/* 1. CSS Variables */
:root {
    /* Color Palette (Tetradic - Inspired) */
    --primary-color: #3EC3C1; /* Teal */
    --primary-color-rgb: 62, 195, 193;
    --secondary-color: #667EEA; /* Indigo/Purple */
    --secondary-color-rgb: 102, 126, 234;
    --accent-color-1: #F7B94C; /* Warm Yellow */
    --accent-color-1-rgb: 247, 185, 76;
    --accent-color-2: #F472B6; /* Pink */
    --accent-color-2-rgb: 244, 114, 182;

    --text-dark: #222222; 
    --text-medium: #555555; 
    --text-light: #FFFFFF; 
    --text-muted: #777777;

    --bg-body: #FFFFFF;
    --bg-section-light: #F8F9FA;
    --bg-section-dark: #282c34; /* Darker, less saturated blue-gray */
    --bg-card: #FFFFFF;

    --border-color-light: #E0E0E0;
    --border-color-dark: #4a4a4a; /* Darker border for dark backgrounds */

    /* Typography */
    --font-family-headings: 'Raleway', sans-serif;
    --font-family-body: 'Open Sans', sans-serif;
    --font-weight-normal: 400;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;

    /* Spacing */
    --spacing-unit: 1rem;
    --section-padding-vertical: calc(var(--spacing-unit) * 3.5); /* 56px */
    --section-padding-horizontal: calc(var(--spacing-unit) * 1.5);

    /* Borders & Shadows */
    --border-radius-small: 4px;
    --border-radius-medium: 8px;
    --border-radius-large: 12px;

    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 8px 16px rgba(0, 0, 0, 0.1);
    --shadow-volumetric: 5px 5px 10px rgba(0, 0, 0, 0.07), -5px -5px 10px rgba(255, 255, 255, 0.6);
    --shadow-volumetric-inset: inset 3px 3px 6px rgba(0, 0, 0, 0.1), inset -3px -3px 6px rgba(255, 255, 255, 0.7);
    --shadow-button-hover: 0 6px 12px rgba(0, 0, 0, 0.15);
    --shadow-text-standard: 1px 1px 2px rgba(0,0,0,0.3);

    /* Transitions */
    --transition-fast: all 0.2s ease-in-out;
    --transition-medium: all 0.3s ease-in-out;

    /* Header Height (Approximate for fixed header offset) */
    --header-height-desktop: 70px;
    --header-height-mobile: 60px;
}

/* 2. Global Styles & Resets */
html {
    scroll-behavior: smooth;
    font-size: 100%; 
    overflow-x: hidden;
}

body {
    font-family: var(--font-family-body);
    color: var(--text-medium);
    background-color: var(--bg-body);
    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-family-headings);
    color: var(--text-dark);
    font-weight: var(--font-weight-bold);
}

.title { 
    color: var(--text-dark) !important; 
}
.subtitle {
    color: var(--text-medium) !important;
    font-weight: var(--font-weight-normal);
}

.section-title {
    margin-bottom: calc(var(--spacing-unit) * 2.5);
    font-weight: var(--font-weight-extrabold);
    color: var(--text-dark);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1); /* Subtle shadow for depth */
}
.section-title.has-text-white {
     text-shadow: var(--shadow-text-standard); 
}

p {
    margin-bottom: var(--spacing-unit);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-fast);
}
a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.read-more-link {
    font-weight: var(--font-weight-semibold);
    color: var(--accent-color-1);
    display: inline-block;
    margin-top: calc(var(--spacing-unit) * 0.5);
    padding: 3px 6px;
    border-radius: var(--border-radius-small);
    transition: var(--transition-medium);
}
.read-more-link:hover {
    background-color: rgba(var(--accent-color-1-rgb), 0.1);
    color: color-mix(in srgb, var(--accent-color-1) 80%, black);
    text-decoration: none;
    transform: translateX(3px);
}

/* 3. Buttons (Global) */
.button, button, input[type="submit"], input[type="button"], input[type="reset"] {
    font-family: var(--font-family-headings);
    font-weight: var(--font-weight-bold);
    border-radius: var(--border-radius-medium);
    padding: calc(var(--spacing-unit) * 0.8) calc(var(--spacing-unit) * 1.8);
    transition: var(--transition-medium);
    cursor: pointer;
    border: 1px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    line-height: 1.5;
}

