/*
================================================
TABLE OF CONTENTS
================================================
1.  :root - CSS Variables
2.  Global Styles & Typography
3.  Bulma Overrides & Enhancements
4.  Component-Specific Styles
    -   Header & Navigation
    -   Hero Section
    -   Cards (General, Glass, Project, Resource)
    -   Sections (About, History, Success, etc.)
    -   Timeline
    -   Forms
    -   Footer
5.  Page-Specific Styles
    -   Success Page
    -   Privacy & Terms Pages
6.  Animations & Interactions
7.  Utility Classes
8.  Responsive Design
================================================
*/

/* 1. :root - CSS Variables */
:root {
    /* Color Palette (Complementary: Teal/Blue + Orange/Gold) */
    --primary-color: #00796B; /* Teal for professionalism and trust */
    --primary-color-dark: #004D40;
    --accent-color: #FFA000; /* Amber/Gold for energy and success */
    --accent-color-hover: #FFC107;
    --text-color: #363636;
    --text-color-light: #555;
    --heading-color: #1a1a1a;
    --light-text-color: #FFFFFF;
    --bg-color: #f7f9fb;
    --bg-light: #fafafa;
    --border-color-light: rgba(255, 255, 255, 0.3);
    --border-color-dark: rgba(0, 0, 0, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --link-color: #009688;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.35);
    --glass-bg-darker: rgba(30, 30, 30, 0.35);
    --glass-blur: 10px;

    /* Fonts */
    --font-primary: 'Montserrat', sans-serif;
    --font-secondary: 'Merriweather', serif;

    /* Transitions */
    --transition-bouncy: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-smooth: all 0.3s ease-in-out;
}

/* 2. Global Styles & Typography */
html {
    scroll-behavior: smooth;
    background-color: var(--bg-color);
}

body {
    font-family: var(--font-secondary);
    color: var(--text-color);
    font-size: clamp(16px, 1.2vw, 18px);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .title, .subtitle {
    font-family: var(--font-primary);
    color: var(--heading-color);
    font-weight: 700;
}

h1, .title.is-1 { font-size: clamp(2.5rem, 5vw + 1rem, 4rem); font-weight: 800; }
h2, .title.is-2 { font-size: clamp(2rem, 4vw + 0.5rem, 3rem); text-shadow: 1px 1px 2px var(--shadow-color); }
h3, .title.is-3 { font-size: clamp(1.75rem, 3vw + 0.5rem, 2.25rem); }
h4, .title.is-4 { font-size: clamp(1.25rem, 2vw + 0.5rem, 1.75rem); }

a {
    color: var(--link-color);
    transition: var(--transition-smooth);
}

a:hover {
    color: var(--primary-color-dark);
}

.section {
    padding: clamp(3rem, 8vw, 6rem) 1.5rem;
}

/* 3. Bulma Overrides & Enhancements */
.button.is-primary {
    background-color: var(--primary-color);
    border-color: transparent;
    font-family: var(--font-primary);
    font-weight: 700;
    transition: var(--transition-bouncy);
}

.button.is-primary:hover {
    background-color: var(--primary-color-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -10px var(--primary-color);
}

.button.is-link.is-outlined {
    border-color: var(--link-color);
    color: var(--link-color);
    transition: var(--transition-smooth);
}
.button.is-link.is-outlined:hover {
    background-color: var(--link-color);
    color: var(--light-text-color);
}

.progress {
    height: 12px;
    border-radius: 6px;
}

/* 4. Component-Specific Styles */

/* Header & Navigation */
.navbar.is-fixed-top {
    background: var(--glass-bg-darker);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}
.navbar-item, .navbar-link {
    color: var(--light-text-color);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition-smooth);
}
.navbar-item:hover, .navbar-link:hover, .navbar-item.is-active {
    background-color: transparent !important;
    color: var(--accent-color) !important;
}
.navbar-brand .navbar-item {
    font-size: 1.5rem;
    font-weight: 800;
}
.navbar-dropdown {
    background-color: rgba(30, 30, 30, 0.9);
    border-top: 2px solid var(--primary-color);
}
.navbar-dropdown .navbar-item {
    color: var(--light-text-color);
}

/* Hero Section */
.hero#hero {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.hero#hero .title {
    color: var(--light-text-color);
}
.hero#hero .subtitle {
    color: rgba(255, 255, 255, 0.9);
}

