/* ============================================
   SS EDUBRIDGE - Combined Components CSS
   Includes: Header + Footer + Base Styles
   ============================================ */

/* ============================================
   CSS Variables
   ============================================ */
:root {
  /* Colors */
  --bg-white: #ffffff;
  --bg-light: #f0fdf4;
  --bg-lighter: #dcfce7;
  --bg-footer: #f8fafc;
  --primary: #16a34a;
  --secondary: #22c55e;
  --accent: #059669;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-smooth: 0.4s ease;

  /* Layout */
  --header-height: 80px;
}

/* ============================================
   Base Reset
   ============================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-white);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  padding-top: var(--header-height);
}

/* ============================================
   Header Component Styles
   ============================================ */
.ss-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: all var(--transition-smooth);
  animation: headerFadeDown 0.6s ease forwards;
  will-change: transform;
  contain: layout style;
}

@keyframes headerFadeDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ss-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 5%;
  /* max-width: 1400px; */
  margin: 0 auto;
  background: white;
  transition: all var(--transition-smooth);
}

.ss-header.scrolled .ss-header-inner {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
  padding: 0.75rem 5%;
  border-radius: 0 0 20px 20px;
}

.ss-logo {
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  flex-direction: column;
}

.ss-logo-tagline {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-secondary);
  -webkit-text-fill-color: var(--text-secondary);
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.ss-nav {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}

.ss-nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition-normal);
  position: relative;
  padding: 0.5rem 0;
}


.ss-nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width var(--transition-normal);
}

.ss-nav-link:hover,
.ss-nav-link.active {
  color: var(--primary);
}

.ss-nav-link:hover::after,
.ss-nav-link.active::after {
  width: 100%;
}

/* Dropdown */
.ss-nav-item {
  position: relative;
}

.ss-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  min-width: 200px;
  box-shadow: var(--shadow-lg);
  border-radius: 12px;
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-normal);
  z-index: 1000;
}

/* Active state */
.ss-dropdown.active {
  /* cursor: pointer; */
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.chevron {
  display: inline-block;
  margin-left: 6px;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.3s ease;
}

/* Rotate to up */
.chevron.rotate {
  transform: rotate(-135deg);
}

.ss-dropdown-link {
  display: block;
  padding: 0.75rem 1.5rem;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background var(--transition-normal);
}

.ss-dropdown-link:hover {
  background: var(--bg-light);
  color: var(--primary);
}

.ss-cta {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  padding: 0.75rem 1.75rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 15px rgba(22, 163, 74, 0.3);
  position: relative;
  overflow: hidden;
}

.ss-cta::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.5s ease;
}

.ss-cta:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(22, 163, 74, 0.4);
}

.ss-cta:hover::before {
  width: 300px;
  height: 300px;
}

.ss-cta:active {
  transform: translateY(0) scale(0.98);
}

.ss-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
  padding: 10px;
  background: none;
  border: none;
}

.ss-hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-normal);
  border-radius: 2px;
}

.ss-hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.ss-hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}

.ss-hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.ss-mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-smooth);
  z-index: 999;
}

.ss-mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ================= MOBILE MENU ================= */

.ss-mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 85%;
  max-width: 360px;
  height: 100vh;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 2rem 1.5rem;
  /* gap: 1rem; */
  transform: translateX(100%);
  transition: transform 0.35s ease;
  z-index: 1000;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
  will-change: transform;
  contain: layout style;
}

.ss-mobile-menu.active {
  transform: translateX(0);
}

/* ================= NAV LINKS ================= */

.ss-mobile-menu .ss-nav-link {
  font-size: 1.1rem;
  padding: 0.75rem 0;
  width: 100%;
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid #f1f1f1;
  transition: color 0.2s ease;
}

.ss-mobile-menu .ss-nav-link:hover {
  color: var(--primary);
}

/* ================= CTA BUTTON ================= */

.ss-mobile-menu .ss-cta {
  margin-top: 1rem;
  padding: 0.9rem 2rem;
  width: 100%;
  text-align: center;
}

/* ================= DROPDOWN ================= */

.ss-mobile-dropdown {
  width: 100%;
}

/* Header */
.ss-mobile-dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  cursor: pointer;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f1f1f1;
}

/* Toggle Arrow */
.ss-mobile-toggle {
  font-size: 0.8rem;
  color: var(--primary);
  transition: transform 0.3s ease;
}

/* Rotate arrow when open */
.ss-mobile-dropdown.open .ss-mobile-toggle {
  transform: rotate(180deg);
}

/* Dropdown Content */
.ss-mobile-dropdown-content {
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  width: 100%;
}

/* Active dropdown */
.ss-mobile-dropdown.open .ss-mobile-dropdown-content {
  max-height: 300px;
  margin-top: 0.5rem;
}

/* Dropdown Links */
.ss-mobile-dropdown-content a {
  display: block;
  padding: 0.6rem 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  padding-left: 10px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.ss-mobile-dropdown-content a:hover {
  color: var(--primary);
}

/* ================= CLOSE BUTTON ================= */

.ss-menu-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  /* WCAG 2.1 AA: minimum 44×44 touch target for finger taps. */
  width: 44px;
  height: 44px;
  background: #f3f4f6;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* X icon */
.ss-menu-close::before,
.ss-menu-close::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 2px;
  background: #333;
}