.button.is-primary, button.is-primary {
    background-color: var(--primary-color);
    color: var(--text-light);
    box-shadow: 0 4px 10px rgba(var(--primary-color-rgb), 0.35);
    border-color: var(--primary-color);
}
.button.is-primary:hover, button.is-primary:hover {
    background-color: color-mix(in srgb, var(--primary-color) 85%, black);
    border-color: color-mix(in srgb, var(--primary-color) 85%, black);
    color: var(--text-light);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 7px 14px rgba(var(--primary-color-rgb), 0.3), 0 3px 6px rgba(0,0,0,0.08);
}
.button.is-primary:active, button.is-primary:active {
    transform: translateY(-1px);
}

.button.is-link, button.is-link {
    background-color: var(--secondary-color);
    color: var(--text-light);
    box-shadow: 0 4px 10px rgba(var(--secondary-color-rgb), 0.3);
    border-color: var(--secondary-color);
}
.button.is-link:hover, button.is-link:hover {
    background-color: color-mix(in srgb, var(--secondary-color) 85%, black);
    border-color: color-mix(in srgb, var(--secondary-color) 85%, black);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 7px 14px rgba(var(--secondary-color-rgb), 0.3), 0 3px 6px rgba(0,0,0,0.08);
}

.is-volumetric {
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.1), 
                -2px -2px 6px rgba(255, 255, 255, 0.03), /* subtle top highlight */
                inset 0px 0px 0px rgba(255, 255, 255, 0), /* no inset shadow initially */
                inset 0px 0px 0px rgba(0, 0, 0, 0);
    border-width: 1px; /* Keep border consistency */
}
.is-volumetric:hover { /* Keep hover from primary/link */
    box-shadow: 0 7px 14px rgba(var(--primary-color-rgb), 0.3), 0 3px 6px rgba(0,0,0,0.08); /* Example for primary */
}
.is-volumetric.is-link:hover {
    box-shadow: 0 7px 14px rgba(var(--secondary-color-rgb), 0.3), 0 3px 6px rgba(0,0,0,0.08); /* Example for link */
}
.is-volumetric:active {
    box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.15), 
                inset -1px -1px 2px rgba(255, 255, 255, 0.02);
    transform: translateY(1px) scale(0.98);
}

.is-volumetric-input {
    background-color: color-mix(in srgb, var(--bg-body) 95%, var(--border-color-light));
    border: 1px solid var(--border-color-light);
    box-shadow: var(--shadow-volumetric-inset);
    border-radius: var(--border-radius-medium);
    padding: calc(var(--spacing-unit) * 0.8) var(--spacing-unit);
    transition: var(--transition-medium);
}
.is-volumetric-input:focus {
    border-color: var(--primary-color);
    background-color: var(--bg-body);
    box-shadow: 0 0 0 0.125em rgba(var(--primary-color-rgb), 0.25), var(--shadow-volumetric-inset);
    outline: none;
}

.is-volumetric-light { /* For static elements like boxes, resource items */
    background-color: var(--bg-card);
    border-radius: var(--border-radius-large);
    padding: calc(var(--spacing-unit) * 1.5);
    box-shadow: var(--shadow-volumetric);
    transition: var(--transition-medium);
}
.is-volumetric-light:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 7px 7px 14px rgba(0, 0, 0, 0.09), -7px -7px 14px rgba(255, 255, 255, 0.65);
}

