/* General Reset */
:root{
  --cream: #fff7d7;
  --accent: #f57c00;
  --blue: #00376d;
  --gold: #ffd700;
  --text: #333;    
  --card-bg: #ffffff;
  --muted: #444;
  --shadow: 0 6px 18px rgba(11,118,255,0.06);
  --radius: 12px;
  --maxw: 640px;
  --pad: 20px;
}

/* Hero Slideshow */
.hero {
  position: relative;
  height: 360px;
  overflow: hidden;
  display: flex;
  align-items: flex-end; /* Text bottom side */
  justify-content: center;
  color: white;
  text-align: center;
}

/* Slides container */
.slides {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.slides img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  top: 0;
  left: 0;
}

.slides img.active {
  opacity: 1;
}

/* Gradient overlay */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.2));
  z-index: 1;
}

/* Text container */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 30px 10px 60px;
  animation: fadeIn 1.5s ease-in-out;
}

.hero-content h1 {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  margin-bottom: 10px;
  color: #FF6F0A;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.hero-content p {
  font-weight: 500;
  font-size: 16px;
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  max-width: 1000px;
  color: #e2e8f0;
  letter-spacing: 0.4px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  text-align: center;
  margin: 0 auto;
}

/* Fade-in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ✅ Tablets (max-width: 992px) */
@media (max-width: 992px) {
  .nenasala-section {
    gap: 25px;
    padding: 30px 15px;
  }

  .nenasala-section .card {
    max-width: 500px;
    min-height: auto;
    padding: 25px;
  }

  .nenasala-section h3 {
    font-size: 20px;
  }

  .nenasala-section p {
    font-size: 16px;
  }
}

/* Medium devices (tablets) */
@media (max-width: 768px) {
  .hero {
    height: 300px;
  }

  .hero-content {
    padding: 20px 15px 40px;
  }

  .hero-content h1 {
    font-size: 20px;
  }

  .hero-content p {
    font-size: 14px;
    
  }
}
/* Small devices (phones under 480px) */
@media (max-width: 550px) {
  .hero {
    height: 280px;
  }

  .hero-content {
    padding: 15px 10px 40px;
  }

  .hero-content h1 {
    font-size: 20px;
  }

  .hero-content p {
    font-size: 13px;
    padding: 0 8px;
  }
}

/* Small devices (phones under 480px) */
@media (max-width: 495px) {
  .hero {
    height: 260px;
  }

  .hero-content {
    padding: 10px 10px 20px;
  }

  .hero-content h1 {
    font-size: 16px;
  }

  .hero-content p {
    font-size: 12px;
    padding: 0 8px;
  }
}

/* Small devices (phones under 480px) */
@media (max-width: 490px) {
  .hero {
    height: 260px;
  }

  .hero-content {
    padding: 10px 10px 20px;
  }

  .hero-content h1 {
    font-size: 16px;
  }

  .hero-content p {
    font-size: 12px;
    padding: 0 8px;
  }
}

/* Small devices (phones under 480px) */
@media (max-width: 480px) {
  .hero {
    height: 260px;
  }

  .hero-content {
    padding: 10px 10px 20px;
  }

  .hero-content h1 {
    font-size: 16px;
  }

  .hero-content p {
    font-size: 12px;
    padding: 0 8px;
  }
}
/* 📱 Mobile range 400px – 470px */
@media (min-width: 400px) and (max-width: 470px) {
  .hero {
    height: 360px; /* slightly taller for more breathing room */
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
  }

  .slides img {
    object-fit: cover;
    height: 100%;
    width: 100%;
  }

  .hero-content {
    padding: 20px 14px 50px; /* balanced spacing */
  }

  .hero-content h1 {
    font-size: 16px;  /* larger text for medium phones */
    line-height: 1.5;
    margin-bottom: 5px;
  }

  .hero-content p {
    font-size: 12px;
    line-height: 1.5;
    padding: 0 15px;
    max-width: 88%;
    margin: 0 auto;
  }
}

/* Courses Section */
.section-title {
  margin-top: 8px;      
  margin-bottom: 6px; 
  text-align: center;
  font-size: 34px;
  margin-bottom: 4px;
  color: #0f172a;
  letter-spacing: -0.3px;
  
}

