/* ============================================================
   DEVENDRAN INTERNATIONAL SCHOOL — Main Stylesheet
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Roboto:wght@300;400;500;700&display=swap');

:root {
    --navy:      #1B3A6B;
    --navy-dark: #0F2347;
    --navy-mid:  #1e4a8a;
    --gold:      #C9952A;
    --gold-lt:   #E8B84B;
    --cream:     #F8F5EE;
    --white:     #FFFFFF;
    --gray-50:   #F8F9FA;
    --gray-100:  #EDF2F7;
    --gray-300:  #CBD5E0;
    --gray-500:  #718096;
    --gray-700:  #4A5568;
    --gray-900:  #1A202C;
    --green:     #28a745;
    --red:       #dc3545;
    --shadow-sm: 0 2px 8px rgba(27,58,107,0.10);
    --shadow-md: 0 4px 20px rgba(27,58,107,0.15);
    --shadow-lg: 0 8px 40px rgba(27,58,107,0.20);
}

* { box-sizing: border-box; }
body { font-family: 'Roboto', sans-serif; color: var(--gray-900); scroll-behavior: smooth; }
h1,h2,h3,h4,h5,h6 { font-family: 'Playfair Display', serif; }
a { text-decoration: none; transition: all .25s ease; }
img { max-width: 100%; }

/* ── TOP BAR ─────────────────────────────────────── */
.top-bar {
    background: var(--navy-dark);
    color: rgba(255,255,255,.8);
    font-size: 13px;
    padding: 6px 0;
}
.top-bar a { color: rgba(255,255,255,.8); }
.top-bar a:hover { color: var(--gold-lt); }
.top-bar .separator { margin: 0 10px; opacity: .4; }

