/* GSSS Jamalpur — Institutional School Website */
/* Color reference: Navy + White + Gold — inspired by KV/NVS/Govt education sites */

:root {
    --navy: #0c2d57;
    --navy-light: #1a4a7a;
    --navy-pale: #e8f0f8;
    --gold: #b8860b;
    --gold-light: #faf3e0;
    --red: #b91c1c;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Noto Serif TC', Georgia, serif;
    --max-w: 1100px;
    --radius: 4px;
}

/* === RESET === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-main); font-size: 14px; line-height: 1.6; color: var(--gray-900); background: var(--white); }
a { color: var(--navy-light); text-decoration: none; }
a:hover { color: var(--navy); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 16px; }

/* === TOP BAR === */
.top-bar {
    background: var(--navy);
    color: rgba(255,255,255,0.8);
    font-size: 11px;
    padding: 5px 0;
}
.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-bar__left { display: flex; gap: 16px; }
.top-bar__left span { display: flex; align-items: center; gap: 4px; }
.top-bar__right { display: flex; gap: 8px; }
.top-bar__right a { color: rgba(255,255,255,0.7); display: flex; }
.top-bar__right a:hover { color: white; text-decoration: none; }

/* === HEADER === */
.header {
    background: var(--white);
    border-bottom: 3px solid var(--gold);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo:hover { text-decoration: none; }
.logo img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.logo-text strong { display: block; font-size: 13px; color: var(--navy); line-height: 1.3; }
.logo-text small { font-size: 10px; color: var(--gray-500); }

.nav { display: flex; gap: 1px; }
.nav a {
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-700);
    padding: 6px 12px;
    border-radius: var(--radius);
    text-decoration: none;
}
.nav a:hover, .nav a.active { background: var(--navy-pale); color: var(--navy); text-decoration: none; }
.nav-dropdown { position: relative; }
.nav-dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 4px 0;
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 200;
}
.dropdown-menu a { display: block; padding: 6px 12px; font-size: 11px; border-radius: 0; color: var(--gray-700); }
.dropdown-menu a:hover { background: var(--gray-50); color: var(--navy); text-decoration: none; }

.menu-toggle { display: none; background: none; border: none; color: var(--navy); padding: 4px; }

/* === NEWS TICKER === */
.news-ticker {
    background: var(--gold-light);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    height: 32px;
    overflow: hidden;
}
.news-ticker__label {
    background: var(--red);
    color: white;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 12px;
    height: 100%;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.news-ticker__track { overflow: hidden; flex: 1; display: flex; align-items: center; }
.news-ticker__content {
    display: flex;
    gap: 50px;
    animation: ticker 35s linear infinite;
    white-space: nowrap;
    padding-left: 16px;
}
.news-ticker__content span { font-size: 11px; color: var(--gray-700); flex-shrink: 0; }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* === HERO / CAROUSEL === */
.hero-carousel { position: relative; height: 340px; overflow: hidden; background: var(--navy); }
.carousel-slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 0.6s; }
.carousel-slide.active { opacity: 1; }
.carousel-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to right, rgba(12,45,87,0.88), rgba(12,45,87,0.4));
    display: flex; flex-direction: column; justify-content: center;
    padding: 0 50px;
}
.carousel-overlay h1 { font-family: var(--font-heading); font-size: 28px; color: white; margin-bottom: 8px; max-width: 550px; font-weight: 500; }
.carousel-overlay p { font-size: 14px; color: rgba(255,255,255,0.75); max-width: 450px; }
.carousel-controls { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; }
.carousel-btn { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.25); color: white; width: 32px; height: 32px; border-radius: 50%; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.carousel-btn:hover { background: rgba(255,255,255,0.25); }
.carousel-dots { position: absolute; bottom: 14px; left: 50px; display: flex; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.35); cursor: pointer; }
.dot.active { background: white; }

/* === INFO BAR === */
.info-bar { background: var(--gray-50); border-bottom: 1px solid var(--gray-200); padding: 12px 0; }
.info-bar .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.info-bar__item { display: flex; align-items: center; gap: 8px; }
.info-bar__item svg { color: var(--navy-light); }
.info-bar__item strong { font-size: 10px; text-transform: uppercase; letter-spacing: 0.3px; color: var(--gray-500); display: block; }
.info-bar__item span { font-size: 13px; font-weight: 600; color: var(--gray-900); }

