/* ===================================================================
   Student ID Management System — Main Stylesheet
   Design: Institutional / Academic — crisp, professional, dark navy
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:wght@300;400;500;600;700&display=swap');

/* ─── VARIABLES ─────────────────────────────────────────────────── */
:root {
    --navy:       #0d1b35;
    --navy-mid:   #162447;
    --navy-light: #1e3a6a;
    --gold:       #c9952a;
    --gold-light: #e8b84b;
    --cream:      #f5f0e8;
    --white:      #ffffff;
    --gray-100:   #f8f9fa;
    --gray-200:   #e9ecef;
    --gray-400:   #ced4da;
    --gray-600:   #6c757d;
    --gray-800:   #343a40;
    --red:        #c0392b;
    --green:      #1a7a4a;
    --radius:     8px;
    --shadow:     0 4px 24px rgba(13,27,53,0.12);
    --shadow-lg:  0 8px 40px rgba(13,27,53,0.18);
    --transition: 0.2s ease;
}

/* ─── RESET & BASE ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--gray-100);
    color: var(--gray-800);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }

img { max-width: 100%; display: block; }

/* ─── LAYOUT ─────────────────────────────────────────────────────── */
.wrapper {
    display: grid;
    grid-template-columns: 240px 1fr;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
}

/* ─── SIDEBAR ────────────────────────────────────────────────────── */
.sidebar {
    grid-row: 1 / -1;
    background: var(--navy);
    color: var(--white);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 2000;
    transition: transform 0.25s cubic-bezier(.4,0,.2,1), box-shadow 0.2s;
}

/* Sidebar overlay for mobile */
.sidebar.sidebar-collapsed {
    transform: translateX(-110%);
    box-shadow: none;
}
.sidebar.sidebar-open {
    transform: translateX(0);
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: 240px;
    box-shadow: 0 0 0 100vw rgba(13,27,53,0.45);
    background: var(--navy);
    z-index: 2000;
}

.sidebar-brand {
    padding: 28px 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-brand .school-name {
    font-family: 'DM Serif Display', serif;
    font-size: 1.1rem;
    color: var(--gold);
    letter-spacing: 0.03em;
    line-height: 1.3;
}

.sidebar-brand .system-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.45);
    margin-top: 4px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
}

.nav-section {
    padding: 0 16px;
    margin-bottom: 4px;
}

.nav-section-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(255,255,255,0.3);
    padding: 12px 8px 6px;
    display: block;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius);
    color: rgba(255,255,255,0.7);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition);
    margin-bottom: 2px;
}

.nav-link:hover {
    background: rgba(255,255,255,0.08);
    color: var(--white);
}

.nav-link.active {
    background: var(--gold);
    color: var(--navy);
    font-weight: 600;
}

.nav-link .icon { font-size: 1rem; width: 20px; text-align: center; }

.sidebar-footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 0.75rem;
    color: rgba(255,255,255,0.3);
}

/* ─── MAIN CONTENT ───────────────────────────────────────────────── */
.main {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* Prevent main from overflowing on mobile */
    min-width: 0;
}

.topbar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-title {
    font-family: 'DM Serif Display', serif;
    font-size: 1.35rem;
    color: var(--navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }

.content {
    flex: 1;
    padding: 32px;
}

/* ─── DASHBOARD STATS ────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px 20px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--gold);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -20px; right: -20px;
    width: 80px; height: 80px;
    background: var(--gold);
    opacity: 0.06;
    border-radius: 50%;
}

.stat-value {
    font-family: 'DM Serif Display', serif;
    font-size: 2.2rem;
    color: var(--navy);
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 6px;
}

/* ─── CARDS ──────────────────────────────────────────────────────── */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.card-title {
    font-family: 'DM Serif Display', serif;
    font-size: 1.15rem;
    color: var(--navy);
}

.card-body { padding: 24px; }

/* ─── BUTTONS ────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all var(--transition);
    white-space: nowrap;
    text-decoration: none;
}

.btn-primary { background: var(--gold); color: var(--navy); }
.btn-primary:hover { background: var(--gold-light); color: var(--navy); }

.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-light); color: var(--white); }

.btn-danger { background: var(--red); color: var(--white); }
.btn-danger:hover { background: #a93226; color: var(--white); }

.btn-success { background: var(--green); color: var(--white); }
.btn-success:hover { background: #155c38; color: var(--white); }

.btn-outline {
    background: transparent;
    border: 2px solid var(--gray-400);
    color: var(--gray-800);
}
.btn-outline:hover { border-color: var(--navy); color: var(--navy); }

.btn-sm { padding: 5px 12px; font-size: 0.8rem; }
.btn-lg { padding: 13px 28px; font-size: 1rem; }

/* ─── FORMS ──────────────────────────────────────────────────────── */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--navy);
}