/* ── NAVBAR ──────────────────────────────────────── */
.school-navbar {
    background: var(--navy) !important;
    box-shadow: var(--shadow-md);
    padding: 0;
    z-index: 1030;
}
.school-navbar .navbar-brand { padding: 12px 0; }
.brand-text { line-height: 1.1; }
.brand-name { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 700; color: #fff; display: block; }
.brand-sub  { font-size: 10.5px; color: var(--gold-lt); letter-spacing: 1px; text-transform: uppercase; }
.school-crest {
    width: 50px; height: 50px; background: var(--gold);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-family: 'Playfair Display', serif; font-weight: 700; font-size: 16px;
    color: var(--navy); margin-right: 10px; flex-shrink: 0;
    border: 2px solid rgba(255,255,255,.3);
}
.school-navbar .nav-link {
    color: rgba(255,255,255,.88) !important;
    font-size: 13px; font-weight: 500; padding: 18px 12px !important;
    position: relative; white-space: nowrap;
}
.school-navbar .nav-link:hover, .school-navbar .nav-link.active { color: var(--gold-lt) !important; }
.school-navbar .nav-link::after {
    content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 0; height: 2px; background: var(--gold); transition: width .25s ease;
}
.school-navbar .nav-link:hover::after { width: 100%; }
.school-navbar .dropdown-menu {
    background: var(--navy-dark); border: none; border-top: 2px solid var(--gold);
    border-radius: 0 0 6px 6px; padding: 4px 0; min-width: 200px;
    box-shadow: var(--shadow-lg);
}
.school-navbar .dropdown-item {
    color: rgba(255,255,255,.8); font-size: 13px; padding: 9px 20px;
}
.school-navbar .dropdown-item:hover { background: rgba(201,149,42,.15); color: var(--gold-lt); padding-left: 24px; }
.school-navbar .dropdown-toggle::after { vertical-align: middle; }

/* ── HERO ────────────────────────────────────────── */
.hero-section {
    min-height: 88vh; position: relative; overflow: hidden;
    display: flex; align-items: center;
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 40%, var(--navy-mid) 100%);
}
.hero-shapes {
    position: absolute; inset: 0; overflow: hidden; z-index: 1;
}
.hero-shapes::before {
    content: ''; position: absolute;
    width: 600px; height: 600px; border-radius: 50%;
    background: radial-gradient(circle, rgba(201,149,42,.18) 0%, transparent 70%);
    top: -100px; right: -100px;
}
.hero-shapes::after {
    content: ''; position: absolute;
    width: 400px; height: 400px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.06) 0%, transparent 70%);
    bottom: -80px; left: -80px;
}
.hero-grid {
    position: absolute; inset: 0; z-index: 1;
    background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 60px 60px;
}
.hero-content { position: relative; z-index: 2; color: #fff; }
.hero-badge {
    display: inline-block; background: rgba(201,149,42,.2); border: 1px solid var(--gold);
    color: var(--gold-lt); font-size: 12px; font-weight: 600; letter-spacing: 2px;
    padding: 5px 14px; border-radius: 20px; margin-bottom: 20px; text-transform: uppercase;
}
.hero-title {
    font-size: clamp(32px, 5vw, 58px); font-weight: 700; line-height: 1.15;
    margin-bottom: 16px; color: #fff;
}
.hero-title span { color: var(--gold); }
.hero-subtitle { font-size: 17px; color: rgba(255,255,255,.75); margin-bottom: 32px; line-height: 1.7; max-width: 520px; }
.hero-cta-group { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-gold {
    background: var(--gold); border: 2px solid var(--gold); color: var(--navy-dark);
    font-weight: 700; padding: 13px 30px; border-radius: 5px; font-size: 14px;
    display: inline-flex; align-items: center; gap: 8px;
}
.btn-gold:hover { background: var(--gold-lt); border-color: var(--gold-lt); color: var(--navy-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(201,149,42,.35); }
.btn-outline-white {
    background: transparent; border: 2px solid rgba(255,255,255,.5); color: #fff;
    font-weight: 600; padding: 13px 28px; border-radius: 5px; font-size: 14px;
}
.btn-outline-white:hover { background: rgba(255,255,255,.1); border-color: #fff; color: #fff; }
.hero-stats {
    margin-top: 50px; display: flex; gap: 30px; flex-wrap: wrap;
}
.hero-stat { text-align: left; }
.hero-stat-num { font-family: 'Playfair Display', serif; font-size: 36px; font-weight: 700; color: var(--gold); line-height: 1; }
.hero-stat-lbl { font-size: 12px; color: rgba(255,255,255,.6); text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }
.hero-image-card {
    background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.15);
    border-radius: 16px; padding: 30px; backdrop-filter: blur(10px);
    position: relative; z-index: 2;
}
.hero-notice-card {
    background: rgba(255,255,255,.1); border-radius: 10px; padding: 16px;
    margin-top: 16px; border-left: 3px solid var(--gold);
}
.hero-notice-card h6 { color: var(--gold-lt); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 6px; }
.hero-notice-card ul { list-style: none; padding: 0; margin: 0; }
.hero-notice-card ul li { font-size: 13px; color: rgba(255,255,255,.8); padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.hero-notice-card ul li:last-child { border: none; }

/* ── SECTIONS ────────────────────────────────────── */
.section-label {
    display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 3px;
    text-transform: uppercase; color: var(--gold); margin-bottom: 8px;
}
.section-title { font-size: clamp(26px, 3.5vw, 40px); font-weight: 700; color: var(--navy); line-height: 1.2; }
.section-divider {
    width: 50px; height: 3px; background: var(--gold); border-radius: 2px;
    margin: 12px 0 20px;
}
.section-divider.center { margin: 12px auto 20px; }
.section-desc { font-size: 16px; color: var(--gray-500); max-width: 600px; line-height: 1.7; }
.section-navy { background: var(--navy); color: #fff; }
.section-cream { background: var(--cream); }
.section-gray  { background: var(--gray-50); }

/* ── STATS BAR ───────────────────────────────────── */
.stats-bar { background: var(--gold); padding: 0; }
.stat-item { padding: 22px 10px; text-align: center; border-right: 1px solid rgba(27,58,107,.15); }
.stat-item:last-child { border-right: none; }
.stat-number { font-family: 'Playfair Display', serif; font-size: 36px; font-weight: 700; color: var(--navy); line-height: 1; }
.stat-label  { font-size: 12px; font-weight: 600; color: rgba(27,58,107,.7); text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }

/* ── FEATURE CARDS ───────────────────────────────── */
.feature-card {
    background: #fff; border-radius: 12px; padding: 32px 28px;
    box-shadow: var(--shadow-sm); border: 1px solid var(--gray-100);
    height: 100%; transition: all .3s ease;
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--gold); }
.feature-icon {
    width: 64px; height: 64px; border-radius: 14px;
    background: linear-gradient(135deg, var(--navy), var(--navy-mid));
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; margin-bottom: 20px; color: var(--gold);
}
.feature-card h5 { font-size: 18px; color: var(--navy); margin-bottom: 12px; }
.feature-card p  { font-size: 14px; color: var(--gray-500); line-height: 1.7; margin: 0; }

/* ── NOTICE CARD ─────────────────────────────────── */
.notice-item {
    display: flex; gap: 16px; padding: 16px 0;
    border-bottom: 1px solid var(--gray-100); align-items: flex-start;
}
.notice-item:last-child { border: none; }
.notice-date-box {
    background: var(--navy); color: #fff; border-radius: 8px;
    min-width: 52px; text-align: center; padding: 8px 6px; flex-shrink: 0;
}
.notice-date-box .day   { font-size: 22px; font-weight: 700; font-family: 'Playfair Display', serif; line-height: 1; }
.notice-date-box .month { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; opacity: .8; }
.notice-info h6 { font-size: 14px; font-weight: 600; color: var(--navy); margin-bottom: 4px; }
.notice-info p  { font-size: 13px; color: var(--gray-500); margin: 0; }
.notice-badge { font-size: 10px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.notice-badge.event    { background: #dbeafe; color: #1d4ed8; }
.notice-badge.finance  { background: #dcfce7; color: #166534; }
.notice-badge.academic { background: #fef3c7; color: #92400e; }
.notice-badge.holiday  { background: #fce7f3; color: #9d174d; }
.notice-badge.general  { background: #f3f4f6; color: #374151; }

/* ── EVENT CARD ──────────────────────────────────── */
.event-card {
    background: #fff; border-radius: 12px; overflow: hidden;
    box-shadow: var(--shadow-sm); border: 1px solid var(--gray-100);
    height: 100%; transition: all .3s ease;
}
.event-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.event-card-header { background: var(--navy); padding: 20px; color: #fff; position: relative; overflow: hidden; }
.event-card-header::after { content: ''; position: absolute; right: -20px; top: -20px; width: 100px; height: 100px; border-radius: 50%; background: rgba(255,255,255,.07); }
.event-date { font-size: 12px; color: var(--gold-lt); font-weight: 600; margin-bottom: 6px; }
.event-card-body { padding: 20px; }
.event-card-body h6 { font-size: 16px; color: var(--navy); margin-bottom: 8px; }
.event-card-body p  { font-size: 13px; color: var(--gray-500); margin-bottom: 10px; }
.event-venue { font-size: 12px; color: var(--gray-500); }
.event-venue i { color: var(--gold); }

/* ── GALLERY ─────────────────────────────────────── */
.gallery-item { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 4/3; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-overlay {
    position: absolute; inset: 0; background: rgba(27,58,107,.6);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .3s ease;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }

/* ── BTN STYLES ──────────────────────────────────── */
.btn-navy { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-dark); border-color: var(--navy-dark); color: #fff; }
.btn-outline-navy { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-outline-navy:hover { background: var(--navy); color: #fff; }

/* ── CARD ────────────────────────────────────────── */
.school-card {
    background: #fff; border-radius: 12px; padding: 24px;
    box-shadow: var(--shadow-sm); border: 1px solid var(--gray-100);
}
.page-hero {
    background: linear-gradient(135deg, var(--navy-dark), var(--navy));
    color: #fff; padding: 60px 0 50px;
}
.page-hero h1 { font-size: clamp(28px, 4vw, 42px); }
.breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.4); }
.breadcrumb-item a { color: rgba(255,255,255,.7); }
.breadcrumb-item.active { color: var(--gold-lt); }

/* ── CONTACT ─────────────────────────────────────── */
.contact-icon-box {
    width: 56px; height: 56px; background: rgba(201,149,42,.12);
    border-radius: 12px; display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
}
.form-control:focus { border-color: var(--navy); box-shadow: 0 0 0 0.2rem rgba(27,58,107,.15); }
.form-select:focus { border-color: var(--navy); box-shadow: 0 0 0 0.2rem rgba(27,58,107,.15); }

/* ── FOOTER ──────────────────────────────────────── */
.school-footer { background: var(--navy-dark); color: rgba(255,255,255,.75); }
.footer-brand { font-family: 'Playfair Display', serif; font-size: 20px; color: #fff; font-weight: 700; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: rgba(255,255,255,.65); font-size: 13.5px; }
.footer-links a:hover { color: var(--gold-lt); padding-left: 4px; }
.footer-bottom { background: rgba(0,0,0,.25); padding: 16px 0; font-size: 13px; }
.footer-social a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(255,255,255,.1); color: rgba(255,255,255,.7);
    margin-right: 8px; font-size: 13px; transition: all .25s;
}
.footer-social a:hover { background: var(--gold); color: var(--navy); }

/* ── ADMIN LAYOUT ────────────────────────────────── */
.admin-wrapper { display: block; min-height: 100vh; }
.admin-sidebar {
    width: 260px; background: var(--navy-dark); flex-shrink: 0;
    display: flex; flex-direction: column; position: fixed; top: 0; left: 0;
    height: 100vh; overflow-y: auto; z-index: 1000;
    transition: transform .3s ease;
}
.admin-sidebar .sidebar-brand {
    padding: 22px 20px; border-bottom: 1px solid rgba(255,255,255,.1);
    display: flex; align-items: center; gap: 12px;
}
.sidebar-logo {
    width: 42px; height: 42px; background: var(--gold); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Playfair Display', serif; font-weight: 700; font-size: 14px; color: var(--navy); flex-shrink: 0;
}
.sidebar-title { color: #fff; font-weight: 600; font-size: 13px; line-height: 1.3; }
.sidebar-title span { color: var(--gold-lt); font-size: 11px; font-family: 'Roboto', sans-serif; font-weight: 400; display: block; }
.sidebar-nav { padding: 12px 0; flex: 1; }
.sidebar-heading {
    font-size: 9.5px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
    color: rgba(255,255,255,.35); padding: 16px 20px 4px;
}
.sidebar-link {
    display: flex; align-items: center; gap: 12px; padding: 10px 20px;
    color: rgba(255,255,255,.72); font-size: 13.5px; font-weight: 400;
    border-left: 3px solid transparent; transition: all .2s ease;
}
.sidebar-link:hover, .sidebar-link.active {
    color: #fff; background: rgba(255,255,255,.07); border-left-color: var(--gold);
}
.sidebar-link .nav-icon { font-size: 16px; width: 20px; text-align: center; }
.admin-topbar {
    position: fixed; top: 0; left: 260px; right: 0; height: 62px;
    background: #fff; border-bottom: 1px solid var(--gray-100);
    display: flex; align-items: center; padding: 0 28px;
    box-shadow: var(--shadow-sm); z-index: 999;
}
.admin-content { margin-left: 260px; margin-top: 62px; padding: 28px; min-height: calc(100vh - 62px); background: var(--gray-50); width: calc(100% - 260px); box-sizing: border-box; overflow: visible; }
.admin-page-title { font-size: 22px; color: var(--navy); margin-bottom: 6px; }
.admin-breadcrumb { font-size: 12.5px; color: var(--gray-500); }
.admin-breadcrumb a { color: var(--navy); }

/* Admin Stat Cards */
.stat-card {
    border-radius: 12px; padding: 24px; color: #fff; position: relative;
    overflow: hidden; height: 100%;
}
.stat-card::after {
    content: ''; position: absolute; right: -20px; top: -20px;
    width: 100px; height: 100px; border-radius: 50%; background: rgba(255,255,255,.12);
}
.stat-card::before {
    content: ''; position: absolute; right: 20px; top: 30px;
    width: 60px; height: 60px; border-radius: 50%; background: rgba(255,255,255,.08);
}
.stat-card.navy  { background: linear-gradient(135deg, #1B3A6B, #2E5FA3); }
.stat-card.gold  { background: linear-gradient(135deg, #C9952A, #E8B84B); color: #1A202C; }
.stat-card.green { background: linear-gradient(135deg, #166534, #16a34a); }
.stat-card.teal  { background: linear-gradient(135deg, #0e7490, #06b6d4); }
.stat-card-icon { font-size: 28px; margin-bottom: 12px; display: block; }
.stat-card-num   { font-size: 36px; font-family: 'Playfair Display', serif; font-weight: 700; line-height: 1; }
.stat-card-lbl   { font-size: 12px; font-weight: 500; opacity: .8; margin-top: 4px; text-transform: uppercase; letter-spacing: 1px; }
.stat-card-trend { font-size: 12px; margin-top: 10px; opacity: .75; }

/* Admin Table */
.admin-table { font-size: 13.5px; }
.admin-table th { background: var(--navy); color: #fff; font-weight: 600; padding: 12px 14px; }
.admin-table td { padding: 11px 14px; vertical-align: middle; }
.admin-table tbody tr:hover { background: var(--gray-50); }
.badge-status { font-size: 11px; padding: 4px 10px; border-radius: 20px; font-weight: 600; }
.badge-active  { background: #dcfce7; color: #166534; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-inactive { background: #fee2e2; color: #991b1b; }
.badge-left     { background: #f3f4f6; color: #374151; }
.badge-paid   { background: #dcfce7; color: #166534; }

/* Admin Form */
.admin-card {
    background: #fff; border-radius: 12px; box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
}
.admin-card-header {
    background: var(--navy); color: #fff; padding: 18px 24px; border-radius: 12px 12px 0 0;
    font-family: 'Playfair Display', serif; font-size: 17px; overflow: visible;
}
.admin-card-body { padding: 24px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--gray-700); }

/* Admin Login */
.admin-login-page {
    min-height: 100vh; display: flex; align-items: center;
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 60%, var(--navy-mid) 100%);
}
.login-card { background: #fff; border-radius: 16px; overflow: hidden; max-width: 450px; width: 100%; box-shadow: var(--shadow-lg); }
.login-card-top { background: var(--navy); padding: 36px 32px; text-align: center; }
.login-crest { width: 72px; height: 72px; background: var(--gold); border-radius: 50%; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; font-family: 'Playfair Display', serif; font-weight: 700; font-size: 24px; color: var(--navy); }
.login-card-body { padding: 32px; }
.login-card-body .form-control { padding: 12px 16px; font-size: 14px; border-radius: 8px; border-color: var(--gray-300); }

/* Mobile adjustments */
@media (max-width: 768px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.show { transform: translateX(0); }
    .admin-topbar { left: 0; }
    .admin-content { margin-left: 0; width: 100%; }
    .hero-section { min-height: 100vh; padding: 100px 0 60px; }
    .stat-item { border-right: none; border-bottom: 1px solid rgba(27,58,107,.1); }
}
@media (max-width: 576px) {
    .school-navbar .nav-link { padding: 12px 10px !important; font-size: 12px; }
}

/* Utilities */
.text-navy  { color: var(--navy) !important; }
.text-gold  { color: var(--gold) !important; }
.bg-navy    { background: var(--navy) !important; }
.bg-gold    { background: var(--gold) !important; }
.border-gold { border-color: var(--gold) !important; }
.fw-playfair { font-family: 'Playfair Display', serif; }
.rounded-12 { border-radius: 12px; }
.rounded-16 { border-radius: 16px; }
.shadow-school { box-shadow: var(--shadow-md); }
