/* ==================================== */
/* --- বেসিক রিসেট ও গ্লোবাল স্টাইল --- */
/* ==================================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;800&display=swap');
/* Poppins ফন্ট ব্যবহার করা হলো */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* ফন্ট পরিবর্তন: 'Kalpurush' বা 'Siyam Rupali' ব্যবহার করা ভালো */
    font-family: 'Poppins', 'Kalpurush', sans-serif; 
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* কন্টেইনার ফিক্স */
main {
    display: flex;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    gap: 20px; /* কলামের মধ্যে দূরত্ব */
}

/* ========================================= */
/* --- হেডার ও নেভিগেশন স্টাইল (উন্নত) --- */
/* ========================================= */

/* --- হেডার ব্যাকগ্রাউন্ড ও ওভারলে --- */
.main-header {
    background-image: url('header.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    position: relative;
    z-index: 10;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4); 
}

/* ছবির উপর ওভারলে (অপাসিটি সংশোধন) */
.main-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.1); /* 0.1.1 থেকে 0.1 এ পরিবর্তন করা হলো */
    z-index: -1;
}

/* --- টপ হেডার কন্টেন্ট --- */
.header-top {
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

.logo-area {
    display: flex;
    align-items: center;
    flex-grow: 1;
    gap: 15px;
}

.logo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #ffc107;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    transition: transform 0.4s ease-out;
}

.logo:hover {
    transform: scale(1.05) rotate(3deg);
}

/* --- শিরোনাম স্টাইল --- */
.title-description {
    line-height: 1.2;
}

.title-description h1 {
    font-size: 1.9em;
    margin: 0;
    font-weight: 800;
    letter-spacing: 0;
    text-shadow: 8px 8px 5px rgba(0, 0, 0, 0.8);
}

.site-description {
    font-size: 1.3em;
    opacity: 0.9;
    font-weight: bold;
    text-shadow: 7px 7px 5px rgba(0, 0, 0, 0.7);
}

/* --- ঘোষণা/নিউজ টিকার স্টাইল --- */
.news-ticker-container {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 2px auto;
    padding: 8px 15px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.fixed-title {
    font-size: 1.2em; /* ফন্ট সাইজ সামান্য কমানো হয়েছে */
    font-weight: bold;
    color: white;
    padding: 5px 10px;
    margin-right: 10px;
    flex-shrink: 0; 
    background: #27ae60; /* মূল থিম রঙ */
    border-radius: 0px;
}

.marquee-wrapper {
    flex-grow: 1; 
    overflow: hidden;
}

marquee {
    font-size: 1.1em;
    color: #333;
    font-weight: 600;
}


/* --- নেভিগেশন বার (ডেস্কটপ) --- */
.main-nav {
    background-color: #eaf5ff; /* হালকা নীল ব্যাকগ্রাউন্ড */
    padding: 0 5%;
    position: relative;
    z-index: 2;
    border-top: 2px solid #0056b3;
}


.main-nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    justify-content: flex-start;
}

