/* ==========================================
   Education Board - Main Stylesheet
   Mobile-First Responsive Design
   ========================================== */

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

:root {
    --green-dark:  #1b5e20;
    --green-main:  #2e7d32;
    --green-mid:   #388e3c;
    --green-light: #4caf50;
    --green-pale:  #e8f5e9;
    --orange:      #e65100;
    --gold:        #f57f17;
    --white:       #ffffff;
    --gray-bg:     #f2f4f5;
    --gray-light:  #eeeeee;
    --gray-mid:    #9e9e9e;
    --text-dark:   #212121;
    --text-mid:    #424242;
    --border:      #ddd;
    --shadow:      0 2px 8px rgba(0,0,0,0.10);
    --radius:      4px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Hind Siliguri', sans-serif;
    background: var(--gray-bg);
    color: var(--text-dark);
    font-size: 14px;
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ===== CONTAINER ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 12px;
}

/* ===== TOP BAR ===== */
.top-bar {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 5px 0;
    font-size: 11px;
}
.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}
.top-bar-links a {
    margin-left: 8px;
    color: var(--green-main);
    font-size: 11px;
}
.top-bar-links a:hover { text-decoration: underline; }

/* ===== HEADER ===== */
.site-header {
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 100%);
    padding: 10px 0;
    color: #fff;
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}
.header-logo {
    width: 72px;
    height: 72px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255,255,255,0.4);
    flex-shrink: 0;
    overflow: hidden;
}
.header-logo img { width: 100%; height: 100%; object-fit: cover; }
.header-logo .logo-text {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    text-align: center;
    line-height: 1;
}
.header-title { flex: 1; min-width: 0; }
.header-title h1 {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.header-title p {
    font-size: 11px;
    opacity: 0.85;
    letter-spacing: 0.3px;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.header-right { flex-shrink: 0; }
.btn-bangla {
    background: var(--orange);
    color: #fff;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

/* ===== MARQUEE BAR ===== */
.marquee-bar {
    background: var(--green-pale);
    border-top: 2px solid var(--green-light);
    border-bottom: 2px solid var(--green-light);
    padding: 6px 0;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.marquee-label {
    background: var(--orange);
    color: #fff;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    border-radius: 3px;
    margin-left: 12px;
    margin-right: 10px;
}
.marquee-label i { margin-right: 3px; }
.marquee-track { flex: 1; overflow: hidden; }
.marquee-track marquee {
    color: var(--green-dark);
    font-size: 13px;
    font-weight: 500;
}

/* ===== HAMBURGER TOGGLE (mobile) ===== */
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 8px 12px;
    margin-left: auto;
}

/* ===== NAVIGATION ===== */
.main-nav {
    background: var(--green-main);
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}
.nav-menu {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.nav-menu::-webkit-scrollbar { display: none; }
.nav-menu li a {
    display: block;
    padding: 11px 14px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    border-right: 1px solid rgba(255,255,255,0.12);
    transition: background 0.2s;
}
.nav-menu li a:hover,
.nav-menu li a.active { background: var(--green-dark); }

/* ===== MAIN LAYOUT ===== */
.main-content { padding: 12px 0 20px; }

/* Desktop 3-column grid */
.content-grid {
    display: grid;
    grid-template-columns: 195px 1fr 210px;
    gap: 12px;
    align-items: start;
}

/* ===== LEFT SIDEBAR ===== */
.sidebar-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.official-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 8px;
    text-align: center;
    box-shadow: var(--shadow);
}
.official-photo {
    width: 68px;
    height: 78px;
    border-radius: 4px;
    background: var(--gray-light);
    margin: 0 auto 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.official-photo img { width: 100%; height: 100%; object-fit: cover; }
.official-photo .no-photo { font-size: 26px; color: var(--gray-mid); }
.official-name { font-size: 12px; font-weight: 600; color: var(--text-dark); line-height: 1.3; }
.official-title { font-size: 11px; color: var(--green-main); margin-top: 3px; font-weight: 500; }

.quick-links-box {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.quick-links-box .box-head {
    background: var(--green-main);
    color: #fff;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 600;
}
.quick-link-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 12px;
    color: var(--text-dark);
    transition: background 0.15s;
}
.quick-link-item:last-child { border-bottom: none; }
.quick-link-item:hover { background: var(--green-pale); color: var(--green-main); }
.quick-link-item i { width: 14px; font-size: 12px; flex-shrink: 0; }

.exam-control-box {
    background: var(--green-dark);
    color: #fff;
    border-radius: var(--radius);
    padding: 10px;
    font-size: 12px;
}
.exam-control-box .box-head {
    font-weight: 700;
    font-size: 11px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.exam-control-box p { margin-bottom: 3px; }

.social-box {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.social-box .box-head {
    background: var(--green-mid);
    color: #fff;
    padding: 7px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.social-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 12px;
    transition: background 0.15s;
}
.social-link:last-child { border-bottom: none; }
.social-link:hover { background: var(--green-pale); }
.social-link .fb-icon { color: #1877f2; }
.social-link .yt-icon { color: #ff0000; }
.social-link .class-icon { color: var(--green-main); }

/* ===== CENTER CONTENT ===== */
.center-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

/* Slider */
.slider-wrap {
    background: var(--green-main);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    min-height: 190px;
    box-shadow: var(--shadow);
}
.slide { display: none; }
.slide.active { display: block; }
.slide-inner {
    background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
    padding: 28px 40px 46px;
    text-align: center;
    color: #fff;
    min-height: 190px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}
.slide-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 50%, rgba(255,255,255,0.05) 0%, transparent 60%);
    pointer-events: none;
}
.slide-logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.35);
}
.slide-title { font-size: 17px; font-weight: 700; line-height: 1.4; margin-bottom: 6px; }
.slide-sub { font-size: 12px; opacity: 0.85; margin-bottom: 14px; }
.slide-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.slide-btn {
    background: rgba(255,255,255,0.18);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.5);
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.2s;
}
.slide-btn:hover { background: rgba(255,255,255,0.32); }
.slide-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}
.slide-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: background 0.2s;
    border: none;
}
.slide-dot.active { background: #fff; }
.slide-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.25);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10;
}
.slide-nav:hover { background: rgba(0,0,0,0.45); }
.slide-nav.prev { left: 8px; }
.slide-nav.next { right: 8px; }

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.service-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 8px 12px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.service-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.14);
}
.service-icon {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}
/* Cycle through 3 color schemes */
.service-card:nth-child(3n+1) .service-icon { background: #e8f5e9; color: #2e7d32; }
.service-card:nth-child(3n+2) .service-icon { background: #fff3e0; color: #e65100; }
.service-card:nth-child(3n)   .service-icon { background: #e3f2fd; color: #1565c0; }
.service-title { font-size: 12px; font-weight: 600; color: var(--text-dark); line-height: 1.4; }

/* ===== RIGHT SIDEBAR ===== */
.sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notice-box {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.notice-box-head {
    background: var(--green-main);
    color: #fff;
    padding: 9px 12px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.5px;
}
.notice-list { max-height: 380px; overflow-y: auto; }
.notice-item {
    display: block;
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-dark);
    transition: background 0.15s;
}
.notice-item:last-child { border-bottom: none; }
.notice-item:hover { background: var(--green-pale); color: var(--green-dark); }
.notice-item.urgent { border-left: 3px solid var(--orange); padding-left: 9px; }
.urgent-dot { color: var(--orange); margin-right: 2px; font-size: 10px; }
.notice-date { font-size: 10px; color: var(--gray-mid); margin-top: 2px; }
.notice-more {
    display: block;
    text-align: center;
    padding: 8px;
    background: var(--green-pale);
    color: var(--green-main);
    font-size: 12px;
    font-weight: 600;
    border-top: 1px solid #ddd;
    transition: background 0.15s;
}
.notice-more:hover { background: var(--green-light); color: #fff; }

/* ===== PAGE INNER LAYOUT ===== */
.page-title-bar {
    background: var(--green-main);
    color: #fff;
    padding: 12px 0;
    margin-bottom: 14px;
}
.page-title-bar h2 { font-size: 17px; font-weight: 600; }
.breadcrumb { font-size: 11px; opacity: 0.8; margin-top: 3px; }
.breadcrumb a { color: rgba(255,255,255,0.8); }

.page-content-wrap {
    background: #fff;
    border-radius: var(--radius);
    padding: 22px 20px;
    box-shadow: var(--shadow);
    min-height: 350px;
    grid-column: 2 / 4;
}
.page-content-wrap h3 { color: var(--green-main); margin-bottom: 12px; font-size: 16px; }
.page-content-wrap p { margin-bottom: 10px; line-height: 1.8; }

/* ===== ALL NOTICES PAGE ===== */
.notice-row {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 12px 14px;
    margin-bottom: 8px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.notice-row .urgent-badge {
    background: var(--orange);
    color: #fff;
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 20px;
    white-space: nowrap;
    margin-top: 2px;
    flex-shrink: 0;
}
.notice-row .notice-text { flex: 1; font-size: 13px; color: var(--text-dark); min-width: 0; }
.notice-row .download-btn {
    background: var(--green-main);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    flex-shrink: 0;
}
.notice-row .download-btn:hover { background: var(--green-dark); }

/* ===== FLASH MESSAGES ===== */
.flash {
    padding: 10px 14px;
    border-radius: 4px;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 500;
}
.flash-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.flash-error   { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }

/* ===== FOOTER ===== */
.site-footer {
    background: var(--green-dark);
    color: rgba(255,255,255,0.85);
    padding: 16px 0;
    margin-top: 20px;
    font-size: 12px;
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.footer-copy { font-size: 12px; }
.footer-links { display: flex; gap: 12px; flex-wrap: wrap; }
.footer-links a { color: rgba(255,255,255,0.7); font-size: 11px; }
.footer-links a:hover { color: #fff; }

/* ================================================================
   RESPONSIVE BREAKPOINTS
   ================================================================ */

/* ---- TABLET: max 960px ---- */
@media (max-width: 960px) {
    .content-grid {
        grid-template-columns: 185px 1fr;
        grid-template-areas:
            "left center"
            "right right";
    }
    .sidebar-left  { grid-area: left; }
    .center-content { grid-area: center; }
    .sidebar-right {
        grid-area: right;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }
    .sidebar-right > * { flex: 1 1 280px; }

    .services-grid { grid-template-columns: repeat(3, 1fr); }

    .header-title h1 { font-size: 16px; }
    .header-title p  { font-size: 10px; }
}

/* ---- MOBILE: max 680px ---- */
@media (max-width: 680px) {
    /* Header */
    .header-logo { width: 54px; height: 54px; }
    .header-logo .logo-text { font-size: 15px; }
    .header-title h1 { font-size: 13px; white-space: normal; }
    .header-title p  { display: none; }
    .btn-bangla { font-size: 10px; padding: 3px 7px; }

    /* Nav: hamburger toggle */
    .nav-toggle { display: block; }
    .nav-menu {
        display: none;
        flex-direction: column;
        background: var(--green-dark);
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 300;
        box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    }
    .nav-menu.open { display: flex; }
    .nav-menu li a {
        padding: 12px 16px;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        font-size: 14px;
        white-space: normal;
    }
    .main-nav { position: sticky; top: 0; }
    .nav-inner { position: relative; }

    /* Single column layout */
    .content-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "center"
            "right"
            "left";
        gap: 10px;
    }
    .sidebar-left  { grid-area: left;   flex-direction: row; flex-wrap: wrap; }
    .sidebar-left > * { flex: 1 1 140px; }
    .center-content { grid-area: center; }
    .sidebar-right {
        grid-area: right;
        flex-direction: column;
    }

    /* Officials side-by-side on mobile */
    .official-card { min-width: 130px; }
    .official-photo { width: 56px; height: 64px; }
    .official-name  { font-size: 11px; }

    /* Services 2 col on mobile */
    .services-grid { grid-template-columns: repeat(2, 1fr); gap: 7px; }
    .service-icon  { width: 46px; height: 46px; font-size: 20px; }
    .service-title { font-size: 11px; }

    /* Slider */
    .slide-inner { padding: 20px 36px 42px; }
    .slide-title  { font-size: 14px; }
    .slide-sub    { font-size: 11px; }

    /* Page inner */
    .page-content-wrap { grid-column: 1; padding: 16px; }

    /* Notice rows */
    .notice-row { flex-direction: column; gap: 6px; }

    /* Top bar */
    .top-bar .container { flex-direction: column; align-items: flex-start; }
    .top-bar-links { margin-bottom: 1px; }
    .top-bar-links a { margin-left: 0; margin-right: 8px; }

    /* Marquee */
    .marquee-label { font-size: 10px; padding: 2px 7px; }
    .marquee-track marquee { font-size: 12px; }

    /* Footer */
    .footer-inner { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ---- SMALL MOBILE: max 400px ---- */
@media (max-width: 400px) {
    .container { padding: 0 8px; }
    .header-inner { gap: 8px; }
    .header-logo { width: 46px; height: 46px; }
    .header-title h1 { font-size: 12px; }
    .services-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .service-card { padding: 10px 5px; }
}

/* ===== INNER PAGE GRID (2-col: sidebar + content) ===== */
.inner-page-grid {
    display: grid;
    grid-template-columns: 195px 1fr;
    gap: 12px;
    align-items: start;
}
.inner-content-wrap {
    background: #fff;
    border-radius: var(--radius);
    padding: 22px 20px;
    box-shadow: var(--shadow);
    min-height: 350px;
}
.inner-content-wrap h3 { color: var(--green-main); margin-bottom: 12px; font-size: 16px; }
.inner-content-wrap p  { margin-bottom: 10px; line-height: 1.8; }

@media (max-width: 680px) {
    .inner-page-grid {
        grid-template-columns: 1fr;
    }
    .inner-page-grid .sidebar-left {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .inner-page-grid .sidebar-left > * { flex: 1 1 140px; }
    .inner-content-wrap { padding: 14px; }
    .notice-row { flex-direction: column; gap: 6px; }
}
