:root {
  --primary: #0d47a1;
  --primary-dark: #08306b;
  --primary-light: #3d6cb9;
  --accent: #e02618;
  --accent-dark: #b71c1c;
  --light: #f8f9fa;
  --dark: #333;
  --text-light: #ffffff;
  --text-dark: #212529;
  --focus-ring: 0 0 0 3px rgba(24, 144, 255, 0.5);
  --transition: all 0.3s ease;
}

/* Reset and base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--dark);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Skip link styles */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: white;
  padding: 8px 16px;
  z-index: 100;
  transition: var(--transition);
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* Focus styles */
a:focus,
button:focus,
[tabindex="0"]:focus {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 4px;
}

/* Visually hidden for screen readers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* ---------- Hero Section ---------- */
.hero-section {
   background: linear-gradient(135deg, #0d47a1 0%, #1976d2 100%);

    padding: 120px 0 100px;
    color: var(--secondary-color);
    position: relative;
    overflow: hid8en;
    height: 80vh;
    padding-top: 50px !important;
}

.hero-section::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 100px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,106.7C1248,96,1344,96,1392,96L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    z-index: 1;
}

.hero-content { position: relative; z-index: 2; }

.hero-section h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    color: white;
}
.hero-section p { 
    font-size: 1.15rem; 
    margin-bottom: 2rem; 
    opacity: .95; 
    color: white;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Buttons (same look, fully fluid) */
.btn-explore, .btn-contact, .btn-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--btn-red);
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    min-width: 160px;
    height: 49px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 18px rgba(255, 45, 32, .3);
}
.btn-explore:hover, .btn-contact:hover, .btn-cta:hover {
    background: var(--btn-red);
    color: #000;
    box-shadow: 0 8px 25px rgba(255, 45, 32, .4);
}

/* Hero Image & Counters */
.hero-image-wrapper {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
  
    box-shadow: 0 25px 70px rgba(0,0,0,.3);
}
.hero-main-img {
    width: 100%;
    height: auto;
    height: 100%;
    display: block;
    transition: transform .4s ease;
}
.hero-image-wrapper:hover .hero-main-img { transform: scale(1.05); }

/* Desktop absolute counters */
.hero-counter {
    position: absolute;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(8px);
    padding: 12px 16px;
    min-width: 130px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    z-index: 20;
    font-weight: 700;
}
.students-counter { top: 10%; right: -2%; }
.courses-counter  { top: 55%; right: 77%; }

.hero-counter h3 {
    font-size: 2.8rem !important;
    font-weight: 700;
    line-height: 1;
    margin: 0;
    color: #1e40af;
}
.hero-counter p {
    font-size: .85rem;
    margin-top: 4px;
    color: #1e40af;
    font-weight: 500;
    letter-spacing: .5px;
}
.courses-counter h3 { font-size: 2.4rem !important; }

/* Mobile counters (stacked) */
.hero-counters-mobile {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}
.hero-counters-mobile .hero-counter {
    position: static;
    flex: 1 1 130px;
}


/* Mobile adjustments */
@media (max-width: 767px) {
  .hero-section {
    padding: 80px 0 60px;
    margin-left: -15px;
    margin-right: -15px;
    width: calc(100% + 30px);
    height: 141vh;
  }
  
  .hero-content {
    padding: 0 15px;
  }
  
  .hero-content h1 {
    font-size: 2.2rem !important;
    margin-bottom: 1.2rem;
  }
  
  .hero-content p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  /* Adjust counter boxes for mobile */
  .counter-box {
    position: relative !important;
    margin: 15px auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    width: 274px;
  }
  
  .counter-box.students,
  .counter-box.courses {
    position: relative;
    display: inline-block;
    margin: 10px !important;
  }
  
  .hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  
  .btn-explore,
  .btn-contact {
    width: 100%;
    margin: 5px 0 !important;
  }
}

.hero-section::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,106.7C1248,96,1344,96,1392,96L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
  background-size: cover;
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.counter-box {
  background: #fff;
  color: var(--primary);
  padding: 1.5rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
  text-align: center;
  position: absolute;
  min-width: 140px;
}

