/* --- Variables & Reset --- */
:root {
    /*
       COLOR PALETTE UPDATE
       Primary Background: #171636 (Exact match to Logo Background)
    */
    --primary-bg: #171636;      /* The exact color requested */
    --secondary-bg: #23214A;    /* Slightly lighter version for cards to stand out */
    --light-bg: #F5F7FA;

    --accent-cyan: #00B9E5;
    --accent-green: #7ED348;

    --text-main: #FFFFFF;
    --text-dark: #171636;       /* Dark text uses the primary color for consistency */
    --text-muted: #9CA3AF;

    --gradient: linear-gradient(90deg, var(--accent-cyan), var(--accent-green));

    --font-head: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Sticky Footer Setup */
body {
    background-color: var(--primary-bg);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; margin-bottom: 0.8rem; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

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

/* --- Buttons --- */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    font-size: 0.95rem;
    border: none;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 185, 229, 0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 185, 229, 0.5);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--accent-cyan);
    color: var(--accent-cyan);
    margin-left: 10px;
}
.btn-secondary:hover {
    background: rgba(0, 185, 229, 0.1);
    color: white;
}

/* --- Navbar --- */
.navbar {
    padding: 10px 0;
    position: sticky;
    top: 0;
    /*
       Updated RGB values to match #171636
       Red: 23, Green: 22, Blue: 54
    */
    background: rgba(23, 22, 54, 0.98); /* Almost opaque to hide scroll content */
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-container { display: flex; justify-content: space-between; align-items: center; }

/* Logo Image Styles */
.logo-link { display: flex; align-items: center; }
.logo-img { height: 60px; width: auto; display: block; }

.nav-links { display: flex; gap: 25px; align-items: center; }
.nav-links a { font-weight: 600; font-size: 0.9rem; color: white; }
.nav-links a:hover, .nav-links a.active { color: var(--accent-cyan); }
.nav-links .btn-primary { color: white !important; }

.hamburger { display: none; cursor: pointer; }
.hamburger span { display: block; width: 25px; height: 3px; background: white; margin: 5px; }

/* --- Hero --- */
.hero {
    padding: 70px 0 60px;
    text-align: center;
    /* Adjusted gradient center to blend with #171636 */
    background: radial-gradient(circle at center, #2E2B63 0%, var(--primary-bg) 70%);
}
.hero h1 { font-size: 3rem; line-height: 1.1; color: white; margin-bottom: 15px; }
.highlight {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-sub { font-size: 1.1rem; color: var(--text-muted); max-width: 700px; margin: 0 auto 30px; }

/* --- Page Header --- */
.page-header {
    background: var(--primary-bg);
    padding: 60px 0 40px;
    text-align: center;
}
.page-header h1 { color: white; font-size: 2.5rem; }
.page-header p { color: var(--text-muted); font-size: 1.1rem; }

/* --- SECTIONS --- */
.light-mode {
    background-color: var(--light-bg);
    color: var(--text-dark);
    padding: 50px 0;
    flex-grow: 1;
}
.features { flex-grow: 1; }

.light-mode h2 {
    color: var(--primary-bg);
    font-size: 2.2rem;
    margin-bottom: 30px;
    text-align: center;
}
.light-mode p { color: #4B5563; }

/* Special Styling for the Mission Tagline (Centered) */
.mission-tagline {
    font-family: var(--font-head);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--secondary-bg);

    /* Layout & Centering Fixes */
    display: block;
    width: 100%;
    text-align: center;
    margin-left: auto;
    margin-right: auto;

    margin-top: -10px;
    margin-bottom: 50px;
    letter-spacing: -0.5px;
}
.mission-tagline span { color: var(--accent-cyan); }
@media (max-width: 768px) {
    .mission-tagline { font-size: 1.4rem; margin-bottom: 30px; }
}

/* --- Cards --- */
.card, .feature-block, .news-card {
    background: var(--secondary-bg);
    color: var(--text-main);
    padding: 30px 25px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.card h2, .feature-block h2, .news-card h3 { color: white; font-size: 1.4rem; margin-bottom: 15px; text-align: left; }
.card p, .feature-block p, .news-card p { color: var(--text-muted); text-align: left; }
.icon { font-size: 2.5rem; margin-bottom: 15px; display: block; }

.card:hover, .feature-block:hover, .news-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-green);
    box-shadow: 0 20px 40px rgba(126, 211, 72, 0.15);
}

/* --- Grids --- */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(450px, 1fr)); gap: 30px; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 25px; }

