/* ===== Madrasa Islamic Institute PP — site.css ===== */
:root {
    --primary: #1a6b3c;
    --primary-dark: #145530;
    --primary-light: #e8f5ee;
    --accent: #c8973a;
    --accent-light: #fdf4e3;
    --bg: #faf8f4;
    --text: #2c2c2c;
    --text-muted: #6b6b6b;
    --border: #e0dcd4;
    --white: #ffffff;
    --shadow: 0 2px 16px rgba(26,107,60,0.08);
    --shadow-hover: 0 8px 32px rgba(26,107,60,0.15);
    --radius: 8px;
    --radius-lg: 16px;
    --transition: 0.3s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; }
body {
    font-family: 'Hind Siliguri', 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: clip;
    line-height: 1.7;
    font-size: 16px;
}
img, svg, video, iframe { max-width: 100%; height: auto; }
table { max-width: 100%; }
.container { overflow-wrap: break-word; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Hind Siliguri', 'Inter', serif;
    color: var(--text);
    line-height: 1.3;
    font-weight: 700;
}
.page-hero h1 { font-size: clamp(1.6rem, 4vw, 2.6rem); }

/* ===== Navbar ===== */
.navbar-brand-text { font-size: 1.2rem; font-weight: 700; color: var(--white) !important; }
.site-navbar {
    background: var(--primary) !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    padding: 0.75rem 0;
}
.site-navbar .nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: color var(--transition);
}
.site-navbar .nav-link:hover,
.site-navbar .nav-link.active { color: var(--accent) !important; }
.site-navbar .navbar-toggler { border-color: rgba(255,255,255,0.4); }
.site-navbar .navbar-toggler-icon { filter: invert(1); }
.lang-btn {
    border: 1.5px solid var(--accent);
    color: var(--accent) !important;
    border-radius: 20px;
    padding: 0.25rem 0.8rem !important;
    font-size: 0.85rem;
    font-weight: 600;
}
.lang-btn:hover { background: var(--accent); color: var(--white) !important; }

/* ===== Notice Bar ===== */
.notice-bar {
    background: var(--accent);
    color: var(--white);
    font-size: 0.875rem;
    padding: 6px 0;
    overflow: hidden;
}
.notice-bar marquee { line-height: 1.5; }

/* ===== Hero Slider ===== */
.hero-slider .carousel-item { min-height: 520px; position: relative; }
.hero-slider .carousel-item img { object-fit: cover; width: 100%; height: 520px; filter: brightness(0.55); }
.hero-slider .carousel-caption {
    bottom: auto; top: 50%; transform: translateY(-50%);
    text-align: left; padding: 0 2rem;
}
.hero-slider .carousel-caption h1 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    color: var(--white);
    margin-bottom: 1rem;
}
.hero-slider .carousel-caption p { font-size: 1.1rem; color: rgba(255,255,255,0.9); }

/* ===== Sections ===== */
.section { padding: 70px 0; }
.section-sm { padding: 50px 0; }
.section-title {
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: var(--primary);
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}
.section-title::after {
    content: '';
    display: block;
    width: 60px; height: 3px;
    background: var(--accent);
    margin-top: 8px;
    border-radius: 2px;
}
.section-subtitle { color: var(--text-muted); font-size: 1rem; margin-bottom: 2.5rem; }
.section-bg { background: var(--primary-light); }
.section-dark { background: var(--primary); color: var(--white); }
.section-dark .section-title { color: var(--accent); }
.section-dark .section-title::after { background: var(--white); }

/* ===== Cards ===== */
.card-program {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
    overflow: hidden;
}
.card-program:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}
.card-program .card-img-top { height: 200px; object-fit: cover; }
.card-program .card-body { padding: 1.25rem; }
.card-program .card-title { font-size: 1.05rem; color: var(--primary); font-weight: 700; margin-bottom: 0.5rem; }
.row > [class*="col"] > .card-program.h-100 { height: 100% !important; }

