:root {
  --primary: #0f6b44;
  --primary-dark: #0a4f33;
  --secondary: #f3b63f;
  --secondary-soft: #fff3d5;
  --dark: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --light: #f8fafc;
  --border: rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 50px rgba(2, 6, 23, 0.10);
}
body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: #ffffff;
}
a { text-decoration: none; }
img { max-width: 100%; }
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem 1rem;
  border-radius: 999px;
  background: rgba(15, 107, 68, .08);
  color: var(--primary);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.brand-logo {
  width: 52px; height: 52px; border-radius: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 14px 30px rgba(15,107,68,.25);
}
.brand-title { font-size: 1rem; color: var(--dark); }
.premium-navbar {
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.7);
  box-shadow: 0 10px 30px rgba(15,23,42,.04);
}
.navbar .nav-link {
  color: var(--text);
  font-weight: 600;
  padding: .8rem 1rem !important;
  border-radius: 999px;
}
.navbar .nav-link.active,
.navbar .nav-link:hover {
  color: var(--primary);
  background: rgba(15,107,68,.08);
}
.btn-premium,
.btn-premium-outline:hover {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
}
.btn-premium {
  border-radius: 16px;
  padding: .85rem 1.35rem;
  box-shadow: 0 16px 30px rgba(15,107,68,.18);
}
.btn-premium-outline {
  border: 1px solid rgba(15,107,68,.15);
  color: var(--primary);
  background: #fff;
  border-radius: 16px;
  padding: .85rem 1.35rem;
}
.hero-premium {
  position: relative;
  padding: 6rem 0 5rem;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(243,182,63,.25), transparent 25%),
    radial-gradient(circle at bottom left, rgba(15,107,68,.15), transparent 28%),
    linear-gradient(180deg, #f8fffb 0%, #ffffff 100%);
}
.hero-premium h1 { font-size: clamp(2.8rem, 6vw, 5rem); line-height: 1.02; color: var(--dark); }
.hero-premium .lead { color: var(--muted); font-size: 1.1rem; }
.glass-panel {
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
}
.hero-image-card { padding: 1.25rem; }
.hero-image {
  border-radius: 24px;
  min-height: 480px;
  background:
    linear-gradient(180deg, rgba(15,107,68,.08), rgba(15,107,68,.22)),
    radial-gradient(circle at top left, rgba(243,182,63,.55), transparent 35%),
    radial-gradient(circle at bottom right, rgba(255,255,255,.28), transparent 30%),
    linear-gradient(135deg, #0f6b44, #11392a);
}
.metric-card,
.info-card,
.timeline-card,
.gallery-card,
.contact-card,
.admin-card,
.dashboard-card,
.table-wrap,
.auth-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
}
.metric-card { padding: 1.5rem; height: 100%; }
.metric-card h3 { font-size: 2rem; color: var(--primary); }
.metric-card p { margin: 0; color: var(--muted); }
.section-space { padding: 5.5rem 0; }
.section-soft { background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%); }
.section-title { color: var(--dark); font-size: clamp(2rem, 4vw, 3rem); }
.info-card { padding: 1.75rem; height: 100%; }
.icon-wrap {
  width: 58px; height: 58px; border-radius: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(15,107,68,.08); color: var(--primary); font-size: 1.35rem;
}
.process-step {
  position: relative; padding: 1.5rem 1.5rem 1.5rem 4.5rem;
  background: #fff; border-radius: 22px; border: 1px solid var(--border);
  box-shadow: var(--shadow-lg); height: 100%;
}
.process-step .step-number {
  position: absolute; left: 1.5rem; top: 1.35rem;
  width: 44px; height: 44px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}
