/* style.css */

/* === Root Variables === */
:root {
    /* Brand Colors (Triadic Approach) */
    --brand-primary: #006D77;       /* Dark Cyan / Teal - Main brand color for elements, backgrounds */
    --brand-primary-dark: #005058;
    --brand-primary-light: #008a99;

    --brand-cta: #E29578;           /* Terracotta / Muted Orange - For primary buttons and CTAs */
    --brand-cta-dark: #c97f60;
    --brand-cta-light: #f0aa90;

    --brand-accent: #8B5FBF;        /* Medium Purple - For secondary accents, highlights */
    --brand-accent-dark: #6d4a9a;
    --brand-accent-light: #a97fdc;

    /* Neutral Colors */
    --text-color-base: #363636;     /* Default body text (Bulma's default) */
    --text-color-headings: #222222; /* Darker for strong headings */
    --text-color-light: #FFFFFF;    /* For dark backgrounds */
    --text-color-muted: #7a7a7a;    /* For subtitles, less important text */

    --background-body: #FFFFFF;
    --background-section-light: #F8F9FA;
    --background-card: #FFFFFF;
    --border-color-light: #EAEAEA;
    --border-color-medium: #DBDBDB; /* Bulma's default */

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-card: 0 8px 16px rgba(0, 0, 0, 0.07);
    --shadow-card-hover: 0 12px 24px rgba(0, 0, 0, 0.12);
    --shadow-button: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-button-hover: 0 6px 12px rgba(0,0,0,0.15);

    /* Typography */
    --font-family-headings: 'Montserrat', sans-serif;
    --font-family-body: 'Merriweather', serif;

    /* Spacing */
    --spacing-unit: 1rem;
    --section-padding-y: 4.5rem;
    --section-padding-x: 1.5rem;
    --container-max-width: 1140px; /* Consistent with Bulma */

    /* Transitions */
    --transition-duration: 0.3s;
    --transition-timing-function: ease-in-out;

    /* Header */
    --header-height: 3.25rem; /* Bulma's default navbar height (52px) */
    --header-height-offset: calc(var(--header-height) + 2rem); /* For pages like privacy/terms */

    /* Gradients & Overlays */
    --gradient-dynamic-1: linear-gradient(135deg, var(--brand-cta), var(--brand-accent));
    --gradient-dynamic-2: linear-gradient(135deg, var(--brand-primary), var(--brand-accent-light));
    --gradient-hero-overlay: linear-gradient(0deg, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.30) 60%, rgba(0,0,0,0.1) 100%);
    --gradient-card-image-overlay: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 60%);
}

/* === Global Styles === */
html {
    scroll-behavior: smooth;
    font-size: 16px; /* Base font size */
}

body {
    font-family: var(--font-family-body);
    color: var(--text-color-base);
    background-color: var(--background-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden; /* Prevent horizontal scroll */
    padding-top: 0px !important;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6,
.title, .subtitle {
    font-family: var(--font-family-headings);
    color: var(--text-color-headings);
    font-weight: 700; /* Bold headings */
}

.title.is-1 { font-size: 3rem; line-height: 1.125; }
.title.is-2 { font-size: 2.5rem; line-height: 1.125; }
.title.is-3 { font-size: 2rem; line-height: 1.25; }
.title.is-4 { font-size: 1.5rem; line-height: 1.25; }
.title.is-5 { font-size: 1.25rem; line-height: 1.25; }


p, .content {
    font-family: var(--font-family-body);
    color: var(--text-color-base);
    line-height: 1.7;
}
.content p:not(:last-child) {
    margin-bottom: 1.25em;
}

a {
    color: var(--brand-cta);
    transition: color var(--transition-duration) var(--transition-timing-function);
}
a:hover {
    color: var(--brand-cta-dark);
}

/* === General Section Styling === */
.section {
    padding: var(--section-padding-y) var(--section-padding-x);
}

.section.has-background-light {
    background-color: var(--background-section-light);
}

.section-title {
    text-align: center;
    font-family: var(--font-family-headings);
    color: var(--text-color-headings);
    margin-bottom: 3rem !important; /* Override Bulma */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    display: block;
    width: 70px;
    height: 4px;
    background: var(--gradient-dynamic-1); /* Dynamic gradient for accent */
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* === Buttons (Global) === */
.button, button, input[type="submit"], input[type="button"] {
    font-family: var(--font-family-headings);
    font-weight: 600;
    border-radius: 8px;
    padding: 0.8em 1.8em;
    transition: background-color var(--transition-duration) var(--transition-timing-function),
                transform var(--transition-duration) var(--transition-timing-function),
                box-shadow var(--transition-duration) var(--transition-timing-function);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border: none;
    box-shadow: var(--shadow-button);
    cursor: pointer;
}

.button:hover, button:hover, input[type="submit"]:hover, input[type="button"]:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-button-hover);
}

.button:active, button:active, input[type="submit"]:active, input[type="button"]:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Bulma specific button customization */
.button.is-primary {
    background-color: var(--brand-cta);
    color: var(--text-color-light);
    border-color: transparent;
}

.button.is-primary:hover {
    background-color: var(--brand-cta-dark);
    color: var(--text-color-light);
    border-color: transparent;
}

.button.is-large {
    padding: 1em 2.2em;
    font-size: 1.1rem;
}

/* "Read More" style links */
.button.is-link {
    background-color: transparent;
    color: var(--brand-primary);
    text-decoration: none;
    padding-left: 0;
    padding-right: 0;
    box-shadow: none;
    text-transform: none; /* Often not uppercase for read more */
    letter-spacing: normal;
    font-weight: 700;
}

.button.is-link:hover {
    background-color: transparent;
    color: var(--brand-primary-dark);
    text-decoration: underline;
    transform: none;
    box-shadow: none;
}

/* === Header / Navbar === */
.header.is-fixed-top {
    background-color: rgba(255, 255, 255, 0.95); /* Slight transparency for modern feel */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
}

.navbar-item img {
    max-height: 2.5rem; /* Adjust logo size */
}

.navbar-item, .navbar-link {
    font-family: var(--font-family-headings);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-color-base);
    transition: color var(--transition-duration) var(--transition-timing-function);
}

