/* ─── SIRTIKA Brand Variables ─────────────────────────────────── */
:root {
    --sirtika-navy: #0F2E4C;
    --sirtika-navy-light: #163d63;
    --sirtika-gold: #C19A3B;
    --sirtika-gold-light: #d4b05a;
    --sirtika-gold-pale: #f9f4e8;
    --sidebar-width: 230px;
}

/* ─── Typography ──────────────────────────────────────────────── */
body {
    font-family: 'Calibri', 'Segoe UI', Arial, sans-serif;
    color: #222;
    background: #f8f9fa;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Calibri', 'Segoe UI', Arial, sans-serif;
    font-weight: 700;
    color: var(--sirtika-navy);
}

/* ─── Navbar ──────────────────────────────────────────────────── */
.sirtika-navbar {
    background: var(--sirtika-navbar-bg, var(--sirtika-navy));
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.admin-navbar {
    background: var(--sirtika-navbar-bg, var(--sirtika-navy));
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.brand-sirtika { color: var(--sirtika-gold); font-size: 1.25rem; letter-spacing: 0.04em; }
.brand-los     { color: #fff; font-size: 1.05rem; }

/* ─── Buttons ─────────────────────────────────────────────────── */
.btn-gold {
    background: var(--sirtika-gold);
    color: #fff;
    border: none;
    font-weight: 600;
}
.btn-gold:hover {
    background: var(--sirtika-gold-light);
    color: #fff;
}
.btn-navy {
    background: var(--sirtika-navy);
    color: #fff;
    border: none;
    font-weight: 600;
}
.btn-navy:hover {
    background: var(--sirtika-navy-light);
    color: #fff;
}

/* ─── Text helpers ────────────────────────────────────────────── */
.text-gold  { color: var(--sirtika-gold) !important; }
.text-navy  { color: var(--sirtika-navy) !important; }
.bg-navy    { background-color: var(--sirtika-navy) !important; }
.bg-gold    { background-color: var(--sirtika-gold) !important; }
.bg-gold-pale { background-color: var(--sirtika-gold-pale) !important; }

/* ─── Public Hero ─────────────────────────────────────────────── */
.hero-section {
    background: var(--sirtika-navy);
    color: #fff;
    padding: 90px 0 80px;
}
.hero-section h1 {
    color: #fff;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.25;
}
.hero-accent { color: var(--sirtika-gold); }

/* ─── Section decorators ──────────────────────────────────────── */
.section-title {
    color: var(--sirtika-navy);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}
.section-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: var(--sirtika-gold);
    margin-top: 8px;
}

/* ─── Week cards ──────────────────────────────────────────────── */
.week-card {
    border: 1px solid #dee2e6;
    border-radius: 10px;
    background: #fff;
    transition: box-shadow 0.2s;
}
.week-card:hover { box-shadow: 0 4px 18px rgba(15,46,76,0.1); }
.week-number-badge {
    background: var(--sirtika-navy);
    color: var(--sirtika-gold);
    border-radius: 50%;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1rem;
    flex-shrink: 0;
}

/* ─── Stat cards ──────────────────────────────────────────────── */
.stat-card {
    background: #fff;
    border-radius: 10px;
    border-left: 4px solid var(--sirtika-gold);
    padding: 1.25rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--sirtika-navy);
    line-height: 1;
}
.stat-card .stat-label { color: #6c757d; font-size: 0.9rem; margin-top: 4px; }

/* ─── Portal Sidebar ──────────────────────────────────────────── */
.portal-sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--sirtika-navy);
    padding: 0;
}
.admin-sidebar { background: var(--sirtika-navy); }