.counter-box.students {
  top: 20%;
  right: -10%;
}

.counter-box.courses {
  bottom: 20%;
  left: -4%;
}

.counter-box h3 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0;
}

.counter-box p {
  margin: .5rem 0 0;
  font-weight: 600;
}

/* ---------- Buttons ---------- */
.btn-explore,
.btn-contact,
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e02618;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  min-width: 160px;
  height: 49px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-explore:hover,
.btn-contact:hover,
.btn-cta:hover,
.btn-explore:focus,
.btn-contact:focus,
.btn-cta:focus {
  background: var(--accent-dark);
  color: var(--text-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(224, 38, 24, 0.4);
  outline: none;
}

.btn-explore:focus-visible,
.btn-contact:focus-visible,
.btn-cta:focus-visible {
  box-shadow: 0 0 0 3px var(--accent), 0 0 0 5px rgba(224, 38, 24, 0.3);
}

/* ---------- Section Title ---------- */
.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: var(--accent);
  margin: .8rem auto 0;
}

/* ---------- Story ---------- */
.story-section {
  padding: 100px 0;
  background: #fff;
}

.story-content p {
  font-size: 1.1rem;
  line-height: 1.9;
  color: #666;
  margin-bottom: 1.5rem;
}

/* ---------- Vision & Mission ---------- */
.vision-mission-section {
  padding: 80px 0;
  background: var(--light);
  position: relative;
}

.vm-box {
  background: #fff;
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
  height: 100%;
  border-left: 5px solid var(--primary);
  transition: var(--transition);
  color: var(--text-light) !important;
}

.vm-box h4 {
  color: var(--text-light) !important;
}

.vm-box:focus-within {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  transform: translateY(-5px);
}

.vm-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--primary), #1976d2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.vm-icon svg {
  width: 35px;
  height: 35px;
  fill: #fff;
}

/* ---------- Principal's Message ---------- */
.principal-section {
  padding: 100px 0;
  background: #fff;
  position: relative;
}

.principal-img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid var(--light);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .1);
}

