:root {
  /* Pastel Color Scheme - Adjusted for vibrancy and contrast */
  --primary-color: #88D498; /* Fresh Mint Green */
  --primary-color-dark: #6ABE80;
  --primary-color-light: #B4E3BF;

  --secondary-color: #F39A9D; /* Soft Coral Pink */
  --secondary-color-dark: #E08589;
  --secondary-color-light: #F9C3C5;

  --accent-color: #FDCB9E; /* Pale Apricot */
  --accent-color-dark: #EAA87E;

  --background-light: #FCFDFE; /* Very light, almost white */
  --background-medium: #F4F7F9; /* Light grey for section backgrounds */
  --background-section-alt: #EBF2F7; /* Slightly different light tone */

  --text-color-darkest: #1A1A1A; /* For main titles */
  --text-color-dark: #333333; /* For body text, good contrast */
  --text-color-medium: #555555; /* For subtitles, descriptions */
  --text-color-light: #FFFFFF;
  --text-color-link: var(--primary-color-dark);
  --text-color-link-hover: var(--secondary-color-dark);

  /* Fonts */
  --font-family-headings: 'Manrope', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-family-body: 'Rubik', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  /* Spacing & Borders */
  --spacing-unit: 1rem;
  --border-radius-small: 6px;
  --border-radius-medium: 12px;
  --box-shadow-light: 0 2px 8px rgba(0, 0, 0, 0.08);
  --box-shadow-medium: 0 5px 15px rgba(0, 0, 0, 0.12);
  --box-shadow-large: 0 10px 25px rgba(0, 0, 0, 0.15);

  /* Transitions */
  --transition-speed-fast: 0.2s;
  --transition-speed-normal: 0.3s;
  --transition-timing-function: ease-in-out;

  /* Header height for page content offset */
  --header-height: 52px; /* Bulma default navbar height */
  --content-offset-top: calc(var(--header-height) + 3rem); /* 52px + approx 48px */
}

/* Global Styles */
html {
  scroll-behavior: smooth;
  background-color: var(--background-light);
  font-size: 16px; /* Base font size */
}

body {
  font-family: var(--font-family-body);
  color: var(--text-color-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

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

.title.is-1 { font-size: 3rem; margin-bottom: 1.5rem; }
.title.is-2, .section-title { font-size: 2.5rem; margin-bottom: 1rem; font-weight: 800; color: var(--text-color-darkest); text-shadow: 1px 1px 2px rgba(0,0,0,0.05);}
.title.is-3 { font-size: 2rem; margin-bottom: 0.75rem; }
.title.is-4 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.subtitle { color: var(--text-color-medium); line-height: 1.5; }

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

a {
  color: var(--text-color-link);
  transition: color var(--transition-speed-fast) var(--transition-timing-function);
  font-weight: 500;
}
a:hover {
  color: var(--text-color-link-hover);
}

/* Global Button Styles */
.button,
button,
input[type="submit"],
input[type="reset"],
input[type="button"] {
    font-family: var(--font-family-headings); /* Using Manrope for buttons */
    font-weight: 700;
    border-radius: var(--border-radius-medium);
    transition: all var(--transition-speed-normal) var(--transition-timing-function);
    padding: 0.8em 1.8em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-width: 2px;
    border-style: solid;
    box-shadow: var(--box-shadow-light);
}

.button.is-primary {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-color-dark));
    border-color: transparent;
    color: var(--text-color-light);
}
.button.is-primary:hover {
    background: linear-gradient(135deg, var(--secondary-color-dark), var(--secondary-color));
    color: var(--text-color-light);
    transform: translateY(-3px) scale(1.03);
    box-shadow: var(--box-shadow-medium);
}
.button.is-primary:active {
    transform: translateY(-1px) scale(1);
    box-shadow: var(--box-shadow-light);
}

.button.is-secondary {
    background-color: var(--primary-color-light);
    border-color: var(--primary-color);
    color: var(--primary-color-dark);
}
.button.is-secondary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color-dark);
    color: var(--text-color-light);
    transform: translateY(-3px) scale(1.03);
    box-shadow: var(--box-shadow-medium);
}

