/*
 * Footer — ana səhifə istisna olmaqla bütün səhifələr (ana səhifə üçün bax
 * css/footer-home.css): CTA sətri ("İnkişafınızı...") + marka (loqo+təsvir+
 * sosial) sütunu + 3 link sütunu, Figma dev-mode CSS-i əsasında.
 */

/* Əvvəl burada #f5f5f5 fon + 40px üst padding var idi (köhnə "boz sahədə ağ kart" dizaynının
   qalığı) — səhifə fonu #f7f7f9 olduğu üçün footer-in üstündə 40px-lik rəng zolağı görünürdü.
   Götürüldü; footer-ə qədər məsafəni .page-main verir (bax css/main.css). */
.site-footer {
  padding: 0;
}

.site-footer__inner {
  /* Ağ fon hər ekranda tam en; məzmunun eni main.css-dəki yan padding ilə 1280px-ə məhdudlaşır */
  width: 100%;
  padding: 64px 80px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 48px;
  box-sizing: border-box;
}

/* --- CTA sətri --- */
.site-footer__cta {
  display: flex;
  align-items: center;
  gap: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid #e9eff3;
}

.site-footer__cta-title {
  flex: 1;
  min-width: 0;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 36px;
  line-height: 150%;
  letter-spacing: 0.01em;
  color: var(--color-heading);
}

.site-footer__cta-button {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Ana səhifə hero-dakı "Daha çox öyrən" (.btn.btn--outline, hero.css) ilə eyni */
  box-sizing: border-box;
  min-width: 190px;
  height: 48px;
  padding: 12px 24px;
  gap: 10px;
  background: transparent;
  border: 1px solid var(--color-nav-active);
  border-radius: 20px;
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 18px;
  line-height: 24px;
  color: var(--color-nav-active);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.site-footer__cta-button:hover {
  background: #e3effb;
  border-color: #2386c8;
  color: #2386c8;
}

/* --- Sütunlar: marka + 3 link sütunu --- */
.site-footer__columns {
  display: flex;
  align-items: flex-start;
  gap: 64px;
  flex-wrap: wrap;
}

.site-footer__brand {
  flex: 0 0 399px;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.site-footer__brand .site-footer__logo {
  display: flex;
  align-items: center;
}

.site-footer__brand .site-footer__logo img {
  width: 154px;
  height: 36px;
  object-fit: contain; /* admindən yüklənən loqo təhrif olunmasın */
  object-position: left center;
  display: block;
}

.site-footer__brand-text {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 16px;
  line-height: 150%;
  color: #364153;
  max-width: 349px; /* Figma: width 349px — max-width ki, dar ekranda sıxılsın */
}

/* Figma: marka 399px sabit, 3 link sütunu qalan sahəni bərabər bölür (flex-grow:1, 1280px-də
   229.67px), hamısının arasında eyni 64px gap */
.site-footer__col {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 117px;
}

.site-footer__col-title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-nav-active);
  margin-bottom: 12px;
}

.site-footer__links,
.site-footer__contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
}

.site-footer__links a,
.site-footer__contact li {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 16px;
  line-height: 20px;
  letter-spacing: 0.01em;
  color: #364153;
}

.site-footer__links a:hover {
  color: var(--color-nav-active);
}

