/* styles.css */

/* VARIABLES ================================================================== */
:root {
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'DM Sans', sans-serif;

    --color-primary: #48C78E; /* Vibrant Green/Teal */
    --color-primary-dark: #3BAA7E;
    --color-primary-light: #6DDCAC;
    --color-primary-text: #FFFFFF;

    --color-accent: #FF9F43; /* Warm Orange */
    --color-accent-dark: #F08D2C;
    --color-accent-text: #FFFFFF;

    --color-text: #363636;
    --color-text-light: #FFFFFF;
    --color-text-medium: #7a7a7a;
    --color-text-subtle: #B5B5B5;

    --color-background: #F8F9FA;
    --color-surface: #FFFFFF;
    --color-border: #E0E0E0;
    --color-border-dark: #CFCFCF;
    --color-dark-bg: #222831;

    --color-shadow-light: rgba(0, 0, 0, 0.08);
    --color-shadow-medium: rgba(0, 0, 0, 0.12);
    --color-shadow-dark: rgba(0, 0, 0, 0.18);

    --bouncy-ease: cubic-bezier(0.68, -0.55, 0.27, 1.55);
    --smooth-ease: cubic-bezier(0.25, 0.1, 0.25, 1);

    --navbar-height: 5rem;
    --section-padding: 4rem 1.5rem;
}

/* GLOBAL STYLES ============================================================== */
html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--color-background);
    color: var(--color-text);
}

body {
    font-family: var(--font-body);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    padding-top: 0px !important;
}

a {
    color: var(--color-primary);
    transition: color 0.3s var(--smooth-ease);
    font-weight: 500;
}

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

h1, h2, h3, h4, h5, h6, .title, .subtitle {
    font-family: var(--font-heading);
    color: #222222; /* Darker text for headings for contrast */
    font-weight: 700;
}
.title {
    color: #222222 !important; /* Stricter dark for titles for contrast */
    font-weight: 700;
    line-height: 1.125;
}
.subtitle {
    color: var(--color-text-medium);
    font-weight: 400; /* DM Sans regular for subtitles */
    line-height: 1.25;
}
.content h1, .content h2, .content h3, .content h4, .content h5, .content h6 {
    color: #222222; /* Ensure headings within .content are also dark */
}

p {
    color: var(--color-text);
    margin-bottom: 1rem;
}
.content p:not(:last-child), .content ul:not(:last-child), .content ol:not(:last-child) {
    margin-bottom: 1.25em;
}


/* UTILITY CLASSES =========================================================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s var(--smooth-ease), transform 0.7s var(--bouncy-ease);
}

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

.is-volumetric { /* Applied to cards and some specific buttons */
    box-shadow: 0 5px 10px var(--color-shadow-light),
                0 15px 30px var(--color-shadow-medium);
    transition: transform 0.3s var(--bouncy-ease), box-shadow 0.3s var(--bouncy-ease);
    border-radius: 8px;
}

.is-volumetric:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 16px var(--color-shadow-medium),
                0 20px 40px var(--color-shadow-dark);
}

.volumetric-image { /* Specific for standalone images needing volumetric style */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px var(--color-shadow-light), 0 10px 20px var(--color-shadow-medium);
    transition: transform 0.3s var(--bouncy-ease), box-shadow 0.3s var(--bouncy-ease);
}
.volumetric-image:hover {
     transform: scale(1.05) translateY(-3px);
     box-shadow: 0 6px 12px var(--color-shadow-medium), 0 15px 30px var(--color-shadow-dark);
}
.volumetric-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* HEADER ===================================================================== */
.header.is-sticky-top {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 5px var(--color-shadow-light);
}

.navbar {
    min-height: var(--navbar-height);
}
.navbar-brand .site-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text);
}
.navbar-brand .site-title .has-text-primary {
    color: var(--color-primary) !important;
}

.navbar-item {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1rem;
    color: var(--color-text);
    transition: color 0.3s var(--smooth-ease), background-color 0.3s var(--smooth-ease);
}
.navbar-item:hover, .navbar-item.is-active {
    background-color: transparent !important;
    color: var(--color-primary) !important;
}
.navbar-burger {
    color: var(--color-text);
}
.navbar-burger:hover {
    background-color: rgba(0,0,0,0.05) !important;
}
.navbar-burger span {
    background-color: var(--color-text) !important;
    height: 2px;
    width: 20px;
    left: calc(50% - 10px);
}
/* Burger active state transitions managed by Bulma JS is-active class */


@media screen and (max-width: 1023px) {
    .navbar-menu {
        background-color: var(--color-surface);
        box-shadow: 0 8px 16px var(--color-shadow-medium);
        padding: 0.5rem 0;
    }
    .navbar-menu .navbar-item {
        padding: 0.75rem 1.5rem;
    }
}