/* Helper to ensure content is below fixed header for specific pages */
.page-content-padding {
    padding-top: var(--content-offset-top);
    padding-bottom: 3rem;
}

/* Particle Animation Container */
#particle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(45deg, var(--primary-color-light) 0%, var(--accent-color) 100%);
    opacity: 0.2; /* Subtle effect */
}

/* Header & Navbar */
.header.is-fixed-top {
  background-color: rgba(252, 253, 254, 0.9); /* Slight transparency */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--box-shadow-light);
  transition: background-color var(--transition-speed-normal) var(--transition-timing-function);
}
.navbar-item, .navbar-link {
  font-family: var(--font-family-headings);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-color-dark);
}
.navbar-item:hover, .navbar-link:hover, .navbar-item.is-active {
  background-color: var(--primary-color-light) !important;
  color: var(--primary-color-dark) !important;
}
.navbar-burger {
    color: var(--text-color-dark);
}
.navbar-dropdown {
    border-top-color: var(--primary-color);
    border-radius: 0 0 var(--border-radius-small) var(--border-radius-small);
}

/* Hero Section */
#hero.hero.is-fullheight {
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  position: relative; /* For potential pseudo-elements or parallax layers */
}
#hero .hero-body {
  position: relative; /* Ensure text is above overlay */
  z-index: 1;
}
#hero .title, #hero .subtitle, #hero p {
  color: var(--text-color-light) !important; /* Force white text */
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
}
#hero .title.is-1 {
    font-size: 3.5rem;
    font-weight: 800;
}
#hero .subtitle.is-3 {
    font-size: 1.75rem;
    font-weight: 500;
}
@media screen and (max-width: 768px) {
  #hero .title.is-1 { font-size: 2.5rem; }
  #hero .subtitle.is-3 { font-size: 1.25rem; }
}

/* General Section Styling */
.section {
  padding: 4rem 1.5rem; /* More vertical padding */
}
.section-title {
  margin-bottom: 2.5rem; /* More space below section titles */
  position: relative;
  padding-bottom: 0.5rem;
}
.section-title::after { /* Subtle underline effect */
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}
.has-background-light { background-color: var(--background-medium) !important; }
.has-background-primary-light { background-color: var(--primary-color-light) !important; }

/* Card Styling - General */
.card {
  background-color: var(--text-color-light);
  border-radius: var(--border-radius-medium);
  box-shadow: var(--box-shadow-medium);
  transition: transform var(--transition-speed-normal) var(--transition-timing-function), box-shadow var(--transition-speed-normal) var(--transition-timing-function);
  overflow: hidden; /* Ensures content respects border radius */
  height: 100%; /* For equal height cards in columns */
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow-large);
}
.card .card-image { /* Bulma's card-image */
  overflow: hidden; /* To contain the image */
  position: relative;
}
.card .card-image img {
  width: 100%;
  height: auto; /* Maintain aspect ratio by default */
  object-fit: cover;
  display: block;
  transition: transform var(--transition-speed-normal) var(--transition-timing-function);
}
.card:hover .card-image img {
    transform: scale(1.05);
}
/* Fixed height for image containers in specific cards if needed */
.portfolio-card .card-image figure.image.is-4by3 {
  /* Bulma handles aspect ratio. Ensure image covers */
}
.portfolio-card .card-image img {
    height: 100%; /* Make image fill the figure */
}

.card .card-content {
  padding: 1.5rem;
  text-align: left; /* Default text align */
  flex-grow: 1; /* Allows content to take available space */
  display: flex;
  flex-direction: column;
}
.card .card-content .title, .card .card-content .subtitle {
    text-align: left;
}
/* Centering content within cards when specifically needed */
.card.has-text-centered .card-content,
.card.has-text-centered .card-content .title,
.card.has-text-centered .card-content .subtitle {
    text-align: center;
}
.card.has-text-centered .card-image figure.image { /* For centered icons/small images */
    margin-left: auto;
    margin-right: auto;
}

