/* style.css */

/* 1. CSS Variables */
:root {
    --font-primary: 'Manrope', sans-serif;
    --font-secondary: 'Rubik', sans-serif;

    /* Neutral Color Scheme with Eco-Minimalist Hints */
    --color-background: #e0e5ec; /* Light grayish-blue, base for neumorphism */
    --color-background-alt: #f0f2f5; /* Slightly lighter for contrasted elements or page backgrounds */
    --color-text-primary: #333740; /* Dark grey for body text */
    --color-text-secondary: #5a606b; /* Lighter grey for less important text */
    --color-text-headings: #2c3036; /* Darker for main headings */
    --color-text-light: #FFFFFF; /* For text on dark backgrounds */

    --color-primary-accent: #5b86e5; /* Soft, modern blue */
    --color-primary-accent-dark: #4a70c0;
    --color-secondary-accent: #36D1DC; /* Bright teal/cyan for highlights */
    --color-eco-accent: #6aa84f; /* Muted green for eco elements */
    --color-eco-accent-dark: #578b3f;

    --color-shadow-light: rgba(255, 255, 255, 0.7);
    --color-shadow-dark: rgba(163, 177, 198, 0.6); /* Derived from --color-background */
    
    --color-border: #d1d9e6;

    /* Neumorphism Shadows */
    --neumorphic-shadow: 6px 6px 12px var(--color-shadow-dark), -6px -6px 12px var(--color-shadow-light);
    --neumorphic-shadow-inset: inset 6px 6px 12px var(--color-shadow-dark), inset -6px -6px 12px var(--color-shadow-light);
    --neumorphic-shadow-hover: 8px 8px 16px var(--color-shadow-dark), -8px -8px 16px var(--color-shadow-light);
    --neumorphic-shadow-pressed: inset 3px 3px 7px var(--color-shadow-dark), inset -3px -3px 7px var(--color-shadow-light);


    /* Spacing */
    --spacing-xs: 0.5rem;   /* 8px */
    --spacing-s: 1rem;      /* 16px */
    --spacing-m: 1.5rem;    /* 24px */
    --spacing-l: 2rem;      /* 32px */
    --spacing-xl: 3rem;     /* 48px */
    --spacing-xxl: 4rem;    /* 64px */

    /* Borders */
    --border-radius-small: 8px;
    --border-radius-medium: 12px;
    --border-radius-large: 20px;

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

    /* Header Height for page content offset */
    --header-height: 60px; /* Adjust as per actual fixed header height */
}

/* 2. Reset & Base Styles */
html {
    scroll-behavior: smooth;
    font-size: 16px; /* Base font size */
    background-color: var(--color-background-alt);
    color: var(--color-text-primary);
}

body {
    font-family: var(--font-secondary);
    line-height: 1.6;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden; /* Prevent horizontal scroll */
    padding-top: var(--header-height); /* For fixed header */
}

/* 3. Typography */
h1, h2, h3, h4, h5, h6,
.title, .subtitle { /* Bulma classes */
    font-family: var(--font-primary);
    color: var(--color-text-headings);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: var(--spacing-s);
}

.title { /* Bulma .title override */
    color: var(--color-text-headings);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1); /* Subtle shadow for better definition */
}
.subtitle { /* Bulma .subtitle override */
    color: var(--color-text-secondary);
}

.section-title {
    margin-bottom: var(--spacing-s);
    color: var(--color-text-headings);
    font-weight: 800; /* Extra bold for section titles */
    text-shadow: 1px 1px 3px rgba(0,0,0,0.15);
}

