:root {
    --green: #1D5D3E;
    --green-dark: #123c2a;
    --gold: #C9A03D;
    --pastel: #F5F0E1;
    --ink: #1f2f27;
    --muted: #6c786f;
    --line: #e7dfce;
    --white: #ffffff;
}

* { box-sizing: border-box; }

body {
    font-family: "Poppins", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 12% 10%, rgba(201, 160, 61, .12), transparent 28%),
        linear-gradient(135deg, #fff 0%, var(--pastel) 100%);
    min-height: 100vh;
}

.urdu, .arabic { font-family: "Noto Naskh Arabic", "Amiri", serif; }

.site-nav {
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(201, 160, 61, .25);
}

.navbar-brand { color: var(--green); font-weight: 700; }
.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--green);
    color: var(--gold);
}

.nav-link { color: var(--ink); font-weight: 500; }
.nav-link.active, .nav-link:hover { color: var(--green); }

.hero {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(110deg, rgba(29, 93, 62, .93), rgba(18, 60, 42, .88)),
        url("../images/pattern.svg");
    color: white;
    min-height: 76vh;
    display: flex;
    align-items: center;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -10% -22% auto;
    width: 55%;
    aspect-ratio: 1;
    border: 1px solid rgba(201, 160, 61, .35);
    border-radius: 50%;
}

.hero h1, .section-title {
    font-family: "Noto Naskh Arabic", "Poppins", serif;
    font-weight: 700;
}

.hero h1 { font-size: clamp(2.3rem, 6vw, 5.2rem); line-height: 1.08; }
.hero p { color: rgba(255,255,255,.86); max-width: 680px; }
.bismillah-pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(201, 160, 61, .45);
    border-radius: 999px;
    padding: .35rem .85rem;
    margin-bottom: 1rem;
    color: var(--gold);
    background: rgba(255,255,255,.08);
    font-size: 1.1rem;
}
.hero-arch-wrap {
    position: relative;
    max-width: 390px;
    margin-inline: auto;
    filter: drop-shadow(0 28px 40px rgba(0,0,0,.2));
}
.hero-arch-wrap img {
    width: 100%;
    display: block;
}
.hero-arch-note {
    position: absolute;
    left: 50%;
    bottom: 9%;
    transform: translateX(-50%);
    width: 78%;
    padding: .9rem;
    text-align: center;
    border: 1px solid rgba(201, 160, 61, .35);
    border-radius: 8px;
    background: rgba(18, 60, 42, .82);
    backdrop-filter: blur(10px);
}
.hero-arch-note span {
    display: block;
    color: var(--gold);
    font-size: 1.4rem;
    margin-bottom: .2rem;
}
.hero-arch-note strong {
    color: white;
    font-size: .9rem;
}

.ornament-band {
    margin-top: -1px;
    padding: 18px 0 0;
}
.ornament-line {
    position: relative;
    height: 38px;
    display: grid;
    place-items: center;
}
.ornament-line::before,
.ornament-line::after {
    content: "";
    position: absolute;
    top: 50%;
    height: 1px;
    width: calc(50% - 42px);
    background: linear-gradient(90deg, transparent, rgba(201, 160, 61, .75));
}
.ornament-line::before { left: 0; }
.ornament-line::after {
    right: 0;
    background: linear-gradient(90deg, rgba(201, 160, 61, .75), transparent);
}
.ornament-line span {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--green);
    color: var(--gold);
    border: 2px solid rgba(201, 160, 61, .45);
    box-shadow: 0 14px 32px rgba(20,58,39,.14);
}

.btn-green {
    background: var(--green);
    border-color: var(--green);
    color: white;
}
.btn-green:hover { background: var(--green-dark); border-color: var(--green-dark); color: white; }