.teacher-card img,
.gallery-card img {
  width: 100%; height: 280px; object-fit: cover;
}
.teacher-card .teacher-photo-fallback,
.gallery-card .gallery-photo-fallback {
  width: 100%; height: 280px; display:flex; align-items:center; justify-content:center;
  background: linear-gradient(135deg, rgba(15,107,68,.1), rgba(243,182,63,.25));
  color: var(--primary-dark); font-size: 3rem; font-weight: 800;
}
.teacher-card .card-body,
.gallery-card .card-body { padding: 1.4rem; }
.facility-badge { background: var(--secondary-soft); color: #9a6b00; }
.timeline-card { padding: 1.5rem; height: 100%; position: relative; overflow: hidden; }
.timeline-card::before {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 6px; background: linear-gradient(180deg, var(--secondary), var(--primary));
}
.timeline-year {
  display:inline-flex; padding:.4rem .9rem; background: rgba(15,107,68,.08); color: var(--primary); border-radius:999px; font-weight:700;
}
.gallery-card { overflow: hidden; }
.page-hero {
  padding: 5rem 0 3rem;
  background: linear-gradient(180deg, rgba(15,107,68,.06), rgba(243,182,63,.06));
}
.page-hero p { max-width: 720px; color: var(--muted); }
.contact-card { padding: 1.6rem; height: 100%; }
.contact-item { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; }
.contact-item i {
  width: 46px; height: 46px; border-radius: 14px; display:flex; align-items:center; justify-content:center;
  background: rgba(15,107,68,.08); color: var(--primary);
}
.footer-premium {
  background: linear-gradient(135deg, #0b1f17 0%, #123f2a 100%);
  color: #fff;
}
.footer-links li,
.footer-contact li { margin-bottom: .8rem; }
.footer-links a { color: rgba(255,255,255,.76); }
.footer-links a:hover { color: #fff; }
.footer-contact li { display: flex; gap: .9rem; color: rgba(255,255,255,.8); }
.social-link {
  width: 46px; height: 46px; display:inline-flex; align-items:center; justify-content:center;
  border-radius: 14px; background: rgba(255,255,255,.08); color: #fff;
}
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); color: rgba(255,255,255,.7); }
.auth-page,
.admin-page { background: linear-gradient(180deg, #f8fffb, #eef5f2); min-height: 100vh; }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 2rem 0; }
.auth-card { padding: 2rem; }
.auth-side {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; border-radius: 28px; padding: 2.5rem; box-shadow: var(--shadow-lg); height: 100%;
}
.admin-layout .sidebar {
  background: linear-gradient(180deg, #0d251b, #123b2a);
  color: #fff; min-height: 100vh; padding: 2rem 1.25rem; position: sticky; top: 0;
}
.sidebar .nav-link {
  color: rgba(255,255,255,.75); border-radius: 14px; margin-bottom: .35rem; padding: .8rem 1rem;
}
.sidebar .nav-link.active,
.sidebar .nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-content { padding: 2rem; }
.dashboard-card, .admin-card, .table-wrap { padding: 1.5rem; }
.table-wrap { overflow-x: auto; }
.table thead th { white-space: nowrap; }
.form-control, .form-select, .form-control:focus {
  border-radius: 14px;
  box-shadow: none;
}
.flash-alert { border-radius: 18px; }
.object-cover { object-fit: cover; }
.preview-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 14px; }
@media (max-width: 991.98px) {
  .hero-image { min-height: 320px; }
  .admin-layout .sidebar { position: relative; min-height: auto; }
}
@media (max-width: 767.98px) {
  .hero-premium { padding-top: 4.5rem; }
  .hero-premium h1 { font-size: 2.5rem; }
  .section-space { padding: 4.5rem 0; }
  .teacher-card img,
  .gallery-card img,
  .teacher-card .teacher-photo-fallback,
  .gallery-card .gallery-photo-fallback { height: 220px; }
}


.hero-slider-wrap { position: relative; }
.hero-slide { min-height: 84vh; display:flex; align-items:center; background-size:cover; background-position:center; position:relative; }
.hero-slide::before { content:''; position:absolute; inset:0; background: linear-gradient(90deg, rgba(9,21,16,.82), rgba(15,107,68,.55)); }
.hero-slide-content { max-width: 760px; color:#fff; padding:7rem 0; }
.hero-slide-content h1 { font-size: clamp(2.8rem, 5vw, 4.8rem); line-height:1.05; }
.hero-slide .lead { color: rgba(255,255,255,.82); font-size:1.15rem; }
.carousel-indicators [data-bs-target] { width: 12px; height:12px; border-radius:50%; }
.stats-floating { margin-top: -3rem; position: relative; z-index: 4; }
.news-card { background:#fff; border:1px solid var(--border); border-radius:24px; overflow:hidden; box-shadow: var(--shadow-lg); }
.news-card img { width:100%; height:250px; object-fit:cover; }
.news-meta { color: var(--primary); font-weight:700; font-size:.9rem; }
.read-more-link { color: var(--primary); font-weight:700; }
.detail-image { width:100%; max-height:430px; object-fit:cover; border-radius:24px; box-shadow: var(--shadow-lg); }
.detail-content { line-height:1.9; }
.sticky-news { position: sticky; top: 110px; }
.sidebar-news-item { padding:1rem; border-radius:16px; background:#f8fafc; border:1px solid var(--border); color:var(--text); }
.sidebar-news-item:hover { background:#eef6f2; color:var(--primary); }
@media (max-width: 991.98px) {
  .hero-slide { min-height: 72vh; }
  .stats-floating { margin-top: 0; }
  .sticky-news { position: static; }
}

.brand-logo-image {
  background: #fff;
  padding: .35rem;
}
.brand-logo-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 14px;
}
.headmaster-photo,
.school-showcase-photo,
.branding-preview-photo {
  width: 100%;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  object-fit: cover;
}
.headmaster-photo { min-height: 320px; max-height: 420px; }
.headmaster-fallback,
.school-photo-fallback,
.fallback-box {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: .75rem;
  background: linear-gradient(135deg, rgba(15,107,68,.12), rgba(243,182,63,.28));
  color: var(--primary-dark);
  font-weight: 700;
}
.headmaster-fallback {
  min-height: 320px;
  font-size: 3rem;
  flex-direction: column;
}
.school-showcase-photo { min-height: 360px; max-height: 460px; }
.school-photo-fallback {
  min-height: 360px;
  font-size: 2rem;
  flex-direction: column;
  padding: 2rem;
}
.headmaster-highlight-card {
  background: #fff;
  padding: 1rem;
  border-radius: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}
.branding-preview-logo {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 24px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border);
  padding: 1rem;
}
.branding-preview-photo {
  min-height: 220px;
  max-height: 260px;
}
.fallback-box {
  min-height: 220px;
  border-radius: 24px;
  padding: 1rem;
}