.is-volumetric-accent { /* For stat widgets */
    background: linear-gradient(145deg, color-mix(in srgb, var(--bg-card) 95%, #000000), var(--bg-card));
    border-radius: var(--border-radius-large);
    padding: calc(var(--spacing-unit) * 1.5);
    box-shadow: 6px 6px 12px #e0e0e0, -6px -6px 12px #ffffff; 
    transition: var(--transition-medium);
}
.is-volumetric-accent:hover {
    transform: translateY(-3px);
    box-shadow: 8px 8px 15px #d3d3d3, -8px -8px 15px #ffffff;
}
.is-volumetric-accent .title { color: var(--primary-color); }
.is-volumetric-accent .heading { color: var(--text-medium); }

/* 4. Header / Navbar */
.header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1030; /* Above Bulma modals (1000) */
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px) saturate(180%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}
.navbar { background-color: transparent !important; }
.navbar-item, .navbar-link {
    font-family: var(--font-family-headings);
    font-weight: var(--font-weight-semibold);
    color: var(--text-medium) !important;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
}
.navbar-item:hover, .navbar-link:hover, .navbar-item.is-active {
    background-color: transparent !important;
    color: var(--primary-color) !important;
}
.navbar-brand .navbar-item img { max-height: 3rem; /* Adjust logo size */ }
.navbar-burger { color: var(--text-dark); height: var(--header-height-desktop); width: var(--header-height-desktop); } /* Ensure burger aligns */
.navbar-burger span { background-color: var(--text-dark) !important; }

@media screen and (max-width: 1023px) {
    .navbar-menu {
        background-color: rgba(255, 255, 255, 0.98);
        box-shadow: 0 8px 16px rgba(0,0,0,0.1);
        border-radius: 0 0 var(--border-radius-medium) var(--border-radius-medium);
        padding-bottom: var(--spacing-unit);
    }
    .navbar-item { padding: 0.8rem 1.5rem; }
}

/* 5. Hero Section */
.hero-main-banner {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative;
    color: var(--text-light);
    /* background-attachment: fixed; Basic parallax - can cause issues on mobile */
}
.hero-main-banner .hero-body {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh; /* Ensure it's full height */
    padding-top: var(--header-height-desktop); /* Offset for fixed header */
}
.hero-content-overlay {
    background: linear-gradient(to bottom, rgba(0,0,0,0.6), rgba(0,0,0,0.4));
    padding: calc(var(--spacing-unit) * 2.5) calc(var(--spacing-unit) * 2);
    border-radius: var(--border-radius-medium);
    max-width: 850px;
    margin: 0 auto;
}
form {
    margin-top: 30px;
}
.hero-main-banner .title,
.hero-main-banner .subtitle,
.hero-main-banner p {
    color: var(--text-light) !important;
    text-shadow: var(--shadow-text-standard);
}
.hero-main-banner .title { font-size: 3rem; font-weight: var(--font-weight-extrabold); }
.hero-main-banner .subtitle { font-size: 1.5rem; }

.parallax-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.2); /* Lighter general overlay if needed */
    z-index: 1;
}

/* 6. Section Styling */
.section {
    padding: var(--section-padding-vertical) var(--section-padding-horizontal);
}
.has-background-light { background-color: var(--bg-section-light) !important; }
.has-background-dark {
    background-color: var(--bg-section-dark) !important;
    color: var(--text-light);
}
.has-background-dark .section-title,
.has-background-dark .title,
.has-background-dark .subtitle,
.has-background-dark p,
.has-background-dark .label,
.has-background-dark .heading, /* For stat widgets */
.has-background-dark a:not(.button) {
    color: var(--text-light) !important;
}
.has-background-dark a:not(.button):hover { color: var(--primary-color) !important; }
.has-background-dark .button.is-primary { /* Ensure button contrast on dark bg */
    /* Primary button styles are generally fine */
}


/* 7. Card Styles */
.card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-medium);
    transition: var(--transition-medium);
    height: 100%; 
    display: flex; 
    flex-direction: column;
    overflow: hidden; 
}
.card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 14px 28px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.08);
}

.card .image-container,
.card .card-image {
    overflow: hidden;
    position: relative;
    display: flex; 
    align-items: center; 
    justify-content: center;
    background-color: #f0f0f0; /* Placeholder bg for images */
}
.card .card-image figure { /* Ensure Bulma figure behaves */
    width: 100%;
    height: 100%;
}
.card .image-container img,
.card .card-image img {
    width: 100%;
    height: 100%; /* Ensure image fills its figure/container */
    object-fit: cover;
    display: block;
    border-radius: var(--border-radius-large) var(--border-radius-large) 0 0;
}

