/* Basic Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* Modern font */
    line-height: 1.6;
    color: #333;
}

main {
    padding-top: 80px; /* Adjust based on header height */
    min-height: calc(100vh - 150px); /* Ensure main content pushes footer down */
}

a {
    text-decoration: none;
    color: #0056b3;
    transition: color 0.2s ease;
}

a:hover {
    color: #003d80;
}

h1, h2, h3 {
    margin-bottom: 1rem;
    color: #002244; /* Dark blue */
}

section {
    padding: 2rem 1rem;
    max-width: 1300px;
    margin: 1rem auto;
}

.btn {
    display: inline-block;
    background: #007bff;
    color: #fff;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn:hover {
    background: #0056b3;
    color: #fff;
}

img {
    max-width: 100%;
    height: auto;
}

/* Header & Navigation */
.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
    border-bottom: 3px solid #0056b3;
    padding: 0;
    margin: 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0.5rem 1rem;
    position: relative;
}

.logo {
    flex-shrink: 0;
}

.logo a img {
    height: 50px;
    width: auto;
    max-width: 100%;
    display: block;
}

.nav-menu {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    gap: 1rem;
}

.nav-menu li {
    position: relative;
    margin: 0;
}

.nav-menu li a {
    display: block;
    padding: 0.8rem 1rem;
    color: #002244;
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.nav-menu li a:hover {
    color: #0056b3;
    background-color: #f8f9fa;
}

/* Dropdown Base */
.dropdown-menu {
    list-style: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    border: 1px solid #ddd;
    border-top: 3px solid #0056b3;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, visibility 0s linear 0.2s, transform 0.2s ease;
    z-index: 1001;
}

.dropdown:hover > .dropdown-menu,
.dropdown > a:focus + .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition-delay: 0s; /* Show immediately on hover */
}

.dropdown-menu li a {
    padding: 0.8rem 1.2rem;
    color: #333;
    display: block;
    white-space: nowrap;
    font-weight: normal;
}

.dropdown-menu li:hover > a,
.dropdown-menu li a:focus {
    background: #eef5ff;
    color: #0056b3;
}

/* Submenu */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > a::after { /* Indicator for submenu */
    content: '▸';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8em;
}

.dropdown-submenu > .submenu {
    top: 0;
    left: 100%;
    margin-left: 1px;
    border-left: 1px solid #ddd;
    border-top: 1px solid #ddd; /* Reset top border */
}

.dropdown-submenu:hover > .submenu,
.dropdown-submenu > a:focus + .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Mobile Menu */
.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #002244;
    padding: 0.5rem;
    background: none;
    border: none;
}

/* --- Home Page Specific Styles --- */

/* Hero Slider */
.hero-slider {
    padding: 0;
    margin-top: 0;
    position: relative;
    height: 550px;
    overflow: hidden;
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
}

.slider {
    width: 100%;
    height: 100%;
    position: relative;
    max-width: 1300px;
    margin: 0 auto;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex; /* Add flex display */
    align-items: center; /* Center vertically */
    justify-content: center; /* Center horizontally */
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center; /* Center the image */
    min-width: 100%; /* Ensure full width */
    min-height: 100%; /* Ensure full height */
}

.slide.active {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 1300px) {
    .hero-slider,
    .slider {
        max-width: 100%;
        padding: 0;
    }
    
    .slide img {
        object-fit: cover;
        object-position: center;
    }
}

@media (max-width: 992px) {
    .navbar {
        padding: 0.5rem;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #ffffff;
        flex-direction: column;
        gap: 0;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu li a {
        padding: 1rem;
        border-bottom: 1px solid #eee;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .logo a img {
        height: 40px;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.5rem 0.75rem;
    }
    
    .logo a img {
        height: 35px;
    }
    
    .nav-menu li a {
        font-size: 0.95rem;
    }
}

@media (max-width: 576px) {
    .navbar {
        padding: 0.5rem 0.5rem;
    }
    
    .logo a img {
        height: 30px;
    }
    
    .nav-menu li a {
        font-size: 0.9rem;
        padding: 0.8rem;
    }
}

@media (max-width: 400px) {
    .navbar {
        padding: 0.5rem 0.25rem;
    }
    
    .logo a img {
        height: 25px;
    }
    
    .nav-menu li a {
        font-size: 0.85rem;
        padding: 0.7rem;
    }
}

/* Introduction */
.introduction {
    text-align: center;
    background-color: #f8f9fa;
}

/* Admission Alert */
.admission-alert {
    background-color: #ffc107; /* Warning yellow */
    color: #333;
    text-align: center;
    padding: 1rem;
    font-weight: bold;
    display: block; /* Initially shown, can be hidden via JS/Admin */
}

.admission-alert.hidden {
    display: none;
}

/* Pamphlet */
.pamphlet {
    text-align: center;
}

/* Video */
.college-video {
    text-align: center;
    background-color: #f8f9fa;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 800px;
    margin: 1rem auto 0;
    border: 1px solid #ddd;
}

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

/* Recruiters */
.recruiters {
    text-align: center;
}

.recruiter-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 1rem;
}

