@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&family=Merriweather:wght@700&family=Tiro+Bangla&display=swap');

:root {
    --primary: #55017D;    /* Navy Blue */
    --accent: #ffaf10;      /* Gold */
    --text: #333;
    --light-bg: #f4f6f8;
    --white: #fff;
    --shadow: 0 4px 10px rgba(0,0,0,0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Poppins', sans-serif; background: var(--light-bg); color: var(--text); display: flex; flex-direction: column; min-height: 100vh; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
img { max-width: 100%; display: block; }

/* --- HEADER (LOGO + TEXT VERSION) --- */
header { background: white; border-bottom: 4px solid var(--primary); width: 100%; }

.text-header {
    background-color: var(--primary); /* Navy Blue Background */
    padding: 25px 20px;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

.text-header:hover {
    background-color: #3b0059; /* Slightly darker primary on hover */
}

/* FLEXBOX: Puts Logo and Text Side-by-Side */
.header-flex {
    display: flex;
    align-items: center;     /* Vertically Center */
    justify-content: center; /* Horizontally Center */
    gap: 20px;               /* Space between Logo and Text */
    max-width: 1200px;
    margin: 0 auto;
}

/* LOGO STYLES (UPDATED: No background) */
.school-logo {
    height: 90px;  /* Fixed Height for PC */
    width: auto;
    border-radius: 5px;
    /* background: white;  <-- REMOVED */
    /* padding: 5px;       <-- REMOVED */
}

/* TEXT BLOCK */
.header-text-block {
    text-align: left;
}

/* PC SIZE: Big and Grand */
.site-title {
    margin: 0;
    font-family: 'Merriweather', serif;
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 2.5rem;  /* Large size for PC */
    line-height: 1.1;
}

.site-subtitle {
    text-align: right;
    margin: 5px 0 0;
    color: var(--accent); /* Gold Text */
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1rem;
}

/* News Ticker */
.news-ticker { background: #eef2f5; display: flex; align-items: center; border-bottom: 1px solid #ddd; font-family: 'Tiro Bangla', serif; height: 40px; }
.ticker-label { background: #d32f2f; color: white; padding: 0 20px; font-weight: bold; height: 100%; display: flex; align-items: center; font-size: 0.9rem; }
marquee { flex: 1; color: #d32f2f; font-weight: bold; font-size: 0.95rem; padding-top: 3px; }

/* --- NAVIGATION --- */
nav { background: var(--primary); position: sticky; top: 0; z-index: 1000; box-shadow: 0 4px 10px rgba(0,0,0,0.2); width: 100%; }

.nav-container {
    width: 96%;
    margin: auto;
    display: flex;
    justify-content: center;
    position: relative;
    min-height: 50px;
}

.menu { display: flex; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; }
.menu a { color: rgba(255,255,255,0.9); padding: 14px 20px; font-weight: 500; font-size: 14px; text-transform: uppercase; border-bottom: 3px solid transparent; display: block; }
.menu a:hover, .menu a.active { background: rgba(255,255,255,0.1); color: var(--accent); border-bottom: 3px solid var(--accent); }

/* MOBILE HAMBURGER */
.hamburger { display: none; background: none; border: none; color: white; font-size: 24px; position: absolute; right: 20px; top: 12px; cursor: pointer; z-index: 1100; }
.brand-mobile { display: none; color: white; font-weight: bold; font-size: 18px; padding: 12px; }

/* --- PAGE LAYOUT (GRID AREAS) --- */
.page-container { width: 96%; margin: 30px auto; padding: 0; flex: 1; }

.content-wrapper {
    display: grid;
    grid-template-areas: "main sidebar";
    grid-template-columns: 3fr 1fr; /* 75% Left, 25% Right */
    gap: 30px;
    align-items: start;
}

.main-content { grid-area: main; }
#sidebar-container { grid-area: sidebar; }

/* --- SIDEBAR WIDGETS --- */
.sidebar-widget { background: white; border-radius: 8px; box-shadow: var(--shadow); margin-bottom: 20px; overflow: hidden; border: 1px solid #eee; }
.widget-header { padding: 12px 15px; color: white; font-family: 'Merriweather', serif; font-weight: bold; display: flex; align-items: center; gap: 10px; font-size: 1rem; }
.notice-header { background: linear-gradient(135deg, #FF512F, #DD2476); }
.links-header { background: linear-gradient(135deg, var(--primary), #7b1fa2); }
.contact-header { background: linear-gradient(135deg, #11998e, #38ef7d); }

.widget-content { padding: 15px; }
.widget-list li { margin-bottom: 10px; border-bottom: 1px dashed #eee; padding-bottom: 8px; font-size: 0.9rem; }
.widget-list a:hover { color: var(--primary); transform: translateX(5px); }
.contact-item { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 0.85rem; }
.contact-icon { width: 30px; height: 30px; background: #f0f0f0; border-radius: 50%; display: flex; justify-content: center; align-items: center; color: var(--primary); font-size: 0.8rem; }

/* --- GENERAL STYLES --- */
.hero { background: linear-gradient(rgba(85,1,125,0.9), rgba(85,1,125,0.65)), url('images/school-bg.jpg'); background-size: cover; background-position: center; color: white; padding: 60px 20px; text-align: center; border-radius: 10px; margin-bottom: 30px; grid-column: 1 / -1; }
.hero h1 { font-size: 2.2rem; margin-bottom: 10px; font-family: 'Merriweather', serif; }
.btn { background: var(--accent); color: var(--primary); padding: 10px 25px; border-radius: 50px; font-weight: bold; display: inline-block; margin-top: 15px; font-size: 0.9rem; }

.section-title { text-align: center; color: var(--primary); margin-bottom: 30px; font-family: 'Merriweather', serif; font-size: 1.8rem; }

.grid-layout { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.card { background: white; padding: 20px; border-radius: 8px; border-top: 4px solid var(--primary); box-shadow: var(--shadow); transition: 0.3s; }
.card:hover { transform: translateY(-5px); }
.read-more { color: var(--primary); font-weight: bold; display: block; margin-top: 10px; background: #eef2f5; padding: 8px; text-align: center; border-radius: 4px; }

/* STAFF CARDS */
/* --- 1. FORCE IDENTICAL SIZE FOR PHOTO & BOX --- */
.staff-img, .no-img-box {
    width: 240px !important;      /* STRICT FIXED WIDTH */
    height: 260px !important;     /* STRICT FIXED HEIGHT */
    
    border-radius: 10px;
    margin: 0 auto 15px;          /* Centered */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    box-sizing: border-box;       /* Includes border in the 240px width */
    display: block;
}

/* Real Image Specifics */
.staff-img {
    object-fit: cover;            /* Ensures photo doesn't stretch */
    border: 3px solid var(--accent);
}

/* No-Image Box Specifics */
.no-img-box {
    background-color: #f0f2f5;
    border: 3px solid #ccc;       /* Gray Border */
    display: flex;
    justify-content: center;
    align-items: center;
}

.no-img-box i {
    font-size: 6rem;
    color: #bdc3c7;
}

/* --- 2. ADJUST GRID TO FIT THE 240PX IMAGES --- */
.staff-grid {
    display: grid;
    /* Columns must be at least 280px wide to hold a 240px image + padding */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 25px;
    padding: 20px 0;
}

/* --- 3. CARD STYLING --- */
.staff-card {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    padding: 20px;                /* Padding around the image */
    text-align: center;
    transition: 0.3s ease-in-out;
    border-bottom: 4px solid transparent;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.staff-card:hover {
    transform: translateY(-5px);
    border-bottom: 4px solid var(--accent);
}

/* FOOTER */
footer { background: #1a1a1a; color: #ccc; padding: 50px 0 20px; margin-top: auto; width: 100%; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; width: 96%; margin: auto; padding: 0; }
.footer-col h3 { color: white; margin-bottom: 15px; border-left: 3px solid var(--accent); padding-left: 10px; font-size: 1.1rem; }
/* --- FOOTER COPYRIGHT BAR --- */
.copyright { 
    display: grid;
    grid-template-columns: 1fr auto 1fr; /* Creates 3 columns: Left (empty), Center, Right */
    align-items: center;
    margin-top: 30px; 
    padding-top: 20px; 
    border-top: 1px solid #333; 
    font-size: 0.85rem; 
}

/* Forces the Copyright text into the exact center */
.copyright span:first-child {
    grid-column: 2;
    text-align: center;
}

/* Forces the Developer credit to the far right */
.copyright span:last-child {
    grid-column: 3;
    text-align: right;
}

/* Mobile Fix: Stacks them neatly on top of each other on small screens */
@media (max-width: 768px) {
    .copyright {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .copyright span:first-child,
    .copyright span:last-child {
        grid-column: 1;
        text-align: center; /* Centers both on mobile */
    }
}
/* --- MOBILE RESPONSIVE LOGIC --- */
@media (max-width: 900px) {
    /* 1. Header Text & Logo Resizing */
    .text-header { padding: 12px 10px; }

    .header-flex {
        gap: 10px;
        justify-content: center;
    }

    .school-logo {
        height: 45px; /* Small Logo */
    }

    .site-title {
        font-size: 1.1rem; /* Small Title */
        line-height: 1.2;
    }

    .site-subtitle {
        font-size: 0.7rem; /* Small Subtitle */
    }

    /* 2. Layout Stacking */
    .content-wrapper {
        grid-template-columns: 1fr;
        grid-template-areas:
            "main"
            "sidebar";
    }

    /* 3. Mobile Menu */
    .nav-container { justify-content: space-between; align-items: center; width: 100%; padding: 0 15px; }
    .brand-mobile { display: block; }
    .hamburger { display: block; }

    .menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: var(--primary);
        position: absolute;
        top: 100%;
        left: 0;
        box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    }
    .menu.show { display: flex; }
    .menu a { text-align: left; padding: 15px 20px; border-bottom: 1px solid rgba(255,255,255,0.1); width: 100%; color: white; }
}

/* --- EXTRA SMALL SCREENS (Phones) --- */
@media (max-width: 600px) {
    .text-header { padding: 8px 5px; }
    
    .header-flex { gap: 8px; }
    
    .school-logo {
        height: 35px;
    }
    
    .site-title {
        font-size: 0.95rem;
        letter-spacing: 0.5px;
    }
    
    .site-subtitle {
        font-size: 0.55rem;
        margin-top: 2px;
        text-align: left;
    }
}

/* --- GALLERY STYLES --- */
.gallery-title { color: var(--primary); font-family: 'Merriweather', serif; margin-bottom: 20px; border-left: 5px solid var(--accent); padding-left: 15px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 30px; }
.gallery-item { height: 180px; overflow: hidden; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); border: 3px solid white; cursor: pointer; transition: 0.3s; }
.gallery-item:hover { transform: scale(1.02); box-shadow: 0 8px 15px rgba(0,0,0,0.2); border-color: var(--primary); }
.gallery-img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.section-divider { border: 0; height: 1px; background: #ddd; margin: 30px 0; }

/* --- LIGHTBOX STYLES --- */
.lightbox { display: none; position: fixed; z-index: 2000; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.9); justify-content: center; align-items: center; }
.lightbox.active { display: flex; }
.lightbox-img { max-width: 90%; max-height: 80%; border: 5px solid white; border-radius: 4px; box-shadow: 0 0 20px rgba(255,255,255,0.2); }
.lightbox-close { position: absolute; top: 20px; right: 30px; background: none; border: none; color: white; font-size: 3rem; cursor: pointer; transition: 0.3s; }
.lightbox-close:hover { color: var(--accent); }
.lightbox-prev, .lightbox-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.1); border: none; color: white; font-size: 2rem; padding: 10px 15px; cursor: pointer; border-radius: 5px; transition: 0.3s; }
.lightbox-prev:hover, .lightbox-next:hover { background: var(--accent); color: var(--primary); }


/* --- COLORFUL READ MORE BUTTONS --- */
.read-more {
    display: block;
    margin-top: 15px;
    padding: 10px 15px;
    text-align: center;
    border-radius: 50px; /* Rounded Pill Shape */
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    transition: 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    border: none;
}

.read-more:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.25);
    color: white;
}

/* 1. Orange Gradient (For Book List/New) */
.btn-orange {
    background: linear-gradient(135deg, #FF512F, #DD2476);
}

/* 2. Blue Gradient (For Notices) */
.btn-blue {
    background: linear-gradient(135deg, var(--primary), #7b1fa2);
}

/* 3. Green Gradient (For Gallery/Sports) */
.btn-green {
    background: linear-gradient(135deg, #11998e, #38ef7d);
}



/* =========================================
   --- LOGIN BUTTON CSS --- 
========================================= */

/* 1. DESKTOP PC VIEW (Button stays on the far right) */
@media (min-width: 901px) {
    /* Snaps the list item containing the button to the right */
    .menu li:last-child {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }

    /* Styles the button like a pill */
    .nav-login-btn {
        background: var(--accent);
        color: var(--primary) !important;
        padding: 8px 20px !important; /* Thin height */
        border-radius: 50px;
        font-weight: bold;
        font-size: 0.85rem;
        transition: 0.3s;
        border-bottom: none !important;
        display: inline-block;
    }
    
    /* Hover effect */
    .nav-login-btn:hover {
        background: white !important;
        transform: translateY(-2px);
    }
}


/* 2. MOBILE VIEW (Button drops to the bottom of the hamburger menu) */
@media (max-width: 900px) {
    /* Removes the right-side snapping */
    .menu li:last-child {
        position: static; 
        transform: none;
        width: 100%;
    }

    /* Makes the button wide and centers it at the bottom */
    .nav-login-btn {
        position: static;          
        transform: none;           
        display: block;
        width: 85%;                
        margin: 15px auto 25px auto; 
        text-align: center;
        border-radius: 50px;
        padding: 8px !important;    /* Keeps height thin on mobile */
        border-bottom: none !important;      
        background-color: var(--accent);
        color: var(--primary) !important;
        font-weight: bold;
    }
    
    .nav-login-btn:hover {
        background-color: white !important;
    }
}