/* === SECTIONS === */
.section { padding: 44px 0; }
.section--alt { background: var(--gray-50); }
.section-title {
    font-family: var(--font-heading);
    font-size: 20px;
    color: var(--navy);
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 10px;
}
.section-title::after { content: ''; position: absolute; bottom: 0; left: 0; width: 36px; height: 3px; background: var(--gold); }
.section-title--center { text-align: center; }
.section-title--center::after { left: 50%; transform: translateX(-50%); }
.section-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 20px; }
.section-header .section-title { margin-bottom: 0; }

.btn-text { font-size: 12px; font-weight: 600; color: var(--navy-light); }
.btn-text:hover { color: var(--navy); }

/* === ABOUT SNIPPET === */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; }
.about-grid__text h2 { font-family: var(--font-heading); font-size: 20px; color: var(--navy); margin-bottom: 12px; }
.about-grid__text p { font-size: 13px; color: var(--gray-700); margin-bottom: 10px; line-height: 1.7; }
.about-grid__img img { border-radius: var(--radius); border: 1px solid var(--gray-200); }

/* === FEATURES === */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature {
    padding: 20px 16px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--white);
    text-align: center;
}
.feature svg { margin: 0 auto 10px; color: var(--navy-light); }
.feature h3 { font-size: 13px; font-weight: 600; color: var(--gray-900); margin-bottom: 6px; }
.feature p { font-size: 11px; color: var(--gray-500); line-height: 1.5; }

/* === EVENTS === */
.events { display: flex; flex-direction: column; }
.event { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--gray-100); }
.event:last-child { border-bottom: none; }
.event__date { background: var(--navy); color: white; border-radius: var(--radius); padding: 6px 10px; text-align: center; min-width: 50px; flex-shrink: 0; }
.event__date .day { display: block; font-size: 18px; font-weight: 700; line-height: 1.1; }
.event__date .month { display: block; font-size: 9px; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.8; }
.event__date .year { display: block; font-size: 9px; opacity: 0.5; }
.event__info h4 { font-size: 13px; font-weight: 600; color: var(--gray-900); margin-bottom: 3px; }
.event__info p { font-size: 12px; color: var(--gray-500); line-height: 1.5; }

/* === QUICK LINKS === */
.qlinks { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.qlink {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 16px 8px; border: 1px solid var(--gray-200); border-radius: var(--radius);
    text-align: center; color: var(--gray-700); text-decoration: none;
}
.qlink:hover { border-color: var(--navy-light); color: var(--navy); background: var(--navy-pale); text-decoration: none; }
.qlink svg { color: var(--navy-light); }
.qlink span { font-size: 10px; font-weight: 500; line-height: 1.3; }

/* === FOOTER === */
.footer { background: var(--navy); color: rgba(255,255,255,0.8); padding: 36px 0 16px; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1.2fr; gap: 24px; margin-bottom: 20px; }
.footer h4 { font-size: 13px; color: white; margin-bottom: 10px; }
.footer p { font-size: 12px; line-height: 1.6; opacity: 0.75; }
.footer a { color: rgba(255,255,255,0.7); font-size: 12px; display: block; margin-bottom: 5px; text-decoration: none; }
.footer a:hover { color: white; text-decoration: none; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 12px; display: flex; justify-content: space-between; font-size: 10px; opacity: 0.5; }
.social-links { display: flex; gap: 8px; margin-top: 10px; }
.social-links a { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,0.08); margin: 0; }
.social-links a:hover { background: rgba(255,255,255,0.18); }

/* === PAGE HEADER (subpages) === */
.page-hero { background: var(--navy); color: white; padding: 32px 0; border-bottom: 3px solid var(--gold); }
.page-hero h1 { font-family: var(--font-heading); font-size: 22px; font-weight: 500; }
.page-hero p { font-size: 13px; opacity: 0.7; margin-top: 4px; }

/* === DOCUMENTS === */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.doc-card { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--gray-200); border-radius: var(--radius); color: var(--gray-700); text-decoration: none; }
.doc-card:hover { border-color: var(--navy-light); background: var(--navy-pale); text-decoration: none; }
.doc-card h4 { font-size: 12px; font-weight: 600; }
.doc-card p { font-size: 10px; color: var(--gray-500); }

/* === CONTACT === */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.contact-info h3 { font-size: 16px; color: var(--navy); margin-bottom: 14px; }
.contact-info .item { display: flex; gap: 8px; margin-bottom: 10px; font-size: 13px; color: var(--gray-700); }
.contact-form input, .contact-form textarea {
    width: 100%; padding: 9px 12px; border: 1px solid var(--gray-200); border-radius: var(--radius);
    font-size: 13px; font-family: inherit; margin-bottom: 10px;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--navy-light); }