.btn-gold {
    background: var(--gold);
    border-color: var(--gold);
    color: #1d271f;
    font-weight: 600;
}
.btn-gold:hover { background: #b68d2d; border-color: #b68d2d; color: #111; }

.soft-card, .feature-card, .course-card, .metric-card {
    background: rgba(255, 255, 255, .86);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 16px 40px rgba(20, 58, 39, .08);
}

.feature-card, .course-card, .metric-card { padding: 1.35rem; height: 100%; }
.feature-card i, .metric-card i { color: var(--gold); font-size: 1.7rem; }

.section-band { padding: 72px 0; }
.text-gold { color: var(--gold); }
.text-green { color: var(--green); }

.announcement-card {
    background: #fff;
    border: 1px solid rgba(201, 160, 61, .32);
    border-left: 4px solid var(--gold);
    border-radius: 8px;
    padding: 1.15rem;
    height: 100%;
    box-shadow: 0 12px 28px rgba(20, 58, 39, .08);
}
.announcement-card h5 { color: var(--green); margin: .45rem 0 .35rem; }
.announcement-card p { color: var(--muted); margin-bottom: 0; }
.card-link {
    display: block;
    color: inherit;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease;
}
.card-link:hover {
    color: inherit;
    transform: translateY(-3px);
    box-shadow: 0 18px 42px rgba(20, 58, 39, .13);
}
.announcement-type, .blog-category {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(201, 160, 61, .16);
    color: #866817;
    font-size: .75rem;
    font-weight: 700;
    padding: .25rem .6rem;
}

.blog-hero { padding-bottom: 42px; }
.blog-card, .blog-detail, .blog-sidebar .sidebar-box {
    background: rgba(255, 255, 255, .9);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(20, 58, 39, .08);
}
.blog-card { height: 100%; }
.blog-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
}
.blog-card h3 {
    font-size: 1.18rem;
    color: var(--green);
    margin: .75rem 0 .5rem;
}
.blog-card p { color: var(--muted); }
.blog-detail-img {
    width: 100%;
    max-height: 430px;
    object-fit: cover;
    display: block;
}
.blog-content {
    color: #34443b;
    line-height: 1.85;
    font-size: 1rem;
}
.blog-sidebar {
    position: sticky;
    top: 90px;
    display: grid;
    gap: 1rem;
}
.sidebar-box { padding: 1.2rem; }
.sidebar-box h5 { color: var(--green); margin-bottom: 1rem; }
.sidebar-link {
    display: block;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
    padding: .75rem 0;
}
.sidebar-link span { display: block; font-weight: 600; }
.sidebar-link small { color: var(--muted); }
.announcement-mini {
    border-bottom: 1px solid var(--line);
    padding: .75rem 0;
}
.announcement-mini span {
    color: var(--gold);
    font-size: .75rem;
    font-weight: 700;
}
.announcement-mini strong {
    display: block;
    color: var(--green);
}
.announcement-mini p {
    color: var(--muted);
    margin: .25rem 0 0;
    font-size: .9rem;
}

.islamic-learning-panel {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, .95fr);
    gap: 1.5rem;
    align-items: stretch;
    padding: clamp(1.25rem, 3vw, 2rem);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(245,240,225,.95), rgba(255,255,255,.86)),
        url("../images/pattern.svg");
    border: 1px solid rgba(201, 160, 61, .25);
    box-shadow: 0 18px 46px rgba(20, 58, 39, .09);
}
.islamic-learning-panel::before {
    content: "";
    position: absolute;
    right: -90px;
    top: -120px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    border: 1px solid rgba(201, 160, 61, .35);
}
.islamic-panel-copy {
    position: relative;
    z-index: 1;
}
.islamic-panel-copy p {
    color: var(--muted);
    max-width: 680px;
}
.islamic-checks {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-top: 1rem;
}
.islamic-checks span {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .7rem;
    border-radius: 999px;
    background: white;
    border: 1px solid var(--line);
    color: var(--green);
    font-weight: 600;
    font-size: .9rem;
}
.islamic-checks i { color: var(--gold); }
.values-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
}
.values-grid div {
    background: rgba(255,255,255,.88);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1rem;
}
.values-grid i {
    color: var(--gold);
    font-size: 1.5rem;
    margin-bottom: .65rem;
}
.values-grid strong {
    display: block;
    color: var(--green);
    margin-bottom: .25rem;
}
.values-grid span {
    color: var(--muted);
    font-size: .9rem;
}

.stat-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--line);
    box-shadow: 0 16px 40px rgba(20, 58, 39, .08);
}
.stat-strip div {
    background: rgba(255,255,255,.92);
    padding: 1.15rem;
    text-align: center;
}
.stat-strip strong {
    display: block;
    color: var(--green);
    font-size: 1.45rem;
}
.stat-strip span { color: var(--muted); font-size: .9rem; }

.home-split {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
    gap: 1.5rem;
    align-items: stretch;
}
.mission-panel, .step-card, .program-card {
    background: rgba(255,255,255,.9);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 16px 40px rgba(20, 58, 39, .08);
}
.mission-panel { padding: 1.5rem; }
.mission-panel h5 { color: var(--green); }
.mission-panel p { color: var(--muted); }

.program-card {
    padding: 1.25rem;
    height: 100%;
}
.program-card h5 { color: var(--green); margin: .6rem 0 .45rem; }
.program-card p { color: var(--muted); }
.program-card strong { color: var(--green); }
.program-pill {
    display: inline-flex;
    border-radius: 999px;
    background: rgba(29, 93, 62, .1);
    color: var(--green);
    font-size: .75rem;
    font-weight: 700;
    padding: .25rem .6rem;
}