.section-subtitle {
    margin-bottom: var(--spacing-xl);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

p {
    margin-bottom: var(--spacing-s);
    color: var(--color-text-primary);
}

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

.read-more-link {
    display: inline-block;
    font-weight: 500;
    color: var(--color-eco-accent);
    padding: var(--spacing-xs) var(--spacing-s);
    border-radius: var(--border-radius-small);
    transition: background-color var(--transition-fast), color var(--transition-fast);
    text-decoration: none;
    border: 1px solid transparent;
}
.read-more-link:hover {
    background-color: var(--color-eco-accent);
    color: var(--color-text-light);
    text-decoration: none;
    border-color: var(--color-eco-accent-dark);
}

/* 4. Layout & Helpers */
.section { /* Bulma .section override */
    padding: var(--spacing-xl) var(--spacing-m);
    background-color: transparent; /* Sections inherit body background or can have their own */
}

.container { /* Bulma .container override */
    max-width: 1200px; /* Or your preferred max-width */
    margin: 0 auto;
    padding-left: var(--spacing-m);
    padding-right: var(--spacing-m);
}

/* Ensure columns use available space well */
.columns.is-centered {
    justify-content: center;
}
.column.is-two-thirds {
    flex: none;
    width: 66.6666%;
}
@media screen and (max-width: 768px) {
    .column.is-two-thirds {
        width: 100%;
    }
}

/* 5. Header & Navigation */
.site-header.is-fixed-top {
    background-color: rgba(224, 229, 236, 0.85); /* Slightly transparent background for fixed header */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: var(--header-height);
    z-index: 1000;
}

.navbar-item, .navbar-link {
    font-family: var(--font-secondary);
    font-weight: 500;
    color: var(--color-text-primary);
    transition: color var(--transition-fast);
}
.navbar-item:hover, .navbar-link:hover,
.navbar-item.is-active {
    background-color: transparent !important; /* Override Bulma */
    color: var(--color-primary-accent) !important;
}

.logo-text {
    font-family: var(--font-primary);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--color-primary-accent) !important;
}
.navbar-burger span {
    background-color: var(--color-text-primary);
}
.navbar-burger:hover span {
    background-color: var(--color-primary-accent);
}

/* Responsive Navbar Menu */
@media screen and (max-width: 1023px) {
    .navbar-menu {
        background-color: var(--color-background-alt); /* Match fixed header bg */
        box-shadow: 0 8px 16px rgba(0,0,0,0.1);
        padding: var(--spacing-s) 0;
    }
    .navbar-item {
        padding: var(--spacing-s) var(--spacing-m);
    }
}


/* 6. Hero Section */
#hero {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative; /* For pseudo-element overlay if needed */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--header-height)); /* Ensure it fills viewport below header */
}
#hero .hero-body {
    padding: var(--spacing-xl);
    z-index: 1; /* Above background/overlay */
}
#hero .title, #hero .subtitle {
    color: var(--color-text-light); /* White text as requested */
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7); /* Stronger shadow for readability on varied images */
}
#hero .title {
    font-size: 3.5rem; /* Large title */
    font-weight: 800;
}
#hero .subtitle {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-l);
}


/* 7. Global Button Styles & Neumorphic Base Styles */
/* Global styling for buttons */
.button, button, input[type="submit"], input[type="button"] {
    font-family: var(--font-secondary);
    font-weight: 500;
    border-radius: var(--border-radius-medium);
    padding: var(--spacing-s) var(--spacing-l);
    transition: all var(--transition-medium);
    cursor: pointer;
    border: none; /* Neumorphic buttons usually don't have borders */
    outline: none;
    text-decoration: none; /* For <a> styled as button */
    display: inline-block; /* For <a> styled as button */
    text-align: center; /* For <a> styled as button */
}

/* Neumorphic specific button style */
.neumorphic-button {
    background-color: var(--color-background);
    color: var(--color-primary-accent);
    box-shadow: var(--neumorphic-shadow);
    font-weight: 600;
}
.neumorphic-button:hover {
    box-shadow: var(--neumorphic-shadow-hover);
    transform: translateY(-2px);
    color: var(--color-primary-accent-dark);
}
.neumorphic-button:active, .neumorphic-button:focus {
    box-shadow: var(--neumorphic-shadow-pressed);
    transform: translateY(1px);
    color: var(--color-primary-accent-dark);
}

