/**
* BEAUTIFUL EDUCATIONAL INSTITUTION THEME
* Base Color: Aqua Green
*/

/* 1. VARIABLES & RESET */
:root {
    /* AQUA GREEN THEME PALETTE */
    --primary-color: #017572;
    /* Base Aqua Green */
    --primary-dark: #00796B;
    /* Darker shade for hovers/active */
    --primary-light: #E0F2F1;
    /* Very light shade for backgrounds */
    --accent-color: #FFC107;
    /* Amber for highlights (optional) */
    --text-dark: #2c3e50;
    /* Dark slate for text */
    --text-light: #ffffff;
    --bg-light: #f8f9fa;
    /* Light gray background */
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --font-heading: 'Raleway', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --header-height: 80px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

/* 2. HEADER & NAVIGATION */
.header {
    background-color: var(--primary-dark);
    box-shadow: var(--shadow-sm);
    /* Removed position: fixed to ensure it sits below the top image bar. 
       Class .sticky-top in HTML will handle stickiness if needed, or we can use position: sticky here. */
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.header .container-fluid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0.5rem;
}

@media (max-width: 575px) {
    .header .container-fluid {
        padding: 0 1rem;
        /* Reduce padding on mobile */
    }

    .logo.d-lg-none img {
        max-width: 70vw;
        /* Ensure logo doesn't crowd the menu icon */
        object-fit: contain;
    }
}

.logo img {
    max-height: 50px;
    width: auto;
}

.navmenu ul {
    display: flex;
    list-style: none;
    gap: 4px;
    /* Reduced from 10px */
    margin: 0;
}


.navmenu a {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: var(--text-light);
    padding: 6px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}

.navmenu a:hover,
.navmenu a.active {
    color: var(--primary-color);
    background-color: var(--primary-light);
}

/* Mobile Toggle */
.mobile-nav-toggle {
    display: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-light);
}

/* Dropdown Styles */
.navmenu .dropdown {
    position: relative;
}

.navmenu .dropdown ul {
    position: absolute;
    display: block;
    top: 100%;
    left: 0;
    margin: 0;
    padding: 10px 0;
    z-index: 99;
    background: #fff;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    min-width: 200px;
    flex-direction: column;
}

.navmenu .dropdown ul li {
    min-width: 200px;
}

.navmenu .dropdown ul a {
    padding: 10px 20px;
    font-size: 14px;
    text-transform: none;
    font-weight: 600;
    color: var(--text-dark);
    display: block;
}

/* Fix right-aligned dropdowns to prevent overflow */
.navmenu li:nth-last-child(-n+3).dropdown ul {
    left: auto;
    right: 0;
}

.navmenu .dropdown:hover>ul {
    opacity: 1;
    visibility: visible;
}

/* Ensure parent link stays visible when dropdown is open */
.navmenu .dropdown:hover>a {
    color: var(--primary-color) !important;
    background-color: var(--primary-light);
}

@media (max-width: 991px) {
    .mobile-nav-toggle {
        display: block;
    }

    .navmenu {
        position: fixed;
        top: var(--header-height);
        right: -100%;
        bottom: 0;
        width: 250px;
        background: var(--text-light);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: 0.3s;
        padding: 20px;
        flex-direction: column;
        overflow-y: auto;
        /* Allow scrolling on mobile menu */
    }

    .mobile-nav-active .navmenu {
        right: 0;
    }

    .navmenu a {
        color: var(--text-dark);
    }

    .navmenu ul {
        flex-direction: column;
        gap: 10px;
    }

    .navmenu .dropdown ul {
        position: static;
        box-shadow: none;
        padding: 10px 0;
        margin: 10px 20px;
        background-color: transparent;
        display: none;
        opacity: 1;
        visibility: visible;
    }

    .navmenu .dropdown:hover>ul {
        display: block;
    }
}

/* 3. HERO CAROUSEL */
.carousel-section {
    /* Header is sticky now, so no need for top margin to offset it */
    margin-top: 0;
    position: relative;
    width: 100%;
}

.carousel-item {
    /* Responsive height: adaptable but clamped */
    height: auto;
    min-height: 300px;
    max-height: 85vh;
    background-color: #000;
    position: relative;
    text-align: center;
    /* Center content vertically and horizontally */
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .carousel-item {
        min-height: 200px;
        /* Reduced height for mobile portrait */
    }
}

/* Mixed Media Responsive Handling */
.carousel-item img {
    width: 100%;
    height: 100%;
    /* Use contain to prevent stretching/squeezing */
    object-fit: contain;
    object-position: center;
    max-height: 85vh;
    /* Ensure it respects the container limit */
}

.carousel-item video {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    object-position: center;
    margin: 0 auto;
}

/* For video, we can keep cover if preferred, but user said 'no stretching' generally */
.carousel-item video {
    object-fit: contain;
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.5);
    /* Readable text bg */
    border-radius: 10px;
    padding: 20px;
    bottom: 20%;
}

