/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body Styling */
body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: #f4f4f9;
  color: #1a1a1a; /* Improved contrast: #333 -> #1a1a1a (WCAG AA compliant) */
  padding: 20px;
  margin: 0;
}

/* Responsive body padding */
@media (max-width: 768px) {
  body {
    padding: 12px;
  }
}

@media (max-width: 576px) {
  body {
    padding: 8px;
  }
}

/* Container for Profiles */
.profile-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

/* Individual Profile Card */
.profile-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  width: 300px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

/* Profile Image */
.profile-card img {
  width: 100%;
  height: auto;
  border-bottom: 1px solid #ddd;
}

/* Profile Info */
.profile-card .profile-info {
  padding: 15px;
}

.profile-card .profile-info h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #444;
}

.profile-card .profile-info p {
  font-size: 1rem;
  color: #404040; /* Improved contrast: #666 -> #404040 (WCAG AA compliant) */
  margin-bottom: 10px;
}

/* Button */
.profile-card .profile-info a {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 15px;
  background-color: #007bff;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.profile-card .profile-info a:hover {
  background-color: #0056b3;
}
body
 {
      font-family: Arial, sans-serif;
      margin: 0;
      padding: 0;
      line-height: 1.6;
    }
    header {
      background: #004080;
      color: #fff;
      padding: 1rem 0;
      text-align: center;
    }
    nav {
      background: #003366;
      color: #fff;
      display: flex;
      justify-content: center;
      padding: 0.5rem 0;
    }
    nav a {
      color: #fff;
      margin: 0 1rem;
      text-decoration: none;
    }
    nav a:hover {
      text-decoration: underline;
    }
    .container {
      padding: 2rem;
    }
     .teachers {
      margin: 2rem 0;
    }
     .teachers h2 {
      color: #004080;
    }
     .teacher {
      border: 1px solid #ddd;
      border-radius: 5px;
      padding: 1rem;
      margin: 1rem 0;
    }
    footer {
      background: #004080;
      color: #fff;
      text-align: center;
      padding: 1rem 0;
      margin-top: 2rem;
    }
    /* End of stylesheet */

/* Plans: grid layout and clickable card styles */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 1rem;
}

.plan {
  display: block;                 /* anchor becomes full card */
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 220ms ease, box-shadow 220ms ease;
  cursor: pointer;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 6px 18px rgba(16,24,40,0.06);
  border: 1px solid rgba(16,24,40,0.04);
  position: relative;
  min-height: 140px;
  padding: 18px 16px;
}

.plan:focus-visible {
  outline: 3px solid rgba(0,120,255,0.18);
  outline-offset: 4px;
}

.plan:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 40px rgba(16,24,40,0.12);
}

/* Plan content */
.plan-body h3 {
  margin: 0 0 8px 0;
  font-size: 1.25rem;
  color: #012a4a;
}

.plan-body .desc {
  margin: 0 0 12px 0;
  color: #2d3d52; /* Improved contrast: #405770 -> #2d3d52 (WCAG AA compliant) */
  font-size: 0.95rem;
  line-height: 1.35;
}

.plan-body .price {
  margin-top: auto;
  font-weight: 700;
  color: #0b6cf5;
  background: rgba(11,108,245,0.06);
  display: inline-block;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.95rem;
}

/* Responsive plans grid */
@media (max-width: 992px) {
  .plans-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}

@media (max-width: 768px) {
  .plans-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .plan {
    padding: 16px;
  }
}

@media (max-width: 600px) {
  .plans-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  
  .plan {
    padding: 14px;
  }
}

/* ...existing code... */
/* ...existing code... */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* two cards per row */
  gap: 20px;
  margin: 1rem auto 0;
  max-width: 1000px;
  align-items: start;
  width: 100%;
}

/* Responsive plans grid - handled in comprehensive media queries below */
/* ...existing code... */

/* Ensure grid shows two cards per row and allow items to shrink */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* two per row on wider screens */
  gap: 20px;
  margin: 1rem auto 0;
  max-width: 1000px;
  width: 100%;
  align-items: start;
}

/* allow items to shrink inside grid columns */
.plan {
  min-width: 0;
  display: block;
}

/* Responsive plans grid - consolidated styles above */

/* ...existing code... */
/* ...existing code... */
/* ...existing code... */