/* HERO SECTION =============================================================== */
.hero.is-large {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}
.hero .hero-body {
    padding: 6rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero .title.is-1 {
    font-size: 3rem;
    color: var(--color-text-light) !important;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.6); /* Stronger shadow for readability */
    margin-bottom: 1.5rem;
}
.hero .subtitle.is-4 {
    font-size: 1.25rem;
    color: var(--color-text-light) !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
}

/* SECTION STYLES ============================================================= */
.section {
    padding: var(--section-padding);
}

.section-title {
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #222222 !important;
    position: relative;
    padding-bottom: 0.5rem;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--color-primary);
    border-radius: 2px;
}


/* CARD STYLES ================================================================ */
.card {
    background-color: var(--color-surface);
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--color-shadow-light);
    transition: box-shadow 0.3s var(--smooth-ease), transform 0.3s var(--smooth-ease);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden; /* Ensures content like images respect border-radius */
}

.card:hover {
    box-shadow: 0 8px 20px var(--color-shadow-medium);
    transform: translateY(-3px);
}

/* .is-volumetric on .card is handled by the global .is-volumetric style */

.card-image { /* Bulma class, usually a wrapper for figure.image */
    /* border-top-left-radius: 8px; Already handled by .card overflow:hidden */
    /* border-top-right-radius: 8px; */
}
.card-image .image-container { /* This is the <figure class="image ... image-container"> */
    display: block;
    position: relative;
}
.event-card .card-image .image-container {
    height: 250px;
}
.timeline-custom-content .card-image .image-container {
    height: 200px;
}

.card-image .image-container img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
    text-align: left;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.card-content .title {
    color: #222222 !important;
}
.card-content .subtitle {
     color: var(--color-text-medium) !important;
}
.card-content .title, .card-content .subtitle {
    margin-bottom: 0.75rem;
}
.card-content .content {
    font-size: 0.95rem;
    color: var(--color-text-medium);
    flex-grow: 1;
}
.card-content .content p:last-child {
    margin-bottom: 0;
}

.card.has-text-centered-content .card-content {
    text-align: center;
}


/* BUTTON STYLES (GLOBAL) ===================================================== */
.button, button, input[type="submit"], input[type="button"] {
    font-family: var(--font-heading);
    font-weight: 700;
    border-radius: 6px;
    padding: 0.75em 1.5em;
    transition: transform 0.2s var(--bouncy-ease),
                box-shadow 0.2s var(--bouncy-ease),
                background-color 0.2s var(--smooth-ease),
                color 0.2s var(--smooth-ease);
    border-width: 0;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.5;
    -webkit-appearance: none; /* Fix for iOS button styling */
    -moz-appearance: none;
    appearance: none;
}

.button.is-primary {
    background-color: var(--color-primary);
    color: var(--color-primary-text) !important;
    box-shadow: 0 3px 0 var(--color-primary-dark), 0 4px 8px var(--color-shadow-light);
}
.button.is-primary:hover {
    background-color: var(--color-primary-dark);
    color: var(--color-primary-text) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 0 var(--color-primary-dark), 0 6px 12px var(--color-shadow-medium);
}
.button.is-primary:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 var(--color-primary-dark), 0 2px 4px var(--color-shadow-light);
}

.button.is-link {
    background-color: var(--color-accent);
    color: var(--color-accent-text) !important;
    box-shadow: 0 3px 0 var(--color-accent-dark), 0 4px 8px var(--color-shadow-light);
}
.button.is-link:hover {
    background-color: var(--color-accent-dark);
    color: var(--color-accent-text) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 0 var(--color-accent-dark), 0 6px 12px var(--color-shadow-medium);
}
.button.is-link:active {
     transform: translateY(1px);
     box-shadow: 0 1px 0 var(--color-accent-dark), 0 2px 4px var(--color-shadow-light);
}

.button.is-outlined.is-primary {
    background-color: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary) !important;
    box-shadow: none;
}
.button.is-outlined.is-primary:hover {
    background-color: var(--color-primary);
    color: var(--color-primary-text) !important;
    transform: translateY(-2px); /* Keep hover effect consistent */
    box-shadow: 0 4px 8px var(--color-shadow-light); /* Add subtle shadow on hover */
}

/* .is-volumetric on buttons provides hover transform, actual shadow defined by color class */
.button.is-volumetric:hover { /* This ensures the volumetric transform for all buttons with this class */
    transform: translateY(-2px) scale(1.02); /* Scale added for more pop */
}
.button.is-volumetric:active {
    transform: translateY(1px) scale(1);
}
/* If button is volumetric AND primary/link, shadows from .is-primary/is-link apply */
/* The .is-volumetric class in HTML is mostly for non-card elements, or for cards if explicitly styled with global volumetric */
/* The .button.is-primary etc. already provide good volumetric feel. */
/* Let's ensure .is-volumetric class for buttons adds to this if not already covered */
.button.is-primary.is-volumetric:hover, .button.is-link.is-volumetric:hover {
    transform: translateY(-2px) scale(1.02); /* Ensure scale is also applied */
}

