@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;600;800&display=swap');

:root {
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.5);
    --secondary: #06b6d4;
    --secondary-glow: rgba(6, 182, 212, 0.5);
    --accent: #a855f7;
    --bg: #030712;
    --surface: #111827;
    --surface-glass: rgba(17, 24, 39, 0.7);
    --text: #f9fafb;
    --text-muted: #9ca3af;
    --border: rgba(255, 255, 255, 0.08);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* Glassmorphism utility */
.glass {
    background: var(--surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 99, 255, 0.5);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Header & Navigation moved to header.php for dynamic control */
header { display: block; }

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.9)), url('../images/hero-bg.jpg') center/cover;
    z-index: -1;
}

.hero-content {
    max-width: 850px;
    position: relative;
    z-index: 10;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.hero h1 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 24px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -1.5px;
}

.text-gradient-alt {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Floating Feature Cards */
.hero-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 60px;
}

.hero-feature-card {
    background: var(--surface-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    padding: 24px;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.4s var(--transition);
}

.hero-feature-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.hero-feature-card i {
    font-size: 1.8rem;
    color: var(--secondary);
}

.hero-feature-card h4 {
    font-size: 1.1rem;
    color: #fff;
}

.hero-feature-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

/* Search Bar in Hero */
.hero-search {
    margin-top: 40px;
    background: var(--surface-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    padding: 10px;
    border-radius: 50px;
    display: flex;
    gap: 10px;
    max-width: 600px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.hero-search input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0 20px;
    color: white;
    font-size: 1rem;
}

.hero-search input:focus {
    outline: none;
}

.hero-search .btn {
    padding: 12px 30px;
    border-radius: 40px;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: -1px;
    animation: fadeInDown 0.8s ease forwards;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 20;
    color: white;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.7;
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid white;
    border-radius: 20px;
    position: relative;
}

.mouse::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: white;
    border-radius: 2px;
    animation: mouseScroll 1.5s infinite;
}

@keyframes mouseScroll {
    0% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, 15px); }
}

.hero p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Hero Slider Enhancements */
.hero-slider {
    background: #000;
}

.hero-slide {
    overflow: hidden;
}

.hero-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.7) 100%);
    z-index: 1;
}

.hero-slide.active .hero-content {
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-slide.active {
    animation: zoomEffect 10s linear infinite;
}

@keyframes zoomEffect {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* Institute Logos Auto Slide */
.institute-carousel {
    padding: 40px 0;
    overflow: hidden;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.carousel-track {
    display: flex;
    gap: 50px;
    align-items: center;
    animation: scroll 20s linear infinite;
    width: max-content;
}

.carousel-track img {
    height: 60px;
    filter: grayscale(100%) opacity(0.6);
    transition: all 0.3s;
}

.carousel-track img:hover {
    filter: grayscale(0) opacity(1);
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Events Section */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: white;
}

.section-title span {
    color: var(--primary);
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    padding: 50px 0;
}

.event-card {
    background: var(--surface);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
    border: 1px solid var(--border);
    position: relative;
}

.event-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
    border-color: var(--primary);
}

.event-img-container {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.event-card:hover .event-img {
    transform: scale(1.1);
}

.status-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    z-index: 10;
}

.status-upcoming { background: var(--primary); }
.status-ongoing { background: var(--success); }
.status-completed { background: var(--muted); }

.event-content {
    padding: 25px;
}

.event-category {
    color: var(--secondary);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
}

.event-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: white;
}

.event-details {
    margin-bottom: 20px;
}

.event-details div {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.event-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.event-actions .btn {
    flex: 1;
}

/* Footer */
footer {
    background: #000;
    padding: 100px 0 50px;
    margin-top: 0;
    border-top: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 60px;
    margin-bottom: 60px;
}

.footer-col h3 {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #fff;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 30px;
    height: 2px;
    background: var(--secondary);
}

.footer-col p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.8;
}

.footer-col ul li {
    margin-bottom: 15px;
}

.footer-col ul li a {
    color: var(--text-muted);
    transition: all 0.3s var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-col ul li a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.social-links a {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--transition);
    color: var(--text-muted);
}

.social-links a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--primary-glow);
    border-color: transparent;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

[data-aos="fade-up"] {
    opacity: 0;
    transform: translateY(30px);
    transition-property: transform, opacity;
}