.form-control {
    padding: 10px 14px;
    border: 1.5px solid var(--gray-400);
    border-radius: var(--radius);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    color: var(--gray-800);
    transition: border-color var(--transition), box-shadow var(--transition);
    background: var(--white);
    width: 100%;
}

.form-control:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201,149,42,0.15);
}

.form-hint { font-size: 0.75rem; color: var(--gray-600); }

.form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
}

/* ─── TABLE ──────────────────────────────────────────────────────── */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

thead th {
    background: var(--navy);
    color: var(--white);
    padding: 13px 16px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

tbody tr {
    border-bottom: 1px solid var(--gray-200);
    transition: background var(--transition);
}

tbody tr:hover { background: #fefaf2; }

tbody td { padding: 12px 16px; vertical-align: middle; }

.student-thumb {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold);
}

.student-no-photo {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--navy-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--white);
    font-weight: 700;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.badge-alevel { background: #d4eaff; color: #1558a0; }
.badge-olevel { background: #e0f5ec; color: var(--green); }

.actions-cell { display: flex; gap: 6px; flex-wrap: wrap; }

/* ─── ALERTS ─────────────────────────────────────────────────────── */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.9rem;
    border-left: 4px solid transparent;
}

.alert-success { background: #eaf7f0; border-color: var(--green); color: #155534; }
.alert-error   { background: #fcecea; border-color: var(--red);   color: #7a1a14; }
.alert-info    { background: #e8f0fe; border-color: var(--navy);  color: var(--navy); }

/* ─── SEARCH BAR ─────────────────────────────────────────────────── */
.search-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.search-input {
    padding: 9px 14px;
    border: 1.5px solid var(--gray-400);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-family: 'DM Sans', sans-serif;
    min-width: 200px;
    width: 100%;
    max-width: 320px;
    transition: border-color var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--gold);
}

/* ─── EMPTY STATE ────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-600);
}

.empty-state .empty-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.4; }
.empty-state p { font-size: 1rem; }

/* ─── FILE UPLOAD PREVIEW ────────────────────────────────────────── */
.upload-preview {
    margin-top: 10px;
    display: none;
}

.upload-preview img {
    max-width: 120px;
    max-height: 120px;
    border-radius: var(--radius);
    border: 2px solid var(--gold);
    object-fit: cover;
}

.current-upload {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    padding: 8px 12px;
    background: var(--gray-100);
    border-radius: var(--radius);
    font-size: 0.8rem;
    color: var(--gray-600);
}

.current-upload img {
    width: 48px; height: 48px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--gray-400);
}

/* ─── PAGINATION ─────────────────────────────────────────────────── */
.pagination {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
    padding: 16px 0 0;
    flex-wrap: wrap;
}

/* ─── MODAL ──────────────────────────────────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(13,27,53,0.6);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-overlay.show { display: flex; }

.modal {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 440px;
    width: 100%;
    box-shadow: var(--shadow-lg);
}

.modal-title {
    font-family: 'DM Serif Display', serif;
    font-size: 1.2rem;
    color: var(--navy);
    margin-bottom: 12px;
}

.modal-text { color: var(--gray-600); font-size: 0.9rem; margin-bottom: 24px; }

.modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* ─── ID CARD STYLES ─────────────────────────────────────────────── */
.id-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 24px;
}

.id-card {
    width: 100%;
    max-width: 340px;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 2px solid var(--navy);
    font-family: 'DM Sans', sans-serif;
    page-break-inside: avoid;
}

.id-card-header {
    background: var(--navy);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.id-card-header .school-crest {
    width: 36px; height: 36px;
    background: var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.9rem;
    color: var(--navy);
    flex-shrink: 0;
}

.id-card-header .school-info { color: var(--white); }

.id-card-header .school-info .name {
    font-family: 'DM Serif Display', serif;
    font-size: 0.85rem;
    line-height: 1.2;
}

.id-card-header .school-info .subtitle {
    font-size: 0.62rem;
    opacity: 0.65;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.id-card-gold-bar {
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
}

.id-card-body {
    padding: 14px 16px;
    display: flex;
    gap: 14px;
}

.id-card-photo { flex-shrink: 0; }

.id-card-photo img {
    width: 80px;
    height: 95px;
    object-fit: cover;
    border: 2px solid var(--gold);
    border-radius: 4px;
}

.id-card-photo .no-photo {
    width: 80px;
    height: 95px;
    background: var(--gray-200);
    border: 2px solid var(--gold);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--gray-400);
}

.id-card-details { flex: 1; min-width: 0; }

.id-card-name {
    font-family: 'DM Serif Display', serif;
    font-size: 1rem;
    color: var(--navy);
    line-height: 1.2;
    margin-bottom: 8px;
}

.id-card-field {
    display: flex;
    gap: 6px;
    font-size: 0.7rem;
    margin-bottom: 3px;
    color: var(--gray-800);
}

.id-card-field .label {
    color: var(--gray-600);
    white-space: nowrap;
    min-width: 60px;
}

.id-card-field .value { font-weight: 600; }

.id-card-reg {
    margin-top: 8px;
    padding: 5px 8px;
    background: var(--navy);
    color: var(--gold);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    display: inline-block;
}

.id-card-footer {
    padding: 10px 16px 12px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
}

.id-card-signature { flex: 1; }

.id-card-signature img {
    max-height: 35px;
    max-width: 100px;
    object-fit: contain;
}

.id-card-signature .sig-label {
    font-size: 0.6rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 2px;
    border-top: 1px solid var(--gray-400);
    padding-top: 3px;
}

.id-card-level {
    font-size: 0.65rem;
    background: var(--gold);
    color: var(--navy);
    padding: 3px 8px;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

/* ─── PRINT STYLES ───────────────────────────────────────────────── */
@media print {
    .no-print,
    .sidebar,
    .topbar,
    .topbar-actions,
    .btn,
    .form-actions,
    .alert { display: none !important; }

    .wrapper { grid-template-columns: 1fr; }
    .main    { min-height: auto; }
    .content { padding: 0; }

    body { background: white; }

    .id-card-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12mm;
        padding: 10mm;
    }

    .id-card {
        page-break-inside: avoid;
        break-inside: avoid;
        max-width: 90mm;
        box-shadow: none;
        border: 1.5px solid #0d1b35;
    }

    @page {
        size: A4;
        margin: 10mm;
    }

    .bwm-card {
        width: 750px;
        height: 430px;
        page-break-inside: avoid;
        break-inside: avoid;
        box-shadow: none;
        margin: 0 auto 20mm;
    }

    .id-card-grid .bwm-card {
        page-break-after: always;
        break-after: page;
    }

    @page {
        size: A4 landscape;
        margin: 10mm;
    }
}

/* ─── MOBILE — Sidebar toggle ────────────────────────────────────── */
/* Hidden on desktop, shown via JS on mobile */
#sidebarToggle {
    display: none;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 2001;
    background: var(--navy);
    color: #fff;
    border: none;
    padding: 9px 13px;
    border-radius: var(--radius);
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

/* ─── RESPONSIVE — 900px (tablet & mobile) ───────────────────────── */
@media (max-width: 900px) {

    /* Show toggle button */
    #sidebarToggle { display: block; }

    /* Sidebar: hidden off-screen, slides in on open */
    .sidebar {
        position: fixed;
        left: 0; top: 0; bottom: 0;
        width: 240px;
        height: 100vh;
        transform: translateX(-110%);
        box-shadow: none;
    }
    .sidebar.sidebar-open {
        transform: translateX(0);
        box-shadow: 0 0 0 100vw rgba(13,27,53,0.45);
    }

    /* Wrapper becomes single column */
    .wrapper {
        grid-template-columns: 1fr;
    }

    /* Topbar: pad left so title doesn't hide under toggle button */
    .topbar {
        padding: 14px 16px 14px 64px;
    }

    .topbar-title {
        font-size: 1.1rem;
    }

    /* Content: less padding */
    .content {
        padding: 16px;
    }

    /* Stats: 2 columns */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 20px;
    }

    /* Card header: tighten up */
    .card-header {
        padding: 14px 16px;
    }

    /* Card-header right-side action group: wrap buttons */
    .card-header > div:last-child {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .card-body {
        padding: 16px;
    }

    /* Quick actions in card body */
    .card-body[style*="display:flex"],
    .card-body[style*="display: flex"] {
        flex-wrap: wrap;
    }

    /* Forms: single column */
    .form-grid {
        grid-template-columns: 1fr;
    }

    /* ID card grid: single column */
    .id-card-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── RESPONSIVE — 480px (small phones) ─────────────────────────── */
@media (max-width: 480px) {

    .topbar {
        padding: 12px 12px 12px 60px;
    }

    /* Hide topbar "New Student" btn — it's already in quick actions */
    .topbar-actions .btn {
        display: none;
    }

    /* Stats: still 2 columns but smaller */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 16px 12px;
    }

    .stat-value {
        font-size: 1.6rem;
    }

    .stat-label {
        font-size: 0.72rem;
    }

    /* Table: tighter and hide graduation year column */
    table {
        font-size: 0.8rem;
    }

    thead th,
    tbody td {
        padding: 10px 8px;
    }

    table th:nth-child(5),
    table td:nth-child(5) {
        display: none;
    }

    /* Buttons in actions cell: stack */
    .actions-cell {
        flex-direction: column;
        gap: 4px;
    }

    /* Search bar: full width */
    .search-input {
        min-width: 0;
        max-width: 100%;
    }

    .modal {
        padding: 20px 16px;
    }
}

/* ===================================================================
   BWMHS ID CARD — Benjamin William Mkapa High School Design
   =================================================================== */

/* ── Outer wrapper ── */
.bwm-card {
    width: 750px;
    max-width: 100%;
    height: 430px;
    background: #ffffff;
    position: relative;
    box-shadow: 0 15px 35px rgba(0,0,0,0.22);
    overflow: hidden;
    font-family: 'Inter', 'DM Sans', sans-serif;
    flex-shrink: 0;
}

/* Body watermark */
.bwm-card::before {
    content: "";
    position: absolute;
    top: 160px; left: 0; right: 0; bottom: 0;
    background: url('../assets/body.jpg') center/cover no-repeat;
    opacity: 0.10;
    z-index: 0;
}

/* ── HEADER ── */
.bwm-header {
    height: 170px;
    background: url('../assets/juu.jpg') center/cover no-repeat, #1b626e;
    color: #ffffff;
    text-align: right;
    padding: 20px 30px;
    box-sizing: border-box;
    border-top:   15px solid #1b626e;
    border-right: 15px solid #1b626e;
    border-left:  15px solid #1b626e;
    position: relative;
}

.bwm-header h3 {
    position: absolute;
    top: 20px; right: 158px;
    margin: 2px;
    font-size: 18px;
    font-weight: 700;
}

.bwm-header p {
    position: absolute;
    top: 40px; right: 45.9px;
    margin: 2px;
    font-size: 17px;
    font-weight: 700;
}

.bwm-school-name {
    position: absolute;
    top: 55px; right: 20px;
    margin: 5px;
    font-size: 20px;
    font-weight: 800;
}

/* ── CIRCULAR STUDENT PHOTO ── */
.bwm-photo-wrapper {
    position: absolute;
    top: 45px; left: 45px;
    width: 215px; height: 215px;
    border-radius: 50%;
    border: 8px solid #ffffff;
    overflow: hidden;
    z-index: 5;
    background-color: #eee;
}

.bwm-photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ── NAME + SIGNATURE ── */
.bwm-info-section {
    margin-left: 340px;
    margin-top: 15px;
    position: relative;
    z-index: 2;
}

.bwm-student-name {
    position: absolute;
    top: -10px; left: 0;
    font-size: 30px;
    color: #1b626e;
    font-weight: 800;
    margin: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 370px;
}

.bwm-sig-img {
    position: absolute;
    top: 30px; left: 85px;
    max-height: 42px;
    max-width: 180px;
    object-fit: contain;
}

.bwm-signature-font {
    position: absolute;
    font-family: 'Caveat', 'DM Serif Display', cursive;
    font-size: 28px;
    color: #333333;
    top: 24px;
    left: 85px;
}

/* ── SCHOOL LOGO ── */
.bwm-school-logo {
    position: absolute;
    right: 50px; top: 250px;
    width: 75px;
    z-index: 2;
    object-fit: contain;
}

/* ── DETAILS GRID ── */
.bwm-details-grid {
    display: flex;
    margin-top: 120px;
    padding-left: 30px;
    position: relative;
    z-index: 2;
}

.bwm-data-column {
    border-left: 5px solid #000000;
    padding: 0 20px;
    margin-right: 15px;
}

.bwm-col-noborder {
    border: none;
    padding-left: 10px;
    border-left: 5px solid #000000;
}

.bwm-label {
    color: #1b626e;
    font-weight: 800;
    font-size: 15px;
    text-transform: uppercase;
}

.bwm-value {
    font-weight: 800;
    font-size: 18px;
    margin-bottom: 12px;
}

.bwm-contacts {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.5;
    margin-left: 20px;
    margin-top: 30px;
}

.bwm-web { color: #1b626e; }

/* ── HEADMASTER ── */
.bwm-headmaster-area {
    text-align: center;
    margin-top: 10px;
}

.bwm-headmaster-area img {
    width: 100px;
    margin-bottom: -10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.bwm-headmaster-label {
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 1px;
    border-top: 1px solid #333;
    padding-top: 2px;
    margin-top: 4px;
}

/* ── FOOTER TAG ── */
.bwm-footer-tag {
    position: absolute;
    bottom: 8px;
    width: 100%;
    text-align: center;
    font-weight: 800;
    color: #666666;
    letter-spacing: 3px;
    font-size: 15px;
    z-index: 2;
}

/* ── BULK GRID: one card per row (card is wide) ── */
.bwm-card-grid {
    display: flex;
    flex-direction: column;
    gap: 28px;
    align-items: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
}