/* -------------------------------------------------------
   Full UI stylesheet — updated colors + footer contrast fix
   Replace your existing CSS file with this content
   ------------------------------------------------------- */

/* ---------------- Variables (kept / extended) ---------------- */
:root {
    --primary-color: #0d6efd;        /* main blue */
    --primary-600: #0056b3;
    --accent-color: #6f42c1;         /* purple accent */
    --secondary-color: #6c757d;      /* muted grey for text */
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;

    --light-bg: #f8f9fa;             /* page background (light) */
    --surface: #ffffff;              /* card / surface bg */
    --muted-surface: #f1f3f5;
    --dark-bg: #212529;              /* default dark shade */
    --footer-bg: #0b1220;            /* footer background (dark) */
    --text: #111827;                 /* main text on light surfaces */
    --text-muted: #6b7280;           /* muted text color */

    --radius-lg: 12px;
    --radius-md: 8px;

    --shadow-sm: 0 4px 12px rgba(16,24,40,0.06);
    --shadow-md: 0 10px 30px rgba(16,24,40,0.08);

    --transition-fast: 180ms;
    --transition-smooth: 280ms;
}

/* ---------------- Reset & Base ---------------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main { flex: 1; }

/* small helper */
.text-muted { color: var(--text-muted) !important; }
.small { font-size: 0.88rem; }

/* links */
a { color: var(--primary-color); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--primary-600); text-decoration: underline; }

/* buttons lightweight */
.btn {
    display:inline-flex; align-items:center; gap:.5rem;
    padding:.48rem .8rem; border-radius:8px; cursor:pointer;
    border:1px solid transparent; font-weight:600; transition: all var(--transition-fast);
}

/* ---------------- Search results dropdown ---------------- */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-radius: 0 0 8px 8px;
    box-shadow: var(--shadow-md);
    max-height: 420px;
    overflow-y: auto;
    z-index: 1050;
    display: none;
}
.search-results.show { display:block; }
.search-result-item {
    padding: 10px 15px;
    border-bottom: 1px solid #eef0f3;
    cursor: pointer;
    transition: background var(--transition-fast);
}
.search-result-item:hover { background: var(--muted-surface); }
.search-result-item:last-child { border-bottom: none; }

/* ---------------- Hero ---------------- */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
    text-align: center;
}
.hero-section h1 { font-weight: 700; margin: 0 0 .25rem; font-size: clamp(1.6rem, 3.6vw, 2.4rem); }
.hero-section p.lead { color: rgba(255,255,255,0.9); margin-bottom: .75rem; }

/* search control in hero */
.input-group { max-width: 760px; margin: 0 auto; width: 100%; }
.input-group .form-control {
    border-radius: 10px 0 0 10px;
    border: 1px solid #e7e9ee;
    background: var(--surface);
    padding: 0.9rem .9rem;
    font-size: 1rem;
}
.input-group .form-control:focus { outline: none; border-color: var(--primary-600); box-shadow: 0 8px 28px rgba(13,110,253,0.07); }
.input-group .btn {
    border-radius: 0 10px 10px 0;
    border:1px solid #e7e9ee;
    background: var(--primary-color);
    color: #fff;
}

/* ---------------- Stats card ---------------- */
.stats-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.stats-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.stats-card .number { font-size: 1.9rem; font-weight: 800; color: var(--primary-color); }
.stats-card .label { color: var(--text-muted); }

/* ---------------- Branch card ---------------- */
.branch-card {
    background: linear-gradient(180deg, var(--surface), #fbfdff);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    text-align: left;
    border: 1px solid #eef3f7;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}
.branch-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 14px 40px rgba(16,24,40,0.08);
    border-color: var(--primary-600);
}
.branch-card .icon { font-size: 2.2rem; color: var(--primary-color); margin-bottom: .45rem; }
.branch-card h5 { margin:0; color: var(--text); font-weight: 700; font-size: 1.05rem; }
.branch-card p { margin:0; color: var(--text-muted); font-size: .92rem; }

/* clickable link wrapper */
.card-link { display:block; color:inherit; text-decoration:none; height:100%; }

/* ---------------- Semester & Subject cards ---------------- */
.semester-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-600));
    color: white; border-radius: var(--radius-md);
    padding: 1.25rem; text-align:center;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.semester-card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(13,110,253,0.14); }

.subject-card {
    background: var(--surface);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
    transition: box-shadow var(--transition-fast);
}
.subject-card:hover { box-shadow: 0 8px 30px rgba(16,24,40,0.06); }

.subject-code {
    font-size: 0.85rem; color: var(--primary-color); font-weight:700;
    background: rgba(13,110,253,0.06); padding:4px 8px; border-radius: 6px; display:inline-block; margin-bottom:.5rem;
}
.subject-name { font-weight:700; color: var(--text); margin-bottom:.35rem; }
.subject-scheme { font-size:.85rem; color: var(--text-muted); }

