/* General Styles & CSS Variables */
:root {
    /* Pastel Color Palette */
    --color-primary-pastel: #A7BED3; /* Soft Blue */
    --color-accent-pastel: #FFB6C1; /* Pastel Pink */
    --color-secondary-accent: #C6DBDA; /* Mint Green */
    --color-background-light: #F4F7F6; /* Very Light Gray/White */
    --color-text-dark: #333333; /* Dark Gray for body text */
    --color-text-heading: #222222; /* Very Dark Gray for headings */
    --color-white: #FFFFFF;
    --color-overlay-dark: rgba(0, 0, 0, 0.5); /* Semi-transparent dark overlay */

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

    /* Spacing */
    --spacing-unit: 1rem; /* 16px */
    --padding-section: 4rem 0; /* Top/bottom padding for sections */

    /* Transitions */
    --transition-smooth: all 0.3s ease-in-out;

    /* Curved Grid/Retro hints */
    --border-radius-soft: 10px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--color-text-dark);
    background-color: var(--color-background-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-text-heading);
    margin-bottom: var(--spacing-unit);
    line-height: 1.2;
}

h1 {
    font-size: 3em;
}

h2 {
    font-size: 2.5em;
}

h3 {
    font-size: 1.8em;
}

h4 {
    font-size: 1.4em;
}

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

a {
    color: var(--color-primary-pastel);
    text-decoration: none;
    transition: var(--transition-smooth);
}

a:hover {
    color: var(--color-accent-pastel);
    text-decoration: underline;
}

/* Global Container & Grid System (Simple Flexbox Implementation) */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-unit);
}

.columns {
    display: flex;
    flex-wrap: wrap;
    margin-left: calc(-1 * var(--spacing-unit)); /* Offset padding */
    margin-right: calc(-1 * var(--spacing-unit)); /* Offset padding */
}

.column {
    flex-grow: 1;
    padding: 0 var(--spacing-unit);
    margin-bottom: var(--spacing-unit); /* Spacing between columns on smaller screens */
}

.column.is-two-thirds {
    flex-basis: 66.666%;
    width: 66.666%;
}

/* Responsive Columns */
@media (max-width: 768px) {
    .column,
    .column.is-two-thirds {
        flex-basis: 100%;
        width: 100%;
    }
}

/* Global Button Styles */
.cta-button,
button[type="submit"],
input[type="submit"] {
    display: inline-block;
    background-color: var(--color-primary-pastel);
    color: var(--color-text-heading); /* Dark text on pastel button */
    padding: 0.8em 1.5em;
    border: none;
    border-radius: var(--border-radius-soft);
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 1em;
    transition: var(--transition-smooth);
    text-align: center;
    -webkit-appearance: none; /* Remove default browser styles */
    -moz-appearance: none;
    appearance: none;
}

.cta-button:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
    background-color: var(--color-accent-pastel);
    color: var(--color-text-heading);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Section Styling */
section {
    padding: var(--padding-section);
    position: relative; /* Needed for potential background shapes or overlays */
    overflow: hidden; /* Keep curved grid elements contained */
}

.centered-heading {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--color-text-heading);
    /* Optional: Add text shadow for contrast on potentially lighter section backgrounds */
    /* text-shadow: 1px 1px 3px rgba(0,0,0,0.2); */
}

/* Hero Section */
.hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white); /* White text as requested */
    text-align: center;
    padding: 6rem var(--spacing-unit); /* Adjust padding as needed */
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1; /* Place behind content */
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-title {
    font-size: 3.5em;
    margin-bottom: 0.5rem;
    color: var(--color-white) !important; /* Ensure white text */
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5); /* Shadow for readability */
}

.hero-subtitle {
     font-size: 1.5em;
     margin-bottom: 2rem;
     color: var(--color-white) !important; /* Ensure white text */
     text-shadow: 1px 1px 3px rgba(0,0,0,0.5); /* Shadow for readability */
}

