/* ===========================================================================
   কাশফুল একাডেমি — Warm Editorial theme
   Brand: Green (primary) + Red (accent) on warm cream. Bengali-first typography.
   Theme colours come from SiteSettings via inline :root vars in _Layout (--ci-*).
   =========================================================================== */
:root {
    --ci-primary: #0E8F46;
    --ci-primary-dark: #0a6e36;
    --ci-accent: #E0271C;
    --ci-ink: #16241C;
    --ci-cream: #FAF7EF;
    --ci-card: #ffffff;
    --ci-brass: #C9A227;
    --ci-muted: #6B7B72;
    --ci-line: #e7e2d4;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Hind Siliguri', 'Plus Jakarta Sans', system-ui, sans-serif;
    color: var(--ci-ink);
    background-color: var(--ci-cream);
    background-image: radial-gradient(rgba(22,36,28,0.018) 1px, transparent 1px);
    background-size: 4px 4px;
    line-height: 1.75;
    overflow-x: hidden;
}

h1, h2, h3, h4, .display-font {
    font-family: 'Tiro Bangla', 'Hind Siliguri', serif;
    color: var(--ci-ink);
    line-height: 1.35;
}

a { color: var(--ci-primary); text-decoration: none; }
a:hover { color: var(--ci-primary-dark); }

.text-primary-ci { color: var(--ci-primary) !important; }
.text-accent-ci { color: var(--ci-accent) !important; }
.bg-cream { background: var(--ci-cream); }
.section { padding: 72px 0; }
.section-sm { padding: 48px 0; }
.eyebrow { color: var(--ci-accent); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; }

/* hand-drawn underline under a heading keyword */
.underline-hand { position: relative; display: inline-block; }
.underline-hand::after {
    content: ""; position: absolute; left: -2%; right: -2%; bottom: -6px; height: 10px;
    background: no-repeat center/100% 10px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='10' viewBox='0 0 200 10'%3E%3Cpath d='M2 7 C50 2, 150 2, 198 6' stroke='%23E0271C' stroke-width='3' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}

