/* ============================================================
   খিদমাতুল উম্মাহ স্মার্ট সিটি ৩১৩ — style.css
   থিম: ইসলামিক প্রিমিয়াম — সবুজ + সোনালি
   ============================================================ */

:root {
    --color-primary: #0b5e3f;        /* গাঢ় সবুজ */
    --color-primary-dark: #073e2a;
    --color-primary-light: #e7f3ee;
    --color-gold: #c9a24a;
    --color-gold-light: #f3e6c4;
    --color-text: #1f2a24;
    --color-muted: #5c6b63;
    --color-bg: #fbfaf6;
    --color-white: #ffffff;
    --color-border: #e4e0d4;
    --color-danger: #b3261e;
    --color-success: #1f7a3d;
    --font-bn: 'Hind Siliguri', sans-serif;
    --font-arabic: 'Amiri', serif;
    --radius: 10px;
    --shadow: 0 4px 18px rgba(11, 94, 63, 0.08);
    --shadow-lg: 0 10px 30px rgba(11, 94, 63, 0.15);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-bn);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.7;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}
.text-center { text-align: center; }

/* ============ পটার্ন ব্যাকগ্রাউন্ড এক্সেন্ট ============ */
.section-title {
    font-size: 2rem;
    color: var(--color-primary-dark);
    margin-bottom: 8px;
    position: relative;
    padding-bottom: 14px;
}
.section-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-gold), var(--color-primary));
    border-radius: 4px;
}
.text-center .section-title::after { left: 50%; }
.section-subtitle {
    max-width: 720px;
    margin: 0 auto 30px;
    color: var(--color-muted);
}
.section { padding: 60px 0; }
.section:nth-of-type(even) { background: var(--color-primary-light); }