/* ===== Faculty Card ===== */
.card-faculty {
    border: none;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow);
    text-align: center;
    padding: 1.5rem 1rem;
    transition: transform var(--transition), box-shadow var(--transition);
}
.card-faculty:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card-faculty img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid var(--primary-light); margin-bottom: 1rem; }
.card-faculty .faculty-name { font-weight: 700; color: var(--primary); margin-bottom: 0.25rem; }
.card-faculty .faculty-designation { color: var(--text-muted); font-size: 0.875rem; }

/* ===== Notice Board ===== */
.notice-item {
    border-left: 3px solid var(--primary);
    padding: 0.75rem 1rem;
    background: var(--white);
    margin-bottom: 0.75rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    box-shadow: var(--shadow);
    transition: border-color var(--transition);
}
.notice-item:hover { border-color: var(--accent); }
.notice-item .notice-date { font-size: 0.8rem; color: var(--text-muted); }
.notice-item .notice-category { font-size: 0.75rem; background: var(--primary-light); color: var(--primary); padding: 2px 8px; border-radius: 10px; }

/* ===== Events ===== */
.card-event {
    border: none;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}
.card-event:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card-event img { height: 180px; object-fit: cover; width: 100%; }
.card-event .event-date-badge {
    background: var(--primary);
    color: var(--white);
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    border-radius: var(--radius);
    display: inline-block;
    margin-bottom: 0.75rem;
}

/* ===== Stats ===== */
.stat-item { text-align: center; padding: 1.5rem; }
.stat-value { font-size: 2.2rem; font-weight: 800; color: var(--accent); line-height: 1; }
.stat-label { font-size: 0.9rem; color: rgba(255,255,255,0.85); margin-top: 0.25rem; }
.section-dark .stat-value { color: var(--accent); }

/* ===== Donate Section ===== */
.donate-card {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    transition: background var(--transition), transform var(--transition);
    color: var(--white);
}
.donate-card:hover { background: rgba(255,255,255,0.18); transform: translateY(-3px); }
.donate-card .donate-icon { font-size: 2rem; color: var(--accent); margin-bottom: 0.75rem; }
.donate-card h5 { color: var(--white); font-weight: 700; margin-bottom: 0.5rem; }

/* ===== Blog ===== */
.card-blog {
    border: none;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}
.card-blog:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card-blog img { height: 190px; object-fit: cover; width: 100%; }
.card-blog .card-body { padding: 1.25rem; }
.card-blog .card-category { font-size: 0.75rem; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

/* ===== Buttons ===== */
.btn-primary-custom {
    background: var(--primary);
    border: none;
    color: var(--white);
    padding: 0.65rem 1.75rem;
    border-radius: 6px;
    font-weight: 600;
    transition: background var(--transition), transform var(--transition);
}
.btn-primary-custom:hover { background: var(--primary-dark); transform: translateY(-1px); color: var(--white); }
.btn-accent { background: var(--accent); border: none; color: var(--white); padding: 0.65rem 1.75rem; border-radius: 6px; font-weight: 600; transition: all var(--transition); }
.btn-accent:hover { background: #b5852e; color: var(--white); transform: translateY(-1px); }
.btn-outline-primary-custom {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    transition: all var(--transition);
}
.btn-outline-primary-custom:hover { background: var(--primary); color: var(--white); }

/* ===== Islamic Geometric Divider (SVG motif) ===== */
.islamic-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}
.islamic-divider::before, .islamic-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 35%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border));
}
.islamic-divider::before { left: 0; }
.islamic-divider::after { right: 0; background: linear-gradient(to left, transparent, var(--border)); }
.islamic-star {
    display: inline-block;
    color: var(--accent);
    font-size: 1.2rem;
    margin: 0 0.5rem;
    position: relative;
    z-index: 1;
}

/* ===== Page Hero ===== */
.page-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 60px 0 50px;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(200,151,58,0.1) 0%, transparent 70%);
    border-radius: 50%;
}
.page-hero h1 { color: var(--white); margin-bottom: 0.5rem; }
.page-hero .breadcrumb-item { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.page-hero .breadcrumb-item a { color: var(--accent); }
.page-hero .breadcrumb-item.active { color: rgba(255,255,255,0.9); }
.page-hero .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.5); }

