/* Dhulia School and College – public website theme */
:root {
  --brand: #0b2a5b;          /* navy */
  --brand-600: #12397a;
  --brand-50: #eef3fb;
  --accent: #16a34a;         /* green */
  --accent-600: #15803d;
  --accent-50: #ecfdf3;
  --ink: #0f172a;
  --muted: #5b6b82;
  --line: #e5eaf2;
  --surface: #ffffff;
  --soft: #f6f8fc;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .05);
  --shadow: 0 10px 30px -12px rgba(11, 42, 91, .22);
  --font: "Plus Jakarta Sans", "Hind Siliguri", system-ui, -apple-system, "Segoe UI", sans-serif;
}
html[lang="bn"] { --font: "Hind Siliguri", "Plus Jakarta Sans", system-ui, sans-serif; }
body { font-family: var(--font); color: var(--ink); background: var(--surface); -webkit-font-smoothing: antialiased; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--accent-600); }
h1, h2, h3, h4, h5, .h1, .h2, .h3, .h4, .h5 { font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.text-muted { color: var(--muted) !important; }
.text-brand { color: var(--brand) !important; }
.text-accent { color: var(--accent) !important; }
.bg-soft { background: var(--soft); }
.bg-brand { background: var(--brand); }
.btn { border-radius: 10px; font-weight: 600; padding: .6rem 1.2rem; }
.btn-brand { background: var(--brand); color: #fff; border: 0; }
.btn-brand:hover { background: var(--brand-600); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; border: 0; }
.btn-accent:hover { background: var(--accent-600); color: #fff; }
.btn-outline-brand { border: 1.5px solid var(--brand); color: var(--brand); }
.btn-outline-brand:hover { background: var(--brand); color: #fff; }
.skip-link { position: absolute; left: -999px; top: 0; z-index: 2000; background: #fff; padding: .5rem 1rem; }
.skip-link:focus { left: 1rem; top: 1rem; }

/* Top bar & header */
.topbar { background: var(--brand); color: #cfd9ea; font-size: .84rem; }
.topbar a { color: #e6edf8; }
.topbar a:hover { color: #fff; }
.topbar .sep { opacity: .35; margin: 0 .6rem; }
.site-header { background: rgba(255,255,255,.96); backdrop-filter: saturate(160%) blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1030; transition: box-shadow .2s; }
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.brand-logo { width: 54px; height: 54px; object-fit: contain; }
.brand-mark { width: 54px; height: 54px; border-radius: 14px; background: linear-gradient(135deg, var(--brand), var(--brand-600)); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; }
.brand-name { font-weight: 800; font-size: 1.15rem; color: var(--brand); line-height: 1.15; }
.brand-sub { font-size: .78rem; color: var(--muted); }
.main-nav .nav-link { color: var(--ink); font-weight: 600; font-size: .95rem; padding: .9rem .8rem !important; border-radius: 8px; }
.main-nav .nav-link:hover, .main-nav .nav-link.active { color: var(--accent-600); }
.main-nav .dropdown-menu { border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: .5rem; min-width: 240px; }
.main-nav .dropdown-item { border-radius: 8px; padding: .5rem .8rem; font-weight: 500; }
.main-nav .dropdown-item:hover { background: var(--accent-50); color: var(--accent-600); }
@media (min-width: 992px) {
  .main-nav .dropdown:hover > .dropdown-menu { display: block; margin-top: 0; }
}
.lang-switch .btn { padding: .25rem .6rem; font-size: .8rem; }

/* Notice ticker */
.ticker { background: var(--accent-50); border-bottom: 1px solid #d1fadf; }
.ticker-label { background: var(--accent); color: #fff; font-weight: 700; padding: .55rem 1rem; white-space: nowrap; }
.ticker-track { overflow: hidden; white-space: nowrap; flex: 1; }
.ticker-track .inner { display: inline-block; padding-left: 100%; animation: ticker 40s linear infinite; }
.ticker-track:hover .inner { animation-play-state: paused; }
.ticker-track a { color: var(--ink); margin-right: 3rem; font-weight: 500; }
@keyframes ticker { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track .inner { animation: none; padding-left: 0; } }

/* Hero */
.hero { position: relative; color: #fff; }
.hero .carousel-item { height: min(78vh, 640px); min-height: 440px; }
.hero .carousel-item img { object-fit: cover; width: 100%; height: 100%; }
.hero .overlay { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(8,27,61,.88) 0%, rgba(8,27,61,.55) 55%, rgba(8,27,61,.15) 100%); }
.hero .caption { position: absolute; inset: 0; display: flex; align-items: center; }
.hero h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 800; max-width: 720px; }
.hero p.lead { color: #dbe5f5; max-width: 620px; }
.hero .eyebrow { display: inline-flex; gap: .5rem; align-items: center; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: .35rem .9rem; font-size: .85rem; }

/* Sections */
.section { padding: 80px 0; }
.section-sm { padding: 56px 0; }
.section-head { margin-bottom: 2.5rem; }
.section-head .eyebrow { color: var(--accent-600); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin: .35rem 0 .5rem; }
.section-head p { color: var(--muted); max-width: 640px; }
.section-head.text-center p { margin: 0 auto; }

/* Cards */
.card-x { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; height: 100%; overflow: hidden; }
.card-x:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-x .thumb { aspect-ratio: 16/10; overflow: hidden; background: var(--soft); }
.card-x .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card-x:hover .thumb img { transform: scale(1.05); }
.card-x .body { padding: 1.25rem; }
.meta { font-size: .82rem; color: var(--muted); }
.icon-tile { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem; background: var(--brand-50); color: var(--brand); flex-shrink: 0; }
.icon-tile.green { background: var(--accent-50); color: var(--accent-600); }
.quick-link { display: flex; flex-direction: column; align-items: center; gap: .75rem; text-align: center; padding: 1.5rem 1rem; color: var(--ink); font-weight: 600; }
.quick-link:hover .icon-tile { background: var(--brand); color: #fff; }

/* Stats */
.stats { background: linear-gradient(120deg, var(--brand) 0%, #0e3a7d 100%); color: #fff; position: relative; overflow: hidden; }
.stats::after { content: ""; position: absolute; right: -120px; top: -120px; width: 380px; height: 380px; border-radius: 50%; background: rgba(22,163,74,.18); }
.stat-num { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; color: #fff; }
.stat-label { color: #c8d5ea; font-weight: 500; }

/* Notices */
.notice-item { display: flex; gap: 1rem; padding: 1rem 0; border-bottom: 1px dashed var(--line); }
.notice-item:last-child { border-bottom: 0; }
.date-chip { width: 62px; flex-shrink: 0; text-align: center; border-radius: 12px; background: var(--brand-50); color: var(--brand); padding: .4rem 0; line-height: 1.1; }
.date-chip .d { font-size: 1.35rem; font-weight: 800; }
.date-chip .m { font-size: .72rem; text-transform: uppercase; font-weight: 700; }
.badge-important { background: #fee2e2; color: #b91c1c; font-weight: 700; }

/* Principal */
.principal-photo { border-radius: 20px; width: 100%; aspect-ratio: 4/5; object-fit: cover; box-shadow: var(--shadow); }
.quote-mark { font-size: 4rem; line-height: 1; color: var(--accent); opacity: .3; }

/* Teacher card */
.person-card { text-align: center; }
.person-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.person-card .name { font-weight: 700; margin-top: .9rem; }
.person-card .role { color: var(--accent-600); font-size: .88rem; font-weight: 600; }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.gallery-grid a { display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 4/3; position: relative; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery-grid a:hover img { transform: scale(1.06); }
.lightbox { position: fixed; inset: 0; background: rgba(5,12,28,.92); z-index: 2000; display: none; align-items: center; justify-content: center; padding: 2rem; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: 10px; }
.lightbox .lb-btn { position: absolute; background: rgba(255,255,255,.12); border: 0; color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 1.2rem; }
.lightbox .lb-close { top: 1rem; right: 1rem; }
.lightbox .lb-prev { left: 1rem; top: 50%; }
.lightbox .lb-next { right: 1rem; top: 50%; }
.lightbox .lb-caption { position: absolute; bottom: 1.2rem; color: #dbe5f5; }

/* Page header */
.page-hero { background: linear-gradient(120deg, var(--brand), #123f86); color: #fff; padding: 56px 0 48px; position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; right: -80px; bottom: -160px; width: 360px; height: 360px; border-radius: 50%; background: rgba(22,163,74,.22); }
.page-hero h1 { color: #fff; font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin: 0; }
.page-hero .breadcrumb { margin: .6rem 0 0; }
.page-hero .breadcrumb a, .page-hero .breadcrumb-item.active, .page-hero .breadcrumb-item + .breadcrumb-item::before { color: #c8d5ea; }
.prose { line-height: 1.8; color: #243247; }
.prose h4 { margin-top: 1.6rem; }
.prose ul { padding-left: 1.2rem; }
.prose img { max-width: 100%; border-radius: 12px; }

/* Forms */
.form-control, .form-select { border-radius: 10px; border-color: #d6deea; padding: .62rem .9rem; }
.form-control:focus, .form-select:focus { border-color: var(--brand-600); box-shadow: 0 0 0 .2rem rgba(18,57,122,.12); }
.form-label { font-weight: 600; font-size: .9rem; }
.form-section { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.25rem; }
.form-section h5 { font-size: 1.02rem; color: var(--brand); margin-bottom: 1rem; }

/* Tables */
.table-x { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.table-x table { margin: 0; }
.table-x thead th { background: var(--brand-50); color: var(--brand); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; border: 0; }

/* Footer */
.site-footer { background: #071d40; color: #b9c7de; }
.site-footer h6 { color: #fff; font-weight: 700; margin-bottom: 1rem; }
.site-footer a { color: #b9c7de; }
.site-footer a:hover { color: #fff; }
.site-footer .footer-links li { margin-bottom: .55rem; }
.site-footer .bottom { border-top: 1px solid rgba(255,255,255,.08); font-size: .85rem; }
.social a { width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center; background: rgba(255,255,255,.08); color: #fff; margin-right: .4rem; }
.social a:hover { background: var(--accent); }
.back-to-top { position: fixed; right: 18px; bottom: 18px; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff; display: none; place-items: center; box-shadow: var(--shadow); z-index: 1000; border: 0; }
.back-to-top.show { display: grid; }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* Mobile */
@media (max-width: 991.98px) {
  .main-nav .nav-link { padding: .65rem .5rem !important; }
  .main-nav .dropdown-menu { box-shadow: none; border: 0; padding-left: 1rem; }
  .section { padding: 56px 0; }
  .brand-name { font-size: 1rem; }
}
@media print {
  .topbar, .site-header, .site-footer, .ticker, .no-print, .back-to-top { display: none !important; }
  .page-hero { background: none; color: #000; padding: 0 0 1rem; }
  .page-hero h1 { color: #000; }
  body { font-size: 12pt; }
}
.card-x.h-auto{height:auto}
@media (max-width: 767.98px){.hero .carousel-control-prev,.hero .carousel-control-next{display:none}}

/* ===== Header refresh (append to public/css/app.css) ===== */

/* Language pill – used in mobile header and desktop nav */
.lang-pill { display: inline-flex; align-items: center; padding: 3px; border-radius: 999px; background: var(--brand-50); border: 1px solid var(--line); flex-shrink: 0; }
.lang-pill a { display: inline-block; min-width: 38px; padding: .3rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 700; line-height: 1; text-align: center; color: var(--brand); transition: background .15s, color .15s; }
.lang-pill a:hover { color: var(--brand-600); background: rgba(11, 42, 91, .06); }
.lang-pill a.active { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.lang-pill a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lang-pill a[lang="bn"] { font-family: "Hind Siliguri", sans-serif; font-size: .85rem; }

/* Menu button */
.nav-toggle { width: 42px; height: 42px; padding: 0; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line) !important; background: #fff; color: var(--brand); flex-shrink: 0; }
.nav-toggle:hover { background: var(--brand-50); }
.nav-toggle:focus { box-shadow: 0 0 0 .2rem rgba(18, 57, 122, .15); }

/* Desktop nav polish */
@media (min-width: 1200px) {
  .main-nav .nav-link { position: relative; padding: 1rem .7rem !important; }
  .main-nav > .nav-item > .nav-link:not(.dropdown-toggle)::after { content: ""; position: absolute; left: .7rem; right: .7rem; bottom: .55rem; height: 2px; border-radius: 2px; background: var(--accent); transform: scaleX(0); transition: transform .2s; }
  .main-nav > .nav-item > .nav-link:not(.dropdown-toggle):hover::after, .main-nav > .nav-item > .nav-link.active::after { transform: scaleX(1); }
  .main-nav .dropdown-toggle::after { vertical-align: .15em; opacity: .55; transition: transform .2s; }
  .main-nav .dropdown:hover > .dropdown-toggle::after { transform: rotate(180deg); }
  .header-actions .btn { border-radius: 999px; font-weight: 600; white-space: nowrap; }
}
@media (min-width: 1200px) and (max-width: 1299.98px) {
  .main-nav .nav-link { padding: 1rem .42rem !important; font-size: .88rem; }
  .main-nav > .nav-item > .nav-link:not(.dropdown-toggle)::after { left: .42rem; right: .42rem; }
  .site-header .navbar-brand { margin-right: .75rem !important; }
  .brand-name { font-size: 1.02rem; }
  .brand-sub { display: none !important; }
  .header-actions .btn { padding-left: .75rem !important; padding-right: .75rem !important; }
}

/* Mobile header */
@media (max-width: 1199.98px) {
  /* backdrop-filter makes the header a containing block for position:fixed,
     which trapped the slide-out menu inside the header – use a solid background on mobile */
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }
  .site-header .navbar { padding-top: .55rem !important; padding-bottom: .55rem !important; }
  .site-header .navbar > .container { flex-wrap: nowrap; gap: .5rem; }
  .site-header .navbar-brand { min-width: 0; flex: 1 1 auto; margin-right: 0; }
  .site-header .navbar-brand > span:last-child { min-width: 0; }
  .brand-mark, .brand-logo { width: 42px; height: 42px; border-radius: 11px; font-size: 1.1rem; flex-shrink: 0; }
  .brand-name { font-size: .95rem; line-height: 1.2; white-space: normal; display: -webkit-box !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

  /* Slide-out menu */
  #mobileNav { width: min(86vw, 340px); }
  #mobileNav .offcanvas-header { padding: 1rem 1.1rem; }
  #mobileNav .offcanvas-title { font-weight: 800; font-size: 1rem; }
  #mobileNav .offcanvas-body { display: flex; flex-direction: column; padding: .5rem 1.1rem 1.25rem; }
  .main-nav { width: 100%; margin-right: 0 !important; }
  .main-nav .nav-item { border-bottom: 1px solid var(--line); }
  .main-nav .nav-link { display: flex; justify-content: space-between; align-items: center; padding: .8rem .25rem !important; }
  .main-nav .nav-link.active { color: var(--accent-600); }
  .main-nav .dropdown-toggle::after { transition: transform .2s; }
  .main-nav .dropdown-toggle.show::after { transform: rotate(180deg); }
  .main-nav .dropdown-menu { padding: 0 0 .5rem .5rem; background: transparent; border: 0; box-shadow: none; }
  /* app.css opens dropdowns on hover from 992px – keep them tap-to-open in the slide-out menu */
  .main-nav .dropdown:hover > .dropdown-menu:not(.show) { display: none; }
  .main-nav .dropdown-item { padding: .5rem .75rem; font-size: .93rem; color: var(--muted); }
  .header-actions { margin-top: auto !important; padding-top: 1.25rem; display: grid !important; grid-template-columns: 1fr 1fr; gap: .6rem !important; }
  .header-actions .btn { padding: .65rem 1rem !important; border-radius: 12px; font-weight: 600; font-size: .92rem; }
}
@media (max-width: 359.98px) {
  .brand-name { font-size: .86rem; }
  .lang-pill a { min-width: 32px; padding: .3rem .4rem; }
}

/* Tap focus: keep rings for keyboard users only */
.main-nav .nav-link:focus:not(:focus-visible), .nav-toggle:focus:not(:focus-visible), .lang-pill a:focus:not(:focus-visible) { box-shadow: none; outline: none; }
.main-nav .nav-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