.ss-menu-close::before {
  transform: rotate(45deg);
}

.ss-menu-close::after {
  transform: rotate(-45deg);
}

.ss-menu-close:hover {
  background: var(--primary);
}

.ss-menu-close:hover::before,
.ss-menu-close:hover::after {
  background: #fff;
}

/* ================= OVERLAY (OPTIONAL) ================= */

.ss-mobile-overlay.active {
  backdrop-filter: blur(5px);
}


/* ============================================
   Footer Component Styles
   ============================================ */
.ss-footer {
  background: var(--bg-footer);
  padding: 4rem 5% 2rem;
  margin-top: auto;
  border-top: 1px solid #e2e8f0;
}

.ss-footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  animation: footerFadeUp 0.6s ease forwards;
  opacity: 0;
  transform: translateY(20px);
}

@keyframes footerFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ss-footer-brand {
  max-width: 300px;
}

.ss-footer-logo {
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  margin-bottom: 1rem;
}

.ss-footer-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.ss-social-links {
  display: flex;
  gap: 0.75rem;
}

.ss-social-link {
  width: 45px;
  height: 45px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-normal);
  border: 1px solid #e2e8f0;
  font-size: 1rem;
}

.ss-social-link:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.ss-footer-column h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  position: relative;
}

.ss-footer-column h4::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 30px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 1px;
}

.ss-footer-column ul {
  list-style: none;
}

.ss-footer-column li {
  margin-bottom: 0.75rem;
}

.ss-footer-column a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all var(--transition-normal);
  position: relative;
  display: inline-block;
}

.ss-footer-column a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--primary);
  transition: width var(--transition-normal);
}

.ss-footer-column a:hover {
  color: var(--primary);
  transform: translateX(3px);
}

.ss-footer-column a:hover::after {
  width: 100%;
}

.ss-footer-contact p {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.ss-footer-contact .ss-contact-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.ss-footer-bottom {
  max-width: 1200px;
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

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

.ss-footer-legal {
  display: flex;
  gap: 1.5rem;
}

.ss-footer-legal a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition-normal);
}

.ss-footer-legal a:hover {
  color: var(--primary);
}

#contactFormWrapper {
  position: sticky;
  top: 100px;
}

/* ============================================
   Responsive Breakpoints
   ============================================ */
@media (max-width: 1024px) {
  .ss-nav {
    gap: 2rem;
  }

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

  .ss-footer-brand {
    grid-column: span 2;
    max-width: 100%;
  }

  .ss-footer-contact {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {

  .ss-nav,
  .ss-header-cta {
    display: none;
  }

  .ss-hamburger {
    display: flex;
  }

  .ss-header-inner {
    padding: 1rem 5%;
  }

  .ss-header.scrolled .ss-header-inner {
    padding: 0.75rem 5%;
  }

  .ss-footer-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    text-align: left;
  }

  .ss-footer-brand {
    grid-column: span 2;
    margin-bottom: 0.5rem;
  }

  .ss-footer-column h4 {
    font-size: 1rem;
  }

  .ss-footer-column h4::after {
    left: 0;
    transform: none;
  }

  .ss-footer-contact {
    grid-column: span 2;
    margin-top: 1rem;
  }

  .ss-footer-contact p {
    justify-content: flex-start;
  }

  .ss-social-links {
    justify-content: flex-start;
  }

  .ss-footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }

  .ss-footer-copyright {
    font-size: 12px;
  }

  .ss-footer-legal a {
    font-size: 11px;
  }

  .ss-footer-legal {
    justify-content: center;
  }
}

@media (max-width: 820px) {
  .hero {
    height: 60vh;
  }

  .about-img {
    margin-top: 40px;
  }
}

@media (max-width: 480px) {
  .ss-logo {
    font-size: 1.25rem;
  }

  .ss-logo-tagline {
    font-size: 0.6rem;
  }

  .ss-footer {
    padding: 3rem 5% 1.5rem;
  }


  .ss-footer-container {
    gap: 2rem;
  }

  .ss-footer-logo {
    font-size: 1.25rem;
  }
}

.ss-logo-img {
  /* max-width: 100%; */
  height: 65px;
  display: block;
}

/* Optional: control logo size in navbar/header */
.ss-logo {
  display: inline-block;
  width: 150px;
  /* adjust as needed */
}

@media (max-width: 768px) {
  .ss-logo {
    width: 120px;
  }
}

@media (max-width: 480px) {
  .ss-logo {
    width: 100px;
  }
}

/* ============================================
   Performance Optimizations
   ============================================ */

/* Disable expensive backdrop-filter on low-end / mobile */
@media (max-width: 768px) {
  .ss-header.scrolled .ss-header-inner {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 255, 255, 0.98);
  }
}

/* GPU-hint for animated elements */
.ss-mobile-menu,
.ss-mobile-overlay,
.ss-dropdown {
  backface-visibility: hidden;
}

/* Skip off-screen rendering for footer (large, below fold) */
.ss-footer {
  content-visibility: auto;
  contain-intrinsic-size: 0 400px;
}