/* =====================================================
   Digital Madrasa / Islamic Center - Design System
   Palette: Deep emerald + antique gold + ivory
   Display: 'Amiri' (serif, Arabic-capable) / Body: 'Inter'
   Signature: geometric 8-point star motif as divider
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --emerald-950: #0a2e2b;
    --emerald-800: #114b45;
    --emerald-600: #1c6b60;
    --gold-500: #c8992e;
    --gold-300: #e3c67a;
    --ivory: #faf6ee;
    --ivory-dim: #f0ead9;
    --ink: #1c2422;
    --ink-soft: #4a5854;
    --danger: #b3432b;
    --success: #2f7d5c;
    --radius: 6px;
    --shadow: 0 4px 20px rgba(10, 46, 43, 0.08);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    color: var(--ink);
    background: var(--ivory);
    line-height: 1.6;
}

h1, h2, h3, h4, .display {
    font-family: 'Amiri', serif;
    color: var(--emerald-950);
    margin: 0 0 .5em;
    font-weight: 700;
}

a { color: var(--emerald-600); text-decoration: none; }
a:hover { color: var(--gold-500); }

.container { max-width: 1440px; margin: 0 auto; padding: 0 32px; }

/* ---------- Signature divider: 8-point star row ---------- */
.star-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 12px 0 32px;
}
.star-divider::before, .star-divider::after {
    content: '';
    height: 1px;
    width: 60px;
    background: var(--gold-300);
}
.star-divider svg { width: 18px; height: 18px; fill: var(--gold-500); }

/* ---------- Top bar / Navigation ---------- */
.topbar {
    background: var(--emerald-950);
    color: var(--ivory);
    font-size: 13px;
    padding: 6px 0;
}
.topbar .container { display: flex; justify-content: space-between; }
.topbar a { color: var(--gold-300); }

