/* Design tokens & base */
:root {
    --brand: #0a2a66;
    --brand-2: #0f7abf;
    --accent: #0f7abf;
    --bg: #f4f6f9;
    --muted: #6b7280;
    --gap: 24px;
    --container: 1100px;
    --radius: 10px;
    --shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    --text: #111827;
    --white: #ffffff;
}

* {
    box-sizing: border-box
}

html {
    font-family: Inter, Arial, sans-serif;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden
}

a {
    color: inherit;
    text-decoration: none
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: rgba(10, 42, 102, 0.85);
    /* Slightly transparent */
    backdrop-filter: blur(12px);
    /* Modern frosted glass effect */
    -webkit-backdrop-filter: blur(12px);
    color: white;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

/* Ensure header always has a solid background to prevent transparency on scroll */
header {
    background: #0a2a66;
}

/* Add a scrolled state so JS can toggle shadow without changing background */
.navbar.scrolled {
    padding: 12px 40px;
    background: rgba(10, 42, 102, 0.98);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* --- Logo Section --- */
.logo {
    display: flex;
    align-items: center;
    /* Vertically centers the image and text */
    gap: 15px;
    /* Adds perfect spacing between the image and the word "CSSA" */
}

.logo-img {
    width: auto;
    /* Keeps the logo proportions mathematically perfect */
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.mgu-logo {
    height: 65px;
}

/* 2. Enlarge the CSSA Logo to compensate for its transparent borders */
.cssa-logo {
    height: 65px;
    transform: scale(1.3);
    /* Zooms in on the image to remove the invisible gap */
    margin: 0 10px;
    /* Gives it breathing room so it doesn't overlap after scaling */
}

.logo a {
    font-size: 24px;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: white;
    text-decoration: none;
    letter-spacing: 1px;
}

/* Navigation */
.nav-links a {
    position: relative;
    padding: 5px 0;
    color: rgba(255, 255, 255, 0.9);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--brand-2);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: #ffffff;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Apply this class to the Interface or Activities link */
.nav-cta {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px !important;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.nav-cta:hover {
    background: var(--brand-2);
    border-color: var(--brand-2);
}

/* Remove the underline effect specifically for the button */
.nav-cta::after {
    display: none;
}

/* Navigation Container */
.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

/* Add this to your CSS */
.nav-links a.active {
    color: var(--brand-2);
    /* Or whatever your bright accent color is */
    font-weight: 700;
}

.nav-links a.active::after {
    width: 100%;
    /* Keeps the underline permanently shown */
}

/* Mobile menu button */
.menu-toggle {
    display: none;
    font-size: 28px;
    cursor: pointer;
}

/* Hero */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--brand) 0%, #0d3b8e 50%, var(--brand-2) 100%);
    color: var(--white);
    text-align: center;
    padding: 120px 20px 100px;
    margin-top: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.5;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    animation: fadeIn 1s ease-out;
    pointer-events: auto;
    /* Ensures buttons remain fully clickable */
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 25px;
    backdrop-filter: blur(5px);
}

.hero h1 {
    font-size: clamp(36px, 5vw, 65px);
    margin-bottom: 15px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.15;
    /* Adds a beautiful, deep shadow to make the text pop off the particle background */
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.hero-subtitle {
    font-size: clamp(16px, 2vw, 20px);
    /* Making it slightly transparent (0.85) creates a professional hierarchy */
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    letter-spacing: 0.5px;
    max-width: 600px;
    margin: 0 auto 35px auto;
    line-height: 1.6;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero p {
    font-size: 18px;
}

/* --- Particles Background Setup --- */
#particles-js canvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Sections */
.section {
    padding: calc(var(--gap) * 2) 20px;
    max-width: var(--container);
    margin: auto;
}

.section h2 {
    color: var(--brand);
    margin-bottom: 20px;
    font-weight: 600;
}

/* Global heading scale */
h1 {
    font-size: clamp(28px, 4vw, 56px);
    line-height: 1.05;
    margin: 0 0 .5rem
}

h2 {
    font-size: clamp(20px, 2.5vw, 32px);
    margin: 0 0 .75rem
}

h3 {
    font-size: clamp(16px, 2vw, 20px);
    margin: 0 0 .5rem
}

/* Cards */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--gap);
    align-items: start;
}

.card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform .18s ease, box-shadow .18s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12)
}

.card h3 {
    font-weight: 600;
    margin-bottom: 8px
}

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

