* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Noto Sans Bengali', Arial, sans-serif; background: #eef3f7; color: #222; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }
a { text-decoration: none; color: inherit; }

/* Top bar */
.topbar { background: #14375e; color: #fff; font-size: 13px; }
.topbar-inner { display: flex; justify-content: space-between; padding: 8px 15px; flex-wrap: wrap; gap: 10px; }

/* Header */
.main-header { background: #fff; padding: 15px 0; }
.header-inner { display: flex; align-items: center; gap: 15px; }
.logo { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; }
.main-header h1 { color: #01A450; font-size: 26px; }
.address { color: #444; font-size: 14px; }

/* Navbar */
.navbar { background: #14375e; }
.nav-menu { list-style: none; display: flex; flex-wrap: wrap; }
.nav-menu li a { display: block; padding: 14px 18px; color: #fff; font-weight: 500; }
.nav-menu li a:hover, .nav-menu li:first-child a { background: #01A450; }

/* Dropdown menu */
.nav-menu li.has-dropdown { position: relative; }
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 200px;
    list-style: none;
    box-shadow: 0 4px 10px rgba(0,0,0,.15);
    z-index: 50;
    border-radius: 0 0 6px 6px;
    overflow: hidden;
}
.nav-menu li.has-dropdown.open .dropdown-menu { display: block; }
.dropdown-menu li a {
    color: #14375e;
    padding: 12px 18px;
    font-weight: 500;
    border-bottom: 1px solid #f0f0f0;
}
.dropdown-menu li a:hover { background: #e8f5ee; color: #01A450; }
.dropdown-menu li:last-child a { border-bottom: none; }

/* Notice marquee bar */
.notice-bar { background: #dceefb; border-bottom: 1px solid #c3dcec; margin-bottom: 6px; }
.notice-inner { display: flex; align-items: center; padding: 8px 15px; gap: 12px; }
.notice-label { background: #14375e; color: #fff; padding: 5px 14px; border-radius: 3px; font-weight: bold; white-space: nowrap; }
marquee { flex: 1; color: #14375e; }

/* Slider */
.slider { max-width: 1200px; margin: 15px auto; position: relative; }
.slide { display: none; }
.slide.active { display: block; animation: fadeSlide .6s ease; }
@keyframes fadeSlide { from { opacity: 0; } to { opacity: 1; } }
.slide img { width: 100%; max-height: 480px; object-fit: cover; border-radius: 6px; }
.slide-caption { position: absolute; bottom: 10px; left: 10px; background: rgba(0,0,0,.5); color: #fff; padding: 4px 10px; border-radius: 4px; }

/* Two column layout */
.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; padding: 20px 0; }
.col-main, .col-side { display: flex; flex-direction: column; gap: 20px; }

/* Green box card */
.green-box { background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.box-title { background: #01A450; color: #fff; text-align: center; padding: 12px; font-size: 17px; }
.box-body { padding: 16px; }
.box-body p { line-height: 1.9; color: #333; text-align: justify; }

/* Quick links grid */
.quick-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; text-align: center; }
.quick-item { border: 1px solid #ddd; border-radius: 6px; padding: 16px 8px; font-size: 14px; font-weight: 600; color: #01A450; }
.quick-item:hover { background: #f0f9f4; }

/* Gallery grid */
.gallery-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.gallery-grid img { width: 100%; height: 90px; object-fit: cover; border-radius: 4px; }

/* হোমপেজের ফটোগ্যালারি প্রিভিউ - ৩ কলাম */
.gallery-grid-home { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gallery-grid-home img { width: 100%; height: 140px; object-fit: cover; border-radius: 6px; }

/* People grid (শিক্ষকমণ্ডলী / কর্মচারী) - বড় পোর্ট্রেট ছবির জন্য */
.people-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.people-grid .staff-card { border: 1px solid #eee; padding: 16px; border-radius: 8px; }
.center-btn { text-align: center; padding: 0 16px 16px; }
.btn-green { display: inline-block; background: #01A450; color: #fff; padding: 8px 24px; border-radius: 20px; font-weight: 600; }
.btn-outline { display: inline-block; border: 1px solid #01A450; color: #01A450; padding: 6px 16px; border-radius: 4px; margin-top: 8px; }

/* Stats table */
.stats-table { width: 100%; border-collapse: collapse; text-align: center; }
.stats-table th, .stats-table td { border: 1px solid #dce8e2; padding: 8px; }
.stats-table th { background: #e8f5ee; color: #01A450; }

/* Home vs Inner page spacing */
.inner-page .main-content { padding-top: 34px; padding-bottom: 10px; }
.home .main-content { padding-bottom: 10px; }

/* Notice item (sidebar) */
.notice-item { border-bottom: 1px dashed #ddd; padding: 10px 0; }
.notice-item a { color: #14375e; font-weight: 600; }
.notice-date { color: #888; font-size: 12px; margin-top: 4px; }

/* Notice list page - clickable card */
.notice-list-card { display: block; background: #fff; border: 1px solid #e6e6e6; border-radius: 6px; padding: 14px 16px; margin-bottom: 10px; transition: box-shadow .15s, border-color .15s; }
.notice-list-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); border-color: #01A450; }
.notice-list-card .n-title { color: #14375e; font-weight: 600; display: block; margin-bottom: 6px; }
.notice-list-card .n-date { color: #888; font-size: 13px; }

/* Staff card */
.staff-card { text-align: center; }
.staff-photo { width: 100%;
                max-width: 180px;
                height: 200px;
                border-radius: 8px;
                object-fit: cover;
                border: 3px solid #01A450;
                display: block;
                margin: 0 auto; 
            }
.staff-card h3 { margin-top: 10px; color: #14375e; }
.staff-card p { color: #666; font-size: 14px; text-align: center; }

/* Staff Details Popup Modal */
.staff-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.55);
    z-index: 999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.staff-modal-overlay.active { display: flex; }
.staff-modal-box {
    background: #fff;
    border-radius: 12px;
    max-width: 420px;
    width: 100%;
    padding: 30px 24px 24px;
    position: relative;
    text-align: center;
    animation: modalPop .2s ease;
}
@keyframes modalPop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.staff-modal-close {
    position: absolute;
    top: 10px; right: 14px;
    background: none;
    border: none;
    font-size: 26px;
    color: #888;
    cursor: pointer;
    line-height: 1;
}
.staff-modal-close:hover { color: #c0392b; }
#staffModalContent img { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; border: 3px solid #01A450; margin-bottom: 12px; }
#staffModalContent h3 { color: #14375e; margin-bottom: 4px; }
#staffModalContent .modal-designation { color: #01A450; font-weight: 600; margin-bottom: 14px; }
#staffModalContent .modal-details { color: #444; text-align: left; line-height: 1.8; font-size: 14px; }

/* Useful links list */
.link-list { list-style: none; }
.link-list li { padding: 8px 0; border-bottom: 1px solid #f0f0f0; }

/* Footer */
.site-footer { background: #01A450; color: #fff; margin-top: 30px; }
.footer-inner { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 20px; padding: 30px 15px; }
.footer-logo { width: 100px; height: 100px; border-radius: 50%; background: #fff; padding: 5px; }
.site-footer h4 { margin-bottom: 14px; font-size: 16px; border-bottom: 1px solid rgba(255,255,255,.25); padding-bottom: 8px; }
.site-footer ul { list-style: none; }
.site-footer ul li { padding: 4px 0; font-size: 14px; }
.footer-contact-item { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-contact-icon { background: rgba(255,255,255,.15); width: 34px; height: 34px; min-width: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.footer-contact-text { font-size: 14px; line-height: 1.5; }
.footer-bottom { text-align: center; padding: 12px; background: #01803E; font-size: 13px; }

/* Result / Routine search forms */
.search-form-box { max-width: 500px; margin: 0 auto; }
.search-form-box label { display: block; margin-bottom: 6px; font-weight: 600; color: #14375e; }
.search-form-box .req { color: red; }
.search-form-box select, .search-form-box input { width: 100%; padding: 10px; margin-bottom: 16px; border: 1px solid #ccc; border-radius: 4px; }
.search-form-box button { width: 100%; background: #01A450; color: #fff; border: none; padding: 12px; border-radius: 6px; font-weight: 700; font-size: 15px; cursor: pointer; }
.search-form-box button:hover { background: #018342; }

.result-card { max-width: 500px; margin: 20px auto 0; border: 1px solid #dce8e2; border-radius: 8px; overflow: hidden; }
.result-card .result-head { background: #01A450; color: #fff; text-align: center; padding: 14px; font-weight: bold; }
.result-card table { width: 100%; border-collapse: collapse; }
.result-card td { padding: 10px 16px; border-bottom: 1px solid #eee; }
.result-card td:first-child { color: #666; width: 40%; }
.result-card td:last-child { font-weight: 600; color: #14375e; }
.result-status-pass { color: #01A450; font-weight: bold; }
.result-status-fail { color: #c0392b; font-weight: bold; }

/* Contact page */
.contact-page-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 24px; }
.contact-info-list { display: flex; flex-direction: column; gap: 18px; }
.contact-info-item { display: flex; gap: 14px; align-items: flex-start; background: #f7faf8; border-radius: 8px; padding: 14px; }
.contact-info-icon { background: #01A450; color: #fff; width: 40px; height: 40px; min-width: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 17px; }
.contact-form label { display: block; font-weight: 600; color: #14375e; margin-bottom: 6px; }
.contact-form input, .contact-form textarea { width: 100%; padding: 11px; margin-bottom: 16px; border: 1px solid #dcdcdc; border-radius: 6px; font-family: inherit; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: #01A450; }
.contact-form button { background: #01A450; color: #fff; border: none; padding: 12px 30px; border-radius: 6px; font-weight: 700; cursor: pointer; }
.contact-form button:hover { background: #018342; }

/* Routine page */
.routine-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.routine-card { background: #fff; border: 1px solid #eee; border-radius: 8px; overflow: hidden; text-align: center; }
.routine-card img { width: 100%; height: 200px; object-fit: cover; }
.routine-card .routine-label { padding: 10px; font-weight: 700; color: #14375e; background: #f0f9f4; }

/* Admission Application Form (স্ক্রিনশট অনুযায়ী সেকশন-ভিত্তিক ডিজাইন) */
.admission-form { max-width: 900px; margin: 0 auto; }
.af-section-title {
    background: #eef3f7;
    color: #14375e;
    font-weight: 700;
    font-size: 15px;
    padding: 10px 14px;
    border-left: 4px solid #01A450;
    margin: 22px 0 16px;
    border-radius: 4px;
}
.af-section-title:first-child { margin-top: 0; }
.af-row { display: grid; gap: 16px; margin-bottom: 4px; }
.af-row-2 { grid-template-columns: 1fr 1fr; }
.af-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.af-field { margin-bottom: 16px; }
.af-field label { display: block; font-weight: 600; font-size: 13px; color: #14375e; margin-bottom: 6px; }
.af-field .req { color: #c0392b; }
.af-field input[type="text"],
.af-field input[type="date"],
.af-field input[type="email"],
.af-field input[type="password"],
.af-field input[type="file"],
.af-field select {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #d7dee3;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: #fbfcfd;
}
.af-field input:focus, .af-field select:focus { outline: none; border-color: #01A450; background: #fff; }
.af-radio-group { display: flex; gap: 16px; align-items: center; padding-top: 6px; }
.af-radio-group label { display: flex; align-items: center; gap: 5px; font-weight: 400; font-size: 14px; color: #333; margin-bottom: 0; }
.af-radio-group input { width: auto; }

@media (max-width: 700px) {
    .af-row-2, .af-row-3 { grid-template-columns: 1fr;
     .people-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .staff-photo { max-width: 100%; height: 160px; 
     }
    }
}

/* Responsive */
@media (max-width: 900px) {
    .two-col { grid-template-columns: 1fr; }
    .quick-links { grid-template-columns: repeat(2, 1fr); }
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
    .gallery-grid-home { grid-template-columns: repeat(2, 1fr); }
    .people-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .dropdown-menu { position: static; box-shadow: none; border-radius: 0; }
    .nav-menu li.has-dropdown.open .dropdown-menu { background: #0e2d4c; }
    .dropdown-menu li a { color: #fff; padding-left: 30px; }
    .dropdown-menu li a:hover { background: #01A450; color: #fff; }
    .contact-page-grid { grid-template-columns: 1fr; }
    .routine-grid { grid-template-columns: repeat(2, 1fr); }
}

/* প্রিন্ট করার সময় শুধু রেজাল্ট কার্ড দেখাবে, বাকি সব লুকানো থাকবে */
@media print {
    body * { visibility: hidden; }
    #resultCardPrintArea, #resultCardPrintArea * { visibility: visible; }
    #resultCardPrintArea { position: absolute; top: 0; left: 0; width: 100%; }
    .no-print { display: none !important; }
}