/* ...existing code... */

/* Header layout: logo left, centered branding + buttons in middle */
header.site-header {
  position: relative; /* enable absolutely positioned children */
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 20px;
  background: #FFFFFF;
  color: #004080;
  min-height: 72px; /* ensures enough vertical space for centered content */
}

/* Logo column (fixed) */
.header-left {
  position: relative;
  z-index: 30;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

/* Center the words to the viewport (ignores logo width) */
.header-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%); /* center horizontally + vertically within header */
  width: min(900px, 80%); /* limits line length */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  z-index: 20;
  pointer-events: none; /* prevents accidental clicks on the centered area (nav/buttons moved out) */
}

/* Allow interactive children (if any) to receive pointer events */
.header-center .branding,
.header-center .branding * {
  pointer-events: auto;
}

/* Ensure centered branding is clearly visible on the white header */
.header-center .branding,
.header-center .branding h1,
.header-center .branding p {
  color: #004080; /* blue text on white header background */
  text-shadow: none; /* Remove text shadow on white background */
}

/* Responsive: tablet and mobile improvements */
@media (max-width: 1024px) {
  header.site-header {
    padding: 14px 18px;
    padding-right: 70px; /* Make room for hamburger menu */
    min-height: 68px;
  }
  
  .header-center {
    width: min(85%, calc(100% - 160px)); /* Account for logo and hamburger */
    max-width: 800px;
  }
  
  .site-logo {
    width: 72px;
    max-height: 56px;
    filter: drop-shadow(0 10px 20px rgba(0,64,128,0.16));
  }
}

/* Show header-center on tablets (481px-768px) with proper spacing */
@media (max-width: 768px) and (min-width: 481px) {
  .header-center {
    display: block !important;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    max-width: calc(100% - 120px); /* Account for logo and hamburger */
    pointer-events: none;
    padding: 0 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    z-index: 20;
  }
  
  .header-center .branding h1 {
    font-size: 0.85rem;
    line-height: 1.2;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  .header-center .branding p {
    display: none;
  }
}

@media (max-width: 768px) {
  header.site-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    padding: 12px 16px;
    padding-right: 70px; /* Make room for hamburger menu (44px + 16px padding + 10px gap) */
    position: relative;
  }
  
  .header-left {
    flex: 0 0 auto;
    z-index: 35;
    min-width: 0;
    display: flex;
    align-items: center;
  }
  
  /* Hide user section on homepage mobile to prevent overlap */
  body.homepage .header-user-section {
    display: none !important;
  }
  
  /* Hide header-center text on mobile to prevent overlap - show only logo and hamburger */
  .header-center {
    display: none !important;
  }
  
  .site-nav {
    display: none; /* Hide nav buttons on mobile - use hamburger menu */
  }
  
  .site-logo {
    width: 52px;
    max-height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0,64,128,0.16));
  }
}

/* Responsive: very small screens - stack layout */
@media (max-width: 480px) {
  header.site-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
    padding: 10px 14px;
    padding-right: 64px; /* Make room for hamburger menu (44px + 14px padding + 6px gap) */
    position: relative;
  }
  
  .header-left {
    flex: 0 0 auto;
    min-width: 0;
    display: flex;
    align-items: center;
  }
  
  /* Hide user section on homepage mobile to prevent overlap */
  body.homepage .header-user-section {
    display: none !important;
  }
  
  /* Hide header-center text on mobile to prevent overlap */
  .header-center {
    display: none !important;
  }
  
  .site-logo {
    width: 48px;
    max-height: 36px;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0,64,128,0.16));
  }
}

/* ...existing code... */
/* ...existing code... */
/* Logo sizing and header-left alignment override */
.header-left {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding-right: 12px; /* space between logo and center column */
}

.site-logo {
  width: 84px;        /* ideal desktop size */
  max-width: 100%;
  height: auto;
  max-height: 56px;   /* prevents very tall logos from stretching header */
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0,64,128,0.16));
  display: block;
  border-radius: 6px;
  margin: 0;
  align-self: center;
}

/* Logo responsive sizes handled in header media queries above */

/* Remove header-nav rules (override if present) */
.header-nav { display: none !important; }

/* Centered / secondary nav used across the header */
.site-nav {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-right: 16px;
  background: transparent;
  border: none;
  box-shadow: none;
}

