/* =========================================
   Global Styles & Fonts
   ========================================= */
body {
    font-family: 'Montserrat', 'Noto Sans Malayalam', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    color: #333;
    overflow-x: hidden;
}

* { box-sizing: border-box; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    padding-top: 70px;
}

h1 {
    text-align: center;
    color: #004d40;
    font-size: 32px;
    margin-bottom: 30px;
}

/* =========================================
   Section Enter Animations (Zoom & Fade)
   ========================================= */
.section {
    display: none;
    opacity: 0;
}

.section.active {
    display: block;
    animation: scaleFadeIn 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes scaleFadeIn {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* =========================================
   Navigation Bar (Sidebar)
   ========================================= */
.menu-icon {
    font-size: 30px;
    cursor: pointer;
    position: fixed;
    top: 15px;
    left: 20px;
    z-index: 1000;
    color: #004d40;
    background: white;
    padding: 5px 12px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}

.menu-icon:active {
    transform: scale(0.9);
}

.sidebar {
    height: 100%; width: 0;
    position: fixed; z-index: 2000;
    top: 0; left: 0;
    background-color: #004d40;
    overflow-x: hidden;
    transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    padding-top: 60px;
    box-shadow: 2px 0 10px rgba(0,0,0,0.3);
}

.sidebar a {
    padding: 15px 25px;
    text-decoration: none;
    font-size: 18px;
    color: white;
    display: block;
    transition: 0.3s ease;
    font-weight: bold;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar a:hover {
    background-color: #00332a;
    padding-left: 35px;
}

.sidebar .closebtn {
    position: absolute;
    top: 0; right: 25px;
    font-size: 36px;
    border: none;
}

/* =========================================
   Hero Section & Floating Logo
   ========================================= */
.hero-section {
    position: relative;
    height: 600px;
    background-image: url('college-bg.jpg'); 
    background-size: cover;
    background-position: center;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 40px;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(3, 75, 63, 0.7);
}

.hero-content {
    position: relative;
    z-index: 1;
}

@keyframes floatAnimation {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.hero-logo {
    max-width: 400px;
    width: 100%; /* ലോഗോ റെസ്പോൺസീവ് ആക്കാൻ */
    height: auto !important; /* ലോഗോ വലിഞ്ഞു പോകാതിരിക്കാൻ */
    object-fit: contain;
    margin-bottom: 15px;
    animation: floatAnimation 4s ease-in-out infinite; 
    transition: transform 0.1s ease-out; 
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.3));
}

.address-text {
    color: white; font-size: 18px; font-weight: 500; letter-spacing: 1px;
}

/* Banners */
.section-banner-full {
    position: relative;
    min-height: 350px !important;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    overflow: hidden;
    flex-direction: column;
}

.banner-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
}

.banner-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.banner-title {
    color: white; margin: 0; font-size: 45px; text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* =========================================
   Quick Links
   ========================================= */
.quick-links-scroll-wrapper {
    overflow-x: auto; padding-bottom: 20px; margin-bottom: 30px;
}
.quick-links-scroll-wrapper::-webkit-scrollbar { height: 8px; }
.quick-links-scroll-wrapper::-webkit-scrollbar-track { background: #e0e0e0; border-radius: 10px; }
.quick-links-scroll-wrapper::-webkit-scrollbar-thumb { background: #004d40; border-radius: 10px; }

.quick-links-container {
    display: flex; gap: 20px; min-width: max-content;
}

.quick-link-card {
    background: white; min-width: 160px; padding: 20px 15px; border-radius: 15px;
    text-align: center; box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    cursor: pointer; transition: 0.3s; border-bottom: 4px solid transparent;
}

.quick-link-card:hover {
    transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); border-bottom: 4px solid #004d40;
}

.quick-link-card:active {
    transform: scale(0.95);
}

.quick-link-card img { transition: transform 0.3s ease; }
.quick-link-card:hover img { transform: scale(1.2) rotate(5deg); }

.quick-link-card h4 { margin: 10px 0 5px 0; color: #333; font-size: 16px; }
.read-more { font-size: 12px; color: #004d40; font-weight: bold; }

/* =========================================
   Notice Board
   ========================================= */
.notice-board {
    background: white; border-radius: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    overflow: hidden; margin-bottom: 40px; border-left: 5px solid #d32f2f;
}
.notice-header { background: #f9f9f9; padding: 15px 20px; border-bottom: 1px solid #eee; }
.notice-header h3 { margin: 0; color: #004d40; font-size: 18px; }
.notice-content { padding: 10px 20px; }
.notice-content ul { list-style: none; padding: 0; margin: 0; }
.notice-content li { padding: 15px 0; border-bottom: 1px dashed #eee; color: #555; font-size: 15px; display: flex; align-items: center; gap: 10px; }
.notice-content li:last-child { border-bottom: none; }

.badge { background-color: #d32f2f; color: white; padding: 3px 8px; border-radius: 3px; font-size: 11px; font-weight: bold; }
.pulse { animation: pulse 1.5s infinite; }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }

/* =========================================
   Cards, Forms & Center Alignment
   ========================================= */
.card {
    background: white; padding: 25px; border-radius: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); margin-bottom: 25px;
}

.center-card {
    max-width: 900px; margin-left: auto !important; margin-right: auto !important;
}

.faculty-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.faculty-card { background: white; padding: 20px; border-radius: 10px; text-align: center; box-shadow: 0 2px 10px rgba(0,0,0,0.05); border-top: 3px solid #004d40; transition: transform 0.3s; }
.faculty-card:hover { transform: translateY(-5px); }

.contact-grid-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.contact-box { background: white; padding: 25px; border-radius: 15px; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: transform 0.3s; }
.contact-box:hover { transform: translateY(-5px); }
.highlight-box { background: #e0f2f1; border: 2px solid #004d40; }
.contact-icon { font-size: 40px; margin-bottom: 15px; display: block; }

.registration-form .form-group { margin-bottom: 15px; text-align: left; }
.registration-form label { display: block; margin-bottom: 5px; font-weight: 600; color: #333; font-size: 14px; }
.registration-form input, .registration-form select, .registration-form textarea { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 5px; font-family: inherit; font-size: 15px; transition: border 0.3s; }
.registration-form input:focus, .registration-form select:focus, .registration-form textarea:focus { border-color: #004d40; outline: none; }

.btn {
    background-color: #d32f2f; color: white; padding: 12px 25px; border: none; border-radius: 5px; cursor: pointer; font-size: 16px; font-weight: bold; transition: all 0.2s ease;
}
.btn:hover { opacity: 0.9; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.btn:active { transform: scale(0.95); }

.submit-btn { width: 100%; padding: 15px; font-size: 16px; background-color: #004d40; }
.btn.whatsapp { background-color: #25D366; display: inline-block; text-decoration: none; margin-top: 10px; }

.closed-card { text-align: center; padding: 50px 20px; border: 2px dashed #d32f2f; }
.closed-icon { font-size: 50px; margin-bottom: 15px; }

/* =========================================
   Feature Rows (SPORTS, ARTS, SOCIAL)
   ========================================= */
.sports-content-container {
    max-width: 1000px; margin: 0 auto; padding: 20px;
}
.feature-row {
    display: flex; flex-wrap: wrap; align-items: center; gap: 30px; margin-bottom: 40px; justify-content: center;
}
.feature-row.reverse { flex-direction: row-reverse; }
.feature-text { flex: 1; min-width: 300px; line-height: 1.8; text-align: left; }
.feature-image { flex: 1; min-width: 300px; text-align: center; }
.feature-image img { max-width: 400px; width: 100%; height: auto; object-fit: contain; border-radius: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.zig-zag-separator { border: 0; border-top: 1px dashed #ccc; margin: 30px 0; }

/* =========================================
   Gallery, Videos & Tables
   ========================================= */
.photo-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-top: 20px; }
.photo-gallery img { width: 100%; height: 200px; object-fit: cover; border-radius: 10px; cursor: pointer; transition: 0.3s; }
.photo-gallery img:hover { transform: scale(1.05); box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.extra-photo { display: none; }

.large-image-container { display: flex; flex-direction: column; gap: 20px; max-width: 900px; margin: 0 auto; }
.large-image { width: 100%; max-width: 800px; margin: 0 auto; border-radius: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); cursor: pointer; transition: 0.3s; }
.large-image:hover { transform: scale(1.02); }

.video-slider-container { display: flex; gap: 15px; overflow-x: auto; padding-bottom: 15px; justify-content: center; }
.video-frame { width: 300px; height: 170px; border-radius: 10px; border: none; }

.os-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.os-table th { background-color: #f2f2f2; border: 1px solid #ccc; padding: 10px; text-align: left; }
.os-table td { border: 1px solid #ccc; padding: 8px; }

/* =========================================
   Students Union & Program Grid
   ========================================= */
.program-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 20px;
}
.program-card {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #eee;
    transition: 0.3s;
    text-align: center;
}
.program-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.placeholder-img {
    width: 100%; 
    height: 200px; 
    background: #e0e0e0; 
    border-radius: 10px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: #888;
    font-weight: bold;
}

/* =========================================
   Live Leaderboard Styles
   ========================================= */
.leaderboard-container {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    margin-top: -30px; 
    position: relative;
    z-index: 5;
}
.live-badge {
    background: #d32f2f;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    animation: pulse 1.5s infinite;
    display: inline-block;
}
.score-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}
.tab-btn {
    padding: 10px 20px;
    border: none;
    background: #eee;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    color: #555;
    transition: 0.3s;
}
.tab-btn.active {
    background: #004d40;
    color: white;
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
    animation: scaleFadeIn 0.3s ease forwards;
}
.score-split {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.score-box {
    flex: 1;
    min-width: 280px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}
.score-table {
    width: 100%;
    border-collapse: collapse;
}
.score-table th, .score-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}
.score-table th {
    background: #f9f9f9;
    font-size: 14px;
}
.score-table tr:nth-child(even) {
    background: #fafafa;
}

/* =========================================
   Modals & Popups
   ========================================= */
.modal { display: none; position: fixed; z-index: 3000; padding-top: 50px; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.9); }
.modal-content { margin: auto; display: block; width: 90%; max-width: 800px; animation: zoomIn 0.3s; }
.close-modal { position: absolute; top: 15px; right: 35px; color: #f1f1f1; font-size: 40px; font-weight: bold; cursor: pointer; transition: 0.3s; }
.close-modal:hover { color: #d32f2f; }

@keyframes zoomIn { from {transform:scale(0)} to {transform:scale(1)} }

.success-popup { display: none; position: fixed; z-index: 3000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.6); justify-content: center; align-items: center; }
.popup-content { background-color: white; padding: 30px; border-radius: 15px; text-align: center; width: 90%; max-width: 400px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); animation: popupAnim 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes popupAnim { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.status-selected { color: white; background-color: #2e7d32; padding: 4px 10px; border-radius: 4px; font-weight: bold; }
.status-rejected { color: white; background-color: #d32f2f; padding: 4px 10px; border-radius: 4px; font-weight: bold; }
.status-pending { color: white; background-color: #f57c00; padding: 4px 10px; border-radius: 4px; font-weight: bold; }

/* =========================================
   Print & PDF Styles (Strictly Isolated)
   ========================================= */
.print-only-section {
    display: none;
}

@media print {
    body * { 
        visibility: hidden; 
    }
    
    .print-only-section, .print-only-section * { 
        visibility: visible; 
    }
    
    .print-only-section { 
        display: block !important; 
        position: absolute; 
        left: 0; 
        top: 0; 
        width: 100%; 
        margin: 0;
        padding: 0;
    }
    
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    @page { 
        size: A4 portrait; 
        margin: 0; 
    }
}

/* =========================================
   Mobile Responsiveness (മൊബൈലിൽ ഭംഗിയായി കാണാൻ ആഡ് ചെയ്തത്)
   ========================================= */
@media (max-width: 768px) {
    /* ലോഗോ മൊബൈലിൽ ഒതുങ്ങി നിൽക്കാൻ */
    .hero-section {
        height: auto;
        min-height: 60vh;
        padding: 80px 20px;
    }
    .hero-logo {
        max-width: 90%; 
        height: auto !important; 
    }
    
    /* വലിയ ഹെഡിങ്ങുകൾ ചെറുതാക്കാൻ */
    h1 {
        font-size: 24px;
        margin-bottom: 20px;
    }
    .banner-title {
        font-size: 28px !important;
    }
    .section-banner-full {
        min-height: 200px !important;
    }
    
    /* ടീച്ചർമാരുടെ ലിസ്റ്റ് 2 കള്ളികളായി (രണ്ട് കോളമായി) വരാൻ */
    .faculty-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .faculty-card {
        padding: 15px 10px;
    }
    .faculty-card h4 {
        font-size: 13px;
        margin: 0;
    }
    
    /* മൊബൈൽ സ്ക്രീൻ സ്പേസിങ് അഡ്ജസ്റ്റ് ചെയ്യാൻ */
    .container {
        padding: 15px;
        padding-top: 70px;
    }
    .quick-link-card {
        min-width: 130px;
        padding: 15px 10px;
    }
    .quick-link-card h4 {
        font-size: 14px;
    }
    
    /* ഫീച്ചർ റോകൾ (കല/കായികം) താഴെ താഴെയായി വരാൻ */
    .feature-row, .feature-row.reverse {
        flex-direction: column;
        text-align: center;
    }
    .feature-text {
        text-align: center;
    }
}