/* ================= Footer shell ================= */
.site-footer {
  background: linear-gradient(180deg, var(--brand-navy) 0%, var(--brand-navy-dark) 100%);
  color: rgba(255, 255, 255, 0.85);
  margin-top: 4rem;
}

.footer-top {
  padding: 3.5rem 0 2.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1.4fr;
  gap: 2rem;
}

/* ================= Brand column ================= */
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1.3rem;
  color: #fff;
  text-decoration: none;
  margin-bottom: 0.9rem;
}

.footer-logo:hover {
  color: #fff;
}

/* Slightly smaller than the header mark, and the gold artwork already reads
   against the navy footer so it needs no inversion. */
.footer-logo .brand-logo {
  height: 42px;
  width: auto;
  display: block;
}

.footer-logo .icon {
  width: 26px;
  height: 26px;
  color: var(--brand-gold);
}

.footer-logo .brand-accent {
  color: var(--brand-gold);
}

.footer-tagline {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
  margin-bottom: 1.35rem;
  max-width: 280px;
}

.footer-social {
  display: flex;
  gap: 0.6rem;
}

.social-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.3s ease, color 0.2s ease;
}

.social-btn .icon {
  width: 16px;
  height: 16px;
}

.social-btn:hover {
  background: var(--brand-gold);
  border-color: var(--brand-gold);
  color: #0b1f3a;
  transform: translateY(-3px) rotate(-8deg);
}

/* ================= Link columns (accordion on mobile) ================= */
.footer-col {
  border: none;
}

.footer-col summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
}

.footer-col summary::-webkit-details-marker {
  display: none;
}

.footer-col summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(255, 255, 255, 0.5);
  border-bottom: 2px solid rgba(255, 255, 255, 0.5);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.footer-col[open] summary::after {
  transform: rotate(-135deg);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 0.87rem;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-col a:hover {
  color: var(--brand-gold);
  padding-left: 0.25rem;
  text-decoration: none;
}

/* ================= Newsletter ================= */
.footer-newsletter h3 {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 0.4rem;
}

.footer-newsletter p {
  font-size: 0.83rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 1rem;
}

.newsletter-input-row {
  display: flex;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 0.6rem;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.newsletter-input-row:focus-within {
  border-color: var(--brand-gold);
}

.newsletter-input-row input {
  flex: 1 1 auto;
  min-width: 0;
  background: transparent;
  border: none;
  padding: 0.7rem 0.9rem;
  color: #fff;
  font-size: 0.87rem;
  outline: none;
}

.newsletter-input-row input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.newsletter-input-row button {
  background: var(--brand-gold);
  border: none;
  width: 44px;
  color: #0b1f3a;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.newsletter-input-row button:hover {
  background: var(--brand-gold-bright);
}

.newsletter-input-row button .icon {
  width: 18px;
  height: 18px;
}

.newsletter-feedback {
  font-size: 0.8rem;
  margin: 0.6rem 0 0;
  min-height: 1.1em;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.newsletter-feedback.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.newsletter-feedback.is-success {
  color: #7bd88f;
}

.newsletter-feedback.is-error {
  color: #ff8a80;
}

/* ================= Bottom bar ================= */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1.25rem 0;
}

.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
}

/* Sits between the copyright and the legal links in the bottom bar. Slightly
   brighter than its neighbours because the flag would otherwise look muddy next
   to 55%-opacity text. */
.made-in-bharat {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
}

.made-in-flag {
  width: 21px;
  height: 14px;
  flex-shrink: 0;
  border-radius: 2px;
  /* Hairline edge so the white middle band does not bleed into the navy bar. */
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.footer-legal-links {
  display: flex;
  gap: 1.25rem;
}

.footer-legal-links a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-legal-links a:hover {
  color: var(--brand-gold);
}

/* ================= Back to top ================= */
.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--brand-navy);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(11, 31, 58, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, background-color 0.2s ease;
  z-index: 60;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--brand-gold);
}

.back-to-top .icon {
  width: 20px;
  height: 20px;
}

/* ================= Responsive ================= */
@media (min-width: 992px) {
  .footer-col summary {
    pointer-events: none;
    cursor: default;
  }

  .footer-col summary::after {
    display: none;
  }
}

@media (max-width: 991.98px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-brand,
  .footer-newsletter {
    grid-column: 1 / -1;
  }

  .footer-tagline {
    max-width: none;
  }
}

@media (max-width: 575.98px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  /* Three items in the bottom bar would wrap into a ragged space-between mess
     on a phone, so stack and centre them instead. */
  .footer-bottom-inner {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 0.85rem;
  }

  .back-to-top {
    right: 1rem;
    bottom: 1rem;
    width: 42px;
    height: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-footer * {
    transition: none !important;
  }
}