/* Our Process Section */
.process-card {
  text-align: center; /* Center icon and text */
}
.process-card .card-image {
    padding-top: 1rem; /* Space for icon */
}
.process-card .card-image img { /* Assuming icons are used here */
    width: 64px !important; /* Override Bulma if needed */
    height: 64px !important;
    object-fit: contain;
    margin: 0 auto;
}
.process-card .card-content .title {
    margin-top: 0.5rem;
    color: var(--text-color-darkest);
}
.process-card .card-content p {
    color: var(--text-color-medium);
    font-size: 0.95rem;
}

/* Portfolio Section */
.portfolio-card .card-image {
  position: relative; /* For overlay */
}
.portfolio-card .image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 60%);
  opacity: 0.8;
  transition: opacity var(--transition-speed-normal) var(--transition-timing-function);
}
.portfolio-card:hover .image-overlay {
  opacity: 1;
}
.portfolio-card .card-content {
  position: relative; /* Ensure text is above any potential background */
  z-index: 1;
  background-color: var(--text-color-light); /* Ensure readability */
}
.portfolio-card .card-content .title {
    color: var(--text-color-darkest);
}
.portfolio-card .card-content .subtitle {
    color: var(--text-color-medium);
}

/* Methodology Section */
#metodologia .content ul {
    list-style: disc;
    margin-left: 1.5em;
    color: var(--text-color-dark);
}
#metodologia .content ul li {
    margin-bottom: 0.5em;
}
#metodologia figure.image img {
    border-radius: var(--border-radius-medium);
    box-shadow: var(--box-shadow-light);
}
.methodology-switches.tabs.is-toggle a {
    border-radius: var(--border-radius-medium);
    border-width: 1px;
    border-color: var(--primary-color);
    color: var(--primary-color-dark);
    font-weight: 500;
}
.methodology-switches.tabs.is-toggle li.is-active a {
    background-color: var(--primary-color);
    border-color: var(--primary-color-dark);
    color: var(--text-color-light);
}
.methodology-switches.tabs.is-toggle a:hover {
    border-color: var(--primary-color-dark);
}
.tab-content {
    background-color: var(--text-color-light);
    border-radius: var(--border-radius-medium);
    padding: 1.5rem;
    box-shadow: var(--box-shadow-light);
    margin-top: -1px; /* Overlap with tabs slightly */
    border: 1px solid var(--primary-color-light);
}

/* Research Section - Info Cards */
.info-card {
  /* Glassmorphism example, can be applied to other cards too */
  /* background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2); */
}
.info-card .media-left img {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.1));
}
.info-card .media-content .title {
    color: var(--text-color-darkest);
    margin-bottom: 0.25rem;
}
.info-card .content {
    font-size: 0.95rem;
    color: var(--text-color-medium);
}

/* External Resources Section */
.resource-card .card-content .title a {
    color: var(--primary-color-dark);
    font-weight: 700;
}
.resource-card .card-content .title a:hover {
    color: var(--secondary-color-dark);
    text-decoration: underline;
}
.resource-card .card-content p {
    font-size: 0.9rem;
    color: var(--text-color-medium);
}

/* Contact Banner Section */
#contacto-banner {
  background: linear-gradient(135deg, var(--primary-color-light), var(--accent-color));
  padding: 4rem 1.5rem;
}
#contacto-banner .title, #contacto-banner .subtitle {
    color: var(--text-color-darkest);
    text-shadow: none;
}

/* Contact Page Form (contacts.html) */
.contact-form .field .label {
    color: var(--text-color-darkest);
    font-weight: 600;
}
.contact-form .input, .contact-form .textarea {
    border-radius: var(--border-radius-small);
    border-color: #dbdbdb; /* Bulma default, can be themed */
    box-shadow: inset 0 1px 2px rgba(10,10,10,.1);
    transition: border-color var(--transition-speed-fast) var(--transition-timing-function), box-shadow var(--transition-speed-fast) var(--transition-timing-function);
}
.contact-form .input:focus, .contact-form .textarea:focus,
.contact-form .input:active, .contact-form .textarea:active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.125em rgba(var(--primary-color-rgb, 136, 212, 152), 0.25); /* Create --primary-color-rgb if needed */
}
.contact-form .button.is-primary {
    width: 100%; /* Full width submit button */
    padding-top: 1em;
    padding-bottom: 1em;
}