.recruiter-logos img {
    height: 60px; /* Adjust as needed */
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.recruiter-logos img:hover {
    filter: grayscale(0%);
}

/* Footer */
footer {
    background-color: #002244;
    color: #eef5ff;
    padding: clamp(1rem, 3vw, 2rem) clamp(0.5rem, 2vw, 1rem);
    margin-top: 2rem;
    width: 100%;
    min-height: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: clamp(1rem, 3vw, 2rem);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(0.5rem, 2vw, 1rem);
}

.footer-content > div {
    padding: clamp(0.5rem, 2vw, 1rem);
}

.footer-content h3 {
    color: #ffffff;
    margin-bottom: clamp(0.8rem, 2vw, 1.5rem);
    border-bottom: 1px solid #0056b3;
    padding-bottom: clamp(0.3rem, 1vw, 0.5rem);
    font-size: clamp(1rem, 2vw, 1.2rem);
}

.footer-content p,
.footer-content a {
    color: #eef5ff;
    margin-bottom: clamp(0.5rem, 1.5vw, 0.8rem);
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
    line-height: 1.5;
    display: block;
}

.footer-content a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-content .map iframe {
    border-radius: 5px;
    width: 100%;
    height: clamp(150px, 25vw, 200px);
    border: none;
    margin-top: clamp(0.5rem, 1.5vw, 1rem);
}

.social-media {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(0.5rem, 1.5vw, 1rem);
    margin-top: clamp(0.5rem, 1.5vw, 1rem);
}

.social-media a {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: #eef5ff;
    transition: color 0.3s ease;
}

.social-media a:hover {
    color: #ffc107;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #003d80;
    padding-top: clamp(0.5rem, 2vw, 1rem);
    margin-top: clamp(1rem, 3vw, 2rem);
    font-size: clamp(0.8rem, 1.5vw, 0.9em);
    color: #adb5bd;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-content > div {
        width: 100%;
    }
    
    .social-media {
        justify-content: flex-start;
    }
}

/* --- Page Specific Styles --- */

/* Content Section Helper */
.content-section {
    background-color: #f8f9fa;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
}

/* Institute Info Page */
.institute-details ul {
    list-style: none;
    padding-left: 0;
}
.institute-details li {
    margin-bottom: 0.8rem;
    font-size: 1.1em;
}
.institute-details li strong {
    display: inline-block;
    width: 150px; /* Adjust as needed */
    color: #002244;
}

/* Managing Society Page */
.society-members {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Responsive grid */
    gap: 2rem;
    margin-top: 2rem;
}

.member-card {
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.member-card img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid #0056b3;
}

.member-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.3em;
}

.member-card .designation {
    font-weight: bold;
    color: #0056b3;
    margin-bottom: 0.8rem;
}

.member-card .bio {
    font-size: 0.95em;
    color: #555;
    line-height: 1.5;
}

/* Achievements/MoUs Page */
.achievements ul, .mous ul {
    list-style: disc;
    margin-left: 2rem;
}
.achievements li, .mous li {
    margin-bottom: 0.8rem;
}

/* Rules Page */
.rules-content h2 {
    margin-top: 2rem;
    border-bottom: 2px solid #0056b3;
    padding-bottom: 0.5rem;
}
.rules-content img {
    display: block;
    margin: 1rem 0;
    max-width: 400px;
    border-radius: 8px;
}

/* Trade Pages Specific */
.trade-gallery {
    margin-top: 2rem;
}
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}
.grid-item {
    text-align: center;
    background-color: #fff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.grid-item img {
    max-width: 100%;
    height: 150px; /* Fixed height for consistency */
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 0.5rem;
}
.grid-item p {
    font-size: 0.9em;
    color: #555;
    margin-top: 0.5rem;
}