.btn { border-radius: 999px; font-weight: 600; padding: .6rem 1.4rem; }
.btn-ci { background: var(--ci-primary); color: #fff; }
.btn-ci:hover { background: var(--ci-primary-dark); color: #fff; }
.btn-cta { background: var(--ci-accent); color: #fff; }
.btn-cta:hover { background: #b91d14; color: #fff; }
.btn-outline-ci { border: 2px solid var(--ci-primary); color: var(--ci-primary); }
.btn-outline-ci:hover { background: var(--ci-primary); color: #fff; }

/* ---------- Top ticker ---------- */
.topbar { background: var(--ci-ink); color: #e9efe9; font-size: .85rem; padding: 6px 0; }
.topbar a { color: #e9efe9; }
.topbar a:hover { color: var(--ci-brass); }

/* ---------- Navbar ---------- */
.site-nav { position: sticky; top: 0; z-index: 1030; background: var(--ci-cream); transition: box-shadow .25s, background .25s; }
.site-nav.scrolled { box-shadow: 0 4px 24px rgba(22,36,28,.08); background: #fff; }
.site-nav { padding-top: .35rem; padding-bottom: .35rem; }
.site-nav .navbar-brand { font-family: 'Tiro Bangla', serif; font-weight: 700; font-size: 1.4rem; color: var(--ci-primary); display: flex; align-items: center; gap: .5rem; }
.site-nav .nav-link { color: var(--ci-ink); font-weight: 600; padding: .5rem .9rem; }
.site-nav .nav-link:hover, .site-nav .nav-link.active { color: var(--ci-primary); }
.brand-logo { height: 72px; width: auto; transition: transform .2s; }
.navbar-brand:hover .brand-logo { transform: scale(1.04); }
@media (max-width: 575px) { .brand-logo { height: 56px; } }

/* ---------- Hero ---------- */
.hero { position: relative; }
.hero-slide { position: relative; min-height: 560px; display: flex; align-items: center; background-size: cover; background-position: center; }
.hero-slide::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(22,36,28,.82) 0%, rgba(22,36,28,.55) 45%, rgba(22,36,28,.15) 100%); }
.hero-content { position: relative; z-index: 2; color: #fff; max-width: 680px; padding: 40px 0; }
.hero-content h1 { color: #fff; font-size: clamp(2rem, 4.4vw, 3.4rem); font-weight: 700; }
.hero-content .lead { color: #f0eee4; font-size: 1.15rem; }
.hero-chips .chip { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); color: #fff; padding: .3rem .9rem; border-radius: 999px; font-size: .85rem; }

/* ---------- Cards / generic ---------- */
.card-ci { background: var(--ci-card); border: 1px solid var(--ci-line); border-radius: 16px; overflow: hidden; transition: transform .2s, box-shadow .2s; }
/* equal-height only when explicitly requested in a grid (Bootstrap h-100); never stretch a lone sidebar card */
.row > [class*="col"] > .card-ci.h-100 { height: 100%; }
.card-ci:hover { transform: translateY(-5px); box-shadow: 0 14px 40px rgba(22,36,28,.10); }
.img-cover { object-fit: cover; width: 100%; }

/* subject mosaic — asymmetric */
.subject-tile { position: relative; border-radius: 18px; overflow: hidden; min-height: 210px; display: flex; align-items: flex-end; color: #fff; background-size: cover; background-position: center; }
.subject-tile::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(22,36,28,.88), rgba(22,36,28,.12)); transition: background .25s; }
.subject-tile:hover::before { background: linear-gradient(0deg, rgba(14,143,70,.9), rgba(22,36,28,.2)); }
.subject-tile .st-body { position: relative; z-index: 2; padding: 18px 20px; }
.subject-tile .st-body h3 { color: #fff; margin: 0; }
.subject-tile .st-icon { font-size: 1.7rem; color: var(--ci-brass); }
.subject-tile.tall { min-height: 440px; }

/* founder */
.founder-photo { border-radius: 18px; box-shadow: 0 16px 40px rgba(22,36,28,.16); transform: rotate(-2deg); border: 6px solid #fff; max-width: 100%; }
.founder-quote { border-left: 4px solid var(--ci-accent); padding-left: 1.2rem; font-style: italic; }

/* stats band */
.stats-band { background: var(--ci-primary); color: #fff; }
.stats-band .stat-num { font-family: 'Tiro Bangla', serif; font-size: 2.6rem; font-weight: 700; line-height: 1; }

/* media showcase */
.media-embed { position: relative; padding-top: 56.25%; border-radius: 14px; overflow: hidden; background: #000; }
.media-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* timeline */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: var(--ci-line); }
.timeline-item { position: relative; padding-bottom: 28px; }
.timeline-item::before { content: ""; position: absolute; left: -24px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--ci-primary); border: 3px solid var(--ci-cream); }

/* gallery masonry */
.masonry { column-count: 3; column-gap: 14px; }
.masonry > * { width: 100%; border-radius: 12px; margin-bottom: 14px; display: block; break-inside: avoid; }
.masonry img { width: 100%; border-radius: 12px; display: block; cursor: pointer; transition: filter .2s; }
.masonry img:hover { filter: brightness(.92); }

/* testimonial */
.testimonial-card { background: #fff; border-radius: 18px; padding: 28px; border: 1px solid var(--ci-line); height: 100%; }
.testimonial-card .quote-mark { font-size: 3rem; color: var(--ci-brass); line-height: .5; }

/* notice */
.notice-row { border-left: 3px solid var(--ci-primary); background: #fff; border-radius: 0 10px 10px 0; }

/* CTA band */
.cta-band { background: var(--ci-accent); color: #fff; }
.cta-band h2 { color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ci-ink); color: #c8d2c8; padding-top: 56px; }
.site-footer h5 { color: #fff; font-family: 'Tiro Bangla', serif; }
.site-footer a { color: #c8d2c8; }
.site-footer a:hover { color: var(--ci-brass); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); }
.social-ic { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; }
.social-ic:hover { background: var(--ci-primary); color: #fff; }

/* floating actions */
.float-actions { position: fixed; right: 18px; bottom: 18px; z-index: 1040; display: flex; flex-direction: column; gap: 10px; }
.float-actions a { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.4rem; box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.fa-wa { background: #25d366; }
.fa-call { background: var(--ci-primary); }

/* page hero (inner pages) */
.page-hero { background: var(--ci-ink); color: #fff; padding: 56px 0; }
.page-hero h1 { color: #fff; }
.breadcrumb-ci a { color: var(--ci-brass); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .section { padding: 52px 0; }
    .hero-slide { min-height: 460px; }
    .masonry { column-count: 2; }
}
@media (max-width: 575px) {
    .masonry { column-count: 1; }
    .hero-content h1 { font-size: 1.8rem; }
    .stats-band .stat-num { font-size: 2rem; }
}
/* ---------- Global responsive safety nets (prevent any overflow / broken layout) ---------- */
img, svg, video, iframe { max-width: 100%; }
img { height: auto; }
.brand-logo { height: 72px; width: auto; } /* keep logo fixed despite the rule above */
@media (max-width: 575px) { .brand-logo { height: 56px; } }
table { max-width: 100%; }
.container, .container-fluid { overflow-wrap: break-word; word-wrap: break-word; }
h1, h2, h3, h4, p, a, span, li { overflow-wrap: break-word; }
.page-hero h1 { font-size: clamp(1.6rem, 4vw, 2.6rem); }
.media-embed iframe, .card-ci iframe { max-width: 100%; }

/* ---------- Rich article / static-page content (blog detail, About, static pages) ---------- */
.blog-content, .page-content, .static-content { font-size: 1.05rem; line-height: 1.95; color: #2a3a30; }
.blog-content > :first-child, .page-content > :first-child { margin-top: 0; }
.blog-content p, .page-content p, .static-content p { margin-bottom: 1.1rem; }
.blog-content h2, .blog-content h3, .blog-content h4,
.page-content h2, .page-content h3, .page-content h4,
.static-content h2, .static-content h3, .static-content h4 { margin: 1.7rem 0 .8rem; color: var(--ci-ink); }
.blog-content img, .page-content img, .static-content img { max-width: 100%; height: auto; border-radius: 12px; margin: 1rem 0; display: block; }
.blog-content ul, .blog-content ol, .page-content ul, .page-content ol, .static-content ul, .static-content ol { margin: 0 0 1.1rem 1.3rem; }
.blog-content li, .page-content li, .static-content li { margin-bottom: .4rem; }
.blog-content blockquote, .page-content blockquote { border-left: 4px solid var(--ci-accent); margin: 1.3rem 0; padding: .4rem 0 .4rem 1.2rem; color: var(--ci-muted); font-style: italic; }
.blog-content a, .page-content a, .static-content a { color: var(--ci-primary); text-decoration: underline; }
.blog-content iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; margin: 1rem 0; }
.blog-content table, .page-content table, .static-content table { width: 100%; margin: 1rem 0; border-collapse: collapse; }
.blog-content table td, .blog-content table th, .page-content table td, .page-content table th { border: 1px solid var(--ci-line); padding: .5rem .75rem; }

/* Google-map embed inside a page is made responsive */
.map-wrap iframe { width: 100% !important; min-height: 320px; border: 0; display: block; }

/* ---------- Extra mobile polish ---------- */
@media (max-width: 767px) {
    .section { padding: 40px 0; }
    .page-hero { padding: 40px 0; }
    .hero-content { text-align: left; }
    .hero-content .btn { margin-bottom: .5rem; }
    .display-6, .display-1 { font-size: 2.2rem; }
    .founder-photo { transform: none; margin-bottom: 1rem; }
    .btn-lg { padding: .55rem 1.1rem; font-size: 1rem; }
}

@media print {
    .site-nav, .topbar, .site-footer, .float-actions { display: none !important; }
}