/* Section blocks */
.course-section h2 {
  margin-top: 10px;     
  margin-bottom: 8px;
  font-weight: 700;
  font-size: clamp(20px, 2.6vw, 30px);
  color: #ff6600;
  letter-spacing: 0.4px;
  position: relative;
  padding-bottom: 10px;
  text-align: center;
  
}

.course-section h2::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 1px;
  width: 120px;
  height: 5px;
  background:#ff6600;
  /* Removed box-shadow and opacity that caused the reflection look */
}

.course-section h2::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -8px;
  width: 10px;
  height: 10px;  
}


/* ---------- Card grid general ---------- */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--gap);
  align-items: start;
  justify-items: center;
}

/* ---------- Card design ---------- */
.course-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: var(--card-height);
  transition: transform .22s ease, box-shadow .22s ease;
  width: 100%;
  max-width: 270px;
}

.course-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(15,23,42,0.12);
}

/* Image area */
.course-card img {
  width: 500px;
  height: 250px;
  object-fit: cover;
  display: block;
}

/* Description area */
.course-card .desc {
  padding: 16px 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.course-card h3 {
  margin: 0;
  font-size: 16px;
  color: #0b1220;
}
.course-card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.course-card .fee {
  font-weight: 600;
  color: #0b1220;
}


/* ---------- Buttons ---------- */
.read-more-btn {
  align-self: center;
  margin-top: auto;
  padding: 8px 12px;
  border-radius: 8px;
  background-color:#ff6600;
  color: #fff;
  border: none;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: transform .12s ease, opacity .12s ease;
}
.read-more-btn:hover { opacity: 0.9; }
.read-more-btn:active { transform: translateY(1px); }
.read-more-btn:focus { outline: 3px solid rgba(31,111,235,0.15); }

/* ---------- Modal / Lightbox ---------- */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
}

.modal-content {
  background: #fff;
  margin: 6% auto;
  padding: 25px;
  width: 60%;
  border-radius: 10px;
  animation: fadeIn 0.4s ease-in-out;
}

.close {
  float: right;
  font-size: 26px;
  cursor: pointer;
  color: #444;
}

.close:hover {
  color: red;
}

@keyframes fadeIn {
  from {opacity: 0; transform: translateY(-30px);}
  to {opacity: 1; transform: translateY(0);}
}


/* ---------- DIPLOMA SECTION ---------- */
.diploma .course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  justify-content: center;
  padding: 40px;
}

/* Each course card */
.diploma .course-card {
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column; /* image top, text bottom */
  height: 100%;
  max-width: 420px;
  margin: auto;
}

/* Hover effect */
.diploma .course-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

/* Course image (top part of card) */
.diploma .course-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
}

/* Description area (bottom part) */
.diploma .course-card .desc {
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
}

/* Text styling */
.diploma .course-card h3 {
  font-size: 1.2rem;
  color: #222;
  margin-bottom: 10px;
  text-align: center;
}

.diploma .details-row {
  font-size: 0.95rem;
  margin-bottom: 15px;
  text-align: center;
}

.diploma .fee {
  color: #444;
}
/* Tablet (≤992px) */
@media (max-width: 992px) {
  .diploma {
    padding: 35px 0;
  }

  .diploma h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
  }

  .diploma .course-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    padding: 30px;
  }

  .diploma .course-card img {
    height: 200px;
  }

  .diploma .course-card h3 {
    font-size: 1.05rem;
  }

  .diploma .details-row {
    font-size: 0.9rem;
  }
}

/* Mobile (≤600px) */
@media (max-width: 600px) {
  .diploma {
    padding: 25px 0;
  }

  .diploma h2 {
    font-size: 1.4rem;
    margin-bottom: 15px;
  }

  .diploma .course-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 20px;
  }

  .diploma .course-card {
    max-width: 95%;
    height: auto;
  }

  .diploma .course-card img {
    height: 170px;
  }

  .diploma .course-card h3 {
    font-size: 1rem;
  }

  .diploma .details-row {
    font-size: 0.85rem;
  }

  .diploma .fee {
    font-size: 0.85rem;
  }
}