/* ---------------- PYQ buttons ---------------- */
.pyq-btn {
    font-size: .85rem; padding: .35rem .6rem; border-radius:7px; margin:2px; border:1px solid transparent;
}
.pyq-btn.summer { background:#fff8e6; color:#785100; border-color:#ffdd66; }
.pyq-btn.summer:hover { background:#ffdd57; color:#222; }
.pyq-btn.winter { background:#e9f2ff; color:#084298; border-color:#d0e6ff; }
.pyq-btn.winter:hover { background:var(--primary-color); color:#fff; }
.pyq-btn.manual { background:#eaf8f1; color:#0f5132; border-color:#c6efd9; }
.pyq-btn.manual:hover { background:var(--success-color); color:#fff; }

/* ---------------- Breadcrumb / misc ---------------- */
.breadcrumb-custom {
    background: var(--surface);
    padding:1rem;
    border-radius:8px;
    margin-bottom:1.25rem;
    box-shadow: var(--shadow-sm);
}

.elective-badge {
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: #212529; font-size:.75rem; padding: 4px 8px; border-radius: 6px;
}

/* status icons */
.status-icon { font-size:.95rem; margin-left:6px; vertical-align:middle; }
.status-icon.available { color: var(--success-color); }
.status-icon.unavailable { color: var(--warning-color); }
.status-icon.manual { color: var(--primary-color); }

/* ---------------- FOOTER (contrast fix here) ---------------- */
/* Use this rule to ensure footer text is always readable even on grey backgrounds */
footer {
    background: var(--footer-bg);   /* you can change this variable if needed */
    color: #e6eef8;
    padding: 2.25rem 0;
    border-top: 1px solid rgba(255,255,255,0.03);
}

/* Important: ensure muted text inside footer is lighter (not the page muted grey) */
footer .text-muted, footer .small {
    color: rgba(230,238,248,0.78) !important;   /* readable light grey */
}

/* Footer links high contrast */
footer a {
    color: #ffffffcc !important;
    text-decoration: none;
    transition: color var(--transition-fast);
}
footer a:hover { color: #ffffff !important; text-decoration: underline; }

/* Footer copyright / disclaimer tweak */
footer .mb-0 { color: rgba(230,238,248,0.9); }
footer p.disclaimer { font-size: 0.9rem; line-height:1.45; color: rgba(230,238,248,0.78); margin-top:0.35rem; }

/* If footer uses .bg-dark + .text-muted classes from bootstrap, override them */
.bg-dark.text-light, .bg-dark.text-muted {
    background: var(--footer-bg) !important;
}

/* ---------------- Admin UI (keeps previous look) ---------------- */
.admin-sidebar {
    background: var(--dark-bg);
    min-height: calc(100vh - 56px);
    padding: 1rem 0;
    color: rgba(255,255,255,0.9);
}
.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.85);
    padding: 0.75rem 1.25rem;
    display:flex; align-items:center; gap:.6rem;
}
.admin-sidebar .nav-link:hover, .admin-sidebar .nav-link.active {
    background: rgba(255,255,255,0.03);
    color: #fff;
}
.admin-sidebar .nav-link i { width:24px; }

/* admin content area */
.admin-content { padding: 1.5rem; background: var(--light-bg); min-height: calc(100vh - 56px); }
.admin-card { background: var(--surface); border-radius:10px; padding:1.25rem; box-shadow: var(--shadow-sm); margin-bottom:1rem; }

/* admin stat cards */
.admin-stat-card { color: #fff; border-radius:10px; padding:1rem; }
.admin-stat-card.success { background: linear-gradient(135deg, var(--success-color), #0f5132); }
.admin-stat-card.warning { background: linear-gradient(135deg, var(--warning-color), #997404); color:#222; }
.admin-stat-card.danger { background: linear-gradient(135deg, var(--danger-color), #842029); }

/* ---------------- Form controls & toggles ---------------- */
.form-label { font-weight: 600; color: var(--text); }
.toggle-switch { position: relative; display:inline-block; width:50px; height:26px; }
.toggle-switch input { opacity:0; width:0; height:0; }
.toggle-slider { position:absolute; cursor:pointer; top:0; left:0; right:0; bottom:0; background:#dfe6ee; transition:0.25s; border-radius:26px; }
.toggle-slider:before { position:absolute; content:''; height:20px; width:20px; left:3px; bottom:3px; background:white; transition:0.25s; border-radius:50%; }
input:checked + .toggle-slider { background: var(--primary-color); box-shadow: 0 6px 18px rgba(13,110,253,0.12); }
input:checked + .toggle-slider:before { transform: translateX(24px); }

/* json-ld hidden */
.json-ld { display: none; }

/* ---------------- Responsiveness ---------------- */
@media (max-width: 991px) {
    .stats-card .number { font-size: 1.6rem; }
    .hero-section { padding: 28px 0; }
}
@media (max-width: 768px) {
    .input-group { padding: 0 12px; }
    .branch-card { padding: 14px; }
    .branch-card .icon { font-size: 2rem; }
    .hero-section h1 { font-size: 1.6rem; }
}

/* small accessibility tweak: focus outlines */
a:focus, button:focus, input:focus { outline: 3px solid rgba(13,110,253,0.12); outline-offset: 2px; border-radius: 6px; }










