/* 
 * College R&D Committee Web Portal - Main Stylesheet
 * Palette: Navy Blue, Charcoal Grey, White, Gold/Light Blue Accents
 */

:root {
    --primary-color: #002147;
    /* Navy Blue */
    --secondary-color: #333333;
    /* Charcoal Grey */
    --accent-color: #FFD700;
    /* Gold */
    --text-color: #333;
    --bg-light: #f4f4f4;
    --white: #ffffff;
    --transition-speed: 0.3s;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-light);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed);
}

ul {
    list-style: none;
}

/* Header */
header {
    background-color: var(--white);
    border-bottom: 3px solid var(--primary-color);
    padding: 10px 0;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-section img {
    height: 60px;
}

.logo-text h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.logo-text p {
    font-size: 0.9rem;
    color: var(--secondary-color);
    font-weight: 500;
}

/* Navigation */
.navbar {
    background-color: var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.nav-menu {
    display: flex;
    gap: 20px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 15px 10px;
    color: var(--white);
    font-weight: 500;
    font-size: 1rem;
    text-transform: uppercase;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-color);
    background-color: rgba(255, 255, 255, 0.1);
}

/* Dropdown */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    min-width: 220px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-speed) ease;
    border-top: 3px solid var(--accent-color);
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    border-bottom: 1px solid #eee;
}

.dropdown-link {
    display: block;
    padding: 12px 20px;
    color: var(--secondary-color);
    font-size: 0.95rem;
}

.dropdown-link:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
    padding-left: 25px;
    /* Slide effect */
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--white);
    transition: all 0.3s;
}

/* Main Content Area */
main {
    flex: 1;
}

/* Section Common */
section {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
    font-size: 2rem;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 40px 0 20px;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding: 0 20px;
}

.footer-col h3 {
    color: var(--accent-color);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.copyright {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: #ccc;
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary-color);
        flex-direction: column;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }

    .nav-menu.active {
        max-height: 500px;
        /* Adjust based on content */
    }

    .nav-item {
        width: 100%;
        text-align: center;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background-color: rgba(0, 0, 0, 0.1);
        display: none;
        /* JS to toggle */
        border: none;
    }

    .nav-item.active .dropdown-menu {
        display: block;
    }

    .dropdown-link {
        color: #ddd;
        padding-left: 30px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .logo-text h1 {
        font-size: 1.2rem;
    }

    .hero-slider {
        height: 70vh;
    }

    .slide-content {
        left: 5%;
        right: 5%;
        text-align: center;
    }

    .slide-content h2 {
        font-size: 2rem;
    }

    .slide-content p {
        font-size: 1rem;
    }

}

/* Homepage Components */

/* News Ticker */
.news-ticker-container {
    background-color: var(--secondary-color);
    color: var(--white);
    overflow: hidden;
    padding: 10px 0;
    position: relative;
}

.news-ticker-text {
    display: inline-block;
    white-space: nowrap;
    animation: ticker 20s linear infinite;
    padding-left: 100%;
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* ==============================
   HERO SLIDER - FULL WIDTH
================================= */

.hero-slider {
    position: relative;
    width: 100%;
    height: 85vh; /* Responsive height */
    min-height: 500px;
    overflow: hidden;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
}

/* Dark overlay for better text visibility */
.slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(0, 33, 71, 0.85),
        rgba(0, 0, 0, 0.4)
    );
}

/* Active Slide */
.slide.active {
    opacity: 1;
    z-index: 1;
}

/* Slide Content */
.slide-content {
    position: absolute;
    top: 50%;
    left: 8%;
    transform: translateY(-50%);
    color: var(--white);
    max-width: 650px;
    z-index: 2;
}

.slide-content h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2;
}

.slide-content p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #ddd;
}

/* Button Styling */
.hero-btn {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--accent-color);
    color: var(--primary-color);
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.hero-btn:hover {
    background-color: var(--white);
    transform: translateY(-3px);
}


/* Hero Slider 
.hero-slider {
    position: relative;
    height: 500px;
    display: flex;
    overflow: hidden;
    background-color: #000;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
}

.slide.active {
    opacity: 1;
}

.slide-content {
    position: absolute;
    bottom: 50px;
    left: 50px;
    color: var(--white);
    background-color: rgba(0, 0, 0, 0.6);
    padding: 20px;
    border-left: 5px solid var(--accent-color);
    max-width: 600px;
}

.slide-content h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}*/

/* Gallery Section */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    aspect-ratio: 16/9;
    /* Maintain consistent aspect ratio */
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-speed);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* About Us - Member Grid */
.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.member-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform var(--transition-speed);
}

.member-card:hover {
    transform: translateY(-10px);
}

.member-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.member-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-info {
    padding: 20px;
}

.member-info h3 {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.member-info p {
    color: var(--secondary-color);
    font-size: 0.9rem;
    font-weight: 500;
}