/* ==========================================================================
   STEPPING STONE GROUP OF INSTITUTIONS (SSGI)
   Modern Dark Footer Stylesheet (footer.css)
   Based on Modern Reference Architecture:
   - 4-Column Grid (Brand, Top Categories, Quick Links, Contact Info)
   - Rounded Contact Pills & Circular Social Badges
   - Vertical Divider & Dark Separated Copyright Bar
   ========================================================================== */

:root {
  --footer-bg-main: #0387DF;
  --footer-bg-bottom: #026bb2;
  --footer-bg-pill: rgba(255, 255, 255, 0.15);
  --footer-bg-pill-hover: rgba(255, 255, 255, 0.25);
  --footer-bg-icon: rgba(255, 255, 255, 0.22);
  --footer-text-title: #FFFFFF;
  --footer-text-body: #E8F3FD;
  --footer-text-muted: #B9DCFA;
  --footer-border-subtle: rgba(255, 255, 255, 0.18);
  --footer-divider-color: rgba(255, 255, 255, 0.22);
  --footer-accent-hover: #FFFFFF;
  --footer-accent-teal: #00D0B0;
}

/* Site Footer Master Container */
.site-footer {
  background-color: var(--footer-bg-main);
  color: var(--footer-text-body);
  position: relative;
  width: 100%;
  overflow: hidden;
  border-top: 1px solid var(--footer-border-subtle);
  font-family: var(--font-body, 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
}

/* Main Upper Section */
.footer-top {
  padding: 4.5rem 0 3.75rem 0;
}

/* 4-Column Desktop Grid */
.footer-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr 1.35fr;
  gap: 2.5rem;
  align-items: start;
}

/* Column 1: Brand & Social */
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  max-width: fit-content;
}

.footer-logo img {
  height: 52px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

.footer-logo-text {
  display: none; /* Display logo graphic primarily */
}

.footer-description {
  color: var(--footer-text-body);
  font-size: 0.92rem;
  line-height: 1.68;
  margin: 0;
  max-width: 380px;
}

/* Social Media Button Group */
.footer-social-wrap {
  margin-top: 0.5rem;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.footer-social-link {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--footer-bg-pill);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              background-color 0.25s ease,
              color 0.25s ease,
              box-shadow 0.25s ease;
}

.footer-social-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  transition: transform 0.25s ease;
}

.footer-social-link:hover {
  background-color: #FFFFFF;
  color: #0387DF;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.footer-social-link:focus-visible {
  outline: 2px solid var(--footer-accent-hover);
  outline-offset: 3px;
}