.portal-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: var(--sirtika-menu-color, rgba(255,255,255,0.75));
    text-decoration: none;
    font-size: 0.92rem;
    transition: background 0.15s, color 0.15s;
}
.portal-nav-link i { width: 18px; text-align: center; }
.portal-nav-link:hover { background: rgba(255,255,255,0.08); color: #fff; }
.portal-nav-link.active { background: rgba(193,154,59,0.18); color: var(--sirtika-gold); border-right: 3px solid var(--sirtika-gold); }

/* ─── Portal Main ─────────────────────────────────────────────── */
.portal-main { background: #f4f6f8; min-height: 100%; min-width: 0; overflow-x: hidden; }
.portal-body  { background: #f4f6f8; }

/* ─── Progress bar ────────────────────────────────────────────── */
.progress { height: 10px; border-radius: 5px; }
.progress-bar-gold { background: var(--sirtika-gold); }

/* ─── Topic viewer ────────────────────────────────────────────── */
.topic-viewer-frame {
    width: 100%;
    height: 75vh;
    border: none;
    border-radius: 8px;
    background: #fff;
}

/* ─── Capstone status badges ──────────────────────────────────── */
.status-pill {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ─── Download cards ──────────────────────────────────────────── */
.download-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    padding: 1.1rem 1.4rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: box-shadow 0.2s;
}
.download-card:hover { box-shadow: 0 3px 14px rgba(15,46,76,0.1); }
.download-icon {
    width: 46px; height: 46px;
    background: var(--sirtika-gold-pale);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: var(--sirtika-gold);
    font-size: 1.3rem;
    flex-shrink: 0;
}
.download-card.locked { opacity: 0.55; }

/* ─── Certificate PDF ─────────────────────────────────────────── */
.cert-container {
    background: #fff;
    border: 8px solid var(--sirtika-navy);
    border-radius: 4px;
    padding: 60px 70px;
    position: relative;
}
.cert-container::before {
    content: '';
    position: absolute;
    inset: 10px;
    border: 2px solid var(--sirtika-gold);
    border-radius: 2px;
    pointer-events: none;
}

/* ─── Footer ──────────────────────────────────────────────────── */
.sirtika-footer {
    background: var(--sirtika-footer, var(--sirtika-navy));
    color: rgba(255,255,255,0.7);
}
.sirtika-footer a { color: rgba(255,255,255,0.6); text-decoration: none; }
.sirtika-footer a:hover { color: var(--sirtika-gold); }
.footer-heading { color: var(--sirtika-gold); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }

/* ─── Mobile nav ──────────────────────────────────────────────── */
.mobile-nav {
    background: var(--sirtika-navy);
    display: flex;
    justify-content: space-around;
    padding: 8px 0 4px;
}
.mobile-nav a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.7rem;
    gap: 3px;
}
.mobile-nav a i { font-size: 1.1rem; }
.mobile-nav a.active { color: var(--sirtika-gold); }

/* ─── Tables ──────────────────────────────────────────────────── */
.table thead th { background: var(--sirtika-navy); color: #fff; border: none; font-weight: 600; font-size: 0.88rem; }
.table-hover tbody tr:hover { background: var(--sirtika-gold-pale); }

/* ─── Cards ───────────────────────────────────────────────────── */
.card { border: 1px solid #e3e8ee; border-radius: 10px; }
.card-header-navy { background: var(--sirtika-navy); color: #fff; border-radius: 10px 10px 0 0 !important; padding: 0.85rem 1.25rem; }
.card-header-navy h5, .card-header-navy h6 { color: #fff; margin: 0; }

/* ─── Pricing card ────────────────────────────────────────────── */
.pricing-card {
    border: 2px solid var(--sirtika-gold);
    border-radius: 14px;
    padding: 2.5rem;
    background: #fff;
    text-align: center;
    box-shadow: 0 6px 24px rgba(15,46,76,0.12);
}
.pricing-amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--sirtika-navy);
    line-height: 1;
}
.pricing-currency { font-size: 1.5rem; vertical-align: top; margin-top: 10px; display: inline-block; }

/* ─── Auth forms ──────────────────────────────────────────────── */
.auth-card {
    max-width: 480px;
    margin: 60px auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 6px 28px rgba(15,46,76,0.1);
    overflow: hidden;
}
.auth-card-header {
    background: var(--sirtika-navy);
    color: #fff;
    padding: 2rem 2rem 1.5rem;
    text-align: center;
}
.auth-card-header h2 { color: #fff; font-size: 1.6rem; }
.auth-card-header p  { color: rgba(255,255,255,0.7); margin: 0; }
.auth-card-body { padding: 2rem; }
.form-control:focus { border-color: var(--sirtika-gold); box-shadow: 0 0 0 0.2rem rgba(193,154,59,0.2); }
.form-check-input:checked { background-color: var(--sirtika-navy); border-color: var(--sirtika-navy); }

/* ─── Announcement ────────────────────────────────────────────── */
.announcement-card {
    border-left: 4px solid var(--sirtika-gold);
    background: #fff;
    border-radius: 0 8px 8px 0;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

/* ─── Admin Mobile Sidebar ────────────────────────────────────── */
.admin-mobile-sidebar {
    position: fixed;
    top: 0; left: 0;
    width: 270px;
    height: 100%;
    height: 100vh;
    background: #0a1e30;
    z-index: 1060;
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.admin-mobile-sidebar.open {
    transform: translateX(0);
    -webkit-transform: translateX(0);
}
.admin-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.55);
    z-index: 1055;
    cursor: pointer;
}
.admin-overlay.open {
    display: block;
}

/* Hide mobile sidebar/overlay on desktop */
@media (min-width: 768px) {
    .admin-mobile-sidebar,
    .admin-overlay,
    #admin-menu-toggle { display: none !important; }
}

/* ─── Student Mobile Sidebar ──────────────────────────────────── */
.student-mobile-sidebar {
    position: fixed;
    top: 0; left: 0;
    width: 270px;
    height: 100%;
    height: 100vh;
    background: var(--sirtika-navy);
    z-index: 1060;
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.student-mobile-sidebar.open {
    transform: translateX(0);
    -webkit-transform: translateX(0);
}
.student-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.55);
    z-index: 1055;
    cursor: pointer;
}
.student-overlay.open {
    display: block;
}

@media (min-width: 768px) {
    .student-mobile-sidebar,
    .student-overlay,
    #student-menu-toggle { display: none !important; }
}

/* ─── Public Mobile Sidebar ───────────────────────────────────── */
.public-mobile-sidebar {
    position: fixed;
    top: 0; left: 0;
    width: 280px;
    height: 100%;
    height: 100vh;
    background: var(--sirtika-navy);
    z-index: 1060;
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.public-mobile-sidebar.open {
    transform: translateX(0);
    -webkit-transform: translateX(0);
}
.public-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.55);
    z-index: 1055;
    cursor: pointer;
}
.public-overlay.open {
    display: block;
}

@media (min-width: 992px) {
    .public-mobile-sidebar,
    .public-overlay,
    #public-menu-toggle { display: none !important; }
}

/* ─── Responsive ──────────────────────────────────────────────── */
@media (max-width: 767px) {
    .portal-main { padding: 1rem !important; }
    .hero-section { padding: 50px 0 40px; }
    .auth-card { margin: 20px; }

    /* Tables: scroll inside wrapper, not the whole page */
    .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
    .table-responsive .table { min-width: 580px; }

    /* Cards full width */
    .card { margin-bottom: 1rem; }

    /* Stack action buttons */
    .btn-group-mobile { display: flex; flex-direction: column; gap: .4rem; }
    .btn-group-mobile .btn { width: 100%; }

    /* Headings */
    h4.fw-bold { font-size: 1.1rem; }

    /* Form max-width override */
    [style*="max-width:700px"],
    [style*="max-width:560px"] { max-width: 100% !important; }
}

@media (max-width: 575px) {
    .portal-main { padding: .75rem !important; }
    .d-flex.justify-content-between { flex-wrap: wrap; gap: .5rem; }
}