.main-nav ul li button{
padding-left: 6px;
padding-right: 6px;
    background-color: #eaf5ff;
    margin: 0px;
    border: ridge;
    box-shadow: 0 8px 16px 0 rgba(0,0,0,0.1);
    margin: 2px;
}
.main-nav ul li a {
    color: black;
    text-decoration: none;
    padding: 15px 18px;
    display: block;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.main-nav ul li a:hover {
    color: white;
    background: #0056b3; 
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: #ffc107; 
    transform: translateX(-100%);
    transition: transform 0.3s ease-out;
}

.main-nav ul li a:hover::after {
    transform: translateX(0);
}

/* হোমে আলাদা স্টাইল */
.main-nav ul li:first-child a {
    padding: 15px 12px;
}
.main-nav ul li:first-child .fa-home {
    font-size: 1.4em; 
    color: #0056b3; 
}
.main-nav ul li:first-child a:hover {
    background: transparent;
    color: black;
}
.main-nav ul li:first-child a:hover .fa-home {
    color: white;
}
.main-nav ul li:first-child a:hover::after {
    transform: translateX(-100%); /* হোম আইকনের নিচে আন্ডারলাইন বন্ধ */
}
/* --- মেনু আইকন স্টাইল (মোবাইলের জন্য) --- */
.menu-icon {
    display: none;
    cursor: pointer;
    padding: 10px;
    margin-left: 20px;
    transition: transform 0.3s ease;
}

.bar {
    width: 30px;
    height: 3px;
    background-color: white;
    margin: 6px 0;
    transition: 0.4s;
}

.menu-icon:hover {
    transform: scale(1.1);
}


/* ========================== */
/* --- কন্টেন্ট ও লেআউট স্টাইল --- */
/* ========================== */

/* বাম দিকের প্রধান কলাম */
#notice-section {
    flex: 3;
    padding-right: 0;
}

/* ইতিহাস কার্ড */
.card {
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    background-color: #fff;
    margin: 15px 0px; /* মার্জিন ঠিক করা হলো */
    padding: 5px;
}

.card-header {
    background-color: #e9ecef;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #ddd;
}

.card-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #333;
    font-weight: 600;
}

.card-header .icon {
    font-size: 1.5rem;
    margin-right: 10px;
}

.card-body {
    padding: 15px;
    line-height: 1.6;
    color: #555;
    text-align: justify;
}

.history-image-float-left {
    float: left;
    margin-right: 15px;
    margin-bottom: 10px;
    max-width: 250px;
    height: auto;
    border-radius: 3px;
    object-fit: cover;
}

.card-body::after {
    content: "";
    display: table;
    clear: both;
}

.read-more-button {
    display: inline-block;
    padding: 5px 15px;
    margin-top: 10px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.read-more-button:hover {
    background-color: #0056b3;
}

/* --- নোটিশ বোর্ড কন্টেইনার --- */
.notice-board-container {
    background-color: #ffffff;
    border-radius: 3px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    padding: 5px;
    border-left: 5px solid #007bff; /* বর্ডার চওড়া করা হলো */
    margin: 15px 0px;
}
.notice-header {
    background-color: #e9ecef;
    padding: 10px 15px;
    text-align: center;
}
    
.notice-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.4em;
    
}
.notice-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notice-item {
    border-bottom: 1px dashed #cccccc;
    transition: background-color 0.3s ease;
}

.notice-item:hover {
    background-color: #eaf5ff;
}

.notice-link {
    display: flex;
    align-items: center;
    padding: 10px 5px;
    text-decoration: none;
    color: #333;
    font-size: 1.05em;
    position: relative;
}

.notice-icon {
    color: #28a745;
    margin-right: 5px;
    font-size: 1.2em;
    min-width: 25px;
}

.notice-date {
    color: #6c757d;
    font-size: 0.9em;
    font-weight: 500;
    width: 130px;
    flex-shrink: 0;
}

.notice-subject {
    flex-grow: 1;
    color: #333;
    font-weight: 600;
    margin-left: 10px;
}

.new-notice .notice-link .notice-subject {
    color: #dc3545;
    font-weight: bold;
}

