:root {
    --primary-color: #005D50;
    --secondary-color: #00382E;
    --text-color: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.1);
    --card-border: rgba(255, 255, 255, 0.2);
    --card-hover-bg: rgba(255, 255, 255, 0.15);
    --font-heading: 'Sanchez', serif;
    --font-body: 'Montserrat', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Splash Screen */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease-out, visibility 0.8s;
}

#splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.splash-logo-img {
    max-width: 600px;
    width: 80%;
    height: auto;
    object-fit: contain;
    animation: fadeIn 2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

/* --- Header & Nav --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 2rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(0, 56, 46, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.site-nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
}

/* --- Main Layout --- */
.main-content {
    margin-top: 80px;
    /* Header height offset */
    min-height: calc(100vh - 80px - 60px);
    /* Viewport - Header - Footer */
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-section {
    text-align: center;
    margin-bottom: 3rem;
    padding-top: 2rem;
}

.hero-title {
    font-family: 'Sanchez', serif;
    font-size: 4rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: #ffffff;
    letter-spacing: 1px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.7;
    font-family: var(--font-body);
}

.dashboard-grid {
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: center;
}

.cards-container {
    display: grid;
    /* Force 3 columns on desktop to push the 4th item to the next row */
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    width: 100%;
}

/* --- Cards --- */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 0;
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    aspect-ratio: 1/1;
    /* Square to show more of the logo */
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0, 56, 46, 0.95), rgba(0, 56, 46, 0.8) 70%, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 100%;
    /* Full height to allow text placement at bottom */
}

.card-label {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-align: center;
    line-height: 1.4;
    margin-bottom: 2rem;
}

.card:hover .card-overlay {
    opacity: 1;
}

.card:hover {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 15px rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.5);
}

.card:hover .card-image {
    transform: scale(1.05);
}

/* --- Footer --- */
.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 32, 26, 0.3);
    padding: 1.5rem 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .site-header {
        padding: 1rem;
    }

    .header-inner {
        flex-direction: column;
        gap: 1rem;
    }

    .site-nav {
        font-size: 0.9rem;
        gap: 1.5rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .cards-container {
        grid-template-columns: 1fr;
    }

}


/* --- Auth & Util --- */
.hidden {
    display: none !important;
}

.login-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
}

.login-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.login-card h1 {
    font-family: 'Sanchez', serif;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.login-card p {
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

.login-btn {
    background: #fff;
    color: #333;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    transition: transform 0.2s, background 0.2s;
}

.login-btn:hover {
    transform: translateY(-2px);
    background: #f0f0f0;
}

.error-msg {
    color: #ff6b6b !important;
    margin-top: 1rem !important;
    margin-bottom: 0 !important;
    font-weight: 500;
}

/* --- Modal Styles --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    /* Above login screen */
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: rgba(26, 30, 31, 0.95);
    /* Dark background matching theme */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    overflow-y: auto;
    color: #e2e8f0;
}

/* Custom Scrollbar for Modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #fff;
}

.privacy-text-content h2 {
    font-family: 'Sanchez', serif;
    margin-bottom: 0.5rem;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.privacy-text-content h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
    /* White for better readability */
}

.privacy-text-content p,
.privacy-text-content ul {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
}

.privacy-text-content ul {
    padding-left: 1.5rem;
}

.privacy-text-content li {
    margin-bottom: 0.5rem;
}