/* =====================================================================
   ফন্ট
   ===================================================================== */
@font-face {
    font-family: 'Nikosh';
    src: url('../fonts/Nikosh.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    /* সাইটের মূল কালার প্যালেট */
    --plum-900: #601D49;
    --plum-800: #4a1739;
    --plum-700: #7a2960;
    --rose-600: #BD5579;
    --rose-500: #c96a8b;
    --pink-300: #EA9D9D;
    --pink-100: #f9dede;
    --cream-50: #FBF2F1;
    --ink-900: #3a1530;
    --ink-600: #7a5a6d;
    --card-bg: #ffffff;

    --font-heading: 'Noto Serif Bengali', 'Nikosh', 'Segoe UI', serif;
    --font-body: 'Hind Siliguri', 'Nikosh', 'Segoe UI', Arial, sans-serif;

    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;

    --shadow-soft: 0 4px 16px rgba(96, 29, 73, 0.10);
    --shadow-lift: 0 12px 28px rgba(96, 29, 73, 0.18);
}

* {
    font-family: var(--font-body);
}

h1, h2, h3, h4, h5, h6,
.site-title, .card-header, .footer-heading {
    font-family: var(--font-heading);
}

body {
    background-color: var(--cream-50);
    color: var(--ink-900);
}

a {
    color: var(--rose-600);
}

a:hover {
    color: var(--plum-900);
}

::selection {
    background-color: var(--pink-300);
    color: var(--plum-900);
}

:focus-visible {
    outline: 3px solid var(--pink-300);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* =====================================================================
   হেডার
   ===================================================================== */
.site-header {
    background: linear-gradient(135deg, var(--plum-900), var(--rose-600));
    color: #fff;
}

.site-header-hero {
    position: relative;
    overflow: hidden;
}

.site-header-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 15% 25%, rgba(255,255,255,0.10) 0, transparent 40%),
        radial-gradient(circle at 85% 75%, rgba(255,255,255,0.08) 0, transparent 45%);
    pointer-events: none;
}

.site-header-hero .container {
    position: relative;
    z-index: 1;
}

@media (prefers-reduced-motion: no-preference) {
    .header-content-reveal {
        animation: heroFadeUp 0.7s ease both;
    }
}