/* ============ বাটন ============ */
.btn {
    display: inline-block;
    padding: 12px 26px;
    border-radius: 30px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all .25s ease;
}
.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #fff;
    box-shadow: var(--shadow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-lg { padding: 15px 34px; font-size: 1.05rem; }
.btn-block { width: 100%; text-align: center; }

/* ============ TOP BAR ============ */
.top-bar {
    background: var(--color-primary-dark);
    color: #eef7f1;
    font-size: 0.85rem;
    padding: 6px 0;
}
.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.top-bar-contact a { color: #eef7f1; margin-inline-end: 16px; opacity: .9; }
.top-bar-right { display: flex; align-items: center; gap: 14px; }
.top-bar-social a { color: #eef7f1; margin-inline-end: 10px; opacity: .85; font-size: .8rem; }
.lang-toggle a { color: #d9c98a; }
.lang-toggle a.active { color: var(--color-gold); font-weight: 700; }
.lang-toggle span { color: #6f8c7d; margin: 0 4px; }
.admin-access-icon {
    color: #6f8c7d;
    font-size: .9rem;
    opacity: 0.55;
}
.admin-access-icon:hover { opacity: 1; }

/* ============ NEWS TICKER ============ */
.news-ticker {
    background: var(--color-gold-light);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    overflow: hidden;
}
.ticker-label {
    background: var(--color-gold);
    color: var(--color-primary-dark);
    font-weight: 700;
    padding: 8px 16px;
    white-space: nowrap;
    font-size: 0.85rem;
}
.ticker-wrap { flex: 1; overflow: hidden; position: relative; }
.ticker-track {
    display: flex;
    white-space: nowrap;
    animation: ticker-scroll 35s linear infinite;
}
.ticker-wrap:hover .ticker-track { animation-play-state: paused; }
.ticker-item {
    padding: 8px 30px;
    color: var(--color-primary-dark);
    font-size: 0.9rem;
    border-inline-end: 1px solid #dfcf98;
}
@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============ MAIN NAV ============ */
.main-header {
    background: var(--color-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 500;
}
.main-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 46px; width: auto; }
.brand-text { font-weight: 700; color: var(--color-primary-dark); font-size: 1.1rem; }

.mobile-menu-toggle {
    display: none;
    background: var(--color-primary-light);
    border: none;
    font-size: 1.4rem;
    color: var(--color-primary-dark);
    width: 42px;
    height: 42px;
    border-radius: 8px;
    cursor: pointer;
}

.main-nav ul { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.main-nav > ul > li { position: relative; }
.main-nav a {
    display: block;
    padding: 10px 14px;
    color: var(--color-text);
    font-weight: 500;
    border-radius: 6px;
    font-size: 0.95rem;
}
.main-nav > ul > li > a:hover { background: var(--color-primary-light); color: var(--color-primary-dark); }
.btn-nav-highlight {
    background: var(--color-gold) !important;
    color: var(--color-primary-dark) !important;
    font-weight: 700 !important;
}
.has-children { position: relative; }
.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: var(--shadow-lg);
    border-radius: 8px;
    min-width: 200px;
    padding: 6px;
    z-index: 50;
}
.has-children:hover .submenu { display: block; }
.submenu a { padding: 8px 12px; }
.submenu a:hover { background: var(--color-primary-light); }

/* ============ FLASH ============ */
.flash-container { margin-top: 16px; }
.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 16px; font-size: .95rem; }
.alert-success { background: #e2f4e7; color: var(--color-success); border: 1px solid #b9e3c4; }
.alert-danger { background: #fbe6e4; color: var(--color-danger); border: 1px solid #f2b8b3; }
.alert-info { background: var(--color-primary-light); color: var(--color-primary-dark); border: 1px solid #cfe6da; }

/* ============ HERO SLIDER ============ */
.hero-slider { position: relative; background: var(--color-primary-dark); }
.slider { position: relative; height: 480px; overflow: hidden; }
.slide {
    position: absolute; inset: 0;
    opacity: 0; transition: opacity .8s ease;
}
.slide.active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide-caption {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(0deg, rgba(7,62,42,.85), transparent);
    color: #fff; padding: 40px 30px 20px;
    font-size: 1.3rem; font-weight: 600;
}
.slider-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,.85); border: none;
    width: 44px; height: 44px; border-radius: 50%;
    font-size: 1.6rem; cursor: pointer; color: var(--color-primary-dark);
    z-index: 10;
}
.slider-arrow.prev { left: 16px; }
.slider-arrow.next { right: 16px; }
.slider-dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 10; }
.slider-dots span {
    width: 10px; height: 10px; border-radius: 50%;
    background: rgba(255,255,255,.5); cursor: pointer;
}
.slider-dots span.active { background: var(--color-gold); }
.hero-fallback {
    padding: 90px 20px; text-align: center; color: #fff;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
}
.hero-fallback h1 { font-size: 2.2rem; margin-bottom: 10px; }

/* ============ PRAYER WIDGET ============ */
.prayer-widget-section { background: var(--color-gold-light); padding: 18px 0; }
.prayer-widget {
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.prayer-item {
    flex: 1; min-width: 90px; text-align: center;
    background: #fff; border-radius: 8px; padding: 10px 6px;
    box-shadow: var(--shadow);
}
.p-name { display: block; font-weight: 700; color: var(--color-primary-dark); font-size: .9rem; }
.p-time { display: block; color: var(--color-gold); font-weight: 600; margin-top: 4px; }

/* ============ MODULES GRID ============ */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 30px;
}
.module-card {
    background: #fff; border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease;
    border: 1px solid var(--color-border);
}
.module-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.module-card-img { height: 170px; overflow: hidden; background: var(--color-primary-light); }
.module-card-img img { width: 100%; height: 100%; object-fit: cover; }
.module-card-body { padding: 16px 18px; }
.module-card-body h3 { margin: 0 0 8px; color: var(--color-primary-dark); font-size: 1.1rem; }
.module-card-body p { margin: 0; color: var(--color-muted); font-size: .9rem; }

/* ============ SOCIAL SECTION ============ */
.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 22px; margin-top: 30px;
}
.social-card {
    background: #fff; border-radius: var(--radius); padding: 26px 20px;
    text-align: center; box-shadow: var(--shadow); border-top: 3px solid var(--color-gold);
}
.social-icon { font-size: 2.2rem; margin-bottom: 10px; }
.social-card h3 { color: var(--color-primary-dark); font-size: 1.05rem; margin: 6px 0; }
.social-card p { color: var(--color-muted); font-size: .88rem; margin: 0; }

/* ============ INVESTMENT SECTION ============ */
.investment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px; margin-top: 26px;
}
.invest-card {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #fff; border-radius: var(--radius); padding: 26px 16px; text-align: center;
    box-shadow: var(--shadow);
}
.invest-number { font-size: 1.8rem; font-weight: 700; color: var(--color-gold); }
.invest-label { margin-top: 6px; font-size: .9rem; opacity: .9; }
.profit-split { margin-top: 40px; text-align: center; }
.profit-split h3 { color: var(--color-primary-dark); margin-bottom: 16px; }
.profit-bar {
    display: flex; height: 46px; border-radius: 30px; overflow: hidden;
    box-shadow: var(--shadow); max-width: 600px; margin: 0 auto;
}
.profit-investor {
    background: var(--color-primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: .82rem; font-weight: 600;
}
.profit-reserve {
    background: var(--color-gold); color: var(--color-primary-dark);
    display: flex; align-items: center; justify-content: center;
    font-size: .82rem; font-weight: 600;
}

/* ============ GALLERY ============ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px; margin-top: 26px;
}
.gallery-item { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); height: 160px; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery-item:hover img { transform: scale(1.08); }

/* ============ FORMS ============ */
.form-card {
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 30px; max-width: 720px; margin: 0 auto; border: 1px solid var(--color-border);
}
.form-row { margin-bottom: 18px; display: flex; flex-direction: column; gap: 6px; }
.form-row-group { display: flex; gap: 16px; }
.form-row-group .form-row { flex: 1; }
label { font-weight: 600; color: var(--color-primary-dark); font-size: .92rem; }
input, select, textarea {
    padding: 11px 14px; border: 1px solid var(--color-border); border-radius: 8px;
    font-family: var(--font-bn); font-size: .95rem; background: #fdfdfb;
}
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-light);
}

/* ============ TABLE ============ */
.table-responsive { overflow-x: auto; margin-top: 20px; }
.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.data-table th, .data-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--color-border); font-size: .9rem; }
.data-table th { background: var(--color-primary); color: #fff; }
.data-table tbody tr:hover { background: var(--color-primary-light); }

.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 24px; }
.pagination a {
    padding: 8px 14px; border-radius: 6px; background: #fff; border: 1px solid var(--color-border); color: var(--color-primary-dark);
}
.pagination a.active { background: var(--color-primary); color: #fff; }

/* ============ CONTACT ============ */
.contact-grid { display: grid; grid-template-columns: 280px 1fr; gap: 30px; align-items: start; margin-top: 20px; }
.contact-info { background: #fff; padding: 24px; border-radius: var(--radius); box-shadow: var(--shadow); }
.contact-info h3 { color: var(--color-primary-dark); }

/* ============ MODULE DETAIL ============ */
.breadcrumb { color: var(--color-muted); font-size: .85rem; margin-bottom: 16px; }
.breadcrumb a { color: var(--color-primary); }
.module-detail-head { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; margin-bottom: 24px; }
.module-detail-img { width: 100%; max-width: 340px; border-radius: var(--radius); box-shadow: var(--shadow); }
.module-detail-head h1 { color: var(--color-primary-dark); margin-bottom: 6px; }
.module-title-en { color: var(--color-gold); font-weight: 400; }
.module-detail-body { background: #fff; padding: 24px; border-radius: var(--radius); box-shadow: var(--shadow); }
.module-nav { display: flex; justify-content: space-between; margin-top: 20px; gap: 10px; flex-wrap: wrap; }
.module-nav-link { background: var(--color-primary-light); padding: 10px 16px; border-radius: 8px; color: var(--color-primary-dark); font-weight: 600; }

/* ============ FOOTER ============ */
.site-footer { background: var(--color-primary-dark); color: #dceee3; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; padding: 46px 20px; }
.footer-col h4 { color: var(--color-gold); margin-bottom: 14px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col a { color: #dceee3; opacity: .85; }
.footer-col a:hover { opacity: 1; color: var(--color-gold); }
.newsletter-form { display: flex; gap: 8px; }
.newsletter-form input { flex: 1; border-radius: 6px; border: none; padding: 10px; }
.newsletter-form button {
    background: var(--color-gold); color: var(--color-primary-dark); border: none;
    border-radius: 6px; padding: 0 16px; font-weight: 700; cursor: pointer;
}
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); text-align: center; padding: 16px 0; font-size: .85rem; opacity: .85; }

/* ============ WHATSAPP FLOAT ============ */
.whatsapp-float {
    position: fixed; bottom: 24px; left: 24px; z-index: 999;
    background: #25D366; width: 56px; height: 56px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 18px rgba(0,0,0,.25); font-size: 1.6rem;
}
.whatsapp-float:hover { transform: scale(1.08); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .mobile-menu-toggle { display: block; }
    .main-nav {
        position: fixed; top: 0; right: -300px; width: 280px; height: 100%;
        background: #fff; box-shadow: -4px 0 20px rgba(0,0,0,.15);
        transition: right .3s ease; padding: 70px 20px 20px; overflow-y: auto; z-index: 600;
    }
    .main-nav.open { right: 0; }
    .main-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
    .submenu { position: static; box-shadow: none; display: none; padding-left: 14px; }
    .has-children.open .submenu { display: block; }
    .form-row-group { flex-direction: column; }
    .module-detail-head { flex-direction: column; align-items: flex-start; }
    .slider { height: 280px; }
    .hero-fallback h1 { font-size: 1.5rem; }
    .prayer-widget { justify-content: flex-start; }
}

@media (max-width: 480px) {
    .top-bar-inner { flex-direction: column; align-items: flex-start; gap: 4px; }
    .investment-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============ NAV OVERLAY (mobile) ============ */
.nav-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 550;
}
.nav-overlay.show { display: block; }