.principal-message {
  position: relative;
  padding: 2rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.principal-message:focus-within {
  box-shadow: 0 0 0 3px var(--primary), 0 10px 30px rgba(0, 0, 0, 0.1);
}

.signature {
  display: inline-block;
  margin-top: 1.5rem;
  font-weight: 600;
  color: var(--primary);
  position: relative;
  padding-left: 1.5rem;
}

.signature:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Governance ---------- */
.governance-section {
  padding: 80px 0;
  background: var(--light);
}

.gov-card {
  background: #fff;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, .08);
  height: 100%;
  text-align: center;
  color: var(--text-light) !important;
}

.gov-card h5 {
  color: var(--text-light) !important;
}

.gov-card:focus-within {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  transform: translateY(-5px);
}

/* ---------- Core Values ---------- */
.core-values-section {
  padding: 100px 0;
  background: var(--light);
  position: relative;
}

.value-card {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  height: 100%;
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.value-card:hover,
.value-card:focus-within {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(13, 71, 161, 0.1);
}

.value-card:focus-within {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

.value-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--primary) 0%, hsl(212, 80%, 42%) 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  transition: var(--transition);
}

.value-card:hover .value-icon {
  transform: scale(1.1);
}

.value-card h5 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.value-card p {
  color: var(--text-dark);
  opacity: 0.9;
  margin-bottom: 0;
}

/* ---------- Journey & Achievements ---------- */
.journey-section {
  padding: 100px 0;
  background: #fff;
  position: relative;
}

.timeline {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 0;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 6px;
  background-color: var(--primary);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -3px;
  border-radius: 3px;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  width: 50%;
  box-sizing: border-box;
  margin-bottom: 30px;
}

.timeline-item::after {
  content: '';
  position: absolute;
  width: 25px;
  height: 25px;
  background-color: white;
  border: 4px solid var(--primary);
  border-radius: 50%;
  top: 15px;
  z-index: 1;
}

.timeline-item.left {
  left: 0;
}

.timeline-item.right {
  left: 50%;
}

.timeline-item.right::after {
  left: -12px;
}

.timeline-item.left::after {
  right: -12px;
}

.timeline-content {
  padding: 20px 30px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.timeline-item:hover .timeline-content {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.timeline-item:focus-within .timeline-content {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

.timeline-year {
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 5px;
}

.timeline-content h5 {
  margin-top: 0;
  color: var(--primary);
}

/* Achievements Grid */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.achievement-box {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  padding: 30px 20px;
  border-radius: 8px;
  text-align: center;
  transition: var(--transition);
}

.achievement-box:hover,
.achievement-box:focus-within {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(13, 71, 161, 0.3);
}

.achievement-box:focus-within {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.achievement-box h3 {
  font-size: 2.5rem;
  margin: 0 0 10px;
  line-height: 1;
}

.achievement-box p {
  margin: 0;
  font-size: 1.1rem;
  opacity: 0.9;
}

/* ---------- CTA ---------- */
.cta-section {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.cta-section p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: .9;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .timeline::after {
    left: 31px;
  }

  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }

  .timeline-item::before {
    left: 60px;
    border-width: 10px 10px 10px 0;
    border-color: transparent var(--primary) transparent transparent;
  }

  .left::after,
  .right::after {
    left: 15px;
  }

  .right {
    left: 0;
  }
}

@media (max-width: 991px) {
  /* Adjust section padding for tablets */
  .hero-section,
  .story-section,
  .vision-mission-section,
  .core-values-section,
  .journey-section,
  .principal-section,
  .governance-section {
    padding: 70px 0;
  }
  
  .section-title {
    font-size: 2.2rem;
  }
  
  .hero-content h1 {
    font-size: 2.5rem;
  }
}

@media (max-width: 767px) {
  /* Mobile-specific adjustments */
  .hero-section,
  .story-section,
  .vision-mission-section,
  .core-values-section,
  .journey-section,
  .principal-section,
  .governance-section {
    padding: 50px 0;
  }
  
  .section-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem !important;
  }
  
  .hero-content h1 {
    font-size: 2rem !important;
    line-height: 1.2;
  }
  
  /* Full width sections on mobile */
  .row {
    margin-right: -15px;
    margin-left: -15px;
  }
  
  .col-12, .col-sm-12, .col-md-6, .col-lg-4, .col-xl-3 {
    padding-right: 15px;
    padding-left: 15px;
  }
  
  /* Adjust buttons for mobile */
  .btn-explore,
  .btn-contact,
  .btn-cta {
        width: 81%;
        /* margin-left: 55px; */
        margin: 9px 24px !important;
        display: block;
        text-align: center;
  }
  
  /* Adjust timeline for mobile */
  .timeline::after {
    left: 31px;
  }
  
  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }
  
  .timeline-item::before {
    left: 60px;
    border-width: 10px 10px 10px 0;
    border-color: transparent var(--primary) transparent transparent;
  }
  
  .timeline-item.left::after,
  .timeline-item.right::after {
    left: 15px;
  }
  
  .timeline-item.right {
    left: 0;
  }
  
  /* Adjust cards for mobile */
  .value-card,
  .vm-box,
  .gov-card {
    margin-bottom: 20px;
  }
  
  /* Ensure images are responsive */
  img {
    max-width: 100%;
    height: auto;
  }
  
  /* Adjust principal section */
  .principal-img {
    margin: 0 auto 30px;
    display: block;
  }
  
  /* Adjust achievements grid */
  .achievements-grid {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }
  
  .achievement-box {
    padding: 15px 10px;
  }
  
  .achievement-box h3 {
    font-size: 1.8rem;
  }
  
  /* Ensure all sections take full width */
  section > .container {
    padding-left: 0;
    padding-right: 0;
    max-width: 100%;
  }
  
  section > .container > .row {
    margin-left: 0;
    margin-right: 0;
  }
  
  /* Ensure full width for mobile containers */
  .container-fluid,
  .container {
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
    max-width: 100%;
  }
  
  /* Fix for Bootstrap container */
  @media (min-width: 576px) {
    .container {
      max-width: 100%;
    }
  }
  
  /* Fix for hero section full width */
  .hero-section .container {
    padding-left: 15px;
    padding-right: 15px;
  }
}