/* Footer */
.footer {
  background-color: var(--background-medium);
  padding: 3rem 1.5rem 3rem; /* Bulma default is 3rem 1.5rem 6rem */
  color: var(--text-color-medium);
  border-top: 3px solid var(--primary-color-light);
}
.footer .title.is-5 {
  color: var(--text-color-darkest);
  margin-bottom: 1rem;
}
.footer ul { list-style: none; margin-left: 0;}
.footer ul li { margin-bottom: 0.5em; }
.footer-link {
  color: var(--text-color-medium);
  font-weight: 500;
}
.footer-link:hover, #cookie-settings-link:hover {
  color: var(--primary-color-dark);
  text-decoration: underline;
}
.footer .social-links-footer a {
    color: var(--text-color-medium);
    margin: 0 0.75em;
    font-family: var(--font-family-body);
    font-size: 0.95rem;
    transition: color var(--transition-speed-fast) var(--transition-timing-function);
}
.footer .social-links-footer a:first-child { margin-left: 0;}
.footer .social-links-footer a:last-child { margin-right: 0;}
.footer .social-links-footer a:hover {
    color: var(--primary-color-dark);
}
.footer .content p {
    color: var(--text-color-medium);
}


/* Success Page Styling */
.success-page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--background-light);
    padding: 2rem;
}
.success-page-container .icon-success {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
    fill: var(--primary-color); /* For SVG icons */
}
.success-page-container .title {
    color: var(--primary-color-dark);
}
.success-page-container p {
    color: var(--text-color-medium);
    max-width: 500px;
    margin-bottom: 2rem;
}

/* "Read More" Link Style */
.read-more-link {
    font-family: var(--font-family-headings);
    font-weight: 600;
    color: var(--primary-color-dark);
    display: inline-block;
    margin-top: 1rem;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
    transition: color var(--transition-speed-fast) var(--transition-timing-function), border-bottom-color var(--transition-speed-fast) var(--transition-timing-function);
}
.read-more-link:hover {
    color: var(--secondary-color-dark);
    border-bottom-color: var(--secondary-color-light);
}
.read-more-link .icon { /* If using Bulma icon with it */
    vertical-align: middle;
    margin-left: 0.25em;
}


/* Barba.js Page Transitions (Example: Fade) */
.barba-leave-active,
.barba-enter-active {
  transition: opacity var(--transition-speed-normal) var(--transition-timing-function);
}
.barba-leave-to,
.barba-enter-from {
  opacity: 0;
}

/* ScrollReveal - Basic setup, elements will be targeted in JS */
/* Add classes like .sr-fade-up, .sr-fade-left to elements in HTML */
/* No specific CSS needed here if using ScrollReveal's default behavior,
   but you can define custom initial states if desired */


/* Bulma Overrides & Complements */
.columns.is-vcentered { /* Ensure Bulma's vcentered works well */
    align-items: center;
}
.container {
    max-width: 1180px; /* Standard container width */
}

/* Cookie Popup (already in HTML but can be themed if needed) */
#cookie-popup p {
    color: var(--text-color-light); /* Override if p defaults to dark */
}
#cookie-popup #accept-cookies {
    background-color: var(--primary-color);
}
#cookie-popup #accept-cookies:hover {
    background-color: var(--primary-color-dark);
}

/* Responsive Adjustments */
@media screen and (max-width: 1023px) { /* Tablet and below */
    .navbar-menu {
        background-color: rgba(252, 253, 254, 0.95);
        box-shadow: 0 8px 16px rgba(10,10,10,.1);
        border-radius: 0 0 var(--border-radius-medium) var(--border-radius-medium);
    }
    .page-content-padding {
        padding-top: calc(var(--header-height) + 2rem);
    }
}

@media screen and (max-width: 768px) { /* Mobile */
    .section {
        padding: 3rem 1rem;
    }
    .title.is-1 { font-size: 2.25rem; }
    .title.is-2, .section-title { font-size: 1.85rem; }

    .button {
        padding: 0.7em 1.5em;
        font-size: 0.95rem;
    }
    #hero .hero-body {
        padding: 2rem 1rem; /* Adjust padding for mobile hero */
    }
}