/* About, Features, Projects, Innovation, Careers, Events Sections */
/* Background colors can alternate for visual separation */
#about, #careers, #events, #contact {
     background-color: var(--color-background-light);
}

#features, #projects, #innovation, #external-resources {
     background-color: #E0F2F1; /* Slightly different pastel for contrast */
}


/* Card Styles (for Features, Projects) */
.card {
    background-color: var(--color-white);
    border-radius: var(--border-radius-soft);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: var(--spacing-unit);
    overflow: hidden; /* Ensure border-radius applies to image */
    display: flex; /* For column layout within card */
    flex-direction: column;
    align-items: center; /* Center content horizontally */
    text-align: center; /* Center text content */
    transition: var(--transition-smooth); /* Smooth transition for hover */
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.card-image {
    width: 100%; /* Image container takes full width of card */
    height: 250px; /* Fixed height for image container */
    overflow: hidden;
    position: relative; /* Needed for potential overlay */
}

.card-image img {
    display: block; /* Remove extra space below image */
    width: 100%;
    height: 100%;
    object-fit: cover; /* Crop image to fit container */
    transition: var(--transition-smooth); /* Smooth scale on hover */
    margin: 0 auto; /* Center image horizontally */
}

.card:hover .card-image img {
     transform: scale(1.05);
}

/* Optional: Overlay for text on images (if text was on image) */
/* This could be applied to .card-image via pseudo-element if needed */

.card-content {
    padding: 1.5rem;
    flex-grow: 1; /* Allow content area to grow */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center text vertically if needed */
}

.card-content h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--color-text-heading);
}

.card-content p {
    margin-bottom: 0;
    color: var(--color-text-dark);
}

/* Read More Link Style */
.card-content a {
    display: inline-block;
    margin-top: 1rem;
    font-weight: bold;
    color: var(--color-primary-pastel);
}

.card-content a:hover {
    color: var(--color-accent-pastel);
    text-decoration: underline;
}


/* Innovation Section - Progress Indicators */
.progress-indicators {
    margin-top: 2rem;
}

.progress-item {
    margin-bottom: 1.5rem;
}

.progress-item span {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--color-text-dark);
}

.progress-bar {
    height: 10px;
    background-color: var(--color-secondary-accent); /* Base color */
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.progress-bar::after {
    content: '';
    display: block;
    height: 100%;
    background-color: var(--color-accent-pastel); /* Filled color */
    width: var(--progress-width, 0%); /* Width controlled by JS based on data-progress */
    transition: width 1s ease-in-out; /* Animation for the fill */
    border-radius: 5px;
}

/* Careers Section - Job Listings */
.job-listings ul {
    list-style: disc;
    padding-left: 1.5em;
    margin-bottom: var(--spacing-unit);
}

.job-listings li {
    margin-bottom: 0.5rem;
    color: var(--color-text-dark);
}

/* Events Section - Event List */
.events-calendar-placeholder ul {
    list-style: none; /* Remove default list style */
    padding: 0;
    margin-bottom: var(--spacing-unit);
}

.events-calendar-placeholder li {
    background-color: var(--color-white);
    border-left: 5px solid var(--color-primary-pastel);
    padding: 1em;
    margin-bottom: 1rem;
    border-radius: var(--border-radius-soft);
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    color: var(--color-text-dark);
}

/* External Resources Section */
.external-resources-section .resource-card {
    background-color: var(--color-white);
    border-radius: var(--border-radius-soft);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    margin-bottom: var(--spacing-unit);
    padding: 1.5rem;
    transition: var(--transition-smooth);
}

.external-resources-section .resource-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.external-resources-section .resource-card a {
    display: block; /* Make the whole card clickable */
    color: var(--color-text-dark); /* Dark text for readability */
}

.external-resources-section .resource-card a:hover {
    text-decoration: none; /* Remove underline on hover for card links */
}

.external-resources-section .resource-card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--color-text-heading);
    font-size: 1.2em;
}

