/* Premium Unified Variables */
:root {
    --primary-dark: #0a192f;
    --gold: #c5a85c;
    --gold-hover: #b5942b;
    --text-main: #333333;
    --bg-light: #f8fafc;
    
    /* Main Entrance Theme Colors */
    --main-theme: #0f766e;
    --main-light: #f0fdfa;
    
    /* Re-Entrance Theme Colors */
    --re-theme: #c2410c;
    --re-light: #fff7ed;
    
    --success: #16a34a;
    --danger: #dc2626;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--text-main);
    line-height: 1.5;
    padding: 20px 10px;
    min-height: 100vh;
}

/* Master Flyer Frame */
.flyer-container {
    max-width: 850px;
    margin: 20px auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    padding: 40px;
    border-top: 10px solid var(--gold);
}

/* Institutional Header Branding */
header {
    text-align: center;
    margin-bottom: 25px;
}

header h2 {
    color: var(--primary-dark);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

header .location {
    color: #64748b;
    font-size: 1rem;
    font-weight: 500;
}

header .main-title {
    margin-top: 12px;
    font-size: 2.2rem;
    color: var(--primary-dark);
    text-transform: uppercase;
}

header .session-tag {
    display: inline-block;
    margin-top: 6px;
    background: #f1f5f9;
    color: var(--gold-hover);
    padding: 4px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1rem;
}

/* Announcement Ticker */
.announcement-banner {
    display: flex;
    align-items: center;
    background: #fefce8;
    border: 1px solid #fef08a;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 30px;
    gap: 12px;
}

.announcement-banner .badge {
    background: #eab308;
    color: #fff;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
}

.announcement-banner p {
    color: #713f12;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Exam Category Component Structuring */
.exam-section {
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.main-exam-card {
    border: 1px solid #ccfbf1;
    background: linear-gradient(to bottom right, #ffffff, var(--main-light));
}

.re-exam-card {
    border: 1px solid #ffedd5;
    background: linear-gradient(to bottom right, #ffffff, var(--re-light));
}

.section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.main-exam-card h3 { color: var(--main-theme); font-size: 1.3rem; }
.re-exam-card h3 { color: var(--re-theme); font-size: 1.3rem; }

/* Faculty Grid Matrix */
.faculty-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.fac-btn {
    padding: 14px 10px;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, cubic-bezier(0.165, 0.84, 0.44, 1) 0.2s;
    color: #fff;
    text-align: center;
}

.fac-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.btn-main { background-color: var(--main-theme); }
.btn-main:hover { background-color: #115e59; }

.btn-re { background-color: var(--re-theme); }
.btn-re:hover { background-color: #9a3412; }

/* Image Media Gallery */
.image-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 30px 0;
}

.gallery-item {
    height: 180px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Footnotes & Signage */
footer {
    text-align: center;
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
    color: #64748b;
}

footer .copyright { font-weight: 600; color: var(--primary-dark); }
footer .contact-info { margin: 6px 0; font-size: 0.95rem; }
footer .note { font-size: 0.8rem; font-style: italic; }

/* Dialog Overlay System */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 15, 30, 0.75); 
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: flex-start;
    z-index: 1000;
    overflow-y: auto;
    padding: 60px 15px;
}

/* Borderless Fluid Siri/Google Ambient Container */
.modal-content {
    background: rgba(255, 255, 255, 0.95);
    width: 100%;
    max-width: 480px;
    padding: 30px;
    border-radius: 24px;
    position: relative;
    border: none;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

/* Internal Siri Ambient Voice-Search Light Engine */
.modal-content::after {
    content: '';
    position: absolute;
    top: -10px; 
    left: -10px; 
    right: -10px; 
    bottom: -10px;
    z-index: 0;
    background: linear-gradient(135deg, 
        rgba(56, 189, 248, 0.25),   
        rgba(168, 85, 247, 0.25),   
        rgba(236, 72, 153, 0.25),   
        rgba(234, 179, 8, 0.2)       
    );
    background-size: 300% 300%;
    filter: blur(35px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Active Voice Activation Trigger Rule */
.modal-content.siri-active::after {
    opacity: 1;
    animation: siriVoiceWave 5s ease infinite;
}

/* Keeps modal components legible over internal fluid colors */
.modal-header-block, .input-group, .submit-btn, .result-display, .close-modal {
    position: relative;
    z-index: 1;
}

/* Fluid Gradient Wave Animation */
@keyframes siriVoiceWave {
    0% {
        background-position: 0% 50%;
        filter: blur(30px);
    }
    50% {
        background-position: 100% 50%;
        filter: blur(45px);
    }
    100% {
        background-position: 0% 50%;
        filter: blur(30px);
    }
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 18px;
    right: 22px;
    font-size: 1.6rem;
    cursor: pointer;
    color: #94a3b8;
}
.close-modal:hover { color: #334155; }

.modal-header-block { margin-bottom: 24px; }

.context-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.modal-main-style .context-badge { background: var(--main-light); color: var(--main-theme); }
.modal-main-style .submit-btn { background: var(--main-theme); color: white; }
.modal-re-style .context-badge { background: var(--re-light); color: var(--re-theme); }
.modal-re-style .submit-btn { background: var(--re-theme); color: white; }

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #334155;
    font-size: 0.9rem;
}

.input-group input {
    width: 100%;
    padding: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 1.05rem;
    outline: none;
    background: rgba(248, 250, 252, 0.8);
    transition: all 0.2s ease;
}
.modal-main-style input:focus { border-color: var(--main-theme); box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.15); }
.modal-re-style input:focus { border-color: var(--re-theme); box-shadow: 0 0 0 4px rgba(194, 65, 12, 0.15); }

.submit-btn {
    width: 100%;
    border: none;
    padding: 14px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 14px;
    transition: filter 0.2s;
}
.submit-btn:hover { filter: brightness(1.1); }

.result-display {
    margin-top: 24px;
    padding: 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e2e8f0;
    display: none;
    animation: slideUp 0.4s ease;
}

.result-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed #e2e8f0;
}
.result-row:last-of-type { border-bottom: none; }
.result-label { color: #64748b; font-weight: 500; font-size: 0.95rem; }
.result-value { color: var(--primary-dark); font-weight: 700; font-size: 0.95rem; }

.badge-pass { color: var(--success); background: #f0fdf4; padding: 2px 12px; border-radius: 20px; font-weight: 700; }
.badge-fail { color: var(--danger); background: #fef2f2; padding: 2px 12px; border-radius: 20px; font-weight: 700; }

@media(max-width: 600px) {
    .flyer-container { padding: 20px; }
    header h1 { font-size: 1.2rem; }
    .faculty-grid { grid-template-columns: 1fr 1fr; }
    .image-gallery { grid-template-columns: 1fr; }
}