.navbar-item:hover, .navbar-link:hover,
.navbar-item.is-active, .navbar-link.is-active {
    background-color: transparent !important; /* Override Bulma */
    color: var(--brand-cta) !important;
}

.navbar-burger {
    color: var(--text-color-base);
}
.navbar-burger:hover {
    color: var(--brand-cta);
}

/* Adjustments for content when header is fixed */
body {
    padding-top: var(--header-height);
}

/* === Hero Section === */
#hero {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative; /* For overlay and parallax (if applicable) */
    color: var(--text-color-light);
    /* min-height: 90vh; /* Ensure it's substantial but not always full page */
}

#hero .hero-body {
    padding: 3rem 1.5rem; /* Ensure padding even on smaller fullheight */
    position: relative; /* For z-index stacking with overlay */
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Overlay applied via HTML div */
.hero-content-overlay {
    background: var(--gradient-hero-overlay);
    padding: 3rem 2rem;
    border-radius: 12px;
    max-width: 800px; /* Control width of text block */
}

#hero .hero-title,
#hero .title {
    color: var(--text-color-light) !important; /* Strict requirement */
    font-size: 3.5rem; /* Larger for hero */
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    margin-bottom: 1rem;
}

#hero .hero-subtitle,
#hero .subtitle {
    color: var(--text-color-light) !important; /* Strict requirement */
    font-size: 1.25rem;
    line-height: 1.8;
    font-weight: 400; /* Lighter than title */
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 2rem;
}

@media screen and (max-width: 768px) {
    #hero .hero-title,
    #hero .title {
        font-size: 2.5rem;
    }
    #hero .hero-subtitle,
    #hero .subtitle {
        font-size: 1.1rem;
    }
    .hero-content-overlay {
        padding: 2rem 1rem;
    }
}

/* === Card Styles (Global) === */
.card {
    background-color: var(--background-card);
    border-radius: 12px; /* More pronounced rounding */
    box-shadow: var(--shadow-card);
    transition: transform var(--transition-duration) var(--transition-timing-function),
                box-shadow var(--transition-duration) var(--transition-timing-function);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%; /* For equal height cards in a row */
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card-hover);
}

.card .card-image {
    position: relative; /* For potential overlays on images */
}

/* Image within Bulma's figure.image structure */
.card .card-image figure.image img {
    display: block;
    width: 100%;
    height: 100%; /* Fill the figure container */
    object-fit: cover; /* Cover the area, cropping if necessary */
}
/* Ensuring the figure itself has the aspect ratio given by Bulma classes */
.card .card-image figure.is-4by3,
.card .card-image figure.is-16by9,
.card .card-image figure.is-3by2,
.card .card-image figure.is-square {
    /* Bulma handles the aspect ratio. Img inside needs to fill it. */
}


.card .card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card .card-content .title {
    font-size: 1.3rem; /* Slightly smaller for cards */
    margin-bottom: 0.75rem;
    color: var(--text-color-headings);
}
.card .card-content .title.is-5 { font-size: 1.15rem; }


.card .card-content .subtitle {
    font-size: 0.9rem;
    color: var(--text-color-muted);
    margin-bottom: 1rem;
}