.external-resources-section .resource-card p {
    font-size: 0.9em;
    color: #555; /* Slightly lighter text for description */
    margin-bottom: 1rem;
}

.external-resources-section .resource-card span {
     display: block;
     font-size: 0.8em;
     color: var(--color-primary-pastel);
     word-break: break-all; /* Prevent long URLs from overflowing */
}


/* Contact Section - Form Styles */
.contact-form-container {
    background-color: var(--color-white);
    border-radius: var(--border-radius-soft);
    padding: 2rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--color-text-dark);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 0.8em;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 1em;
    transition: border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    border-color: var(--color-primary-pastel);
    box-shadow: 0 0 5px rgba(167, 190, 211, 0.5); /* Soft blue shadow */
    outline: none;
}

textarea {
    resize: vertical; /* Allow vertical resizing */
}

/* Footer Styling */
.site-footer {
    background-color: var(--color-text-heading); /* Dark background for contrast */
    color: var(--color-background-light); /* Light text */
    padding: var(--padding-section) 0;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.footer-section {
    flex: 1;
    min-width: 200px; /* Minimum width for footer columns */
    margin-right: 2rem;
    margin-bottom: 1.5rem;
}

.footer-section:last-child {
    margin-right: 0;
}

.footer-section h3 {
    color: var(--color-primary-pastel); /* Pastel heading in footer */
    margin-bottom: 1rem;
}

.footer-section p {
    font-size: 0.9em;
    line-height: 1.5;
    color: #ccc; /* Slightly lighter text */
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--color-background-light); /* Light text link */
    text-decoration: none;
    transition: var(--transition-smooth);
}

.footer-section ul li a:hover {
    color: var(--color-primary-pastel); /* Pastel color on hover */
    text-decoration: underline;
}

/* Footer Social Links (Text Only) */
.social-footer ul li a {
    font-weight: normal; /* Ensure they don't look like main nav links */
}


.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1); /* Subtle separator */
    font-size: 0.8em;
    color: #aaa; /* Even lighter text */
}


/* Header & Navigation */
.site-header {
    background-color: var(--color-white); /* Or maybe a light pastel */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000; /* Stay on top */
}

.site-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-family: var(--font-heading);
    font-size: 1.8em;
    color: var(--color-text-heading);
    text-decoration: none;
    font-weight: bold;
}

.site-nav ul.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.site-nav ul.nav-links li {
    margin-left: 2rem;
}

.site-nav ul.nav-links li a {
    color: var(--color-text-dark);
    font-family: var(--font-heading);
    font-size: 1em;
    text-decoration: none;
    padding: 0.5rem 0;
    position: relative; /* For underline effect */
}

.site-nav ul.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary-pastel);
    transition: width 0.3s ease;
}

.site-nav ul.nav-links li a:hover::after {
    width: 100%;
}

/* Burger Menu Toggle (Hidden on Desktop) */
.burger-menu-toggle {
    display: none; /* Hidden by default */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001; /* Above nav links when open */
}

.burger-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--color-text-dark);
    border-radius: 3px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

/* Responsive Header & Burger Menu */
@media (max-width: 768px) {
    .site-nav ul.nav-links {
        display: none; /* Hide default nav */
        flex-direction: column;
        position: absolute;
        top: 100%; /* Position below header */
        left: 0;
        width: 100%;
        background-color: var(--color-white); /* Background for mobile menu */
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        padding: var(--spacing-unit);
        border-top: 1px solid #eee;
        z-index: 999;
        align-items: center; /* Center menu items */
    }

    .site-nav ul.nav-links.active {
        display: flex; /* Show menu when active */
    }

    .site-nav ul.nav-links li {
        margin: 0.5rem 0; /* Spacing for vertical menu */
        text-align: center;
    }

     .site-nav ul.nav-links li a {
         padding: 0.8rem 0; /* Larger touch area */
         width: 100%; /* Make link fill width */
     }

    .burger-menu-toggle {
        display: flex; /* Show burger icon */
    }

    /* Burger icon animation */
    .burger-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg);
    }

    .burger-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg);
    }
}