/* --- Contact Page Specifics --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    align-items: start;
}
.contact-info h2 { text-align: left; color: var(--primary-bg); }
.contact-info p, .contact-info strong { color: var(--text-dark); }
.info-item { margin-bottom: 20px; }

/* Form Styles */
.contact-form {
    background: var(--secondary-bg);
    padding: 35px;
    border-radius: 15px;
    color: white;
    width: 100%;
}
.form-group { margin-bottom: 20px; width: 100%; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: white; }

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #363259;
    background: var(--primary-bg);
    color: white;
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--accent-cyan);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 185, 229, 0.2);
}
.form-group textarea { resize: vertical; }

.cta {
    background-color: var(--primary-bg);
    padding: 60px 0;
    text-align: center;
}
.cta h2 { color: white; }
.cta p { color: var(--text-muted); margin-bottom: 30px; }

/* --- Footer --- */
footer {
    background-color: #0F0E24; /* Slightly darker/deeper than primary #171636 for hierarchy */
    padding: 50px 0 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: auto;
}
.footer-content { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 30px; margin-bottom: 30px; }
.footer-col h3, .footer-col h4 { color: white; margin-bottom: 15px; font-size: 1.1rem; }
.footer-col a, .footer-col p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 8px; }
.footer-col a:hover { color: var(--accent-cyan); }
.copyright { border-top: 1px solid rgba(255,255,255,0.05); padding-top: 20px; color: #6B7280; font-size: 0.85rem; }

/* --- Responsive --- */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hamburger { display: block; }
    .hero { padding: 50px 0 40px; }
    .hero h1 { font-size: 2.2rem; }
    .contact-wrapper { grid-template-columns: 1fr; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* --- News Card Interactive Elements --- */
.icon-btn {
    background: transparent;
    border: 2px solid var(--accent-cyan);
    color: var(--accent-cyan);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.icon-btn:hover {
    background: var(--accent-cyan);
    color: white;
    box-shadow: 0 0 15px rgba(0, 185, 229, 0.4);
    transform: scale(1.1);
}

/* --- Modal Styles --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(19, 17, 46, 0.85); /* Dark semi-transparent background */
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    color: var(--text-dark);
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    padding: 40px;
    border-radius: 15px;
    position: relative;
    overflow-y: auto; /* Scrollable content */
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.3s;
    line-height: 1;
}

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

/* --- Formatting inside the modal --- */
#modal-body h4 { font-size: 1.4rem; color: var(--primary-bg); margin-top: 20px; border-bottom: 2px solid var(--accent-green); padding-bottom: 10px; }
#modal-body h5 { font-size: 1.2rem; color: var(--secondary-bg); margin-top: 20px; font-weight: 700; }
#modal-body p { margin-bottom: 15px; line-height: 1.7; color: #374151; }
#modal-body ul, #modal-body ol { margin-left: 20px; margin-bottom: 20px; }
#modal-body li { margin-bottom: 8px; color: #374151; }

/* --- Toast Notifications (Modern Alerts) --- */
#toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 300px;
    padding: 16px 24px;
    border-radius: 12px;
    background: var(--secondary-bg); /* Dark blue background */
    color: white;
    font-size: 0.95rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border-left: 5px solid;
    display: flex;
    align-items: center;
    justify-content: space-between;
    opacity: 0;
    transform: translateX(50px);
    animation: slideInToast 0.4s forwards;
}

/* Success variant (Green) */
.toast.success {
    border-color: var(--accent-green);
}

/* Error variant (Red/Pink - derived from brand or standard) */
.toast.error {
    border-color: #ef4444;
}

/* Info variant (Cyan) */
.toast.info {
    border-color: var(--accent-cyan);
}

/* Animation Keyframes */
@keyframes slideInToast {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOutToast {
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* --- Honeypot Anti-Spam --- */
/* Moves the field off-screen so humans don't see it, but bots do */
.honeypot-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

/* --- GDPR Cookie Banner --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(19, 17, 46, 0.98); /* Primary dark BG */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
    animation: slideUpCookie 0.5s ease-out;
}

.cookie-content {
    max-width: 600px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.cookie-content h3 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.cookie-buttons {
    display: flex;
    gap: 15px;
}

/* Specific small button style for cookie banner */
.btn-small {
    padding: 8px 16px;
    font-size: 0.85rem;
}

@keyframes slideUpCookie {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .cookie-banner {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }
}
