/* --- Clean, academic color palette --- */
/* --- 1. DEFAULT VARIABLES (Fallback if CMS fails) --- */
:root {
    --main-font: 'Inter', -apple-system, sans-serif;
    --text-size: 16px;
    --text-color: #333333;
    --header-size: 32px;
    --container-width: 1100px;
}

/* --- 2. APPLY VARIABLES GLOBALLY --- */
body {
    font-family: var(--main-font);
    font-size: var(--text-size);
    color: var(--text-color);
}

h1, h2, h3, .section-header {
    font-size: var(--header-size);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 20px;
}
:root {
    --primary-blue: #003366;
    --light-gray: #f4f4f9;
    --text-dark: #333;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #fdfbf7; 
    background-image: 
        radial-gradient(circle at 0% 20%, rgba(254, 243, 199, 0.4) 0%, transparent 40%),
        radial-gradient(circle at 100% 80%, rgba(224, 242, 254, 0.4) 0%, transparent 40%);
    background-attachment: fixed;
}
  
/* --- Navigation --- */
nav { background-color: var(--primary-blue); padding: 15px 5%; display: flex; justify-content: space-between; align-items: center; }
nav .logo { color: white; font-size: 1.2rem; font-weight: bold; text-decoration: none; }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; }
nav ul li a { color: white; text-decoration: none; font-size: 0.95rem; }
nav ul li a:hover { text-decoration: underline; }

/* --- Slider Styling (Added Back!) --- */
.slider-container { width: 100%; height: 60vh; position: relative; margin: auto; overflow: hidden; background-color: #000; }
.slide { display: none; width: 100%; height: 100%; }
.slide img { width: 100%; height: 100%; object-fit: cover; opacity: 0.6; }
.slide-text { color: #f2f2f2; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; width: 80%; }
.prev, .next { cursor: pointer; position: absolute; top: 50%; transform: translateY(-50%); padding: 20px; color: white; font-weight: bold; font-size: 30px; background-color: rgba(0,0,0,0.2); }
.next { right: 10px; } .prev { left: 10px; }

/* --- Container Alignment --- */
.container { width: 95%; max-width: 1400px; margin: 0 auto; padding: 40px 20px; }
.section-header { color: var(--primary-blue); border-bottom: 2px solid var(--primary-blue); padding-bottom: 10px; margin-top: 50px; }

/* --- Grid Layout --- */
.grid-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 30px; margin-top: 30px; }
.card { background: white; border: 1px solid #e0e0e0; padding: 25px; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); display: flex; flex-direction: column; }

/* --- News Scroller --- */
.news-scroller { width: 95%; max-width: 1400px; margin: 40px auto; overflow: hidden; padding: 10px 0; }
.news-track { display: flex; width: max-content; animation: scrollLeft 30s linear infinite; }
.news-track:hover { animation-play-state: paused; }
.news-card { width: 320px; margin-right: 30px; background: white; border: 1px solid #ddd; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.news-card img { width: 100%; height: 180px; object-fit: cover; }
.news-content { padding: 15px; }

/* --- Footer --- */
footer { background-color: var(--primary-blue); color: white; text-align: center; padding: 30px; margin-top: 60px; }

/* --- Animations --- */
@keyframes scrollLeft { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* --- Mobile --- */
@media (max-width: 768px) {
    nav { flex-direction: column; }
    .grid-container { grid-template-columns: 1fr; }
    .container { width: 90%; }
    .slider-container { height: 40vh; }
}
/* --- RESEARCH MODAL STYLES --- */
.modal {
    display: none; /* Hidden by default */
    position: fixed; 
    z-index: 9999; /* Sit on top of everything */
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0, 30, 60, 0.7); /* Deep blue overlay */
    backdrop-filter: blur(4px); /* Modern frosted glass effect */
    overflow-y: auto; /* Allow scrolling inside the modal if text is very long */
}

.modal-content {
    background-color: #ffffff;
    margin: 5% auto; /* 5% from the top and centered */
    padding: 40px;
    border-radius: 12px;
    width: 90%;
    max-width: 800px; /* Restrict width for optimal reading */
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    position: relative;
    animation: modalFadeIn 0.3s ease-out forwards;
}

.close-btn {
    color: #999;
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.close-btn:hover {
    color: #cc0000; /* Turns red on hover */
}

/* Smooth pop-up animation */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
