/*
 * footer.css - Nottworks Child Theme
 *
 * Light Warm-White Footer with Subtle Blue Top Wave Divider
 * 5 Columns, strictly no newsletter.
 */

.nw-footer {
  background-color: var(--color-warm-white, #F5F3EE);
  position: relative;
  padding-top: 48px;
  padding-bottom: 32px;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
}

.nw-footer__waves-decor,
.nw-footer__wave {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 48px;
  transform: translateY(-100%);
  pointer-events: none;
  overflow: hidden;
  line-height: 0;
}

.nw-footer__waves-decor svg,
.nw-footer__wave svg {
  width: 100%;
  height: 100%;
  display: block;
}

.nw-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1.5fr;
  gap: clamp(1.5rem, 3vw, 3rem);
  margin-bottom: clamp(3rem, 5vw, 4.5rem);
}

.nw-footer__logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: var(--space-4);
  text-decoration: none;
  border-radius: var(--radius-sm, 6px);
  outline: none;
  border: none;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
}

.nw-footer__logo:focus:not(:focus-visible),
.nw-footer__logo:active {
  outline: none !important;
  outline-style: none !important;
  box-shadow: none !important;
  border: none !important;
  background: transparent !important;
}

.nw-footer__logo:focus-visible {
  outline: 2px solid var(--color-ink-navy, #111827) !important;
  outline-style: solid !important;
  outline-width: 2px !important;
  outline-color: var(--color-ink-navy, #111827) !important;
  outline-offset: 3px !important;
  border-radius: var(--radius-sm, 6px) !important;
  box-shadow: none !important;
  background: transparent !important;
}

.nw-footer__logo-img {
  height: 28px;
  width: auto;
  max-width: 145px;
  display: block;
  object-fit: contain;
  transition: opacity 0.2s ease;
  outline: none !important;
  border: none !important;
}

.nw-footer__logo:hover {
  background: transparent !important;
  outline: none !important;
  border: none !important;
}

.nw-footer__logo:hover .nw-footer__logo-img {
  opacity: 0.85;
}

.nw-footer__tagline {
  font-size: var(--text-xs);
  color: var(--color-steel);
  line-height: var(--leading-relaxed);
  max-width: 280px;
  margin-bottom: var(--space-5);
}

.nw-footer__social {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nw-footer__social-btn {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  border-radius: var(--radius-md, 10px);
  background: #ffffff;
  border: 1px solid rgba(17, 24, 39, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-ink-navy);
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.04);
  transition: all 0.2s ease;
}

.nw-footer__social-btn:hover {
  background: var(--color-ink-navy);
  color: #ffffff;
  border-color: var(--color-ink-navy);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.12);
}

.nw-footer__social-btn:focus-visible {
  outline: 2px solid var(--color-accent-blue);
  outline-offset: 2px;
}

.nw-footer__title,
.nw-footer__accordion-btn {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-ink-navy);
  margin-bottom: var(--space-4);
  letter-spacing: -0.01em;
  background: transparent;
  border: none;
  padding: 0;
  text-align: left;
  width: 100%;
  cursor: default;
  pointer-events: none;
}

/* Accordion icons hidden on desktop */
.nw-footer__col-icon,
.nw-footer__chevron {
  display: none !important;
}

.nw-footer__accordion-content {
  display: block !important;
}

.nw-footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nw-footer__list a {
  font-size: var(--text-xs);
  color: var(--color-steel);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-block;
}

.nw-footer__list a:hover {
  color: var(--color-accent-blue);
  transform: translateX(2px);
}

.nw-footer__contact-sub {
  font-size: var(--text-xs);
  color: var(--color-steel);
  line-height: var(--leading-normal);
  margin-bottom: var(--space-4);
}

.nw-footer__contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nw-footer__contact-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-xs);
  color: var(--color-steel);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
  line-height: 1.4;
}

.nw-footer__contact-link:hover {
  color: var(--color-accent-blue);
  transform: translateX(2px);
}

.nw-footer__contact-link .nw-whatsapp-icon,
.nw-footer__contact-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--color-steel);
  transition: color 0.2s ease;
}

.nw-footer__contact-link:hover .nw-footer__contact-icon,
.nw-footer__contact-link:hover .nw-whatsapp-icon {
  color: var(--color-accent-blue);
}

.nw-footer__location {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--text-xs);
  color: var(--color-steel);
  margin-top: 0;
  padding-left: 0;
  line-height: 1.45;
}

.nw-footer__location span {
  display: block;
  line-height: 1.5;
}

.nw-footer__location svg,
.nw-footer__location .nw-footer__contact-icon {
  width: 16px;
  height: 16px;
  color: var(--color-steel);
  flex-shrink: 0;
  margin-top: 2px;
}

.nw-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-6);
  border-top: 1px solid rgba(17, 24, 39, 0.06);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.nw-footer__copyright {
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 0;
}

.nw-footer__legal-links {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  color: #94a3b8;
}

.nw-footer__legal-links a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nw-footer__legal-links a:hover {
  color: var(--color-ink-navy);
}

@media (max-width: 1024px) and (min-width: 769px) {
  .nw-footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .nw-footer__col--brand {
    grid-column: span 2;
  }
}

/* =============================================================================
   MOBILE RESPONSIVE (max-width: 768px)
   Concept B: Dark Ink Navy (#111827) Footer with Dark Accordion Cards
   STRICTLY MOBILE ONLY
   ============================================================================= */