/* --- Sosial ikonlar --- */
.site-footer__socials {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-footer__social {
  width: 50px;
  height: 50px;
  border-radius: 50px;
  background: #f6f6f6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-heading);
  flex-shrink: 0;
}

.site-footer__social svg {
  width: 24px;
  height: 24px;
}

/* Sosial ikonların hover-i (Figma variantları: normalda 24px #05243C, hover-də 36px
   brend rəngində). Kəsim dəyərləri faizlədir ki, hər ikon ölçüsündə (24/20/18/16px) düz
   işləsin: ikon path-ləri 24-lük viewBox-da 0..23.04 sahəsini tutur. Instagram qradiyenti
   hər səhifənin footer SVG-sindəki <radialGradient id="ig-grad">-dir. */
.site-footer__social {
  color: #05243c;
}

.site-footer__social svg {
  transform-origin: center;
  /* yavaş, sıçrayışsız ease-out; fon rəngi (ağ/mavi) də tədricən görünsün */
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.5s ease;
}

.site-footer__social path {
  transition: fill 0.5s ease;
}

.site-footer__social:hover svg {
  transform: scale(1.5);
}

/* Instagram: qradiyent kvadrat, ağ kontur/dairə/nöqtə (ağ fon path-in boşluqlarından görünür) */
.site-footer__social[aria-label="Instagram"]:hover svg {
  background: #fff;
  clip-path: inset(0 4% 4% 0 round 25%);
}
.site-footer__social[aria-label="Instagram"]:hover svg path {
  fill: url(#ig-grad);
}

/* Facebook: mavi dairə, ağ "f" */
.site-footer__social[aria-label="Facebook"]:hover svg {
  background: #fff;
  clip-path: circle(48% at 48% 48%);
}
.site-footer__social[aria-label="Facebook"]:hover svg path {
  fill: #0866ff;
}

/* YouTube: qırmızı düymə, ağ üçbucaq */
.site-footer__social[aria-label="YouTube"]:hover svg {
  background: #fff;
  clip-path: inset(16.4% 4% 16.4% 0 round 18%);
}
.site-footer__social[aria-label="YouTube"]:hover svg path {
  fill: #ff0302;
}

/* LinkedIn: mavi kvadrat, ağ "in" */
.site-footer__social[aria-label="LinkedIn"]:hover svg {
  background: #0a66c2;
  border-radius: 12%;
}
.site-footer__social[aria-label="LinkedIn"]:hover svg path {
  fill: #fff;
}

/* --- Alt sətir --- */
.site-footer__bottom {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 32px;
  padding-top: 24px;
  border-top: 1px solid #e9eff3;
}

.site-footer__privacy,
.site-footer__bottom span {
  font-family: var(--font-heading);
  font-size: 14px;
  color: var(--color-text-secondary);
}

.site-footer__privacy {
  text-decoration: none;
}

.site-footer__privacy:hover {
  color: var(--color-nav-active);
}

/* Desktop (Figma "bottom" sətri): sosial ikonlar solda, copyright sağda, eyni hizada.
   Markup-da ikonlar marka sütununun içindədir (mobil grid onu loqonun yanına qoyur), ona görə
   HTML dəyişmədən ikonlar alt sətrin sol kənarına mütləq mövqelə köçürülür. */
@media (min-width: 961px) {
  .site-footer__inner {
    position: relative;
  }

  .site-footer__socials {
    position: absolute;
    left: max(var(--page-pad-x), calc((100% - 1280px) / 2)); /* main.css-dəki yan padding ilə eyni */
    bottom: 64px; /* .site-footer__inner-in alt padding-i */
    height: 50px;
  }

  .site-footer__bottom {
    min-height: 50px; /* ikonların hündürlüyü — copyright onların mərkəzinə düşür */
    padding-top: 0;
    border-top: none;
  }
}

@media (max-width: 1100px) {
  .site-footer__cta {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .site-footer__brand {
    flex: 1 1 100%;
  }
}

@media (max-width: 960px) {
  .site-footer__inner {
    padding: 40px 24px 32px;
  }

  .site-footer__cta-title {
    font-size: 28px;
  }

  .site-footer__columns {
    gap: 32px;
  }

  .site-footer__bottom {
    justify-content: flex-start;
  }
}

/*
 * Figma mobil (390px) dizaynı. Sıra: CTA (başlıq + tam-en düymə, altında xətt) →
 * [loqo | sosial ikonlar] → [Fəaliyyətlər | Qalerya] → Bizimlə əlaqə → copyright.
 * Loqo və sosial ikonlar .site-footer__brand-ın içindədir — brand "display:contents"
 * ilə açılır, .site-footer__columns grid-ə çevrilir. Təsvir mətni mobil dizaynda yoxdur.
 */
@media (max-width: 600px) {
  .site-footer {
    padding: 0;
  }

  .site-footer__inner {
    padding: 40px 20px;
    gap: 24px;
  }

  /* --- CTA --- */
  .site-footer__cta {
    gap: 32px;
    padding-bottom: 0;
    margin-bottom: 56px; /* CTA → loqo sətri cəmi 80px */
  }

  .site-footer__cta-title {
    font-size: 20px;
    line-height: 150%;
    color: #0f2942;
  }

  .site-footer__cta-button {
    /* hero.css mobil .btn--outline ilə eyni: tam en, 16px semibold */
    align-self: stretch;
    width: 100%;
    font-size: 16px;
    font-weight: 600;
    border-color: #2386c8;
    color: #2386c8;
  }

  /* --- Loqo, sosial ikonlar, sütunlar --- */
  .site-footer__columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "logo socials"
      "col1 col2"
      "col3 col3";
    row-gap: 24px;
    column-gap: 0;
  }

  .site-footer__brand {
    display: contents;
  }

  .site-footer__brand-text {
    display: none;
  }

  .site-footer__brand .site-footer__logo {
    grid-area: logo;
    margin-bottom: 24px; /* loqo sətri → sütunlar cəmi 48px */
  }

  .site-footer__brand .site-footer__logo img {
    width: auto;
    height: 32px;
  }

  .site-footer__socials {
    grid-area: socials;
    justify-self: end;
    gap: 8px;
    margin-bottom: 24px;
  }

  .site-footer__social {
    width: 40px;
    height: 40px;
    background: #f3f4f6;
  }

  .site-footer__social svg {
    width: 16px;
    height: 16px;
  }

  .site-footer__col:nth-child(2) {
    grid-area: col1;
  }

  .site-footer__col:nth-child(3) {
    grid-area: col2;
    justify-self: end;
    width: 160px;
  }

  .site-footer__col:nth-child(4) {
    grid-area: col3;
  }

  .site-footer__col-title {
    line-height: 18px;
    color: #2386c8;
  }

  .site-footer__links a,
  .site-footer__contact li {
    line-height: 20px;
    color: #364153;
  }

  /* --- Alt sətir --- */
  .site-footer__bottom {
    justify-content: space-between;
    gap: 16px;
    padding-top: 0;
    border-top: none;
  }

  .site-footer__privacy,
  .site-footer__bottom span {
    line-height: 140%;
    color: #0f2942;
  }
}