/* Image Container Styling (for images next to text in columns) */
.image-container {
    width: 100%; /* Take full width of its column */
    display: flex; /* Use flexbox to center image */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    overflow: hidden; /* Hide any potential overflow */
    border-radius: var(--border-radius-soft); /* Add some retro feel */
}

.image-container img {
     display: block;
     max-width: 100%; /* Ensure image is responsive */
     height: auto; /* Maintain aspect ratio */
     border-radius: var(--border-radius-soft); /* Match container radius */
}


/* Progress Indicator Animation (CSS part - initial state and transition) */
/* The actual width update is handled by JS */
.progress-bar .progress-fill { /* Assuming an inner div for the fill */
    height: 100%;
    background-color: var(--color-accent-pastel);
    transition: width 1s ease-in-out; /* Smooth fill animation */
    width: 0; /* Initial state */
}


/* Specific Page Styles (applied via body class or specific selectors) */
/* Add these styles if success.html, privacy.html, terms.html have corresponding body classes or wrapper divs */

/* Style for Success Page */
.success-page-content { /* Assuming a div with this class wraps the content */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    padding: var(--padding-section);
}

/* Style for Privacy and Terms Pages */
.page-content { /* Assuming a div with this class wraps the content */
    padding-top: 100px; /* Offset for sticky header */
    padding-bottom: var(--padding-section);
}

.page-content h1,
.page-content h2,
.page-content h3 {
     margin-bottom: 1rem;
}

.page-content p {
    margin-bottom: 1rem;
}


/* Curved Grid / Retro Hints (More complex implementations might involve pseudo-elements, SVGs or background shapes) */
/* Example: A subtle diagonal separator between sections */
/* This is illustrative; complex curved grids require more involved CSS/SVG */
/*
section:nth-of-type(odd)::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 50px; // Adjust height for desired curve size
    background-color: var(--color-background-light); // Match next section's background
    transform: skewY(-2deg); // Create a diagonal line
    transform-origin: bottom left;
    z-index: 1;
}
section:nth-of-type(even)::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 50px;
    background-color: #E0F2F1; // Match next section's background
    transform: skewY(2deg); // Create a diagonal line
    transform-origin: bottom right;
    z-index: 1;
}
*/

/* Image Overlay for text readability (applied via linear-gradient in HTML style attribute, but CSS could also do it) */
/* Example CSS overlay if not using linear-gradient in HTML: */
/*
.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-overlay-dark);
    z-index: -1;
}
*/


/* Scroll Reveal Animations (Triggered by JS, CSS defines initial state if needed, but ScrollReveal often handles this) */
/* Example initial state for elements that will be revealed: */
/*

[data-scroll-reveal].is-revealed {
    opacity: 1;
    transform: translateY(0);
}
*/
/* ScrollReveal library typically adds classes like .sr-initialized and .sr-load or changes element styles directly.
   No specific CSS needed unless custom pre-animation states are desired. */

/* Anime.js Animations (Triggered by JS, CSS defines target properties) */
/* No specific CSS needed unless defining initial states before JS animates */

/* Ensure contrast for all text */
/* Headings on light backgrounds */
h1, h2, h3, h4, h5, h6 {
    color: var(--color-text-heading); /* Darker than body text */
}

/* Body text on light backgrounds */
body, p, li, span {
     color: var(--color-text-dark); /* Sufficiently dark */
}

/* Text in Footer (on dark background) */
.site-footer, .site-footer p, .site-footer li {
    color: var(--color-background-light); /* Light text on dark background */
}

.site-footer h3 {
    color: var(--color-primary-pastel); /* Pastel heading on dark background */
}

.site-footer a {
    color: var(--color-background-light);
}