/* Column Headings */
.footer-widget-title {
  color: var(--footer-text-title);
  font-family: var(--font-heading, 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 1.5rem 0;
  position: relative;
  line-height: 1.3;
}

/* Navigation Lists (Categories & Quick Links) */
.footer-links-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer-link-item {
  margin: 0;
  padding: 0;
}

.footer-link-item a {
  color: var(--footer-text-body);
  text-decoration: none;
  font-size: 0.935rem;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: color 0.2s ease, transform 0.2s ease;
  line-height: 1.45;
}

.footer-link-item a .footer-chevron {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  stroke: var(--footer-text-muted);
  stroke-width: 2.5;
  transition: stroke 0.2s ease, transform 0.2s ease;
}

.footer-link-item a:hover {
  color: #FFFFFF;
  transform: translateX(3px);
}

.footer-link-item a:hover .footer-chevron {
  stroke: var(--footer-accent-hover);
  transform: translateX(2px);
}

.footer-link-item a:focus-visible {
  outline: 2px solid var(--footer-accent-hover);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Column 4: Contact Info (with subtle vertical divider on desktop) */
.footer-col-contact {
  position: relative;
  border-left: 1px solid var(--footer-divider-color);
  padding-left: 2.25rem;
}

.footer-contact-pills {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

/* Contact Rounded Pill Container */
.footer-contact-pill {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  background-color: var(--footer-bg-pill);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9999px;
  padding: 0.65rem 1.15rem;
  text-decoration: none;
  color: #FFFFFF;
  transition: background-color 0.25s ease,
              border-color 0.25s ease,
              transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.25s ease;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Multi-line address pill softens radius gracefully */
.footer-contact-pill.pill-address {
  border-radius: 22px;
  align-items: flex-start;
  padding: 0.75rem 1.15rem;
}

.footer-pill-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--footer-bg-icon);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.footer-contact-pill.pill-address .footer-pill-icon {
  margin-top: 2px;
}

.footer-pill-icon svg {
  width: 17px;
  height: 17px;
}

.footer-pill-text {
  font-size: 0.885rem;
  font-weight: 500;
  color: #F1F5F9;
  line-height: 1.45;
  word-break: break-word;
  flex: 1;
}

.footer-pill-text a {
  color: #F1F5F9;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-contact-pill:hover {
  background-color: var(--footer-bg-pill-hover);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.footer-contact-pill:hover .footer-pill-icon {
  background-color: #FFFFFF;
  color: #0387DF;
}

.footer-contact-pill:focus-visible {
  outline: 2px solid var(--footer-accent-hover);
  outline-offset: 3px;
}

/* Footer Bottom Bar (Darker, Separated Bar) */
.footer-bottom {
  background-color: var(--footer-bg-bottom);
  border-top: 1px solid var(--footer-border-subtle);
  padding: 1.35rem 0;
  width: 100%;
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
}

.footer-copyright {
  color: var(--footer-text-muted);
  font-size: 0.885rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  margin: 0;
  line-height: 1.6;
}

.footer-copyright a {
  color: #FFFFFF;
  text-decoration: underline;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.footer-copyright a:hover {
  opacity: 0.85;
}

/* ==========================================================================
   Responsive Breakpoints & Layout Adaptations
   Tested for: 1920px, 1440px, 1024px, 768px, 480px, 375px
   ========================================================================== */

/* Large Desktops (1440px - 1920px) */
@media (min-width: 1400px) {
  .footer-grid {
    grid-template-columns: 1.55fr 1fr 1fr 1.45fr;
    gap: 3rem;
  }
  .footer-col-contact {
    padding-left: 2.75rem;
  }
}

/* Medium Desktops & Tablets Landscape (992px - 1199px) */
@media (max-width: 1199px) {
  .footer-grid {
    grid-template-columns: 1.35fr 0.95fr 0.95fr 1.35fr;
    gap: 2rem;
  }
  .footer-col-contact {
    padding-left: 1.75rem;
  }
}

/* Tablet Portrait (768px - 991px) */
@media (max-width: 991px) {
  .footer-top {
    padding: 3.75rem 0 3rem 0;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem 2rem;
  }
  .footer-col-contact {
    border-left: none;
    padding-left: 0;
  }
  .footer-description {
    max-width: 100%;
  }
}

/* Small Tablets & Mobile Devices (under 768px) */
@media (max-width: 767px) {
  .footer-top {
    padding: 3.25rem 0 2.5rem 0;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }
  .footer-col-contact {
    border-left: none;
    padding-left: 0;
  }
  .footer-brand {
    align-items: flex-start;
  }
  .footer-description {
    max-width: 100%;
    font-size: 0.9rem;
  }
  .footer-widget-title {
    margin-bottom: 1.15rem;
    font-size: 1.15rem;
  }
  .footer-contact-pill {
    padding: 0.65rem 1rem;
  }
  .footer-pill-text {
    font-size: 0.85rem;
  }
  .footer-bottom {
    padding: 1.25rem 0;
  }
  .footer-copyright {
    font-size: 0.825rem;
    padding: 0 1rem;
  }
}

/* Extra Small Mobile Viewports (under 400px - e.g. 375px) */
@media (max-width: 399px) {
  .footer-top {
    padding: 2.75rem 0 2rem 0;
  }
  .footer-grid {
    gap: 2rem;
  }
  .footer-social-link {
    width: 35px;
    height: 35px;
  }
  .footer-social-link svg {
    width: 14px;
    height: 14px;
  }
  .footer-contact-pill {
    border-radius: 18px;
    padding: 0.6rem 0.85rem;
    gap: 0.75rem;
  }
  .footer-pill-icon {
    width: 32px;
    height: 32px;
  }
  .footer-pill-icon svg {
    width: 15px;
    height: 15px;
  }
  .footer-pill-text {
    font-size: 0.825rem;
  }
}

/* Reduced Motion Preference Accessibility */
@media (prefers-reduced-motion: reduce) {
  .footer-social-link,
  .footer-social-link svg,
  .footer-link-item a,
  .footer-link-item a .footer-chevron,
  .footer-contact-pill,
  .footer-pill-icon {
    transition: none !important;
    transform: none !important;
  }
}