.button.is-large {
    padding: 1em 2em;
    font-size: 1.15rem;
}
.button.is-fullwidth {
    display: block;
    width: 100%;
}

/* FORM STYLES ================================================================ */
.label {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.input, .textarea {
    font-family: var(--font-body);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    box-shadow: inset 0 1px 3px var(--color-shadow-light);
    transition: border-color 0.3s var(--smooth-ease), box-shadow 0.3s var(--smooth-ease);
    padding: 0.85em 1em; /* Increased padding for better feel */
    color: var(--color-text);
    width: 100%; /* Ensure inputs take full width of their control container */
}
.input::placeholder, .textarea::placeholder {
    color: var(--color-text-subtle);
    opacity: 1; /* Ensure placeholder is visible */
}

.input:hover, .textarea:hover {
    border-color: var(--color-border-dark);
}
.input:focus, .textarea:focus,
.input.is-focused, .textarea.is-focused {
    border-color: var(--color-primary) !important; /* important to override bulma */
    box-shadow: 0 0 0 0.125em rgba(var(--color-primary), 0.25), inset 0 1px 3px var(--color-shadow-light) !important;
}

.contact-form-volumetric .input,
.contact-form-volumetric .textarea {
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--color-shadow-light) inset; /* Inner shadow for depth */
}
.contact-form-volumetric .input:focus,
.contact-form-volumetric .textarea:focus {
    box-shadow: 0 0 0 0.125em rgba(var(--color-primary), 0.25), 0 2px 4px var(--color-shadow-light) inset !important;
}


/* TIMELINE (CUSTOM) ========================================================== */
.timeline-custom {
    position: relative;
    margin: 2rem auto;
    max-width: 800px;
}
.timeline-custom::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--color-border);
    border-radius: 2px;
}

.timeline-custom-item {
    position: relative;
    margin-bottom: 2.5rem;
    padding-left: 50px;
}
.timeline-custom-item:last-child {
    margin-bottom: 0;
}

.timeline-custom-marker {
    position: absolute;
    left: 0;
    top: 5px; /* Align a bit below top of card */
    transform: translateX(calc(20px - 50% + 2px));
    width: 20px;
    height: 20px;
    background-color: var(--color-primary);
    border: 3px solid var(--color-surface);
    border-radius: 50%;
    z-index: 1;
}
.timeline-custom-content .card { /* Card is the content */
    /* Already styled by global .card */
}
.timeline-custom-content .card-content .title.is-4 {
    color: var(--color-primary-dark) !important;
}


/* PROGRESS INDICATORS ======================================================== */
progress[value] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: none;
    border-radius: 20px;
    height: 12px;
    overflow: hidden;
}
progress[value]::-webkit-progress-bar {
    background-color: var(--color-border);
    border-radius: 20px;
}
progress[value]::-webkit-progress-value {
    background-color: var(--color-primary);
    border-radius: 20px;
    transition: width 0.5s var(--smooth-ease);
}
progress[value]::-moz-progress-bar { /* Firefox */
    background-color: var(--color-primary);
    border-radius: 20px;
    transition: width 0.5s var(--smooth-ease);
}
.event-card .has-text-grey {
    font-size: 0.85rem;
    margin-top: 0.5rem;
    color: var(--color-text-medium);
}

/* COMMUNITY SECTION ========================================================== */
#community .columns.is-mobile .column {
    padding: 0.5rem;
}

/* EXTERNAL RESOURCES ========================================================= */
.resource-card { /* Already inherits .card styles */
    /* height: 100%; */ /* Set by .card global style */
}
.resource-card .card-content {
    justify-content: flex-start; /* Align content to top */
}
.resource-card .title.is-5 {
    margin-bottom: 0.5rem;
    line-height: 1.3;
}
.resource-card .title.is-5 a {
    color: var(--color-primary-dark);
    text-decoration: none;
}
.resource-card .title.is-5 a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}
.resource-card .content.is-small {
    font-size: 0.875rem;
    color: var(--color-text-medium);
}