.new-badge {
    background-color: #dc3545;
    color: white;
    font-size: 0.7em;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 10px;
    animation: blinker 1.5s linear infinite;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

.view-all {
    text-align: right;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

/* --- লিংক বক্সের স্টাইল --- */
.box-container {
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    background-color: #fff;
    margin: 15px 0px;
}
.info-box {
    padding: 15px;
    border: 1px dotted #ccc;
    background-color: #ffffff;
    display: flex;
    align-items: flex-start;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-left: 5px solid; /* বর্ডার চওড়া করা হলো */
}

/* রঙ ঠিক করা হলো */
.box-institution { border-left-color: #007bff; }
.box-web-4 { border-left-color: #28a745; }
.box-web-2 { border-left-color: #ffc107; }
.box-web-3 { border-left-color: #dc3545; }

.info-box img {
    width: 80px; /* ছবি ছোট করা হলো */
    margin-right: 15px;
    flex-shrink: 0;
    border-radius: 5px;
}

.info-box ul {
    list-style: none;
    padding: 0;
}

.info-box ul li {
    line-height: 1.4;
    font-size: 1em;
    padding-left: 20px;
    position: relative;
    margin-bottom: 5px;
}

.info-box ul li::before {
    content: "\f0a9"; 
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #007bff; /* তীর চিহ্নের রঙ নীল করা হলো */
    font-size: 0.9em;
}

.info-box ul li a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.info-box ul li a:hover {
    color: #dc3545;
}

/* গুগল ম্যাপ ও ফেসবুক শিরোনাম */
.map, .facebook {
    text-align: center;
    color: #fff;
    background-color: #27ae60;
    margin: 25px 0 10px 0;
    border-bottom: 2px solid #ccc;
    padding-bottom: 5px;
    font-size: 1.3em;
}

/* --- সাইডবার (ডান দিকের কলাম) স্টাইল --- */
.sidebar-container {
    flex: 1.5;
    background: #ffffff;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    height: fit-content;
    margin-top: 15px;
}

.sidebar-container h4, .sidebar-container h2 {
    color: #fff;
    margin-bottom: 15px;
    border-bottom: 2px solid #ccc;
    padding-bottom: 5px;
    text-align: center;
    background-color: #27ae60;
    font-size: 1.2em;
}

.sidebar-container .president, .sidebar-container .principal {
    margin-top: 0px !important;
}
.sidebar-container div h2 {
    margin-top: 20px !important;
}

.sidebar-container p {
    text-align: justify;
    
    color: #343a40;
    font-size: 1em;
    margin-bottom: 20px;
}

/* ভিডিওটিকে রেসপনসিভ করতে এই CSS অংশটি ব্যবহার করুন */
.video-responsive {
    overflow: hidden;
    /* 16:9 অনুপাত বজায় রাখতে 56.25% ব্যবহার করা হয় */
    padding-bottom: 56.25%; 
    position: relative;
    height: 0;
    max-width: 100%; /* কন্টেইনারের সর্বোচ্চ প্রস্থ */
    margin: 20px 0; /* মার্জিন প্রয়োজন অনুসারে পরিবর্তন করুন */
}

.video-responsive iframe {
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    position: absolute;
}

/* ============================ */
/* --- শিক্ষক ক্যারোসেল স্টাইল --- */
/* ============================ */
.carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin: 10px auto 20px auto;
    
    padding: 2 10px;
}

.carousel-container > h2 {
    text-align: center;
    color: #fff;
    background-color: #27ae60;
    margin-bottom: 20px;
    border-bottom: 2px solid #ccc;
    padding-bottom: 5px;
    width: 100%;
    
}

.carousel-slider {
    display: flex;
    transition: transform 0.5s ease;
    padding-bottom: 5px; /* নিচের শ্যাডো দেখানোর জন্য */
}

.carousel-item {
    min-width: calc(25% - 15px); /* 4 আইটেমের জন্য ফিক্সড উইডথ */
    background-color: #fff;
    margin-right: 10px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    border-top: 4px solid #dc3545;
}

/* শেষ আইটেমের ডানদিকের মার্জিন বাদ দেওয়া */
.carousel-item:last-child {
    margin-right: 0;
}

.teacher-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 3px solid #007bff;
}

.prev-btn, .next-btn {
    position: absolute;
    top: 55%; /* মাঝখানে আনা হলো */
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    z-index: 100;
    border-radius: 5px;
    transition: background 0.3s;
    font-size: 1.2em;
    opacity: 0.8;
}

.prev-btn:hover, .next-btn:hover {
    background: #007bff;
    opacity: 1;
}

.prev-btn { left: 5px; }
.next-btn { right: 5px; }

/* ডিসেবল্ড বাটনের স্টাইল */
.prev-btn:disabled, .next-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(0, 0, 0, 0.6);
}

/* --- ফুটার --- */
footer {
    background: #343a40;
    color: white;
    text-align: center;
    padding: 15px 0;
    margin-top: 20px;
    font-size: 0.9em;
}

/* ========================================= */
/* --- MOBILE VIEW RESPONSIVENESS (<= 768px) --- */
/* ========================================= */

@media (max-width: 1024px) {
    /* ট্যাবলেট ভিউতে ক্যারোসেল আইটেম 2টি */
    .carousel-item {
        min-width: calc(50% - 10px);
    }
}


@media (max-width: 768px) {

    /* 1. Header & Navigation Fixes */
    .header-top {
        flex-wrap: wrap;
        padding: 15px 10px;
    }

    .menu-icon {
        display: block;
        position: absolute;
        top: 20px;
        right: 10px;
        z-index: 100;
    }

    .logo-area {
        width: 100%;
        margin-bottom: 10px;
    }

    .logo {
        width: 60px;
        height: 60px;
    }

    .title-description h1 {
        font-size: 1.5em;
    }

    .site-description {
        font-size: 0.9em;
    }
    .news-ticker-container {
        padding: 5px 10px;
    }
    .fixed-title {
        font-size: 1em;
        padding: 3px 8px;
    }
    marquee {
        font-size: 1em;
    }


    /* মেনু লুকানো এবং সাইডবারে নিয়ে আসা */
    .main-nav {
        display: none;
        width: 100%;
        position: absolute;
        top: 100%; /* হেডারের নিচে */
        left: 0;
        background: #0056b3;
        z-index: 50;
        padding: 0;
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
    }

    .main-nav ul li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        text-align: center;
    }
    .main-nav ul li a {
        color: white;
        padding: 10px;
    }
    .main-nav ul li a:hover {
        background: #007bff;
    }


    /* 2. Main Content Layout Fix */
    main {
        flex-direction: column;
        padding: 0 10px;
        margin-top: 10px;
    }
    /* সাইডবারকে নিচে নিয়ে আসা */
    .sidebar-container {
        order: 2;
        margin-bottom: 20px;
        margin-top: 0;
    }
    #notice-section {
        order: 1;
    }
  
    /* নোটিশ বোর্ড আইটেম ফিক্স */
    .notice-link {
        flex-wrap: wrap;
        padding: 10px 5px;
        justify-content: space-between;
    }

    .notice-date {
        width: auto;
        order: 2;
        margin-left: 0;
        font-size: 0.8em;
    }

    .notice-subject {
        width: 100%;
        order: 1;
        margin-top: 0;
        margin-left: 0;
        font-size: 0.95em;
        font-weight: 500;
        
    }
    .notice-icon {
        display: none; /* ছোট স্ক্রিনে আইকন বাদ দেওয়া হলো */
    }

    /* ইতিহাস ছবির ফ্লোট বাতিল */
    .history-image-float-left {
        float: none;
        display: block;
        margin: 10px auto;
        max-width: 100%;
    }

    /* Link Box ফিক্স */
    .info-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .info-box img {
        margin-right: 0;
        margin-bottom: 10px;
        width: 70px;
    }

    .info-box .box-content {
        width: 100%;
        text-align: left;
    }
    .info-box ul li {
        text-align: left;
    }

    /* ক্যারোসেল ফিক্স */
    .carousel-container {
        padding: 0 10px;
    }
    .carousel-item {
        min-width: 100%; /* মোবাইলে একটি আইটেম */
        margin-right: 15px;
    }

    .prev-btn, .next-btn {
        top: 50%;
        padding: 8px;
        font-size: 0.8em;
    }
}