/* 📏 Extra small devices (max width 395px) */
@media (max-width: 395px) {
  /* Reduce spacing around the grid */
  .diploma .course-grid {
    padding: 15px;
    gap: 18px; 
  }

  /* Reduce space between the h2 title and grid */
  .diploma h2 {
    margin-bottom: 12px; 
    font-size: 1.1rem; 
  }

  /* Adjust card size for better mobile fit */
  .diploma .course-card {
    max-width: 100%;
    height: auto;
  }

  .diploma .course-card img {
    height: 180px; 
  }

  .diploma .course-card h3 {
    font-size: 1rem;
  }

  .diploma .details-row {
    font-size: 0.85rem;
  }
}

/* ---------- CERTIFICATE SECTION ---------- */
.certificate-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 cards per row */
  gap: 40px; /* space between cards */
  justify-content: center;
  justify-items: center;
  align-items: stretch;
  padding: 30px 20px; /* equal top & bottom padding */
  width: 100%;
  max-width: 1100px;
  margin: 0 auto; /* center section */
  scroll-behavior: smooth;
  box-sizing: border-box;
}

/* Each course card */
.certificate-grid .course-card {
  overflow: hidden;
  height: 440px;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Hover lift effect */
.certificate-grid .course-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

/* Center if odd number of cards */
.certificate-grid:has(.course-card:last-child:nth-child(odd)) {
  justify-content: center;
}
/* Medium devices (tablets ≤ 992px) */
@media (max-width: 992px) {
  .certificate-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* auto adjust */
    gap: 25px; /* smaller gaps */
    padding: 40px 20px;
    max-width: 900px;
  }

  .certificate-grid .course-card {
    height: auto;
    max-width: 360px;
  }

  .certificate-grid .course-card img {
    height: 200px;
    object-fit: cover;
  }
}

/* Small devices (mobile ≤ 600px) */
@media (max-width: 600px) {
  .certificate-grid {
    grid-template-columns: 1fr; /* one column on mobile */
    gap: 18px;
    padding: 20px 10px; /* reduce padding */
    max-width: 100%;
  }

  .certificate-grid .course-card {
    height: auto;
    width: 100%;
    max-width: 100%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  }

  .certificate-grid .course-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
  }

  .certificate-grid .course-card h3 {
    font-size: 1rem;
    margin-bottom: 6px;
    text-align: center;
  }

  .certificate-grid .course-card p {
    font-size: 0.9rem;
    text-align: center;
  }

  .certificate-grid .course-card .fee {
    font-size: 0.9rem;
  }

  .read-more-btn {
    font-size: 12px;
    padding: 6px 10px;
  }
}


/* ---------- NVQ SECTION ---------- */
.nvq .course-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 50px; /* 🔹 increased space between cards */
  padding: 30px 20px; /* a bit more breathing room */
  scroll-behavior: smooth;
}

.nvq .course-card {
  height: 420px;
  max-width: 460px; /* slightly smaller to balance larger gaps */
  flex: 1 1 42%; /* keeps two per row on large screens */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.nvq .course-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}
/* 🖥 Medium screens (tablets ≤ 992px) */
@media (max-width: 992px) {
  .nvq .course-grid {
    gap: 30px;
    padding: 30px 15px;
  }

  .nvq .course-card {
    max-width: 400px;
    flex: 1 1 48%;
    height: auto;
  }

  .nvq .course-card img {
    height: 200px;
    object-fit: cover;
  }
}

/* 📱 Small screens (mobile ≤ 600px) */
@media (max-width: 600px) {
  .nvq .course-grid {
    flex-direction: column; /* stack vertically */
    align-items: center;
    gap: 20px; /* balanced gap between cards */
    padding: 20px 10px;
  }

  .nvq .course-card {
    width: 100%;
    max-width: 100%;
    height: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  }

  .nvq .course-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
  }

  .nvq .course-card .desc {
    padding: 14px;
    text-align: center;
  }

  .nvq .course-card h3 {
    font-size: 1rem;
    margin-bottom: 6px;
  }

  .nvq .course-card p {
    font-size: 0.9rem;
  }

  .read-more-btn {
    font-size: 12px;
    padding: 6px 10px;
  }
}
/* ---------- KIDS SECTION ---------- */
.kids .course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  justify-content: center;
  scroll-behavior: smooth;
  padding: 30px 20px;
}
.kids .course-card {
  height: 420px;
  max-width: 500px;
}
/* Tablet (below 992px) */
@media (max-width: 992px) {
  .kids .course-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    padding: 30px;
  }

  .kids .course-card {
    height: 400px;
    max-width: 400px;
  }

  .kids .course-card img {
    height: 200px;
  }

  .kids .course-card h3 {
    font-size: 1.1rem;
  }
}