.card .card-content .content {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-color-base);
    flex-grow: 1; /* Push footer down */
}
.card .card-content .content p:last-child {
    margin-bottom: 0;
}


.card .card-footer {
    border-top: 1px solid var(--border-color-light);
    padding: 0; /* Bulma's default is 0.75rem, reset for full-width items */
    background-color: transparent;
}

.card .card-footer-item {
    font-family: var(--font-family-headings);
    font-weight: 600;
    color: var(--brand-cta);
    padding: 1rem 1.5rem;
    transition: color var(--transition-duration) var(--transition-timing-function), background-color var(--transition-duration) var(--transition-timing-function);
}

.card .card-footer-item:hover {
    color: var(--text-color-light);
    background-color: var(--brand-cta-dark);
}
.card .card-footer-item:not(:last-child) {
    border-right: 1px solid var(--border-color-light); /* If multiple footer items */
}

/* Specific card types based on HTML structure */
.feature-card .card-content .title {
    text-align: center; /* As an example of content centering for specific cards */
}

.pricing-card.is-featured {
    border: 2px solid var(--brand-cta);
    box-shadow: var(--shadow-lg); /* More prominent shadow */
}
.pricing-card.is-featured .card-header-title {
    background-color: var(--brand-cta);
    color: var(--text-color-light);
}
.pricing-card .card-header-title {
    font-weight: 700;
    letter-spacing: 0.5px;
}
.pricing-card ul { list-style: disc; margin-left: 20px; }
.pricing-card ul li { margin-bottom: 0.5em; }


/* === Specific Section Styling === */

/* Features Section Card Adjustments */
#features .card {
    text-align: center; /* Center title and image if structure supports */
}
#features .card-content .title {
    color: var(--brand-primary);
}
#features .card-content .content {
    text-align: left; /* Keep longer text readable */
}


/* Research Section */
#research .content.is-medium {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Case Studies (Slider) */
.custom-slider-container {
    position: relative;
    overflow: hidden; /* Clips slides outside container */
}

.custom-slider {
    display: flex;
    /* JS will handle transform: translateX() for sliding */
    transition: transform var(--transition-duration) var(--transition-timing-function);
}

.custom-slider .slide.card {
    min-width: 100%; /* Each slide takes full width of the slider */
    flex-shrink: 0; /* Prevent slides from shrinking */
    box-sizing: border-box;
    /* Add padding if multiple slides are partially visible and need gutters
       padding: 0 0.5rem; */
}
/* If using Bulma columns *inside* the slider for layout of multiple cards per slide: */
/* .custom-slider .slide .column { padding: 0.5rem; } */

.slider-nav {
    margin-top: 1.5rem;
    text-align: center;
}

.slider-nav .button {
    margin: 0 0.5rem;
    background-color: var(--brand-primary);
    color: var(--text-color-light);
}
.slider-nav .button:hover {
    background-color: var(--brand-primary-dark);
}

/* Behind the Scenes Section */
#behind-the-scenes .image.is-square img {
    border-radius: 8px;
    object-fit: cover;
}

/* Webinars & Insights Cards */
#webinars .card .card-image figure.is-16by9,
#insights .card .card-image figure.is-3by2 {
    /* Aspect ratio is set by Bulma class, img inside will cover */
}
#webinars .card .button.is-primary,
#insights .card .button.is-link {
    margin-top: auto; /* Push button to bottom of card content */
}

/* Media Section */
#media img {
    max-height: 60px; /* Control partner logo sizes */
    width: auto;
    margin: 0.5rem 1rem;
    filter: grayscale(80%);
    transition: filter var(--transition-duration) var(--transition-timing-function);
}
#media img:hover {
    filter: grayscale(0%);
}

/* Events Calendar */
.event-list .card { margin-bottom: 1.5rem; }
.event-list .card-content .title { font-size: 1.2rem; color: var(--brand-primary); }
.event-list .card-content .subtitle { color: var(--text-color-muted); font-size: 0.9rem; }


/* External Resources */
#external-resources .resource-card .card-content {
    padding: 1.25rem;
}
#external-resources .resource-card .title.is-5 a {
    color: var(--brand-primary);
    font-weight: 600;
}
#external-resources .resource-card .title.is-5 a:hover {
    color: var(--brand-primary-dark);
    text-decoration: underline;
}
#external-resources .resource-card .is-size-7 {
    margin-bottom: 0.5rem;
    display: block;
}