.contact-form textarea { height: 90px; resize: vertical; }
.contact-form button { background: var(--navy); color: white; border: none; padding: 9px 24px; border-radius: var(--radius); font-size: 12px; font-weight: 600; }
.contact-form button:hover { background: var(--navy-light); }

/* === VALUES GRID (About page) === */
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.value-card { padding: 20px; border: 1px solid var(--gray-200); border-radius: var(--radius); }
.value-card h3 { font-size: 14px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.value-card p { font-size: 12px; color: var(--gray-500); line-height: 1.6; }

/* === ANNOUNCEMENTS === */
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.post-card { border: 1px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; }
.post-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.post-card__body { padding: 14px; }
.post-card__body h3 { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.post-card__body .date { font-size: 10px; color: var(--gray-500); margin-bottom: 4px; }
.post-card__body p { font-size: 12px; color: var(--gray-700); line-height: 1.5; }

/* === COMPLIANCE SIDEBAR === */
.compliance-layout { display: grid; grid-template-columns: 200px 1fr; gap: 24px; }
.compliance-nav { position: sticky; top: 72px; }
.compliance-nav a { display: block; padding: 6px 10px; font-size: 11px; color: var(--gray-700); border-radius: var(--radius); margin-bottom: 1px; text-decoration: none; }
.compliance-nav a:hover { background: var(--navy-pale); color: var(--navy); text-decoration: none; }
.compliance-nav a.active { background: var(--navy-pale); color: var(--navy); font-weight: 600; border-left: 3px solid var(--navy); }
.compliance-content img { max-width: 560px; border: 1px solid var(--gray-200); border-radius: var(--radius); }

/* === NEWS.PHP FEED === */
.post-feed { display: flex; flex-direction: column; gap: 16px; }
.feed-card { border: 1px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; }
.feed-card__header { display: flex; justify-content: space-between; padding: 10px 14px; background: var(--gray-50); border-bottom: 1px solid var(--gray-100); font-size: 12px; }
.feed-card__teacher { font-weight: 600; color: var(--navy); }
.feed-card__date { color: var(--gray-500); font-size: 11px; }
.feed-card__body { padding: 14px; }
.feed-card__title { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.feed-card__media img { max-width: 100%; border-radius: var(--radius); border: 1px solid var(--gray-200); }
.feed-card__media iframe { width: 100%; height: 380px; border: 1px solid var(--gray-200); border-radius: var(--radius); }
.feed-card__meta { margin-top: 8px; font-size: 10px; color: var(--gray-500); }
.feed-card__download { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; background: var(--navy-pale); border: 1px solid var(--gray-200); border-radius: var(--radius); font-size: 12px; color: var(--navy); text-decoration: none; }
.feed-card__download:hover { background: var(--navy); color: white; text-decoration: none; }

.empty-state { text-align: center; padding: 50px; background: var(--gray-50); border: 1px dashed var(--gray-300); border-radius: var(--radius); }
.empty-state p { font-size: 14px; color: var(--gray-500); }

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: white; flex-direction: column; padding: 8px; border-bottom: 1px solid var(--gray-200); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
    .nav.open { display: flex; }
    .dropdown-menu { position: static; box-shadow: none; border: none; padding-left: 8px; }
    .top-bar__left span:nth-child(2) { display: none; }
    .hero-carousel { height: 220px; }
    .carousel-overlay { padding: 0 20px; }
    .carousel-overlay h1 { font-size: 20px; }
    .carousel-controls { display: none; }
    .carousel-dots { left: 20px; }
    .info-bar .container { overflow-x: auto; flex-wrap: nowrap; }
    .about-grid { grid-template-columns: 1fr; }
    .features { grid-template-columns: repeat(2, 1fr); }
    .qlinks { grid-template-columns: repeat(3, 1fr); }
    .contact-grid { grid-template-columns: 1fr; }
    .footer__grid { grid-template-columns: 1fr; gap: 16px; }
    .footer__bottom { flex-direction: column; gap: 4px; text-align: center; }
    .compliance-layout { grid-template-columns: 1fr; }
    .compliance-nav { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
    .values-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .features { grid-template-columns: 1fr; }
    .qlinks { grid-template-columns: repeat(2, 1fr); }
}