.button.is-primary { /* Bulma primary button enhanced */
    background-color: var(--color-primary-accent);
    color: var(--color-text-light);
}
.button.is-primary:hover {
    background-color: var(--color-primary-accent-dark);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.button.is-primary.neumorphic-button { /* If both classes are used */
    background-color: var(--color-primary-accent);
    color: var(--color-text-light);
    box-shadow: var(--neumorphic-shadow);
}
.button.is-primary.neumorphic-button:hover {
    background-color: var(--color-primary-accent-dark);
    color: var(--color-text-light);
}


/* Neumorphic Inputs and Textareas */
.neumorphic-input, .neumorphic-textarea {
    background-color: var(--color-background);
    border: 1px solid var(--color-border); /* Subtle border for definition */
    border-radius: var(--border-radius-medium);
    padding: var(--spacing-s);
    box-shadow: var(--neumorphic-shadow-inset);
    color: var(--color-text-primary);
    font-family: var(--font-secondary);
    transition: box-shadow var(--transition-medium);
    width: 100%; /* Make them full width by default within their container */
}
.neumorphic-input:focus, .neumorphic-textarea:focus {
    outline: none;
    box-shadow: var(--neumorphic-shadow-inset), 0 0 0 2px var(--color-primary-accent-dark); /* Focus ring */
    border-color: var(--color-primary-accent);
}
.label { /* Bulma label styling */
    color: var(--color-text-headings);
    font-weight: 500;
    font-family: var(--font-secondary);
    margin-bottom: var(--spacing-xs);
}


/* 8. Component Styles (Cards, Widgets, Accordions, etc.) */
.neumorphic-card, .card { /* Bulma .card can be base for neumorphic */
    background-color: var(--color-background);
    border-radius: var(--border-radius-large);
    box-shadow: var(--neumorphic-shadow);
    padding: var(--spacing-m);
    transition: all var(--transition-medium);
    overflow: hidden; /* Important for child elements like images */
    display: flex;
    flex-direction: column;
    /* align-items: center; Removed global align-items as card content might be left-aligned */
    /* text-align: center; Removed global text-align */
    height: 100%; /* For consistent height in columns */
}
.neumorphic-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--neumorphic-shadow-hover);
}

.card .card-content { /* Bulma card content */
    padding: var(--spacing-s); /* Adjust default Bulma padding if needed */
    text-align: left; /* Default text align for card content */
    width: 100%;
}
.card .card-content .title,
.card .card-content .subtitle {
    margin-bottom: var(--spacing-xs);
}

/* Strict Image Card Styling */
.card .card-image, .card .image-container { /* Bulma structure */
    width: 100%;
    margin-left: auto; /* Center block element */
    margin-right: auto; /* Center block element */
    overflow: hidden;
    border-radius: var(--border-radius-medium); /* Rounded corners for image container */
    margin-bottom: var(--spacing-s);
    display: flex; /* For centering image inside */
    justify-content: center; /* For centering image inside */
    align-items: center; /* For centering image inside */
}

/* Specific height for different card types if needed, or rely on aspect ratio figure */
.card .card-image.is-4by3, .card .image-container.is-4by3 { height: auto; /* Bulma handles aspect ratio */ }
.card .card-image.is-3by2, .card .image-container.is-3by2 { height: auto; }
.card .card-image.is-1by1, .card .image-container.is-1by1 { height: auto; padding-top: 100%; position: relative; } /* For square */
.card .card-image.is-1by1 img { position: absolute; top:0; left:0; }


.card .card-image img, .card .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Crucial for image display */
    display: block; /* Remove extra space below image */
    border-radius: var(--border-radius-medium); /* Match container or remove if container has it */
}

/* For cards that need centered text content */
.card.has-text-centered .card-content,
.neumorphic-card.has-text-centered .card-content,
.profile-card .card-content,
.card-innovation .card-content { /* Assuming these also need centered text */
    text-align: center;
}
.profile-card .card-image { /* Profile images are often square or round */
    max-width: 150px; /* Example size */
    height: 150px;
    border-radius: 50%; /* Circular profile images */
    margin-top: var(--spacing-s); /* Spacing from top of card */
}