/* Contact Section */
#contact .label {
    font-family: var(--font-family-headings);
    font-weight: 600;
    color: var(--text-color-headings);
}
#contact .input, #contact .textarea {
    border-radius: 8px;
    border-color: var(--border-color-medium);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition-duration) var(--transition-timing-function), box-shadow var(--transition-duration) var(--transition-timing-function);
}
#contact .input:focus, #contact .textarea:focus,
#contact .input:active, #contact .textarea:active {
    border-color: var(--brand-cta);
    box-shadow: 0 0 0 0.125em rgba(var(--brand-cta), 0.25), var(--shadow-sm); /* Match Bulma focus with custom color */
}
#contact .contact-details p {
    margin-bottom: 0.75rem;
}
#contact .contact-details strong {
    color: var(--text-color-headings);
}

/* === Footer === */
.footer {
    background-color: var(--brand-primary-dark); /* Dark footer background */
    color: rgba(255, 255, 255, 0.8);
    padding: 3rem 1.5rem 2rem; /* Less bottom padding */
}

.footer .title.is-5 {
    color: var(--text-color-light);
    font-family: var(--font-family-headings);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1.1rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    font-family: var(--font-family-body);
    transition: color var(--transition-duration) var(--transition-timing-function);
}

.footer a:hover {
    color: var(--text-color-light); /* Brighter on hover */
    text-decoration: underline;
}

.footer .content.has-text-centered p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}
.footer hr {
    background-color: rgba(255, 255, 255, 0.2);
    height: 1px;
    margin: 2rem 0;
}

/* Footer Social Links (Text based as per requirement) */
.footer .column:nth-child(3) p a { /* Targeting 'Suivez-Nous' column links */
    display: inline-block;
    padding: 0.25rem 0;
}


/* === Page Specific Styles === */

/* Privacy & Terms Pages */
body[data-barba-namespace="privacy"] main,
body[data-barba-namespace="terms"] main {
    padding-top: var(--header-height-offset) !important; /* Ensure content below fixed header */
    padding-bottom: var(--section-padding-y);
}
body[data-barba-namespace="privacy"] .container,
body[data-barba-namespace="terms"] .container {
    max-width: 800px; /* Readable width for text-heavy pages */
}
body[data-barba-namespace="privacy"] h1,
body[data-barba-namespace="terms"] h1 {
    margin-bottom: 2rem;
}
body[data-barba-namespace="privacy"] h2,
body[data-barba-namespace="terms"] h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

/* Success Page */
body[data-barba-namespace="success"] {
    padding-top: 0 !important; /* Override general body padding-top */
}
body[data-barba-namespace="success"] .header {
    /* You might want to hide the header or make it transparent on success page */
    /* display: none; */
}
body[data-barba-namespace="success"] main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--section-padding-x);
    background: var(--gradient-dynamic-2); /* Example dynamic background */
}
body[data-barba-namespace="success"] .success-content {
    background-color: rgba(255,255,255,0.9);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    max-width: 600px;
}
body[data-barba-namespace="success"] .success-content .title {
    color: var(--brand-primary);
}
body[data-barba-namespace="success"] .success-content .button {
    margin-top: 1.5rem;
}


/* === Parallax & Animations (Placeholders / Basic Setup) === */
/* Basic fixed background for parallax effect on sections needing it. */
/* Apply class .parallax-bg to a section for this effect. */
/* Note: background-attachment: fixed can have issues on mobile and with other transforms. */
/* JS (e.g., Motion One) is better for more complex parallax. */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* For parallax on blocks (JS driven) */
.parallax-block {
    transition: transform 0.1s linear; /* Smoothness for JS updates */
}

/* Smooth page transitions (Barba.js will handle classes) */
.barba-leave-active,
.barba-enter-active {
    transition: opacity var(--transition-duration) var(--transition-timing-function),
                transform var(--transition-duration) var(--transition-timing-function);
}
.barba-leave { opacity: 1; transform: translateX(0); }
.barba-leave-to { opacity: 0; transform: translateX(-20px); }
.barba-enter { opacity: 0; transform: translateX(20px); }
.barba-enter-to { opacity: 1; transform: translateX(0); }


/* === Responsive Adjustments (Bulma handles most) === */
@media screen and (max-width: 768px) {
    .title.is-1 { font-size: 2.5rem; }
    .title.is-2 { font-size: 2rem; }
    .section { padding: 3rem 1rem; }
    .section-title { margin-bottom: 2rem !important; font-size: 1.8rem; }

    body {
        padding-top: var(--header-height); /* Ensure this is correct if header height changes on mobile */
    }

    /* Ensure columns stack nicely in slider if multiple items per slide are shown */
    .custom-slider .slide .columns {
        margin-left: 0;
        margin-right: 0;
    }
    .custom-slider .slide .column {
        padding: 0.5rem 0; /* Adjust padding for stacked items */
    }
}

/* Cookie Popup: Using inline styles as requested, but can add button consistency if needed */
#cookie-popup button#accept-cookie {
    font-family: var(--font-family-headings);
    /* Other styles are inline in HTML */
}