/* Cards (General, Glass, Project, Resource) */
.card {
    background-color: var(--light-text-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px var(--shadow-color);
    transition: var(--transition-bouncy);
    height: 100%;
    display: flex;
    flex-direction: column;
    text-align: left; /* Default text alignment */
}
.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}
.card .image-container {
    height: 220px;
    overflow: hidden;
}
.card .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease-out;
}
.card:hover .image-container img {
    transform: scale(1.05);
}
.card-content {
    flex-grow: 1; /* Allows content to fill space */
}
.stat-widget.card {
    text-align: center;
    background: linear-gradient(145deg, var(--bg-light), var(--light-text-color));
}
.stat-widget .stat-number {
    font-family: var(--font-primary);
    font-weight: 800;
    color: var(--primary-color);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-color-light);
    box-shadow: 0 8px 32px 0 var(--shadow-color);
}
.glass-card .label {
    color: var(--text-color);
}

.resource-card {
    background-color: #e8f5e9;
}
.resource-card a {
    color: var(--primary-color-dark);
    text-decoration: none;
}
.resource-card:hover a {
    text-decoration: underline;
}

/* History & Timeline */
.timeline {
    margin-top: 3rem;
}
.timeline .timeline-item .timeline-marker {
    background-color: var(--primary-color);
}
.timeline .timeline-item .timeline-content .heading {
    color: var(--primary-color);
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 700;
}

/* Careers Section */
#careers .progress::-webkit-progress-value {
    background-color: var(--primary-color);
    transition: width 0.5s ease;
}
#careers .progress.is-link::-webkit-progress-value {
    background-color: var(--link-color);
}

/* Forms */
.input, .textarea {
    border-radius: 8px;
    border: 1px solid var(--border-color-dark);
    font-family: var(--font-secondary);
    transition: var(--transition-smooth);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.input:focus, .textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 121, 107, 0.25);
}
.input::placeholder, .textarea::placeholder {
    color: #aaa;
}
.glass-card .input, .glass-card .textarea {
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.7);
}
.glass-card .label {
    color: var(--heading-color);
    text-shadow: none;
}

/* Footer */
.footer {
    padding: 3rem 1.5rem 3rem;
}
.footer .title {
    color: var(--light-text-color);
}
.footer p {
    color: rgba(255, 255, 255, 0.7);
}
.footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}
.footer a:hover {
    color: var(--accent-color);
}

/* 5. Page-Specific Styles */

/* Success Page */
.success-page-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
}
.success-page-container .box {
    max-width: 600px;
}
.success-page-container .title {
    color: var(--primary-color);
}

/* Privacy & Terms Pages */
.privacy-page-content, .terms-page-content, .about-page-content {
    padding-top: 10rem;
    padding-bottom: 5rem;
}
.privacy-page-content h2, .terms-page-content h2, .about-page-content h2 {
    margin-bottom: 2rem;
}
.privacy-page-content .content, .terms-page-content .content, .about-page-content .content {
    max-width: 800px;
    margin: 0 auto;
}

/* 6. Animations & Interactions */
.animate-in {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation delays for items in a list */
.animate-in:nth-child(2) { transition-delay: 0.1s; }
.animate-in:nth-child(3) { transition-delay: 0.2s; }
.animate-in:nth-child(4) { transition-delay: 0.3s; }

/* 7. Utility Classes */
.has-text-shadow {
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* 8. Responsive Design */
@media screen and (max-width: 768px) {
    .navbar-menu {
        background: rgba(30, 30, 30, 0.98);
        box-shadow: 0 8px 16px rgba(0,0,0,0.1);
        padding: 0.5rem 0;
    }
    .columns.is-vcentered.is-8 {
        flex-direction: column-reverse; /* Stack image on top of text on mobile */
    }
    .columns.is-vcentered.is-8 .column:first-child {
        margin-top: 2rem;
    }
}