@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Poppins:wght@700&display=swap');

/* ========================================
   BEM CSS STRUCTURE - Index/Homepage
   Block__Element--Modifier
   ======================================== */

/* ---------- GLOBAL ---------- */

:root {
  --bg: #FFF6E2;
  --header-footer: #FFDEA9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', Arial, sans-serif;
  background-color: #FFF6E2;
  line-height: 1.4;
}

img {
  display: block;
  max-width: 100%;
}

/* ===========================================
   BLOCK: header
   =========================================== */

.header {
  position: sticky;
  top: 0;
  background: #FFDEA9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  z-index: 1200;
  position: relative;
}

.header__title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.header__heading {
  margin: 0;
  font-family: 'Poppins', Arial, sans-serif;
}

.header__logo {
  /* Container for logo link */
}

.header__logo-img {
  height: 60px;
  width: auto;
}

/* ===========================================
   BLOCK: burger
   =========================================== */

.burger {
  width: 30px;
  height: 25px;
  cursor: pointer;
}

.burger__line {
  display: block;
  height: 4px;
  background: purple;
  margin: 5px 0;
  transition: 0.4s;
}

/* Modifier: burger--active */
.burger--active .burger__line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.burger--active .burger__line:nth-child(2) {
  opacity: 0;
}

.burger--active .burger__line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* ===========================================
   BLOCK: sidebar
   =========================================== */

.sidebar {
  position: fixed;
  top: 0;
  left: -260px;
  width: 260px;
  height: 100%;
  background: #F7CE8C;
  padding-top: 80px;
  transition: 0.4s;
  z-index: 1000;
}

/* Modifier: sidebar--active */
.sidebar--active {
  left: 0;
}

.sidebar__link {
  display: block;
  padding: 15px 30px;
  font-size: 22px;
  color: black;
  text-decoration: none;
  transition: 0.3s;
}

.sidebar__link:hover {
  background: #F8B729;
}

/* ===========================================
   BLOCK: overlay
   =========================================== */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  z-index: 800;
  pointer-events: none;
}

/* Modifier: overlay--active */
.overlay--active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ===========================================
   BLOCK: main
   =========================================== */

main {
  padding: 40px 30px;
}

/* ===========================================
   BLOCK: slideshow
   =========================================== */

.slideshow {
  max-width: 900px;
  margin: 40px auto;
  position: relative;
  z-index: 1;
}

.slideshow__slide {
  display: none;
  position: relative;
}

.slideshow__image {
  width: 100%;
  border-radius: 12px;
}

.slideshow__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 16px;
  font-size: 24px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  user-select: none;
  transition: 0.3s;
  text-decoration: none;
}

.slideshow__nav--prev {
  left: 10px;
}

.slideshow__nav--next {
  right: 10px;
}

.slideshow__nav:hover {
  background: rgba(0, 0, 0, 0.6);
}

.slideshow__dots {
  text-align: center;
  margin-top: 15px;
}

.slideshow__dot {
  height: 12px;
  width: 12px;
  margin: 5px;
  background-color: #FF70A6;
  border-radius: 50%;
  display: inline-block;
  cursor: pointer;
  transition: 0.3s;
}

.slideshow__dot:hover,
.slideshow__dot--active {
  background-color: black;
}

/* ===========================================
   BLOCK: content-divider
   =========================================== */

.content-divider {
  height: 2px;
  background: rgba(0, 0, 0, 0.75);
  margin: 0 -22px 28px;
}

/* ===========================================
   BLOCK: forside (homepage cards)
   =========================================== */

.forside-links {
  display: flex;
  flex-direction: column;
  gap: 26px;
  margin-bottom: 30px;
}

.forside-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.forside-card__content {
  display: grid;
  grid-template-columns: 1fr 135px;
  align-items: start;
  gap: 16px;
}

.forside-card__image-link {
  position: relative;
  display: block;
  width: 135px;
  min-width: 135px;
  border-radius: 16px;
  text-decoration: none;
  order: 2;
}