.step-card {
    padding: 1.35rem;
    height: 100%;
}
.step-card span {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--green);
    color: var(--gold);
    font-weight: 800;
    margin-bottom: .85rem;
}
.step-card h5 { color: var(--green); }
.step-card p { color: var(--muted); margin-bottom: 0; }

.notice-link {
    display: block;
    color: inherit;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease;
}
.notice-link:hover {
    color: inherit;
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(20, 58, 39, .12);
}

.gallery-tile {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 8px;
    min-height: 220px;
    color: white;
    text-decoration: none;
}
.gallery-tile img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
    transition: transform .2s ease;
}
.gallery-tile span {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1rem;
    background: linear-gradient(transparent, rgba(18, 60, 42, .86));
    font-weight: 700;
}
.gallery-tile:hover { color: white; }
.gallery-tile:hover img { transform: scale(1.04); }

.home-cta {
    background:
        linear-gradient(110deg, rgba(29, 93, 62, .96), rgba(18, 60, 42, .94)),
        url("../images/pattern.svg");
    border-radius: 8px;
    padding: clamp(1.5rem, 4vw, 3rem);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}
.home-cta p { color: rgba(255,255,255,.82); max-width: 720px; }
.share-box {
    background: rgba(245, 240, 225, .65);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: .85rem;
}
.share-box span {
    display: block;
    color: var(--green);
    font-weight: 700;
    margin-bottom: .4rem;
}

.form-control, .form-select {
    border-color: #d9d0bd;
    border-radius: 8px;
    padding: .72rem .85rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 .2rem rgba(29, 93, 62, .14);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    border-radius: 999px;
    padding: .25rem .65rem;
    font-size: .8rem;
    font-weight: 600;
}
.status-paid { background: #dff5e8; color: #146c43; }
.status-partial { background: #fff2cc; color: #946200; }
.status-overdue, .status-pending { background: #fde2e1; color: #b42318; }

.site-footer {
    background: var(--green-dark);
    color: rgba(255,255,255,.82);
}
.site-footer a { display: block; color: rgba(255,255,255,.82); text-decoration: none; margin-bottom: .4rem; }
.site-footer h5, .site-footer h6 { color: white; }
.footer-bottom { background: rgba(0,0,0,.18); }

.whatsapp-float {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #25D366;
    color: white;
    font-size: 1.8rem;
    z-index: 20;
    box-shadow: 0 10px 28px rgba(0,0,0,.18);
    text-decoration: none;
}

.admin-body { background: #f7f4ec; }
.admin-shell { display: grid; grid-template-columns: 270px 1fr; min-height: 100vh; }
.admin-sidebar {
    background: var(--green-dark);
    color: white;
    padding: 1rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.admin-brand {
    display: flex;
    align-items: center;
    gap: .65rem;
    color: white;
    text-decoration: none;
    font-weight: 700;
    padding: .75rem .6rem 1.2rem;
}
.admin-sidebar nav a {
    display: flex;
    align-items: center;
    gap: .7rem;
    color: rgba(255,255,255,.8);
    text-decoration: none;
    padding: .75rem .8rem;
    border-radius: 8px;
    margin-bottom: .25rem;
}
.admin-sidebar nav a:hover, .admin-sidebar nav a.active {
    background: rgba(201, 160, 61, .2);
    color: white;
}
.admin-topbar {
    min-height: 68px;
    background: rgba(255,255,255,.92);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    position: sticky;
    top: 0;
    z-index: 5;
}
.admin-content { padding: 1.25rem; }
.table { vertical-align: middle; }
.table thead th { color: var(--green); white-space: nowrap; }
.student-actions {
    min-width: 280px;
}
.student-actions .btn,
.student-actions form {
    margin: .12rem;
}

@media (max-width: 991px) {
    .hero { min-height: auto; padding: 70px 0; }
    .hero-arch-wrap { max-width: 320px; }
    .islamic-learning-panel { grid-template-columns: 1fr; }
    .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-split { grid-template-columns: 1fr; }
    .home-cta { align-items: flex-start; flex-direction: column; }
    .admin-shell { grid-template-columns: 1fr; }
    .admin-sidebar { position: static; height: auto; }
    .admin-sidebar nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem; }
}

@media (max-width: 575px) {
    .admin-sidebar nav { grid-template-columns: 1fr; }
    .section-band { padding: 48px 0; }
    .values-grid { grid-template-columns: 1fr; }
    .hero-arch-note { width: 86%; }
    .stat-strip { grid-template-columns: 1fr; }
}