@media (max-width: 768px) {
  .nw-footer {
    background-color: var(--color-ink-navy, #111827) !important;
    color: #FFFFFF !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding-top: 32px !important;
    padding-bottom: 76px !important; /* Ensures ~76px clearance so floating back-to-top button NEVER overlaps copyright text or footer content */
  }

  .nw-footer__waves-decor,
  .nw-footer__wave {
    display: none !important;
  }

  .nw-footer__grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important; /* Refined compact gap */
    margin-bottom: 20px !important;
  }

  /* ---------------------------------------------------------------------------
     Brand, Tagline & Social Buttons
     --------------------------------------------------------------------------- */
  .nw-footer__col--brand {
    margin-bottom: 8px !important;
  }

  .nw-footer__logo {
    margin-bottom: 4px !important;
    display: inline-block !important;
  }

  .nw-footer__logo-img {
    height: 26px !important;
    width: auto !important;
    max-width: 130px !important;
    filter: brightness(0) invert(1) !important; /* Pure white vector logo */
  }

  .nw-footer__tagline {
    font-size: 0.8125rem !important; /* 13px */
    line-height: 1.5 !important;
    color: #94A3B8 !important; /* Soft slate/muted gray */
    max-width: 100% !important;
    margin-top: 6px !important;
    margin-bottom: 14px !important;
  }

  .nw-footer__social {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 6px !important;
  }

  .nw-footer__social-btn {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #FFFFFF !important;
    box-shadow: none !important;
    transition: all 0.2s ease !important;
  }

  .nw-footer__social-btn:active {
    background: rgba(0, 163, 224, 0.2) !important;
    border-color: rgba(0, 163, 224, 0.4) !important;
    color: #38BDF8 !important;
  }

  /* Hide separate contact column on mobile (links are inside Şirket accordion) */
  .nw-footer__col--contact {
    display: none !important;
  }

  /* ---------------------------------------------------------------------------
     Dark Accordion Cards (Hizmetlerimiz, Şirket, Yasal)
     Collapsed row height target: approximately 60–65px
     --------------------------------------------------------------------------- */
  .nw-footer__col--accordion {
    background: rgba(255, 255, 255, 0.035) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  }

  .nw-footer__col--accordion.is-open {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(77, 155, 232, 0.28) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25) !important;
  }

  .nw-footer__accordion-btn {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    height: 60px !important;
    min-height: 60px !important;
    max-height: 60px !important;
    padding: 0 16px !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    cursor: pointer !important;
    margin: 0 !important;
    text-align: left !important;
    -webkit-tap-highlight-color: transparent !important;
    user-select: none !important;
    box-sizing: border-box !important;
    pointer-events: auto !important;
  }

  /* Line Icon on Left */
  .nw-footer__col-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 22px !important;
    height: 22px !important;
    color: #38BDF8 !important; /* Cyan accent */
    margin-right: 12px !important;
    flex-shrink: 0 !important;
  }

  .nw-footer__col-icon svg {
    width: 20px !important;
    height: 20px !important;
    stroke: #38BDF8 !important;
  }

  /* Heading Title */
  .nw-footer__title-text {
    font-family: var(--font-heading, 'Manrope', sans-serif) !important;
    font-size: 0.9375rem !important; /* 15px */
    font-weight: 700 !important;
    color: #FFFFFF !important;
    letter-spacing: -0.01em !important;
    flex: 1 !important;
  }

  /* Chevron on Right */
  .nw-footer__chevron {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px !important;
    height: 20px !important;
    color: #94A3B8 !important;
    flex-shrink: 0 !important;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease !important;
  }

  .nw-footer__col--accordion.is-open .nw-footer__chevron {
    transform: rotate(180deg) !important;
    color: #38BDF8 !important;
  }

  /* Collapsible List Container: strictly 0px and zero leakage when collapsed */
  .nw-footer__accordion-content {
    display: none !important;
    overflow: hidden !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .nw-footer__col--accordion.is-open .nw-footer__accordion-content {
    display: block !important;
    animation: nwAccordionFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  }

  @keyframes nwAccordionFadeIn {
    from {
      opacity: 0;
      transform: translateY(-4px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Expanded list uses natural height with compact readable padding */
  .nw-footer__accordion-content > .nw-footer__list {
    min-height: 0 !important;
    overflow: hidden !important;
    padding: 6px 16px 14px 48px !important;
    gap: 8px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .nw-footer__list a {
    font-size: 0.8125rem !important; /* 13px */
    color: #94A3B8 !important;
    padding: 3px 0 !important;
    min-height: auto !important;
    transition: color 0.2s ease, transform 0.2s ease !important;
  }

  .nw-footer__list a:hover,
  .nw-footer__list a:active {
    color: #38BDF8 !important;
    transform: translateX(3px) !important;
  }

  /* ---------------------------------------------------------------------------
     Bottom Copyright & Floating Back-to-Top Clearance
     --------------------------------------------------------------------------- */
  .nw-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding-top: 20px !important;
    margin-top: 10px !important;
    padding-bottom: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 8px !important;
  }

  .nw-footer__copyright {
    font-size: 0.75rem !important;
    line-height: 1.45 !important;
    color: #94A3B8 !important;
    text-align: center !important;
    max-width: calc(100% - 64px) !important; /* Keeps copyright clear of edge */
    margin: 0 auto !important;
  }

  .nw-footer__legal-links {
    display: none !important;
  }

  /* Reposition floating back-to-top button so it stays neat and never overlaps */
  #ast-scroll-top,
  .nw-scroll-top {
    bottom: 16px !important;
    right: 16px !important;
    width: 38px !important;
    height: 38px !important;
    line-height: 38px !important;
  }
}