.forside-card__image-shadow {
  position: absolute;
  top: 10px;
  left: -6px;
  width: 100%;
  height: 100%;
  background: #F8B729;
  border-radius: 16px;
  z-index: 0;
}

.forside-card__image {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 16px;
  border: 2px solid #2b193d;
}

.forside-card__text {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 6px;
  order: 1;
}

.forside-card__description {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
}

/* ===========================================
   BLOCK: footer
   =========================================== */

.footer {
  background: #FFDEA9;
  padding: 18px 18px 28px;
  border-top: 2px solid rgba(0, 0, 0, 0.75);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr 70px;
  gap: 18px;
  align-items: start;
}

.footer__text p {
  margin: 0 0 2px;
  font-size: 14px;
  line-height: 1.2;
}

.footer__contact {
  margin-top: 14px;
}

.footer__contact p {
  margin: 0 0 2px;
  font-size: 14px;
  line-height: 1.2;
}

.footer__socials {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}

.footer__social-link {
  display: block;
}

.footer__social-icon {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

/* ===========================================
   RESPONSIVE: Tablet
   =========================================== */

@media (min-width: 768px) {
  .footer__inner {
    grid-template-columns: 1fr 100px;
  }

  .footer__text p,
  .footer__contact p {
    font-size: 18px;
  }

  .footer__social-icon {
    width: 58px;
    height: 58px;
  }
}

/* ===========================================
   RESPONSIVE: Desktop
   =========================================== */

@media (min-width: 1024px) {
  .header {
    padding: 18px 42px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.08);
  }

  .header__heading {
    font-size: 2.2rem;
    letter-spacing: 0.02em;
  }

  .header__logo-img {
    height: 78px;
  }

  .burger {
    display: none;
  }

  .sidebar {
    position: static;
    left: auto;
    width: min(1200px, calc(100% - 80px));
    height: auto;
    margin: 0 auto;
    padding: 12px 16px 18px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .sidebar__link {
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 700;
  }

  .overlay {
    display: none !important;
  }

  main {
    width: min(1200px, calc(100% - 80px));
    margin: 0 auto;
    padding: 28px 0 72px;
  }

  .slideshow {
    max-width: 1200px;
    margin: 12px auto 28px;
  }

  .slideshow__image {
    aspect-ratio: 16 / 7;
    object-fit: cover;
    border-radius: 26px;
  }

  .slideshow__nav {
    padding: 18px 22px;
    font-size: 28px;
  }

  .content-divider {
    margin: 0 0 42px;
  }

  .forside-links {
    gap: 24px;
  }

  .forside-card {
    max-width: 980px;
    margin: 0 auto;
    width: 100%;
    background: rgba(255, 255, 255, 0.45);
    border: 2px solid rgba(43, 25, 61, 0.12);
    border-radius: 28px;
    padding: 32px;
    box-shadow: 0 18px 40px rgba(43, 25, 61, 0.08);
  }

  .forside-card__content {
    grid-template-columns: minmax(0, 1.15fr) 360px;
    gap: 36px;
    align-items: center;
  }

  .forside-card__image-link {
    width: 360px;
    min-width: 360px;
  }

  .forside-card__image-shadow {
    top: 16px;
    left: -12px;
  }

  .forside-card__image {
    border-radius: 22px;
  }

  .forside-card__text {
    gap: 20px;
    padding-top: 0;
  }

  .forside-card__description {
    font-size: 1.5rem;
    line-height: 1.45;
    max-width: 32ch;
  }

  .footer {
    padding: 36px 40px 40px;
  }

  .footer__inner {
    width: min(1200px, 100%);
    margin: 0 auto;
    grid-template-columns: 1fr auto;
    gap: 32px;
    align-items: center;
  }

  .footer__text p,
  .footer__contact p {
    font-size: 1.05rem;
    line-height: 1.45;
  }

  .footer__socials {
    flex-direction: row;
    align-items: center;
    gap: 18px;
  }

  .footer__social-icon {
    width: 52px;
    height: 52px;
  }
}