/* CONTACT SECTION ============================================================ */
.section-contact {
    background-color: var(--color-surface);
}
.contact-details {
    margin-top: 2rem;
}
.contact-details p {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}
.contact-details strong {
    color: var(--color-text);
}
.contact-details a {
    color: var(--color-primary);
    font-weight: 500;
}
.contact-details a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* FOOTER ===================================================================== */
.footer {
    background-color: var(--color-dark-bg);
    color: var(--color-text-subtle);
    padding: 3rem 1.5rem 2rem;
}
.footer .title.is-5 {
    color: var(--color-text-light) !important;
    margin-bottom: 1rem;
    font-weight: 500;
}
.footer .content.is-small, .footer p {
    font-size: 0.9rem;
    color: var(--color-text-subtle);
}
.footer ul {
    list-style: none;
    margin-left: 0;
}
.footer ul li {
    margin-bottom: 0.5rem;
}
.footer ul li a {
    color: var(--color-text-subtle);
    font-weight: 400;
    text-decoration: none;
    transition: color 0.3s var(--smooth-ease);
}
.footer ul li a:hover {
    color: var(--color-primary-light);
    text-decoration: underline;
}
.footer hr {
    background-color: rgba(255,255,255,0.1);
    height: 1px;
    margin: 2rem 0;
}
.footer .content.has-text-centered p {
    color: var(--color-text-subtle);
    font-size: 0.85rem;
}

/* PAGE SPECIFIC STYLES ======================================================= */
body.success-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--color-background);
}
.success-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}
.success-container .icon {
    font-size: 4rem; /* Requires an icon font or SVG */
    color: var(--color-primary);
    margin-bottom: 1.5rem;
}
.success-container .title {
    color: var(--color-primary-dark) !important;
    margin-bottom: 1rem;
}
.success-container .subtitle {
    color: var(--color-text-medium);
    max-width: 500px;
    margin-bottom: 2rem;
}

body.privacy-page .main-container > main,
body.terms-page .main-container > main {
    padding-top: var(--navbar-height);
}
.static-page-content {
    padding: var(--section-padding);
    background-color: var(--color-surface);
    margin: 2rem auto;
    max-width: 900px;
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--color-shadow-light);
}
.static-page-content h1, .static-page-content .title.is-1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--color-primary-dark) !important;
}
.static-page-content h2, .static-page-content .title.is-3 {
    font-size: 1.75rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #222222 !important; /* Dark text for h2 as well */
}
.static-page-content p {
    margin-bottom: 1.25rem;
    line-height: 1.7;
    color: var(--color-text);
}
.static-page-content ul, .static-page-content ol {
    list-style-position: outside;
    margin-left: 1.5rem;
    margin-bottom: 1.25rem;
    color: var(--color-text);
}
.static-page-content ul { list-style-type: disc; }
.static-page-content ol { list-style-type: decimal; }

/* "Read More" Link Style =================================================== */
.read-more-link {
    display: inline-block;
    font-family: var(--font-heading);
    font-weight: bold;
    color: var(--color-primary);
    text-decoration: none;
    padding: 0.25em 0;
    position: relative;
    transition: color 0.3s var(--smooth-ease);
}
.read-more-link::after {
    content: '→';
    margin-left: 0.5em;
    transition: transform 0.3s var(--smooth-ease);
    display: inline-block;
}
.read-more-link:hover {
    color: var(--color-primary-dark);
}
.read-more-link:hover::after {
    transform: translateX(5px);
}


/* RESPONSIVE DESIGN (Additional fine-tuning) ================================= */
@media screen and (max-width: 768px) {
    html {
        font-size: 15px;
    }
    .section {
        padding: 3rem 1rem;
    }
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    .section-title::after {
        width: 60px;
        height: 3px;
    }

    .hero .title.is-1 {
        font-size: 2.25rem;
    }
    .hero .subtitle.is-4 {
        font-size: 1.1rem;
    }
    .button.is-large {
        font-size: 1rem;
        padding: 0.9em 1.8em;
    }

    .timeline-custom::before {
        left: 10px;
    }
    .timeline-custom-item {
        padding-left: 35px;
    }
    .timeline-custom-marker {
        width: 16px;
        height: 16px;
        top: 8px; /* Adjust marker position slightly for smaller items */
        transform: translateX(calc(10px - 50% + 2px));
    }
}

@media screen and (max-width: 480px) {
    .hero .title.is-1 {
        font-size: 1.8rem; /* Further reduce for very small screens */
    }
    .hero .subtitle.is-4 {
        font-size: 1rem;
    }
    /* Bulma handles column stacking well. Ensure .columns.is-mobile stacks if needed */
}

/* Barba.js Transition Styles (Example) ===================================== */
.barba-leave-active,
.barba-enter-active {
  transition: opacity .4s var(--smooth-ease);
}
.barba-leave-to,
.barba-enter-from {
  opacity: 0;
  position: absolute; /* Optional: to prevent layout shifts */
  width: 100%;
}
.barba-enter-to {
    opacity: 1;
}


/* Cookie Consent Popup specific overrides (mostly inline styled) */
#cookieConsentPopup p {
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.5;
}
#cookieConsentPopup a {
    font-weight: bold;
}
#acceptCookieButton {
    font-family: var(--font-heading);
    font-weight: bold;
}