/* ===== Footer ===== */
.site-footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.85);
    padding: 60px 0 0;
    border-top: 4px solid var(--accent);
}
.footer-brand { font-size: 1.3rem; font-weight: 700; color: var(--white); margin-bottom: 0.75rem; }
.footer-tagline { color: var(--accent); font-size: 0.9rem; margin-bottom: 1rem; }
.footer-heading { color: var(--accent); font-weight: 700; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 1rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a { color: rgba(255,255,255,0.75); font-size: 0.9rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--accent); padding-left: 4px; }
.footer-contact p { font-size: 0.9rem; margin-bottom: 0.4rem; color: rgba(255,255,255,0.8); }
.footer-contact i { color: var(--accent); margin-right: 0.5rem; }
.footer-social a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: var(--white);
    font-size: 1rem;
    margin-right: 0.5rem;
    transition: background var(--transition), color var(--transition);
}
.footer-social a:hover { background: var(--accent); color: var(--white); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 16px 0;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}
.footer-bottom a { color: var(--accent); }
.back-to-top {
    position: fixed;
    bottom: 2rem; right: 2rem;
    width: 42px; height: 42px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.1rem;
    display: none;
    align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: background var(--transition), transform var(--transition);
    z-index: 999;
}
.back-to-top:hover { background: var(--accent); transform: translateY(-2px); }
.back-to-top.show { display: flex; }

/* ===== Cookie Banner ===== */
#cookie-banner {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: rgba(26,107,60,0.97);
    color: var(--white);
    padding: 1rem 1.5rem;
    z-index: 9999;
    display: none;
    align-items: center; justify-content: space-between; gap: 1rem;
    font-size: 0.9rem;
}
#cookie-banner.show { display: flex; }

/* ===== Forms ===== */
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(26,107,60,0.15);
}
label { font-weight: 500; color: var(--text); margin-bottom: 0.35rem; }

/* ===== Pagination ===== */
.pagination .page-link { color: var(--primary); border-color: var(--border); }
.pagination .page-link:hover { background: var(--primary-light); border-color: var(--primary); }
.pagination .page-item.active .page-link { background: var(--primary); border-color: var(--primary); }

/* ===== Gallery Lightbox ===== */
.gallery-item { position: relative; overflow: hidden; border-radius: var(--radius); cursor: pointer; }
.gallery-item img { transition: transform 0.4s ease; width: 100%; height: 220px; object-fit: cover; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item .gallery-overlay {
    position: absolute; inset: 0;
    background: rgba(26,107,60,0.5);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity var(--transition);
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-item .gallery-overlay i { font-size: 1.5rem; color: var(--white); }

/* ===== Alert styles ===== */
.alert { border-radius: var(--radius); }

/* ===== Mobile Responsive ===== */
@media (max-width: 991px) {
    .hero-slider .carousel-caption { top: 40%; padding: 0 1rem; }
    .hero-slider .carousel-item img { height: 380px; }
    .hero-slider .carousel-item { min-height: 380px; }
}
@media (max-width: 767px) {
    .section, .page-hero { padding: 40px 0; }
    .hero-slider .carousel-item img { height: 280px; }
    .hero-slider .carousel-item { min-height: 280px; }
    .hero-slider .carousel-caption h1 { font-size: 1.4rem; }
    .site-footer { padding: 40px 0 0; }
    .back-to-top { bottom: 1rem; right: 1rem; }
}
@media (max-width: 1199.98px) {
    .row.g-5, .row.gx-5 { --bs-gutter-x: 1.5rem; }
}
@media (max-width: 480px) {
    .stat-value { font-size: 1.7rem; }
    .card-program .card-img-top { height: 160px; }
}
@media print {
    .site-navbar, .site-footer, .back-to-top, #cookie-banner { display: none !important; }
}