nav.main-nav {
    background: var(--ivory);
    border-bottom: 1px solid var(--ivory-dim);
    position: sticky; top: 0; z-index: 50;
    box-shadow: var(--shadow);
}
nav.main-nav .container { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: 'Amiri', serif; font-size: 22px; font-weight: 700; color: var(--emerald-950); }
.brand .mark { width: 38px; height: 38px; }
.brand .brand-logo-img { height: 40px; width: auto; }
.site-brand-banner { background: linear-gradient(180deg, #ffffff 0%, #f7f4ea 100%); border-bottom: 1px solid var(--ivory-dim); text-align: center; padding: 30px 20px 26px; }
.site-brand-banner .brand-logo-img-lg { height: 108px; width: auto; margin-bottom: 12px; }
.site-brand-banner h1 {
    margin: 0;
    font-family: 'Amiri', serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--emerald-950);
    font-size: 30px;
}
.site-brand-banner .brand-subline {
    margin-top: 6px;
    color: var(--gold-500);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 600;
}
@media (max-width: 640px) {
    .site-brand-banner h1 { font-size: 21px; letter-spacing: 1.5px; }
    .site-brand-banner .brand-logo-img-lg { height: 72px; }
}
.nav-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink); font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--gold-500); }
.nav-cta { background: var(--emerald-800); color: var(--ivory) !important; padding: 10px 20px; border-radius: var(--radius); }
.nav-cta:hover { background: var(--gold-500); color: var(--emerald-950) !important; }
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: var(--emerald-950);
    cursor: pointer;
    padding: 4px 6px;
}

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(160deg, var(--emerald-950), var(--emerald-800));
    color: var(--ivory);
    padding: 80px 0 100px;
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: '';
    position: absolute; inset: 0;
    background-image: radial-gradient(circle at 85% 20%, rgba(200,153,46,0.15), transparent 40%);
}
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 50px; align-items: center; }
.hero h1 { color: var(--ivory); font-size: 44px; line-height: 1.15; }
.hero .eyebrow { color: var(--gold-300); letter-spacing: 2px; text-transform: uppercase; font-size: 13px; font-weight: 600; margin-bottom: 14px; display: block; }
.hero p.lead { color: #d7e4e0; font-size: 17px; max-width: 480px; }
.hero-actions { margin-top: 30px; display: flex; gap: 14px; }

.btn {
    display: inline-block;
    padding: 13px 26px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    border: none;
    text-align: center;
}
.btn-gold { background: var(--gold-500); color: var(--emerald-950); }
.btn-gold:hover { background: var(--gold-300); color: var(--emerald-950); }
.btn-outline { background: transparent; border: 1.5px solid var(--ivory); color: var(--ivory) !important; }
.btn-outline:hover { background: var(--ivory); color: var(--emerald-950) !important; }
.btn-primary { background: var(--emerald-800); color: var(--ivory); }
.btn-primary:hover { background: var(--emerald-600); color: var(--ivory); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }

/* ---------- Sections ---------- */
section { padding: 70px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head .eyebrow { color: var(--gold-500); font-weight: 600; letter-spacing: 2px; text-transform: uppercase; font-size: 13px; }
.bg-ivory-dim { background: var(--ivory-dim); }

/* ---------- Course cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 26px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--ivory-dim);
    transition: transform .2s ease;
}
.card:hover { transform: translateY(-4px); }
.card-img { height: 170px; background: var(--emerald-800); display: flex; align-items: center; justify-content: center; color: var(--gold-300); font-family:'Amiri',serif; font-size:20px; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 22px; }
.card-body h3 { font-size: 19px; margin-bottom: 8px; }
.card-body p { color: var(--ink-soft); font-size: 14px; margin-bottom: 14px; }
.badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-free { background: #e2f3ea; color: var(--success); }
.badge-paid { background: #fbeee0; color: var(--gold-500); }
.card-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px solid var(--ivory-dim); }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: #4a5854; margin-bottom: 10px; }
.card-meta span { display: inline-flex; align-items: center; gap: 4px; }
.card-more { margin-bottom: 12px; }
.card-more summary { cursor: pointer; color: var(--gold-500); font-weight: 600; font-size: 13px; list-style: none; }
.card-more summary::-webkit-details-marker { display: none; }
.card-more summary::after { content: ' \25BE'; }
.card-more[open] summary::after { content: ' \25B4'; }
.card-more .desc { margin-top: 10px; font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); }
.card-more .desc-meta { margin-top: 8px; font-size: 12px; color: #7d928c; font-style: italic; }

footer.site-footer { background: var(--emerald-950); color: #b9cac5; padding: 50px 0 20px; margin-top: 40px; }
footer.site-footer h4 { color: var(--ivory); }
footer.site-footer a { color: #b9cac5; }
footer.site-footer a:hover { color: var(--gold-300); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 30px; padding-top: 18px; font-size: 13px; text-align: center; color: #7d928c; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--emerald-950); }
input, select, textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #dde3e0;
    border-radius: var(--radius);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    background: #fff;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold-500); }
.form-card { background: #fff; padding: 36px; border-radius: 10px; box-shadow: var(--shadow); max-width: 620px; margin: 0 auto; }

/* ---------- Dashboard / Admin panel layout ---------- */
.dash-wrap { display: flex; min-height: 100vh; }
.sidebar {
    width: 240px;
    background: var(--emerald-950);
    color: var(--ivory);
    flex-shrink: 0;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .brand { color: var(--ivory); padding: 22px 20px; font-size: 18px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar ul { list-style: none; padding: 14px 0; margin: 0; }
.sidebar a { display: flex; align-items: center; gap: 10px; padding: 12px 22px; color: #cfe0da; font-size: 14px; font-weight: 500; }
.sidebar a:hover, .sidebar a.active { background: rgba(200,153,46,0.15); color: var(--gold-300); border-right: 3px solid var(--gold-500); }
.main-content { flex: 1; background: var(--ivory-dim); min-height: 100vh; }
.topbar-dash { background: #fff; padding: 16px 30px; display: flex; justify-content: space-between; align-items: center; box-shadow: var(--shadow); }
.content-area { padding: 28px 30px; }

.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 28px; }
.stat-card { background: #fff; border-radius: 10px; padding: 22px; box-shadow: var(--shadow); border-left: 4px solid var(--gold-500); }
.stat-card .num { font-size: 28px; font-weight: 700; color: var(--emerald-950); font-family: 'Amiri', serif; }
.stat-card .label { color: var(--ink-soft); font-size: 13px; margin-top: 4px; }

table.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); }
table.data-table th { background: var(--emerald-950); color: var(--ivory); text-align: left; padding: 12px 16px; font-size: 13px; font-weight: 600; }
table.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--ivory-dim); font-size: 14px; }
table.data-table tr:hover td { background: var(--ivory-dim); }
.panel { background: #fff; border-radius: 10px; padding: 24px; box-shadow: var(--shadow); margin-bottom: 24px; }
.panel h3 { font-size: 17px; border-bottom: 1px solid var(--ivory-dim); padding-bottom: 12px; margin-bottom: 18px; }

.status-pill { padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; display: inline-block; }
.status-paid, .status-active, .status-present, .status-published { background: #e2f3ea; color: var(--success); }
.status-unpaid, .status-inactive, .status-absent, .status-overdue { background: #fbe4de; color: var(--danger); }
.status-partial, .status-pending, .status-leave, .status-draft { background: #fbeee0; color: var(--gold-500); }

.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 20px; font-size: 14px; }
.alert-success { background: #e2f3ea; color: var(--success); border: 1px solid #b8e0c9; }
.alert-error { background: #fbe4de; color: var(--danger); border: 1px solid #f0bcae; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, var(--emerald-950), var(--emerald-800)); }
.login-box { background: #fff; padding: 40px; border-radius: 12px; width: 100%; max-width: 380px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.login-box .brand { justify-content: center; margin-bottom: 6px; }
.login-box p.sub { text-align: center; color: var(--ink-soft); font-size: 14px; margin-bottom: 26px; }

/* ---------- Large screens: give the layout a bit more room ---------- */
@media (min-width: 1600px) {
    .container { max-width: 1600px; }
}

/* ---------- Tablets & small laptops ---------- */
@media (max-width: 900px) {
    .hero .container { grid-template-columns: 1fr; }
    .hero { padding: 60px 0 70px; }
    .hero h1 { font-size: 34px; }
    .grid-2 { grid-template-columns: 1fr; }
    .stat-cards { grid-template-columns: repeat(2,1fr); }

    /* Hamburger nav */
    .nav-toggle { display: block; }
    nav.main-nav .container { flex-wrap: wrap; position: relative; }
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 4px;
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: #fff;
        box-shadow: var(--shadow);
        padding: 10px 24px 18px;
        z-index: 60;
    }
    .nav-links.open { display: flex; }
    .nav-links a { display: block; padding: 10px 0; border-bottom: 1px solid var(--ivory-dim); }
    .nav-cta { padding: 9px 14px; font-size: 13px; }

    .dash-wrap { flex-direction: column; }
    .sidebar { width: 100%; height: auto; position: relative; }
    .content-area { padding: 20px 16px; }
    .topbar-dash { padding: 14px 16px; }
}

/* ---------- Phones ---------- */
@media (max-width: 600px) {
    .container { padding: 0 16px; }
    section { padding: 44px 0; }
    .hero h1 { font-size: 28px; }
    .hero p.lead { font-size: 15px; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; }
    .topbar .container { flex-direction: column; gap: 4px; text-align: center; font-size: 12px; }
    .brand { font-size: 18px; }
    .brand .mark { width: 30px; height: 30px; }
    .form-card { padding: 22px; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .stat-cards { grid-template-columns: 1fr 1fr; gap: 12px; }
    .stat-card { padding: 16px; }
    .stat-card .num { font-size: 22px; }
    table.data-table { display: block; overflow-x: auto; white-space: nowrap; }
    .panel { padding: 16px; }
    footer.site-footer .grid-3 { grid-template-columns: 1fr; text-align: center; }
}

/* ============================================================
   SCROLLING TICKER (public site announcement marquee)
   ============================================================ */
.site-ticker{ background:#c8992e; color:#1c1208; overflow:hidden; white-space:nowrap; position:relative; }
.site-ticker .ticker-label{
    position:absolute; top:0; left:0; bottom:0; display:flex; align-items:center;
    padding:0 14px; background:#114b45; color:#f6ead0; font-weight:700; font-size:12px;
    letter-spacing:.03em; z-index:2; white-space:nowrap;
}
html[dir="rtl"] .site-ticker .ticker-label{ left:auto; right:0; }
.site-ticker .ticker-track{
    display:inline-flex; align-items:center; padding-left:130px;
    animation:ticker-scroll 32s linear infinite;
}
html[dir="rtl"] .site-ticker .ticker-track{ padding-left:0; padding-right:130px; animation-name:ticker-scroll-rtl; }
.site-ticker .ticker-track:hover{ animation-play-state:paused; }
.site-ticker .ticker-item{ display:inline-flex; align-items:center; padding:9px 0; font-size:13px; font-weight:600; }
.site-ticker .ticker-item a{ color:#1c1208; text-decoration:none; }
.site-ticker .ticker-sep{ margin:0 28px; color:#1c1208; opacity:.5; }
@keyframes ticker-scroll{ from{ transform:translateX(0); } to{ transform:translateX(-50%); } }
@keyframes ticker-scroll-rtl{ from{ transform:translateX(0); } to{ transform:translateX(50%); } }

/* Admin dashboard ticker variant */
.admin-ticker{ background:#114b45; color:#f6ead0; border-radius:8px; overflow:hidden; white-space:nowrap; margin-bottom:20px; }
.admin-ticker .ticker-track{ display:inline-flex; align-items:center; animation:ticker-scroll 28s linear infinite; padding:10px 0; }
.admin-ticker .ticker-track:hover{ animation-play-state:paused; }
.admin-ticker .ticker-item{ display:inline-flex; align-items:center; font-size:13px; font-weight:600; }
.admin-ticker .ticker-item a{ color:#f6ead0; text-decoration:none; }
.admin-ticker .ticker-sep{ margin:0 28px; color:#f6ead0; opacity:.4; }

/* ============================================================
   HOMEPAGE LOGOS STRIP
   ============================================================ */
.logos-strip{ display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:36px; padding:30px 0; }
.logos-strip a, .logos-strip span{ display:flex; flex-direction:column; align-items:center; gap:6px; opacity:.85; transition:opacity .2s; }
.logos-strip a:hover{ opacity:1; }
.logos-strip img{ height:56px; width:auto; object-fit:contain; filter:grayscale(15%); }
.logos-strip .logo-caption{ font-size:11.5px; color:#7d928c; }

/* ============================================================
   HOMEPAGE SLIDER
   ============================================================ */
.home-slider{ position:relative; width:100%; aspect-ratio:16/6; min-height:260px; overflow:hidden; background:#0b332f; }
.home-slider .slide{
    position:absolute; inset:0; opacity:0; transition:opacity .8s ease; display:flex; align-items:flex-end;
}
.home-slider .slide.active{ opacity:1; }
.home-slider .slide img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.home-slider .slide-caption{
    position:relative; z-index:2; padding:26px 40px; color:#fff; width:100%;
    background:linear-gradient(0deg, rgba(0,0,0,.65), transparent);
}
.home-slider .slide-caption h3{ font-family:var(--font-display); font-size:24px; margin:0 0 4px; color:#fff; }
.home-slider .slide-caption p{ margin:0; color:#e7e2d3; font-size:14px; }
.home-slider .slider-dots{ position:absolute; z-index:3; bottom:14px; right:20px; display:flex; gap:6px; }
.home-slider .slider-dot{ width:9px; height:9px; border-radius:50%; background:rgba(255,255,255,.5); cursor:pointer; border:none; padding:0; }
.home-slider .slider-dot.active{ background:#c8992e; }
@media (max-width:600px){
    .home-slider{ aspect-ratio:4/3; }
    .home-slider .slide-caption h3{ font-size:18px; }
}