.site-footer a:hover {
    color: var(--color-primary-pastel);
}

/* Text on pastel backgrounds */
#features, #projects, #innovation, #external-resources {
     color: var(--color-text-dark); /* Dark text on pastel is readable */
}
#features h2, #projects h2, #innovation h2, #external-resources h2 {
     color: var(--color-text-heading);
}
#features a, #projects a, #innovation a, #external-resources a {
     color: var(--color-text-dark); /* Or a darker accent color */
     text-decoration: underline;
}
#features a:hover, #projects a:hover, #innovation a:hover, #external-resources a:hover {
     color: var(--color-primary-pastel);
}


/* Ensure adequate spacing */
section > .container > .columns {
    margin-top: 2rem; /* Spacing between heading and columns */
}

.columns .column {
    margin-bottom: 2rem; /* Spacing between columns when they wrap */
}

.columns .column:last-child {
    margin-bottom: 0;
}

/* Spacing for specific blocks within columns */
.about-content, .careers-content, .events-calendar-placeholder, .innovation-content {
    margin-bottom: 2rem; /* Space below content blocks if they are the first/only item in a column */
}

.card {
    margin-bottom: 2rem; /* Spacing between cards in multi-column layouts */
}

.project-gallery .card {
     /* Specific spacing for gallery items if needed */
     margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

/* Spacing between form groups and the submit button */
.contact-form-container form .submit-button {
    margin-top: 1.5rem;
}

/* Add space below paragraphs and lists */
p, ul, ol {
    margin-bottom: 1em;
}

/* Ensure last paragraph/list item doesn't add extra space if followed by another element */
p:last-child, ul:last-child, ol:last-child {
    margin-bottom: 0;
}

/* Specific adjustment for text within card content */
.card-content p {
    margin-bottom: 1em; /* Ensure spacing between paragraphs within cards */
}
.card-content p:last-child {
    margin-bottom: 0;
}

/* Style adjustments for responsiveness */
@media (max-width: 768px) {
    h1 { font-size: 2.5em; }
    h2 { font-size: 2em; }
    h3 { font-size: 1.5em; }
    .hero-title { font-size: 3em; }
    .hero-subtitle { font-size: 1.2em; }
    .hero-section { padding: 4rem var(--spacing-unit); }
    section { padding: 2rem var(--spacing-unit); }
    .card-image { height: 200px; } /* Smaller image height on mobile */
    .footer-section { margin-right: 0; min-width: 100%; } /* Stack footer items */
}

/* Style for links within text, like "contacta con nosotros" */
a:not(.cta-button):not(.site-title):not(.site-nav ul.nav-links li a):not(.footer-section ul li a) {
    color: var(--color-accent-pastel); /* Use accent color for inline links */
    text-decoration: underline;
    font-weight: bold;
}

a:not(.cta-button):not(.site-title):not(.site-nav ul.nav-links li a):not(.footer-section ul li a):hover {
    color: var(--color-primary-pastel);
}

/* Style for the cookie consent popup - Basic inline styles are in HTML as requested, but adding minimal styles here for safety/consistency */
/* These are supplementary to the inline styles */
#cookieConsentPopup a {
    color: var(--color-accent-pastel);
    text-decoration: underline;
}

#cookieConsentPopup button {
    background-color: #4CAF50; /* Green */
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    margin-left: 15px; /* Space between text and button */
}

#cookieConsentPopup button:hover {
    background-color: #45a049; /* Darker green */
}

/* Ensure cookie popup is responsive */
#cookieConsentPopup > div {
    flex-direction: column;
    align-items: center;
}
#cookieConsentPopup p {
    margin: 0 0 10px 0; /* Adjust margin for stacked layout */
}
#cookieConsentPopup button {
    margin: 10px 0 0 0; /* Add top margin when stacked */
}

header ul{
    flex-wrap: wrap;
}

.card{
    max-width: 30rem;
    margin: 0 auto;
}