.card .card-content {
    padding: calc(var(--spacing-unit) * 1.5);
    flex-grow: 1;
    text-align: center; 
}
.card .card-content .title { font-size: 1.3rem; margin-bottom: 0.75rem; }
.card .card-content .subtitle { font-size: 0.9rem; color: var(--text-muted); }
.card .card-content .content p { color: var(--text-medium); font-size: 0.9rem; line-height: 1.6; }
.card .card-header { box-shadow: none; border-bottom: 1px solid var(--border-color-light); }
.card .card-header-title { font-weight: var(--font-weight-bold); color: var(--text-dark); justify-content: center; }
.card .card-footer { border-top: 1px solid var(--border-color-light); background-color: transparent; }
.card .card-footer-item {
    font-weight: var(--font-weight-semibold);
    transition: var(--transition-fast);
    color: var(--primary-color);
}
.card .card-footer-item:hover {
    background-color: rgba(var(--primary-color-rgb), 0.05);
    color: color-mix(in srgb, var(--primary-color) 80%, black);
}

/* Fixed height for specific card types */
.case-study-card .card-image, .media-card .card-image { height: 230px; }

/* Pricing Cards Specifics */
.pricing-card.is-featured {
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 30px rgba(var(--primary-color-rgb), 0.25);
    transform: scale(1.03);
}
.pricing-card.is-featured .card-header { background-color: var(--primary-color); }
.pricing-card.is-featured .card-header-title { color: var(--text-light) !important; }
.pricing-card .price-value { font-size: 2.8rem; font-weight: var(--font-weight-extrabold); color: var(--primary-color); }
.pricing-card ul { list-style: none; margin: 0 auto var(--spacing-unit); padding: 0; max-width: 80%; }
.pricing-card ul li { padding: calc(var(--spacing-unit) * 0.6) 0; border-bottom: 1px dashed var(--border-color-light); font-size: 0.9rem; }

/* Career/Press Cards - more text-heavy */
.career-card .card-content, .press-card .card-content { text-align: left; }
.career-card .card-content .title, .press-card .card-content .title { color: var(--secondary-color); }

/* Resource Item (External Resources) */
.resource-item.box { margin-bottom: var(--spacing-unit) * 1.5; text-align: left; }
.resource-item .title a { color: var(--secondary-color); }

/* 8. Progress Bar */
.progress.is-primary::-webkit-progress-value { background-color: var(--primary-color) !important; }
.progress.is-primary::-moz-progress-bar { background-color: var(--primary-color) !important; }
.progress.is-primary::-ms-fill { background-color: var(--primary-color) !important; }
.progress.is-large { height: 18px; border-radius: var(--border-radius-medium); }

/* 9. Statistical Widgets */
.stat-widget .title.is-1 { font-size: 3.2rem; margin-bottom: calc(var(--spacing-unit) * 0.1); }
.stat-widget .heading { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1.2px; }

/* 10. Contact Section Form */
#contact, #contact-page-form {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--text-dark); /* Default text color for content on light overlay */
}
.parallax-overlay-light {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(5px);
    z-index: 1;
}
.contact-container-overlay { position: relative; z-index: 2; }
#contact .label, #contact-page-form .label { color: var(--text-dark) !important; font-weight: var(--font-weight-semibold); }
#contact .checkbox a, #contact-page-form .checkbox a { color: var(--primary-color); }


/* 11. Footer */
.footer {
    padding: calc(var(--spacing-unit) * 3.5) var(--section-padding-horizontal);
    color: rgba(var(--text-light-rgb, 255, 255, 255), 0.8); /* text-light with opacity */
}
.footer .title.is-5 { color: var(--text-light) !important; margin-bottom: calc(var(--spacing-unit) * 1.2); font-weight: var(--font-weight-semibold); }
.footer p, .footer li { color: rgba(var(--text-light-rgb, 255, 255, 255), 0.7); font-size: 0.9rem; }
.footer a.footer-link { color: rgba(var(--text-light-rgb, 255, 255, 255), 0.85) !important; display: inline-block; padding: calc(var(--spacing-unit) * 0.3) 0; }
.footer a.footer-link:hover { color: var(--primary-color) !important; text-decoration: none; }
.footer .footer-hr { background-color: var(--border-color-dark); height: 1px; margin: calc(var(--spacing-unit) * 2) 0; }
.footer .content.has-text-centered p { font-size: 0.85rem; color: rgba(var(--text-light-rgb, 255, 255, 255), 0.6); }
.footer img[alt*="Logo"] { filter: brightness(0) invert(1); opacity: 0.9; }

