/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    /* Color Palette derived from image */
    --primary-color: #5B7B9C;
    --accent-blue: #4A76A8;
    --accent-purple: #9B72AA;
    --accent-red: #E06C6C;
    --accent-yellow: #F4C756;
    --accent-green: #5CB888;

    --background-gradient: linear-gradient(135deg, #b8c6db 0%, #f5f7fa 100%);
    --surface-white: #ffffff;
    --text-dark: #333333;
    --text-muted: #888888;

    --sidebar-width: 260px;
    --border-radius: 20px;
    --card-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}

body {
    background: var(--background-gradient);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Vertical Stacking */
    padding: 0;
}

.main-wrapper {
    display: flex;
    width: 100%;
    max-width: 1400px;
    min-height: 60vh;
    /* Allow it to shrink/grow */
    background: var(--surface-white);
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    overflow: visible;
    margin: 20px auto;
    flex: 1;
    /* Push footer down */
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background: var(--primary-color);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    color: white;
    justify-content: space-between;
}

.sidebar h2 {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 40px;
    font-weight: 600;
    padding-left: 10px;
}

.public-menu,
.menu-header {
    margin-bottom: 10px;
}

.menu-header {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin: 15px 0 5px 15px;
    letter-spacing: 1px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border-radius: 12px;
    margin-bottom: 5px;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Content Area */
.content-area {
    flex: 1;
    background: #F0F2F5;
    padding: 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.glass-panel {
    background: transparent;
    border: none;
    box-shadow: none;
}

.sidebar.glass-panel {
    background: var(--primary-color);
    border-radius: 0;
    box-shadow: none;
    border: none;
}

.content-area.glass-panel {
    background: #FAFBFF;
    border-radius: 0;
}

/* Top Header */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.top-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Dashboard Cards (Colored) */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    padding: 25px;
    border-radius: 20px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 140px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    text-decoration: none;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.dashboard-grid>*:nth-child(1) .stat-card,
.dashboard-grid>*:nth-child(1).stat-card {
    background: var(--accent-purple);
}

.dashboard-grid>*:nth-child(2) .stat-card,
.dashboard-grid>*:nth-child(2).stat-card {
    background: var(--accent-red);
}

.dashboard-grid>*:nth-child(3) .stat-card,
.dashboard-grid>*:nth-child(3).stat-card {
    background: var(--accent-yellow);
}

.dashboard-grid>*:nth-child(4) .stat-card,
.dashboard-grid>*:nth-child(4).stat-card {
    background: var(--accent-green);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: white !important;
}

/* === New Public Header Design (Image Based) === */
.public-header-container {
    background-color: #fdfbf0;
    /* Light beige/off-white background */
    width: 100%;
    margin-bottom: 20px;
    font-family: 'Arial', sans-serif;
}

/* Branding Section */
.header-branding {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
    gap: 20px;
}

.logo-section {
    flex-shrink: 0;
}

.logo-placeholder {
    width: 100px;
    height: 100px;
    background: #0056b3;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 3px solid #87ceeb;
}

.text-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.inst-title {
    font-size: 2.2rem;
    color: #004085;
    /* Dark Blue */
    font-weight: 800;
    margin-bottom: 5px;
    text-transform: uppercase;
    text-shadow: 1px 1px 0px #fff;
    font-family: 'Arial Black', sans-serif;
}

.inst-sub {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 2px;
}

.inst-affil {
    font-size: 1rem;
    color: #333;
}

.inst-grade {
    font-size: 1.1rem;
    color: #d9534f;
    /* Red */
    font-weight: bold;
    margin: 5px 0;
}

.inst-addr {
    font-size: 1rem;
    color: #333;
}

/* Marquee Bar */
.marquee-bar {
    background-color: #ff8c00;
    /* Orange */
    color: white;
    font-weight: bold;
    padding: 5px 0;
    border-top: 2px solid #e17000;
    border-bottom: 2px solid #e17000;
}

/* Blue Navigation Bar */
.blue-nav-bar {
    background: linear-gradient(to bottom, #2da2cf 0%, #0077a3 100%);
    /* Blue Gradient */
    border-top: 1px solid #4fc1e9;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    position: relative;
}

.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.menu-item {
    color: white;
    text-decoration: none;
    padding: 12px 25px;
    font-size: 0.95rem;
    font-weight: bold;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    transition: background 0.2s;
    text-transform: uppercase;
}

.menu-item:first-child {
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.public-header-wrapper,
.header-inner,
.public-nav,
.brand,
.nav-item,
.login-link {
    display: none !important;
}

/* Adjust Main Wrapper when sidebar is hidden (Full Width) */
.full-width-content {
    max-width: 1200px !important;
    height: auto !important;
    box-shadow: none !important;
    background: transparent !important;
    margin-top: 0 !important;
}

.full-width-content .content-area {
    background: transparent !important;
    padding: 0 !important;
}

/* Forms & Tables */
.form-control {
    border: 1px solid #ddd;
    background: white;
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 0.9rem;
}

.btn {
    border-radius: 10px;
    padding: 10px 25px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: capitalize;
}

.btn-primary {
    background: var(--primary-color);
    box-shadow: 0 4px 10px rgba(91, 123, 156, 0.4);
}

.data-table {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    border: none;
}

.data-table th {
    background: #fff;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 2px solid #f0f0f0;
}

.data-table td {
    border-bottom: 1px solid #f5f5f5;
    color: var(--text-dark);
}

.marquee-container {
    background: var(--accent-blue) !important;
    border: none !important;
    border-radius: 10px;
}

.gallery-item,
.event-card {
    background: white !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: none !important;
    color: var(--text-dark);
}

.event-card {
    border-left: 5px solid var(--accent-blue) !important;
}

.event-card.completed {
    border-left-color: var(--accent-green) !important;
    opacity: 1;
    background: #fdfdfd !important;
}

.event-title,
.caption {
    color: var(--text-dark);
}

/* === Footer Styles === */
.site-footer {
    background-color: #333;
    color: #ccc;
    padding: 20px 0;
    width: 100%;
    margin-top: auto;
    font-size: 0.9rem;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-text a {
    color: #fff;
    text-decoration: none;
    margin: 0 5px;
}

.footer-text a:hover {
    text-decoration: underline;
}

.footer-powered {
    display: flex;
    align-items: center;
    gap: 5px;
}

.footer-powered a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
}

.m-designs-logo {
    display: inline-block;
    width: 24px;
    height: 24px;
    background: #FF5722;
    color: white;
    font-size: 10px;
    font-weight: bold;
    text-align: center;
    line-height: 24px;
    border-radius: 4px;
}

/* === Responsive Design & Mobile Modifications === */

/* Mobile Menu Button (Hidden on Desktop) */
.mobile-menu-toggle {
    display: none;
    padding: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    cursor: pointer;
    text-align: center;
    background: rgba(0, 0, 0, 0.1);
}

/* Media Query for Tablet and Mobile (max-width: 900px) */
@media screen and (max-width: 900px) {

    /* 1. Header Responsiveness */
    .header-branding {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }

    .text-section {
        width: 100%;
    }

    .inst-title {
        font-size: 1.5rem;
        /* Smaller Title */
        line-height: 1.2;
    }

    .inst-sub,
    .inst-affil,
    .inst-addr {
        font-size: 0.9rem;
    }

    /* 2. Navigation Responsiveness */
    .mobile-menu-toggle {
        display: block;
        /* Show Hamburger */
    }

    .nav-inner {
        display: none;
        /* Hide Menu by default */
        flex-direction: column;
        width: 100%;
    }

    .nav-inner.active {
        display: flex;
        /* Show when active */
    }

    .menu-item {
        width: 100%;
        text-align: center;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 15px;
    }

    /* 3. Internal Dashboard Sidebar Responsiveness */
    .main-wrapper {
        flex-direction: column;
        /* Stack Sidebar and Content */
        height: auto;
        /* Remove fixed height */
        border-radius: 0;
        /* Remove corners for mobile */
        margin: 0;
        max-width: 100%;
    }

    .sidebar {
        width: 100%;
        order: -1;
        padding: 10px;
    }

    .content-area {
        padding: 15px;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    /* 4. Grid System Adjustments */
    .dashboard-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
        /* Single column stats/gallery */
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* Media Query for Extra Small Mobile (max-width: 480px) */
@media screen and (max-width: 480px) {
    .inst-title {
        font-size: 1.2rem;
    }

    .logo-placeholder {
        width: 70px;
        height: 70px;
        font-size: 0.8rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }
}