/* =========================================================
   Regency College Kandy - styles for the new pages
   (Admissions, Hostel Life, Results, Gallery, Staff, News, FAQ)
   and the WhatsApp button used on every page.
   ========================================================= */

:root {
  --navy: #172238;
  --navy-dark: #100b3c;
  --gold: #f5a425;
  --text: #1f2937;
  --muted: #5b6475;
  --card: #ffffff;
  --radius: 14px;
}

/* ---------- Floating WhatsApp button (all pages) ---------- */
.whatsapp-float {
  position: fixed;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #25d366;
  color: #fff !important;
  border-radius: 40px;
  padding: 12px 18px 12px 14px;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  text-decoration: none !important;
  transition: transform 0.2s;
}
.whatsapp-float:hover { transform: scale(1.05); color: #fff; }
.whatsapp-float i { font-size: 28px; line-height: 1; }
@media screen and (max-width: 575px) {
  .whatsapp-float { padding: 13px; right: 14px; }
  .whatsapp-float span { display: none; } /* icon only on phones */
}

/* ---------- Page banner ---------- */
.page-banner {
  background: var(--navy) url(../images/school-pattern.svg) repeat;
  background-size: 320px 320px;
  padding: 140px 20px 60px;
  text-align: center;
  color: #fff;
}
.page-banner h1 {
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 800;
  color: #fff;
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.page-banner h1 em { font-style: normal; color: var(--gold); }
.page-banner p { color: #d7dcea; font-size: 16px; max-width: 680px; margin: 0 auto; line-height: 1.7; }
.breadcrumb-line { font-size: 13px; margin-bottom: 14px; color: #aab3c8; }
.breadcrumb-line a { color: var(--gold); }

/* ---------- Page body ---------- */
.page-body {
  background: var(--navy) url(../images/school-pattern.svg) repeat;
  background-size: 320px 320px;
  padding: 10px 0 80px;
}
.content-card {
  background: var(--card);
  color: var(--text);
  border-radius: var(--radius);
  padding: clamp(20px, 4vw, 40px);
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.content-card h2 {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 18px;
}
.content-card h2 i { color: var(--gold); margin-right: 8px; }
.content-card h3 { font-size: 19px; font-weight: 700; color: var(--navy); margin: 0 0 10px; }
.content-card p, .content-card li { font-size: 16px; line-height: 1.75; color: var(--text); }
.content-card ul { padding-left: 20px; }
.content-card a { color: #c77d00; font-weight: 600; }

/* Grid of small cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.mini-card {
  background: #f6f7fb;
  border-radius: 12px;
  padding: 22px;
  border-top: 4px solid var(--gold);
}
.mini-card i.card-icon { font-size: 28px; color: var(--gold); margin-bottom: 12px; display: block; }
.mini-card p { font-size: 15px; margin: 0; }

/* Steps (Admissions) */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px; }
.step { background: #f6f7fb; border-radius: 12px; padding: 24px 20px 20px; position: relative; }
.step::before {
  counter-increment: step;
  content: counter(step);
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--gold); color: #fff; font-weight: 800; font-size: 18px;
  margin-bottom: 14px;
}
.step p { font-size: 15px; margin: 0; }

/* Buttons */
.btn-gold, .btn-outline {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 6px 8px 6px 0;
  text-decoration: none !important;
}
.btn-gold { background: var(--gold); color: #fff !important; }
.btn-gold:hover { background: #e0901a; }
.btn-outline { border: 2px solid var(--navy); color: var(--navy) !important; }
.btn-outline:hover { background: var(--navy); color: #fff !important; }

/* Tables (timetable, results) */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.nice-table { width: 100%; border-collapse: collapse; min-width: 460px; }
.nice-table th { background: var(--navy); color: #fff; padding: 12px 14px; text-align: left; font-size: 14px; }
.nice-table td { padding: 12px 14px; border-bottom: 1px solid #e5e7ef; font-size: 15px; }
.nice-table tr:nth-child(even) td { background: #f8f9fc; }

/* ---------- "ADD:" boxes: information the school must fill in ---------- */
.todo {
  display: block;
  background: #fff8e1;
  border: 2px dashed #f5a425;
  color: #7a4f00 !important;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px !important;
  font-weight: 600;
  margin: 8px 0;
}
.todo::before { content: "✏️ "; }
span.todo { display: inline-block; margin: 2px 0; padding: 2px 8px; }

/* ---------- Gallery ---------- */
.gallery-filters { text-align: center; margin-bottom: 25px; }
.gallery-filters button {
  background: transparent; border: 2px solid #fff; color: #fff;
  border-radius: 30px; padding: 8px 18px; margin: 5px; font-weight: 700; font-size: 13px;
  text-transform: uppercase; cursor: pointer; min-height: 42px;
}
.gallery-filters button.active, .gallery-filters button:hover { background: var(--gold); border-color: var(--gold); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.gallery-grid a {
  display: block; position: relative; border-radius: 12px; overflow: hidden;
  aspect-ratio: 4 / 3; background: #223153; box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s; }
.gallery-grid a:hover img { transform: scale(1.06); }
.gallery-grid .cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  color: #fff; font-size: 14px; font-weight: 600; padding: 24px 12px 10px;
}
.gallery-grid a.hide { display: none; }

/* ---------- Staff ---------- */
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; }
.staff-card { background: #f6f7fb; border-radius: 12px; overflow: hidden; text-align: center; }
.staff-card .photo { aspect-ratio: 1 / 1; background: #dfe3ee; display: flex; align-items: center; justify-content: center; }
.staff-card .photo img { width: 100%; height: 100%; object-fit: cover; }
.staff-card .photo i { font-size: 70px; color: #a9b1c6; }
.staff-card .info { padding: 16px; }
.staff-card h3 { font-size: 17px; margin: 0 0 4px; }
.staff-card .role { color: #c77d00; font-weight: 700; font-size: 14px; }
.staff-card .qual { font-size: 14px !important; color: var(--muted) !important; margin: 6px 0 0; }

/* ---------- News ---------- */
.news-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.news-item { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,0.25); display: flex; flex-direction: column; }
.news-item img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.news-item .body { padding: 20px; flex: 1; }
.news-item .date { font-size: 13px; font-weight: 700; color: #c77d00; text-transform: uppercase; }
.news-item h3 { font-size: 19px; color: var(--navy); margin: 6px 0 10px; font-weight: 700; }
.news-item p { font-size: 15px; color: var(--text); line-height: 1.7; margin: 0; }
.news-item .tag { display: inline-block; background: var(--navy); color: #fff; font-size: 12px; border-radius: 20px; padding: 3px 10px; margin-bottom: 8px; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid #e5e7ef; padding: 4px 0; }
.faq summary {
  cursor: pointer; list-style: none; font-weight: 700; font-size: 17px; color: var(--navy);
  padding: 16px 40px 16px 0; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 12px; font-size: 26px; color: var(--gold); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 16px; margin: 0; }

/* ---------- Testimonials (homepage) ---------- */
.testimonials { background: var(--navy) url(../images/school-pattern.svg) repeat; background-size: 320px 320px; padding: 80px 0; }
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.testimonial { background: #fff; border-radius: 14px; padding: 28px; position: relative; }
.testimonial::before { content: "“"; position: absolute; top: -10px; left: 18px; font-size: 80px; color: var(--gold); font-family: Georgia, serif; }
.testimonial p { font-size: 16px; line-height: 1.7; color: var(--text); margin: 20px 0 16px; font-style: italic; }
.testimonial .who { font-weight: 700; color: var(--navy); }
.testimonial .who span { display: block; font-weight: 400; font-size: 14px; color: var(--muted); }

/* Call-to-action strip at the bottom of pages */
.cta-strip { text-align: center; }
.cta-strip h2 { margin-bottom: 10px; }

/* Staff photos: keep faces in view */
.staff-card .photo img { object-position: center 20%; }
.staff-card .qual { line-height: 1.6; }

/* Achievements (Results page) */
.mini-card.achievement { overflow: hidden; }
.achievement-img { width: calc(100% + 44px); margin: -22px -22px 14px; aspect-ratio: 4 / 3; object-fit: cover; display: block; max-width: none; }
.tag-small { display: inline-block; background: #172238; color: #fff; font-size: 12px; font-weight: 700; border-radius: 20px; padding: 3px 10px; margin-bottom: 8px; }