@keyframes heroFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.site-logo {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #ffffff;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}

.site-title {
    font-size: 1.9rem;
    font-weight: 700;
}

.site-subtitle {
    font-size: 1rem;
    opacity: 0.92;
}

/* =====================================================================
   মেনু বার (নেভিগেশন)
   ===================================================================== */
.main-nav {
    background-color: var(--plum-800);
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.main-nav .navbar-nav {
    gap: 2px;
}

.main-nav .nav-link {
    position: relative;
    color: #f6e6ef;
    font-weight: 500;
    padding: 0.85rem 1.2rem;
    transition: color 0.2s ease;
}

.main-nav .nav-link i {
    margin-right: 4px;
}

.main-nav .nav-link::before {
    content: '';
    position: absolute;
    left: 1.2rem;
    right: 1.2rem;
    bottom: 10px;
    height: 2px;
    background-color: var(--pink-300);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease;
}

.main-nav .nav-link:hover,
.main-nav .nav-link:focus-visible {
    color: #ffffff;
}

.main-nav .nav-link:hover::before,
.main-nav .nav-link:focus-visible::before,
.main-nav .nav-link.active::before {
    transform: scaleX(1);
}

.main-nav .dropdown-menu {
    background-color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lift);
    padding: 6px;
    margin-top: 6px;
    animation: none;
}

.main-nav .dropdown-menu.show {
    animation: dropdownFadeIn 0.18s ease both;
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.main-nav .dropdown-item {
    color: var(--plum-900);
    border-radius: 6px;
    padding: 8px 14px;
    font-weight: 500;
    transition: background-color 0.15s ease, padding-left 0.15s ease;
}

.main-nav .dropdown-item i {
    margin-right: 6px;
    color: var(--rose-600);
    width: 18px;
    display: inline-block;
    text-align: center;
}

.main-nav .dropdown-item:hover,
.main-nav .dropdown-item:focus {
    background-color: var(--pink-100);
    color: var(--plum-900);
    padding-left: 18px;
}

.lang-switch {
    background-color: rgba(255,255,255,0.15);
    color: #fff !important;
    border-radius: 20px;
    padding: 6px 16px !important;
    margin-left: 8px;
}

.lang-switch::before {
    display: none;
}

.lang-switch:hover {
    background-color: rgba(255,255,255,0.3);
}

/* কাস্টম হ্যামবার্গার (মোবাইল মেনু টগলার) — X এ রূপান্তরিত হয় */
.custom-toggler {
    border: none;
    padding: 6px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
}

.custom-toggler:focus {
    box-shadow: 0 0 0 3px rgba(234,157,157,0.45);
    outline: none;
}

.toggler-bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.custom-toggler:not(.collapsed) .toggler-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.custom-toggler:not(.collapsed) .toggler-bar:nth-child(2) {
    opacity: 0;
}

.custom-toggler:not(.collapsed) .toggler-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* =====================================================================
   নোটিশ টিকার (মেনু বারের ঠিক নিচে — একপাশ থেকে অন্যপাশে স্ক্রল হয়)
   ===================================================================== */
.notice-ticker {
    background-color: var(--plum-900);
    border-top: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
}

.notice-ticker-inner {
    display: flex;
    align-items: stretch;
}

.notice-ticker-label {
    background-color: var(--rose-600);
    color: #fff;
    padding: 9px 18px;
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    clip-path: polygon(0 0, 100% 0, 92% 100%, 0% 100%);
    padding-right: 26px;
}

.notice-ticker-track {
    overflow: hidden;
    flex: 1;
    display: flex;
    align-items: center;
}

.notice-ticker-content {
    display: flex;
    align-items: center;
    width: max-content;
    white-space: nowrap;
    animation: tickerScroll var(--ticker-duration, 20s) linear infinite;
    padding-left: 1.5rem;
}

.notice-ticker-inner:hover .notice-ticker-content {
    animation-play-state: paused;
}

@keyframes tickerScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    .notice-ticker-content { animation: none; }
}

/* নোটিশ কম থাকলে (৪টির কম) স্থিরভাবে দেখানো হয় — স্ক্রল/ডুপ্লিকেট করা হয় না */
.ticker-static-mode .notice-ticker-track {
    overflow: visible;
}

.ticker-static-mode .notice-ticker-content {
    animation: none;
    flex-wrap: wrap;
    width: auto;
    white-space: normal;
    padding: 6px 0;
}

.notice-ticker-item {
    color: var(--pink-100);
    text-decoration: none;
    padding: 9px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.15s ease;
}

.notice-ticker-item:hover {
    color: #ffffff;
    text-decoration: underline;
}

.notice-ticker-sep {
    color: var(--pink-300);
    opacity: 0.6;
    font-size: 0.6rem;
}

/* =====================================================================
   নোটিশ (হোমপেজ ও নোটিশ পেজ)
   ===================================================================== */
.notice-item {
    border-left: 4px solid var(--rose-600);
    padding: 10px 15px;
    margin-bottom: 12px;
    background-color: #fffbfb;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

/* নোটিশ তালিকার প্রতিটি আইটেম ক্লিকযোগ্য — নিজস্ব আলাদা পেজে খোলে */
a.notice-item-link {
    color: var(--ink-900);
    text-decoration: none;
    cursor: pointer;
}

a.notice-item-link:hover {
    background-color: var(--pink-100);
    color: var(--ink-900);
    transform: translateX(4px);
    box-shadow: var(--shadow-soft);
}

.notice-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--ink-600);
    font-size: 0.92rem;
}

.notice-attachment-badge {
    background-color: var(--pink-100);
    color: var(--plum-900);
    font-weight: 600;
    border: 1px solid var(--pink-300);
}