/* Mobile (below 600px) */
@media (max-width: 600px) {
  .kids .course-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 20px;
  }

  .kids .course-card {
    max-width: 100%;
    height: auto;
  }

  .kids .course-card img {
    height: 180px;
  }

  .kids .course-card h3 {
    font-size: 1rem;
  }

  .kids .course-card p {
    font-size: 0.9rem;
  }
}

/* Very small devices (below 400px) */
@media (max-width: 400px) {
  .kids .course-card img {
    height: 160px;
  }

  .kids .course-card h3 {
    font-size: 0.95rem;
  }

  .kids .course-card p {
    font-size: 0.85rem;
  }
}
/*school syllabus*/

.course-category{
  max-width: 1100px;    
  margin: 36px auto;     
  padding: 28px 20px;    
  box-sizing: border-box;
  text-align: center;
  scroll-behavior: smooth;
}
.course-category h2 {
  position: relative;
  display: inline-block;
  font-size: clamp(22px, 2.8vw, 34px);
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #ff6600;
  padding-bottom: 14px;
  transition: all 0.4s ease;
}

/* Gradient underline */
.course-category h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 160px;
  height: 5px;
  border-radius: 4px;
  background: #ff6600;
  box-shadow: 0 6px 16px;
  transition: width 0.4s ease;
}


/* optional subtitle style (if you add a <p class="subtitle">) */
.course-category .subtitle{
  text-align: center;
  margin: 8px 0 20px;
  color: #374151;
  font-size: 14px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}


.school-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  padding: 20px;
}

.grade-card {
  width: 260px;
  background: #00376d;
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  padding: 25px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.grade-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
}

.grade-card h4 {
  color: #ffffff;
  font-size: 22px;
  margin-bottom: 10px;
}

.grade-card p {
  font-size: 15px;
  margin: 6px 0;
  color: #ffffff;
}

.view-btn {
  background: #ff6600;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  margin-top: 10px;
  cursor: pointer;
  transition: background 0.3s;
}

.view-btn:hover {
  background: #305b9b;
}

/* 🔹 Lightbox / Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 100;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.6);
}

.modal-content {
  background-color: #fff;
  margin: auto;
  padding: 30px;
  border-radius: 12px;
  width: 80%;
  max-width: 600px;
  animation: fadeIn 0.4s;
  text-align: left;
}

.modal-content h3 {
  color: #1f3a68;
  margin-bottom: 15px;
}

.modal-content ul {
  margin-left: 20px;
  color: #333;
}

.modal-content ul li {
  margin-bottom: 6px;
  list-style-type: disc;
}

.close {
  color: #aaa;
  float: right;
  font-size: 26px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: #000;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* 🖥 Tablets and smaller laptops (≤ 992px) */
@media (max-width: 992px) {
  .course-category h2 {
    font-size: 26px;
    padding-bottom: 5px;
  }

  .course-category h2::after {
    width: 100px;
    height: 4px;
  }

  .course-category {
    padding: 20px 10px;
    margin: 24px auto;
  }

  /* Make 2 cards per row on tablets */
  .school-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    padding: 20px;
    justify-items: center;
  }

  .grade-card {
    width: 100%;
    max-width: 300px;
    padding: 20px;
  }

  .grade-card h4 {
    font-size: 20px;
  }

  .grade-card p {
    font-size: 14px;
  }

  .view-btn {
    padding: 8px 14px;
    font-size: 13px;
  }
}

/* 📱 Mobile Devices (≤ 600px) */
@media (max-width: 600px) {
  .course-category h2 {
    font-size: 22px;
    padding-bottom: 8px;
  }

  .course-category h2::after {
    width: 80px;
  }

  .school-grid {
    display: grid;
    grid-template-columns: 1fr; /* 1 card per row */
    gap: 20px;
    justify-items: center; /* center the single card */
    padding: 15px;
  }

  .grade-card {
    width: 100%;
    max-width: 320px;
    padding: 18px;
  }

  .grade-card h4 {
    font-size: 18px;
  }

  .grade-card p {
    font-size: 13px;
  }

  .view-btn {
    font-size: 12px;
    padding: 6px 12px;
  }

  /* Modal width fix for mobile */
  .modal-content {
    width: 90%;
    padding: 20px;
  }
}