/* Innovation Cards */
.card-innovation {
    padding: var(--spacing-l);
    text-align: center;
}
.card-innovation img.animated-icon { /* Specific to animated icons */
    margin-bottom: var(--spacing-m);
    height: 80px; /* As per HTML */
    width: 80px;
    /* Add animation placeholder if needed */
}

/* Statistical Widgets */
.neumorphic-widget {
    background-color: var(--color-background);
    padding: var(--spacing-m);
    border-radius: var(--border-radius-medium);
    box-shadow: var(--neumorphic-shadow);
    text-align: center;
}
.neumorphic-widget .title { /* Counter number */
    color: var(--color-primary-accent);
    font-size: 2.5rem;
    margin-bottom: var(--spacing-xs);
}
.neumorphic-widget .heading { /* Label */
    font-family: var(--font-secondary);
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* FAQ Accordion */
.faq-item {
    margin-bottom: var(--spacing-s);
    background-color: var(--color-background);
    border-radius: var(--border-radius-medium);
    box-shadow: var(--neumorphic-shadow);
    overflow: hidden; /* For smooth animation */
}
.faq-question { /* This is a button */
    width: 100%;
    text-align: left;
    padding: var(--spacing-m);
    font-weight: 600;
    color: var(--color-text-headings);
    background-color: transparent; /* Button part of the card */
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-question .icon { /* For the + / - icon */
    transition: transform var(--transition-fast);
    color: var(--color-primary-accent);
}
.faq-question.active .icon {
    transform: rotate(45deg);
}
.faq-answer {
    padding: 0 var(--spacing-m) var(--spacing-m) var(--spacing-m);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-medium), padding var(--transition-medium);
    color: var(--color-text-secondary);
}
.faq-answer p {
    margin-bottom: 0;
}
.faq-item.active .faq-answer { /* JS will add .active */
    max-height: 500px; /* Adjust as needed */
    /* padding-bottom: var(--spacing-m); Implicitly handled by transition */
}

/* Resource Cards for External Links */
.resource-card .card-content {
    text-align: left;
}
.resource-card .title a {
    color: var(--color-primary-accent);
    font-size: 1.1rem; /* Slightly smaller for resource titles */
}
.resource-card .title a:hover {
    color: var(--color-primary-accent-dark);
}
.resource-card .content {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

/* 9. Section Specific Styles */
/* Contact Form Styling */
.neumorphic-form .field {
    margin-bottom: var(--spacing-m);
}
/* Contact form and other general form containers */
.page-text-container {
    background: var(--color-background);
    padding: var(--spacing-l);
    border-radius: var(--border-radius-large);
    box-shadow: var(--neumorphic-shadow);
    color: var(--color-text-primary); /* Ensure text inside is readable */
}
.page-text-container h1, .page-text-container h2, .page-text-container h3 {
    color: var(--color-text-headings);
}
.page-text-container p, .page-text-container li {
    color: var(--color-text-primary);
}
.page-text-container a {
    color: var(--color-primary-accent);
}
.page-text-container a:hover {
    color: var(--color-primary-accent-dark);
}

/* Community section specific paragraph styling */
#comunidad .content.is-medium {
    font-size: 1.1rem; /* Slightly larger for readability */
    line-height: 1.7;
}

/* 10. Footer */
.site-footer {
    background-color: var(--color-background); /* Neumorphic base */
    padding: var(--spacing-xl) 0 var(--spacing-m) 0;
    border-top: 5px solid transparent;
    border-image: linear-gradient(to right, var(--color-primary-accent), var(--color-secondary-accent)) 1;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.05); /* Subtle top shadow */
    color: var(--color-text-secondary);
}
.footer-title {
    font-family: var(--font-primary);
    color: var(--color-text-headings);
    margin-bottom: var(--spacing-s);
    font-size: 1.2rem;
}
.site-footer p, .site-footer li {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}
.site-footer a {
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
}
.site-footer a:hover {
    color: var(--color-primary-accent);
    text-decoration: none;
}
.site-footer .social-links {
    list-style: none;
    padding-left: 0;
    margin-top: var(--spacing-s);
}
.site-footer .social-links li {
    margin-bottom: var(--spacing-xs);
}
.site-footer .social-links a {
    /* Text links, no icons by default as per request */
    font-weight: 500;
}
.site-footer .content p { /* Copyright text */
    margin-top: var(--spacing-l);
    font-size: 0.9rem;
}