.notice-item-arrow {
    font-size: 1.1rem;
    vertical-align: middle;
}

.notice-date {
    font-size: 0.8rem;
    color: var(--ink-600);
}

/* একক নোটিশ বিস্তারিত পেজ */
.notice-detail-card .about-content {
    font-size: 1.02rem;
    line-height: 1.9;
}

.notice-attachment-box {
    border-top: 1px dashed var(--pink-300);
}

.notice-attachment-preview {
    max-height: 500px;
    box-shadow: var(--shadow-soft);
}

.notice-nav-link {
    max-width: 48%;
}

/* হোমপেজ হিরো স্লাইডার */
.hero-slider {
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 100%;
    min-height: 320px;
    box-shadow: var(--shadow-soft);
}

.hero-slider .carousel-inner,
.hero-slider .carousel-item {
    height: 100%;
}

.hero-slider .carousel-item img {
    height: 320px;
    object-fit: cover;
}

.hero-slider-placeholder {
    height: 320px;
    background: linear-gradient(135deg, var(--plum-900), var(--rose-600));
}

.hero-slider .carousel-caption {
    background: rgba(96, 29, 73, 0.7);
    border-radius: var(--radius-sm);
    padding: 6px 14px;
    bottom: 15px;
}

.hero-slider .carousel-indicators [data-bs-target] {
    background-color: var(--pink-300);
}

/* হোমপেজ নোটিশ সাইডবার (স্লাইডারের পাশে) */
.notice-sidebar-card {
    max-height: 100%;
}

.notice-sidebar-body {
    max-height: 320px;
    overflow-y: auto;
}

.notice-sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 6px;
    text-decoration: none;
    color: var(--ink-900);
    border-left: 3px solid var(--rose-600);
    margin-bottom: 8px;
    border-radius: 0 6px 6px 0;
    background-color: #fffbfb;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.notice-sidebar-item:hover {
    background-color: var(--pink-100);
    color: var(--plum-900);
    transform: translateX(3px);
}

.notice-sidebar-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
    min-width: 52px;
    padding: 4px 6px;
    border: 1px solid var(--pink-300);
    border-radius: 6px;
    background-color: #fff;
}

.notice-sidebar-date .d {
    font-weight: 700;
    font-size: 1rem;
    color: var(--plum-900);
}

.notice-sidebar-date .m,
.notice-sidebar-date .y {
    font-size: 0.7rem;
    color: var(--ink-600);
}

.notice-sidebar-title {
    font-size: 0.9rem;
    font-weight: 500;
}

/* =====================================================================
   কার্যক্রম টাইমলাইন
   ===================================================================== */
.activity-timeline {
    position: relative;
    padding-left: 30px;
}

.activity-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background-color: var(--rose-600);
}

.activity-item {
    position: relative;
    margin-bottom: 20px;
}

.activity-item::before {
    content: '';
    position: absolute;
    left: -30px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--pink-300);
    border: 2px solid var(--plum-900);
}

.activity-image {
    max-width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    display: block;
}

/* =====================================================================
   কার্ড, বাটন, টেবিল
   ===================================================================== */
.card {
    border: 1px solid rgba(96, 29, 73, 0.06);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    background-color: var(--card-bg);
}

.card-header {
    background: linear-gradient(135deg, var(--plum-900), var(--plum-700));
    color: #fff;
    border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
    font-weight: 600;
    border-bottom: none;
}

.btn {
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background-color: var(--plum-900);
    border-color: var(--plum-900);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--plum-800);
    border-color: var(--plum-800);
    box-shadow: 0 6px 16px rgba(96, 29, 73, 0.3);
}

.btn-outline-primary {
    color: var(--plum-900);
    border-color: var(--plum-900);
}

.btn-outline-primary:hover {
    background-color: var(--plum-900);
    border-color: var(--plum-900);
}

.btn-gold {
    background: linear-gradient(135deg, var(--rose-600), var(--pink-300));
    border: none;
    color: #fff;
    box-shadow: 0 6px 18px rgba(189, 85, 121, 0.35);
}

