/* ============================================================
   FOOTER PREMIUM – Studies Learning
   Concept : "Nuage ancré" — glassmorphism, aéré, poétique
   ============================================================ */

:root {
  --footer-bg: #1a1c3b; /* Deep Indigo */
  --footer-border: rgba(255, 255, 255, 0.08); /* Lighter border for dark bg */
  --footer-text: #94a3b8; /* Muted Blue-Gray */
  --footer-heading: #ffffff; /* Bright White for headings */
  --footer-accent: #0047ff;
  --footer-muted: #cbd5e1; /* Brighter muted for dark mode */
  --footer-link-hover: #ffffff;
  --footer-radius: 0px;
  --footer-blur: 0px;
  --footer-transition: 0.3s ease;
}

/* ── Wrapper ───────────────────────────────────────────────── */
.site-footer {
  position: relative;
  margin-top: 0;
  background: linear-gradient(
    165deg,
    #080b26 0%,
    #0f1338 20%,
    #1a1c3b 45%,
    #1f2350 65%,
    #141740 85%,
    #0a0d2e 100%
  );
  color: var(--footer-text);
  overflow: hidden;
  border-top: 1px solid var(--footer-border);
}

/* Deep radial glow – bottom-right */
.site-footer::before {
  content: "";
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(0, 71, 255, 0.08) 0%,
    rgba(99, 102, 241, 0.04) 30%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

/* Top accent line */
.site-footer::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 71, 255, 0.4),
    transparent
  );
  pointer-events: none;
  z-index: 1;
}

/* ── Upper panel ─────────────────────────────────────── */
.footer-glass {
  position: relative;
  z-index: 1;
  padding: 4rem 0 2.5rem; /* Reduced height */
  background: transparent;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 4rem;
  display: grid;
  grid-template-columns: 1.2fr 1.5fr 1.2fr; /* More balanced columns */
  gap: 4rem; /* Reduced gap to avoid overflow */
  align-items: start;
}

/* ── Column A – Brand ──────────────────────────────────────── */
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 320px; /* Prevent it from pushing other columns */
}

.footer-logo-wrap img,
.footer-logo-img,
.footer-logo-wrap .custom-logo {
  max-width: 60px; /* Kept user preference */
  height: auto;
  display: block;
}

.footer-logo-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.footer-site-name {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--footer-heading);
  letter-spacing: -0.02em;
  white-space: nowrap; /* Keep on one line */
}

.footer-site-name span {
  color: var(--footer-accent);
}

.footer-tagline {
  font-size: 0.9rem; /* Slightly smaller */
  font-weight: 300;
  color: rgba(255, 255, 255, 0.4); /* Dimmer */
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  line-height: 1.4;
}

.footer-description {
  font-size: 0.95rem;
  color: var(--footer-text);
  line-height: 1.8;
  max-width: 32ch;
}

/* ── Column B – Navigation ─────────────────────────────────── */
.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.25rem 2rem;
  align-items: start;
}

.footer-nav-heading {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff; /* White for contrast */
  margin-bottom: 1rem;
  grid-column: 1 / -1;
}

/* Override WP ul */
.footer-nav ul,
.footer-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: contents;
}

.footer-nav ul li,
.footer-nav-list li {
  grid-column: auto;
}

.footer-nav ul li a,
.footer-nav-list li a {
  position: relative;
  display: inline-block;
  font-size: 0.93rem;
  font-weight: 400;
  color: var(--footer-text);
  text-decoration: none;
  padding: 0.35rem 0;
  transition: color var(--footer-transition);
  outline-offset: 4px;
}

/* Underline grow animation */
.footer-nav ul li a::after,
.footer-nav-list li a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--footer-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--footer-transition);
}

.footer-nav ul li a:hover,
.footer-nav-list li a:hover {
  color: var(--footer-accent);
}

.footer-nav ul li a:hover::after,
.footer-nav-list li a:hover::after {
  transform: scaleX(1);
}

/* ── Column C – Right (Newsletter + Social) ────────────────── */
.footer-right {
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
}

/* Newsletter */
.footer-newsletter-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff; /* White for contrast */
  margin-bottom: 0.75rem;
  display: block;
}

.footer-newsletter-form {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03); /* Glassy input */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.35rem 0.35rem 0.35rem 1.25rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
  transition: all var(--footer-transition);
}

.footer-newsletter-form:focus-within {
  border-color: var(--footer-accent);
  box-shadow: 0 8px 25px rgba(0, 71, 255, 0.08);
}

.footer-newsletter-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.9rem;
  color: #fff;
  font-family: inherit;
  outline: none;
}

.footer-newsletter-input::placeholder {
  color: var(--footer-muted);
}

.footer-newsletter-btn {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  border: none;
  background: var(--footer-accent);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--footer-transition);
}

.footer-newsletter-success {
  display: none;
  font-size: 0.85rem;
  color: #10b981;
  margin-top: 0.8rem;
  font-weight: 600;
}

.footer-newsletter-success.visible {
  display: block;
  animation: fadeInSlide 0.4s ease forwards;
}

@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.footer-newsletter-btn:hover {
  background: #2c3fb9;
  transform: translateY(-2px);
}

/* Social icons */
.footer-social-icons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-social-link {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--footer-text);
  text-decoration: none;
  font-size: 1.2rem;
  transition: all var(--footer-transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.footer-social-link:hover {
  transform: translateY(-5px);
  background: var(--footer-accent);
  color: #fff;
  border-color: var(--footer-accent);
}

/* ── Bottom bar ────────────────────────────────────────────── */
.footer-bottom {
  position: relative;
  z-index: 1;
  background: transparent;
  border-top: 1px solid var(--footer-border);
}

.footer-bottom-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-legal-links a {
  font-size: 0.8rem;
  color: var(--footer-muted);
  text-decoration: none;
  transition: color 0.25s ease;
}

.footer-legal-links a:hover {
  color: var(--footer-accent);
}

.footer-copyright {
  font-size: 0.8rem;
  color: var(--footer-muted);
}

.footer-legal-links {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.footer-legal-links a {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.25s ease;
}

.footer-legal-links a:hover {
  color: rgba(255, 255, 255, 0.9);
}

.footer-legal-sep {
  color: rgba(255, 255, 255, 0.2);
  font-size: 0.75rem;
  user-select: none;
}

.footer-copyright {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.38);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
  .footer-right {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .footer-glass {
    padding: 3.5rem 0 2.5rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 0 1.5rem;
  }

  .footer-nav {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-right {
    grid-template-columns: 1fr;
  }

  .footer-description {
    max-width: none;
  }

  .footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 1.25rem 1.5rem;
  }
}

@media (max-width: 400px) {
  .footer-nav {
    grid-template-columns: 1fr;
  }
}