/* 11. Page Specific Styles */
/* privacy.html & terms.html */
.page-content section { /* For non-index pages */
    padding-top: var(--spacing-xl); /* Add space below fixed header */
}
.page-content h1.section-title {
    margin-top: 0; /* Already padded by section */
    margin-bottom: var(--spacing-l);
}
body.privacy-page, body.terms-page { /* Add these classes to body in privacy.html/terms.html */
    /* Handled by .page-content and body padding-top */
}
/* Ensure the .page-text-container on privacy/terms is not directly under the fixed header */
main.page-content {
    /* Body already has padding-top */
}


/* success.html */
body.success-page { /* Add this class to body in success.html */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
body.success-page main.page-content {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.success-message-card {
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.success-message-card img {
    margin: 0 auto var(--spacing-m) auto;
}

/* 12. Particle Animation Container */
#particles-js, #particles-js-alt {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1; /* Behind all content */
    background-color: var(--color-background-alt); /* Fallback background */
}
/* #particles-js-alt might have different particle config via JS */


/* 13. Animations & Transitions */
/* GSAP will handle scroll animations. Add classes for initial states if needed. */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.is-visible { /* Class added by ScrollTrigger */
    opacity: 1;
    transform: translateY(0);
}

/* Simple hover scale for some cards or interactive elements */
.hover-scale {
    transition: transform var(--transition-medium);
}
.hover-scale:hover {
    transform: scale(1.03);
}

/* Animated text fill for Hero */
.animated-text-fill {
    /* Example: to be animated by GSAP */
}
.animated-text-fill-delay {
    /* Example: to be animated by GSAP with delay */
}


/* 14. Utility Classes */
.has-text-primary { color: var(--color-primary-accent) !important; }
.has-text-eco { color: var(--color-eco-accent) !important; }

/* Margin & Padding helpers if not covered by Bulma or for fine-tuning */
.mt-s { margin-top: var(--spacing-s); }
.mb-s { margin-bottom: var(--spacing-s); }
.mt-m { margin-top: var(--spacing-m); }
.mb-m { margin-bottom: var(--spacing-m); }
.mt-l { margin-top: var(--spacing-l); }
.mb-l { margin-bottom: var(--spacing-l); }

.text-shadow-subtle {
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* 15. Responsive Design (Media Queries) */
@media screen and (max-width: 1023px) { /* Tablet and below */
    .title.is-1 { font-size: 2.5rem; }
    .title.is-2 { font-size: 2rem; }
    #hero .title { font-size: 2.8rem; }
    #hero .subtitle { font-size: 1.25rem; }

    .columns.is-multiline .column { /* Ensure columns stack nicely */
        margin-bottom: var(--spacing-m);
    }
}

@media screen and (max-width: 768px) { /* Mobile */
    html { font-size: 15px; } /* Slightly smaller base font on mobile */
    :root {
        --spacing-xl: 2.5rem;
        --spacing-l: 1.5rem;
        --spacing-m: 1rem;
        --header-height: 50px; /* Smaller header on mobile */
    }
    body {
        padding-top: var(--header-height);
    }

    #hero .title { font-size: 2.2rem; }
    #hero .subtitle { font-size: 1.1rem; }
    #hero .button { font-size: 1rem; padding: var(--spacing-s) var(--spacing-m); }

    .section {
        padding: var(--spacing-l) var(--spacing-s);
    }
    .container {
        padding-left: var(--spacing-s);
        padding-right: var(--spacing-s);
    }

    .footer .columns {
        text-align: center; /* Center footer columns content on mobile */
    }
    .footer .column {
        margin-bottom: var(--spacing-l);
    }
    .footer .social-links {
        justify-content: center;
        display: flex;
        flex-wrap: wrap;
    }
    .footer .social-links li {
        margin: 0 var(--spacing-xs) var(--spacing-xs) var(--spacing-xs);
    }
}