/* 4. SECTIONS COMMON */
.section {
    padding: 30px 0;
    /* Reduced from 60px */
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 32px;
    color: var(--primary-dark);
    display: inline-block;
    position: relative;
    padding-bottom: 15px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

/* 5. ABOUT, VISION, MISSION */
.vision-mission-box {
    background: var(--text-light);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    height: 100%;
    border-top: 5px solid var(--primary-color);
    transition: transform 0.3s;
}

.vision-mission-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.vision-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.about-content {
    font-size: 16px;
    color: #555;
    text-align: justify;
}

/* 6. RECRUITERS & NOTICE BOARD */
.common-box {
    background: var(--text-light);
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
    min-height: 400px;
    border: 1px solid #eee;
}

.tab-container {
    display: flex;
    background: #eee;
    border-radius: 25px;
    padding: 5px;
    margin-bottom: 20px;
}

.tab-item {
    flex: 1;
    text-align: center;
    padding: 10px;
    cursor: pointer;
    border-radius: 20px;
    font-weight: 600;
    transition: 0.3s;
    color: #666;
}

.active-tab {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

.inactive-tab {
    background: transparent;
}

.tab-content-box {
    max-height: 300px;
    overflow-y: auto;
}

.logo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    align-items: center;
}

.logo-grid img {
    width: 100%;
    height: auto;
    /* filter: grayscale(100%); Removed to show color */
    opacity: 1;
    /* Make fully visible */
}

.logo-grid img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

/* 7. DEPARTMENTS */
.dept-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
    aspect-ratio: 4/3;
    cursor: pointer;
}

.dept-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.dept-card:hover img {
    transform: scale(1.1);
}

.dept-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 20px;
    color: white;
}

.dept-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    text-align: center;
}

/* 8. FOOTER */
.footer {
    background: var(--primary-color);
    color: rgba(255, 255, 255, 0.8);
    padding: 20px 0 20px;
    /* Reduced top padding from 50px */
    font-size: 14px;
}

.footer h4 {
    color: var(--text-light);
    font-size: 18px;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
    display: inline-block;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    display: block;
    margin-bottom: 8px;
}

.footer a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 30px;
    padding-top: 20px;
    text-align: center;
}

/* 9. UTILITIES & BUTTONS */
.btn-primary-custom {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 600;
    display: inline-block;
    border: none;
    box-shadow: var(--shadow-sm);
}

.btn-primary-custom:hover {
    background-color: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Floating social icons - kept similar but cleaner */
.fixed-social {
    position: fixed;
    right: 10px;
    width: 35px;
    height: 35px;
    z-index: 999;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    transition: 0.3s;
}

.fixed-social:hover {
    transform: scale(1.1);
}

.fixed-facebook {
    top: 35%;
}

.fixed-insta {
    top: 42%;
}

.fixed-youtube {
    top: 49%;
}

.fixed-whatsapp {
    top: 56%;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* 10. SIDEBAR & SUBMENU (Migrated from root style.css) */
.menu-btn {
    font-size: 26px;
    margin-right: 15px;
    font-family: Arial;
    cursor: pointer;
    display: none;
    background: var(--primary-color);
}

.sidebar {
    background: var(--primary-color) !important;
    color: white !important;
    position: relative;
    top: 0;
    left: 0;
    bottom: 0;
    font-family: var(--font-body);
    padding: 20px 0;
    font-size: 10px;
    overflow-y: auto;
    transition: 0.3s;
    flex-shrink: 0;
    position: relative;
    min-height: 100vh;
    z-index: 2;
}

#sidebar,
.page-container>#sidebar {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    background-image: none !important;
    font-size: 14px;
}

.sidebar.hidden {
    transform: translateX(-270px);
}

.sidebar a {
    display: block;
    padding: 12px 20px;
    color: white;
    text-decoration: none;
}

.sidebar a:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* Submenu */
.submenu-btn {
    cursor: pointer;
    padding: 12px 20px;
}

.submenu-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

.submenu {
    max-height: 0;
    overflow: hidden;
    background-color: var(--primary-dark);
    /* Slightly darker for contrast */
    transition: max-height 0.3s ease-out;
}

.submenu a {
    padding-left: 40px;
    font-size: 14px;
}

/* Page Container Layout */
.page-container {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
}

.content {
    flex: 1;
    padding: 30px;
    background: #fff;
    overflow: auto;
}

.custom-heading {
    padding-top: 10px;
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.custom-name {
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    color: var(--primary-color);
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .sidebar {
        font-size: 12px;
    }

    .custom-heading {
        font-size: 14px;
    }

    .custom-name {
        font-size: 12px;
    }
}

/* 11. CUSTOM LOGIN BUTTON */
.btn-primary-custom {
    background: var(--primary-color) !important;
    /* Force override of color AND gradient */
    /* Force override */
    color: #fff !important;
    padding: 10px 20px;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    position: fixed;
    right: 0;
    top: 70%;
    z-index: 999;
    box-shadow: -2px 2px 5px rgba(0, 0, 0, 0.2);
    transition: 0.3s;
}

.btn-primary-custom:hover {
    background-color: var(--primary-dark) !important;
    color: #fff !important;
    padding-right: 25px;
}

/* 12. THEME UTILITIES (For Code/Badge) */
.text-theme {
    color: var(--primary-color) !important;
}

.bg-theme {
    background-color: var(--primary-color) !important;
    color: #fff;
}