/* Media Queries - Mobile First Refinements */
@media (max-width: 992px) {
    .hero h1 { font-size: 2.8rem; }
    .hero-features { grid-template-columns: 1fr; gap: 15px; }
    .hero-feature-card { padding: 15px; }
    
    .mobile-toggle { display: block !important; }

    .scroll-indicator {
        display: none; /* Hide on small screens to prevent overlap */
    }
    
    .contact-flex { flex-direction: column; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .hero { padding: 100px 0 60px; min-height: auto; }
    .hero h1 { font-size: 2.5rem; }
    .section-title { font-size: 2.2rem; }
    .container { padding: 0 20px; }
    .gallery-grid { grid-template-columns: 1fr; }
    .partners-section h3 { font-size: 1.5rem; }
    .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 2rem; }
    .hero-tag { font-size: 0.8rem; padding: 8px 15px; }
    .section-title { font-size: 1.8rem; }
    .hero-search { 
        flex-direction: column; 
        border-radius: 16px; 
        padding: 15px;
        width: 100%;
    }
    .hero-search input { margin-bottom: 15px; font-size: 1rem; text-align: center; }
    .hero-search .btn { width: 100%; padding: 15px; font-size: 1.1rem; }
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: var(--text-muted);
}

.footer-col ul li a:hover {
    color: var(--secondary);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.social-links a:hover {
    background: var(--primary);
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: white;
    font-family: inherit;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255,255,255,0.1);
}

select.form-control option {
    background: #1e293b; /* Enforce dark background on dropdown items */
    color: white;
}

/* Admin Specific */
.admin-sidebar {
    width: 250px;
    background: var(--surface);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    padding: 20px;
    border-right: 1px solid var(--border);
}

.admin-main {
    margin-left: 250px;
    padding: 30px;
}

/* Event Gallery */
.gallery-section {
    padding: 80px 0;
    background: rgba(255, 255, 255, 0.02);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    height: 300px;
    border: 1px solid var(--border);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    display: flex;
    align-items: flex-end;
    padding: 30px;
    opacity: 0;
    transition: opacity 0.4s var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Contact Section */
.contact-home {
    padding: 80px 0;
    background: var(--bg);
}

.contact-flex {
    display: flex;
    gap: 50px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.contact-info-cards {
    flex: 1;
    min-width: 300px;
    display: grid;
    gap: 20px;
}

.contact-info-card {
    background: var(--surface);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 20px;
}

.contact-info-card i {
    font-size: 2rem;
    color: var(--secondary);
}

.contact-form-home {
    flex: 1.5;
    min-width: 350px;
    background: var(--surface);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

/* --- ULTRA MODERN RESPONSIVENESS --- */

@media (max-width: 1200px) {
    .container { max-width: 92%; }
}

/* Hero Section Mobile Overhaul */
@media (max-width: 768px) {
    .hero { min-height: 80vh !important; padding: 0 !important; }
    .hero-slide { height: 80vh !important; padding: 0 !important; }
    .hero-content { padding: 0 20px; text-align: center !important; }
    
    .hero h1 { 
        font-size: 2rem !important; 
        line-height: 1.2 !important; 
        letter-spacing: -0.5px !important;
        margin-bottom: 15px !important;
    }
    .hero p { 
        font-size: 0.9rem !important; 
        margin-bottom: 25px !important;
        line-height: 1.6 !important;
        opacity: 0.8;
    }
    
    .hero-tag { 
        font-size: 0.7rem !important; 
        padding: 6px 14px !important;
        margin-bottom: 20px !important;
        border-radius: 50px !important;
        background: rgba(255,255,255,0.08) !important;
        display: inline-flex !important;
    }
    
    .hero-search {
        padding: 10px !important;
        border-radius: 15px !important;
        width: 100% !important;
        flex-direction: column !important;
        gap: 10px !important;
    }
    .hero-search input {
        font-size: 0.9rem !important;
        padding: 12px !important;
        height: auto !important;
        border-bottom: 1px solid var(--border) !important;
        text-align: center !important;
    }
    .hero-search .btn {
        padding: 12px !important;
        font-size: 0.9rem !important;
        width: 100% !important;
    }
}

/* Stats Grid Fix for Laptop/Desktop */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    text-align: center;
}

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(var(--mob-cols, 2), 1fr) !important;
    }
    .stat-item h2 { font-size: 1.8rem !important; }
    .stat-item p { font-size: 0.7rem !important; }
}

.hide-mobile { display: flex; }
@media (max-width: 768px) {
    .hide-mobile { display: none !important; }
}

/* Partners Section */
@media (max-width: 768px) {
    .partners-section h3 { font-size: 1.2rem; margin-bottom: 20px; }
    .partner-logo-box { padding: 15px 25px; min-width: 150px; }
    .partner-logo-box img { height: 35px; }
}

/* Gallery & Contact responsiveness */
@media (max-width: 768px) {
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 15px; }
    .gallery-item { height: 180px; }
    
    .contact-flex { flex-direction: column; gap: 30px; }
    .contact-info-card { padding: 15px; }
}

/* Admin Sidebar active fix */
.admin-nav-link.active {
    background: var(--primary) !important;
    color: white !important;
}