/* 12. Specific Page Styles */
/* success.html */
body.success-page { /* Add class to body of success.html */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
body.success-page main {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
body.success-page .section { width: 100%; }
body.success-page .title { color: var(--accent-color-2) !important; } /* Green or success color */

/* privacy.html & terms.html */
main > section:first-child { /* Adjust for fixed header */
    padding-top: calc(var(--header-height-desktop) + var(--section-padding-vertical));
}
@media screen and (max-width: 1023px) {
    main > section:first-child {
        padding-top: calc(var(--header-height-mobile) + var(--section-padding-vertical));
    }
}
/* For hero pages, the hero itself handles this. If about/contacts are first sections after header: */
body:not(.has-hero-first) main > section:first-child { /* Add .has-hero-first to ./ body if hero exists */
    padding-top: calc(var(--header-height-desktop) + var(--section-padding-vertical));
}
@media screen and (max-width: 1023px) {
    body:not(.has-hero-first) main > section:first-child {
        padding-top: calc(var(--header-height-mobile) + var(--section-padding-vertical));
    }
}
/* The prompt specifically requests 100px for privacy/terms. This can be achieved by adding a class to their body/main.
   For now, this general rule will apply if they are the first section.
   If a specific page class like `legal-page-body` is added to privacy/terms HTML:
   .legal-page-body main > section:first-child { padding-top: 100px !important; }
*/
/* Simpler rule based on prompt */
body[class*="privacy-page"] main > section:first-child,
body[class*="terms-page"] main > section:first-child {
    padding-top: 100px !important; /* This is more direct for the request */
}


/* 13. Animations (AOS setup) */
[data-aos] { transition-property: transform, opacity; }

/* 14. Cookie Consent Popup */
#cookieConsentPopup {
    font-family: var(--font-family-body);
    box-shadow: 0 -3px 15px rgba(0,0,0,0.15) !important;
}
#cookieConsentPopup p a { color: var(--primary-color); text-decoration: underline; }
#cookieConsentPopup button {
    font-family: var(--font-family-headings);
    border-radius: var(--border-radius-small);
    font-weight: var(--font-weight-bold);
    padding: 8px 18px;
    font-size: 0.9em;
}
#acceptCookieButton { background-color: var(--primary-color); color: var(--text-light); }
#acceptCookieButton:hover { background-color: color-mix(in srgb, var(--primary-color) 85%, black); }
#closeCookiePopupButton { background-color: var(--text-medium); color: var(--text-light); }
#closeCookiePopupButton:hover { background-color: color-mix(in srgb, var(--text-medium) 85%, black); }


/* Bulma Overrides & Enhancements */
.input, .textarea, .select select {
    box-shadow: none; 
    border-color: var(--border-color-light);
    border-radius: var(--border-radius-medium);
    font-size: 0.95rem;
    transition: var(--transition-medium);
}
.input:focus, .textarea:focus, .select select:focus,
.input.is-focused, .textarea.is-focused, .select select.is-focused,
.input:active, .textarea:active, .select select:active,
.input.is-active, .textarea.is-active, .select select.is-active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.125em rgba(var(--primary-color-rgb), 0.25);
}
/* Apply volumetric to form elements if class is present */
.input.is-volumetric-input, .textarea.is-volumetric-input, .select select.is-volumetric-input {
    background-color: color-mix(in srgb, var(--bg-body) 95%, var(--border-color-light));
    border: 1px solid var(--border-color-light);
    box-shadow: var(--shadow-volumetric-inset);
}
.input.is-volumetric-input:focus, .textarea.is-volumetric-input:focus, .select select.is-volumetric-input:focus {
    border-color: var(--primary-color);
    background-color: var(--bg-body);
    box-shadow: 0 0 0 0.125em rgba(var(--primary-color-rgb), 0.25), var(--shadow-volumetric-inset);
}


.select:not(.is-multiple):not(.is-loading)::after { /* Style Bulma select arrow */
    border-color: var(--primary-color);
    right: 1.1em;
    top: 52%;
}

/* Ensure high contrast for all body text by default */
.content { color: var(--text-medium); }
.content h1, .content h2, .content h3, .content h4, .content h5, .content h6 {
    color: var(--text-dark); 
    font-weight: var(--font-weight-bold);
}
.content ul { list-style-type: disc; margin-left: var(--spacing-unit) * 1.5; }
.content ol { list-style-type: decimal; margin-left: var(--spacing-unit) * 1.5; }
.content strong { color: var(--text-dark); font-weight: var(--font-weight-bold); }