/* Polished pill-style links used across header and site navigation.
   These provide good contrast, keyboard focus, and scale responsively. */
.site-nav a,
.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;              /* even more compact */
  font-size: 0.85rem;
  line-height: 1;
  height: 34px;                  /* slightly smaller compact height */
  min-width: 0;                  /* allow shrinking */
  max-width: 140px;              /* prevent overly wide pills */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #06385a;                /* accessible dark-blue text */
  background: rgba(255,255,255,0.98); /* slightly translucent for depth */
  border: 1px solid rgba(6,56,90,0.06);
  border-radius: 10px;           /* reduced radius for sleeker look */
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 5px 12px rgba(2,6,23,0.045); /* slightly lighter shadow */
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

/* icon styling inside nav buttons */
.nav-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  flex: 0 0 16px;
}
.nav-label {
  display: inline-block;
  margin-left: 6px;
}

/* Hover and keyboard focus styles (use :focus-visible for accessibility) */
.site-nav a:hover,
.nav-btn:hover {
  transform: translateY(-3px);
  background: #f1faff;
  box-shadow: 0 12px 30px rgba(2,6,23,0.10);
}
.site-nav a:focus-visible,
.nav-btn:focus-visible {
  outline: 3px solid rgba(3,120,255,0.16);
  outline-offset: 4px;
}

.nav-btn:active,
.site-nav a:active {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(2,6,23,0.09);
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .site-nav a,
  .nav-btn,
  .plan,
  .profile-card {
    transition: none !important;
  }
}

/* Teachers grid: place immediately under header, responsive cards with photos */
.teachers {
  padding: 18px 20px;
  background: transparent;
}
.teachers h2 {
  color: #012a4a;
  margin-bottom: 12px;
  font-size: 1.5rem;
}
.teachers-grid {
   display: grid;
   grid-template-columns: repeat(4, 1fr);
   gap: 18px;
   align-items: start;
   max-width: 1100px;
   margin: 0 auto 12px;
 }
.teacher-card {
  background: #fff;
  border: 1px solid rgba(2,6,23,0.06);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(2,6,23,0.04);
  transition: transform 180ms ease, box-shadow 180ms ease;
  display: flex;
  flex-direction: column;
}
.teacher-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(2,6,23,0.07);
}
.teacher-card img {
  width: 100%;
  height: auto;
  display: block;
}
.teacher-info {
  padding: 12px 14px 16px;
}
.teacher-info h3 {
  margin: 0 0 6px 0;
  font-size: 1.05rem;
  color: #06385a;
}
.teacher-info p {
  margin: 0;
  color: #2d3a47; /* Improved contrast: #465a6b -> #2d3a47 (WCAG AA compliant) */
  font-size: 0.95rem;
}

/* Responsive teachers grid */
@media (max-width: 1200px) {
   .teachers-grid {
       grid-template-columns: repeat(3, 1fr);
       gap: 16px;
   }
 }

@media (max-width: 992px) {
   .teachers-grid {
       grid-template-columns: repeat(2, 1fr);
       gap: 14px;
   }
   
   .teachers h2 {
       font-size: 1.3rem;
   }
 }

@media (max-width: 768px) {
   .teachers {
       padding: 14px 16px;
   }
   
   .teachers h2 {
       font-size: 1.2rem;
       margin-bottom: 10px;
   }
   
   .teachers-grid {
       grid-template-columns: repeat(2, 1fr);
       gap: 12px;
   }
   
   .teacher-card {
       border-radius: 8px;
   }
   
   .teacher-info {
       padding: 10px 12px 12px;
   }
   
   .teacher-info h3 {
       font-size: 1rem;
   }
   
   .teacher-info p {
       font-size: 0.9rem;
   }
 }

 @media (max-width: 576px) {
   .teachers {
       padding: 12px 14px;
   }
   
   .teachers h2 {
       font-size: 1.1rem;
   }
   
   .teacher-card img { 
       height: auto; 
   }
   
   .teachers-grid {
       grid-template-columns: 1fr;
       gap: 14px;
   }
   
   .teacher-info {
       padding: 12px 14px 14px;
   }
 }
 /* Mobile-specific rules were moved to `mobile.css` for separation. */