.btn-gold:hover {
    background: linear-gradient(135deg, var(--plum-900), var(--rose-600));
    color: #fff;
    box-shadow: 0 10px 24px rgba(96, 29, 73, 0.4);
}

.table thead {
    background-color: var(--plum-900);
    color: #fff;
}

/* =====================================================================
   ফুটার
   ===================================================================== */
.site-footer {
    background-color: var(--plum-800);
    color: var(--pink-100);
    margin-top: 40px;
}

.footer-heading {
    color: var(--pink-300);
    font-weight: 700;
    margin-bottom: 12px;
}

.footer-heading i {
    margin-right: 6px;
}

.footer-text {
    color: #f3e2ea;
    font-size: 0.92rem;
}

.footer-text a {
    color: #f3e2ea;
    text-decoration: underline;
}

.footer-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.12);
    color: #fff;
    margin-right: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.footer-social-icon:hover {
    background-color: var(--pink-300);
    color: var(--plum-900);
    transform: translateY(-2px);
}

.footer-map-wrap {
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.15);
}

.footer-bottom {
    background-color: #3a1230;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.developer-credit {
    font-size: 0.78rem;
    opacity: 0.75;
    margin-top: 4px;
}

/* =====================================================================
   পরিচিতি: শিক্ষক ও ম্যানেজিং কমিটি কার্ড
   ===================================================================== */
.person-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.person-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lift);
}

.person-photo {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--pink-300);
}

.person-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--pink-100);
    color: var(--rose-600);
    font-size: 2.2rem;
    margin-left: auto;
    margin-right: auto;
}

.about-content {
    font-size: 1.02rem;
    line-height: 1.9;
}

.result-marksheet-table th, .result-marksheet-table td {
    text-align: center;
    vertical-align: middle;
}

/* =====================================================================
   এডমিন সাইডবার (রেসপনসিভ)
   ===================================================================== */
.admin-sidebar {
    background-color: var(--plum-800);
    min-height: 100vh;
    color: #fff;
}

.admin-sidebar a {
    position: relative;
    color: #f6e6ef;
    display: block;
    padding: 12px 18px 12px 22px;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    border-left: 3px solid transparent;
    transition: background-color 0.15s ease, border-color 0.15s ease, padding-left 0.15s ease;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    background-color: var(--plum-900);
    color: #ffffff;
    border-left-color: var(--pink-300);
    padding-left: 26px;
}

.admin-toggler {
    display: none;
}

.stat-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lift);
}

.stat-icon {
    font-size: 1.8rem;
    color: var(--rose-600);
    margin-bottom: 6px;
}

@media (max-width: 767.98px) {
    .admin-toggler {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        background-color: var(--plum-800);
        color: #fff;
        border: none;
        padding: 14px 18px;
        font-weight: 600;
    }

    .admin-sidebar {
        min-height: auto;
        width: 100% !important;
        min-width: 0 !important;
    }

    .admin-sidebar .admin-sidebar-links {
        display: none;
    }

    .admin-sidebar.open .admin-sidebar-links {
        display: block;
    }

    .admin-main-content {
        width: 100%;
    }
}

/* =====================================================================
   সাধারণ রেসপনসিভ সামঞ্জস্য
   ===================================================================== */
@media (max-width: 767.98px) {
    .site-title {
        font-size: 1.4rem;
    }

    .site-logo {
        width: 68px;
        height: 68px;
    }

    .hero-slider,
    .hero-slider .carousel-item img,
    .hero-slider-placeholder {
        min-height: 220px;
        height: 220px;
    }

    .notice-ticker-label {
        font-size: 0.8rem;
        padding: 7px 14px;
        padding-right: 20px;
    }

    .notice-ticker-item {
        font-size: 0.82rem;
        padding: 7px 10px;
    }
}

@media print {
    .no-print { display: none !important; }
    body { background: #fff; }
}