.gallery img {
    width: 100%;
    border-radius: var(--radius)
}

/* Button */
.btn {
    display: inline-block;
    margin-top: 16px;
    padding: 12px 22px;
    background: linear-gradient(90deg, var(--brand-2), var(--accent));
    color: var(--white);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(15, 122, 191, 0.12);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.btn-primary,
.btn-secondary {
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: var(--white);
    color: var(--brand);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

/* Footer */
/* --- Modern Footer UI --- */
.site-footer {
    background-color: var(--brand);
    /* Deep academic blue */
    color: #e2e8f0;
    /* Soft light gray text */
    padding-top: 60px;
    margin-top: 80px;
    border-top: 4px solid var(--brand-2);
    /* Bright blue accent line */
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.site-footer h3 {
    color: #ffffff;
    font-size: 28px;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.site-footer h4 {
    color: #ffffff;
    font-size: 18px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--brand-2);
    display: inline-block;
    padding-bottom: 5px;
}

.footer-brand p {
    margin: 5px 0;
    line-height: 1.5;
}

.footer-links ul {
    list-style: none;
    /* Removes those messy bullet points */
    padding: 0;
    margin: 0;
}

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

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

/* Adds a nice hover animation where the link slides slightly to the right */
.footer-links a:hover {
    color: #ffffff;
    transform: translateX(8px);
}

.footer-contact p {
    margin: 10px 0;
    font-size: 15px;
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.25);
    /* Darkens the bottom strip */
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
    color: #94a3b8;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom p {
    margin: 4px 0;
}

/* Mobile Nav */
@media(max-width:768px) {
    .nav-links {
        position: absolute;
        top: 70px;
        right: -100%;
        background: #0a2a66;
        flex-direction: column;
        width: 200px;
        padding: 20px;
        transition: 0.3s;
    }

    /* Interface list small tweaks */
    .interface-list {
        margin: 15px 0 20px 20px
    }

    .interface-list li {
        margin-bottom: 8px
    }

    /* Utility grid for small card groups */
    .grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: var(--gap)
    }

    .nav-links a {
        padding: 10px 0;
    }

    .nav-links.active {
        right: 0;
    }

    .menu-toggle {
        display: block;
    }
}

/* --- Filter Buttons --- */
.gallery-filters {
    text-align: center;
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    /* Default (Inactive) State */
    background: white;
    color: var(--brand);
    border: 2px solid #e5e7eb;
    /* Soft gray border instead of harsh blue */
}

.filter-btn:hover {
    border-color: var(--brand-2);
    color: var(--brand-2);
}

/* Active State */
.filter-btn.active {
    background: var(--brand-2);
    /* Solid blue background */
    color: white;
    border-color: var(--brand-2);
    box-shadow: 0 4px 12px rgba(15, 122, 191, 0.2);
}

/* --- Global Container Utility --- */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Team Member Grid UI --- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 30px;
}

.team-member-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.team-member-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
}

.team-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-bottom: 3px solid var(--brand-2);
}

.team-info {
    padding: 20px;
    text-align: center;
}

.team-info h3 {
    margin: 0 0 5px 0;
    color: var(--brand);
    font-size: 1.2rem;
}

.team-info .role {
    margin: 0;
    color: var(--brand-2);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Refined Inner Page Headers --- */
.page-hero {
    position: relative;
    background: linear-gradient(135deg, var(--brand) 0%, #0d3b8e 50%, var(--brand-2) 100%);
    color: var(--white);
    text-align: center;
    padding: 80px 20px 60px;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.5;
    pointer-events: none;
}

.page-hero-content {
    position: relative;
    z-index: 2;
    animation: fadeIn 0.8s ease-out;
}

.page-hero h1 {
    font-size: clamp(32px, 4vw, 48px);
    margin-bottom: 10px;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.page-hero p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 auto;
}

/* --- Modal Styles --- */
.interface-card:hover {
    transform: translateY(-5px) !important;
}

.custom-modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 42, 102, 0.8);
    /* Dark blue blurred background */
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background-color: #fefefe;
    border-radius: 12px;
    width: 100%;
    max-width: 800px;
    max-height: 85vh;
    /* Prevents it from going off-screen */
    overflow-y: auto;
    /* Adds a scrollbar if the text is very long */
    padding: 40px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

.close-modal {
    color: #aaa;
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: var(--brand);
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}