/* style.css */

/* -------------------------------------------------------------------------
   1. CSS Variables
   ------------------------------------------------------------------------- */
:root {
    --primary-color: #5DADE2; /* Blue */
    --primary-color-darker: #4A8DBA;
    --accent-color-1: #F5B041; /* Orange-Yellow */
    --accent-color-1-darker: #D4912D;
    --accent-color-2: #EC7063; /* Red-Orange */
    --neutral-dark: #2C3E50;
    --neutral-medium: #85929E;
    --neutral-light: #F4F6F6;
    --neutral-light-shadow-dark: #d1d9e6;
    --neutral-light-shadow-light: #ffffff;

    --text-dark: #34495E;
    --text-light: #FFFFFF;
    --text-heading-dark: #222222; /* Extra dark for headings on light bg */
    --text-muted: #7f8c8d;

    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'DM Sans', sans-serif;

    --border-radius-soft: 10px;
    --border-radius-medium: 15px;
    --border-radius-large: 20px;

    --shadow-neumorphic-outset: 8px 8px 16px var(--neutral-light-shadow-dark), -8px -8px 16px var(--neutral-light-shadow-light);
    --shadow-neumorphic-outset-hover: 12px 12px 24px var(--neutral-light-shadow-dark), -12px -12px 24px var(--neutral-light-shadow-light);
    --shadow-neumorphic-inset: inset 5px 5px 10px var(--neutral-light-shadow-dark), inset -5px -5px 10px var(--neutral-light-shadow-light);
    --shadow-neumorphic-button: 5px 5px 10px rgba(0,0,0,0.1), -5px -5px 10px var(--neutral-light-shadow-light);
    --shadow-neumorphic-button-hover: 3px 3px 6px rgba(0,0,0,0.1), -3px -3px 6px var(--neutral-light-shadow-light);

    --navbar-height: 3.25rem; /* Default Bulma navbar height */
    --navbar-height-plus-padding: calc(var(--navbar-height) + 2rem);
}

/* -------------------------------------------------------------------------
   2. Base & Typography (Complementing Bulma)
   ------------------------------------------------------------------------- */
html {
    scroll-behavior: smooth;
    font-size: 100%; /* Corresponds to 16px by default */
}

body {
    background-color: var(--neutral-light);
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.7; /* Increased for better readability */
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

.title {
    margin-bottom: 1rem; /* Default spacing */
}
.subtitle {
    margin-top: -0.5rem; /* Closer to title */
    margin-bottom: 2rem;
    color: var(--neutral-medium);
    font-weight: 400;
}

.title.is-1 { font-size: 3rem; margin-bottom: 2rem; }
.title.is-2 { font-size: 2.5rem; margin-bottom: 1.75rem; }
.title.is-3 { font-size: 2rem; margin-bottom: 1.5rem; }
.title.is-4 { font-size: 1.5rem; margin-bottom: 1rem; color: var(--text-heading-dark); } /* Card titles */
.title.is-5 { font-size: 1.25rem; margin-bottom: 0.75rem; }


p {
    margin-bottom: 1.25rem;
    color: var(--text-dark);
}

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

.content ul li {
    line-height: 1.8;
}

.content h1, .content h2, .content h3, .content h4, .content h5, .content h6 {
    color: var(--text-heading-dark);
    font-family: var(--font-heading);
}

/* -------------------------------------------------------------------------
   3. Layout & Section Styling
   ------------------------------------------------------------------------- */
.section {
    padding: 4rem 1.5rem; /* Default section padding */
    position: relative;
}
.section .container {
    max-width: 1152px; /* Consistent container width for content */
}

.main-container {
    overflow: hidden; /* For animations */
}

.has-parallax-background {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
}

/* Dark overlay for text on background images */
.has-parallax-background::before,
.hero::before { /* General for hero too */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5));
    z-index: 1; /* Below content */
}
.hero-body {
    position: relative; /* To ensure content is above the overlay */
    z-index: 2;
}

.hero-text-white,
.hero-text-white .title,
.hero-text-white .subtitle {
    color: var(--text-light) !important;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}


/* Specific page body classes for padding */
body.page-legal .main-content-area,
body.page-about .main-content-area { /* Generic wrapper for content on these pages */
    padding-top: var(--navbar-height-plus-padding);
    padding-bottom: 3rem; /* Add some bottom padding too */
}
body.page-contacts .main-content-area {
     padding-top: var(--navbar-height-plus-padding);
}


body.page-success {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  text-align: center;
  padding: 2rem;
  background-color: var(--neutral-light); /* Consistent background */
}

.success-container {
  background: var(--neutral-light);
  border-radius: var(--border-radius-large);
  padding: 2rem 3rem;
  box-shadow: var(--shadow-neumorphic-outset);
  max-width: 600px;
  width: 100%;
}
.success-container .title {
  color: var(--primary-color);
}
.success-container p {
  color: var(--text-dark);
  font-size: 1.1rem;
}

/* -------------------------------------------------------------------------
   4. Neumorphic Components
   ------------------------------------------------------------------------- */

/* General Button Styles (Global) */
.button.neo-button,
button.neo-button,
input[type='submit'].neo-button {
    background: var(--primary-color);
    color: var(--text-light);
    border: none;
    border-radius: var(--border-radius-soft);
    padding: 0.75em 1.5em; /* Adjusted padding using em */
    font-weight: 500;
    font-family: var(--font-heading);
    box-shadow: var(--shadow-neumorphic-button);
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    letter-spacing: 0.5px;
}
.button.neo-button:hover,
button.neo-button:hover,
input[type='submit'].neo-button:hover {
    background: var(--accent-color-1);
    color: var(--neutral-dark);
    box-shadow: var(--shadow-neumorphic-button-hover);
    transform: translateY(1px);
}
.button.neo-button:active,
button.neo-button:active,
input[type='submit'].neo-button:active {
    box-shadow: inset 2px 2px 4px rgba(0,0,0,0.1), inset -2px -2px 4px var(--neutral-light-shadow-light);
    transform: translateY(2px);
}

.button.is-large.neo-button {
    padding: 1em 2em;
    font-size: 1.15rem;
}
.button.is-small.neo-button {
    padding: 0.5em 1em;
    font-size: 0.9rem;
}


.neo-card {
    background: var(--neutral-light);
    border-radius: var(--border-radius-large);
    padding: 1.5rem; /* Default padding for cards */
    box-shadow: var(--shadow-neumorphic-outset);
    transition: all 0.3s ease-in-out;
    height: 100%; /* For equal height columns if using Bulma's .column */
    display: flex; /* For flex children if needed */
    flex-direction: column; /* Default for card content flow */
}
.neo-card:hover {
    box-shadow: var(--shadow-neumorphic-outset-hover);
    transform: translateY(-5px);
}

.neo-input, .neo-textarea,
.input.neo-input, .textarea.neo-textarea { /* Targeting Bulma classes as well */
    background-color: var(--neutral-light);
    border: none;
    border-radius: var(--border-radius-soft);
    padding: 1rem;
    box-shadow: var(--shadow-neumorphic-inset);
    width: 100%;
    color: var(--text-dark);
    font-family: var(--font-body);
    transition: box-shadow 0.3s ease;
}
.neo-input:focus, .neo-textarea:focus,
.input.neo-input:focus, .textarea.neo-textarea:focus {
    outline: none;
    box-shadow: var(--shadow-neumorphic-inset), 0 0 0 2px var(--primary-color-darker); /* Highlight on focus */
}
.neo-input::placeholder, .neo-textarea::placeholder {
    color: var(--neutral-medium);
}


/* Card specific styles */
.card.neo-card { /* When Bulma card is also a neo-card */
    display: flex;
    flex-direction: column;
    /* align-items: center;  STRICT: Content within card-content should align as per design */
}

.card .card-image { /* Bulma's card-image */
    border-radius: var(--border-radius-medium) var(--border-radius-medium) 0 0;
    overflow: hidden;
    position: relative; /* For image container */
}
.card .card-image .image-container { /* Custom container for stricter control */
    width: 100%;
    /* For fixed height/aspect ratio, example: */
    height: 200px; /* Or use aspect-ratio if supported */
    /* aspect-ratio: 16 / 9; */
    overflow: hidden;
    display: flex; /* Center image within this container */
    align-items: center;
    justify-content: center;
}
.card .card-image .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers the container */
    display: block;
}

.card .card-content {
    padding: 1.5rem;
    flex-grow: 1; /* Allows content to fill space if card heights are matched */
    text-align: left; /* Default text alignment for card content */
}
.card .card-content .title,
.card .card-content .subtitle {
    text-align: left; /* Titles in cards are left-aligned */
}
.card .card-content .title.is-4 {
    margin-bottom: 0.5rem;
}
.card .card-content .content {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* -------------------------------------------------------------------------
   5. Navigation (Navbar)
   ------------------------------------------------------------------------- */
.navbar.is-fixed-top {
    box-shadow: 0 2px 10px rgba(44, 62, 80, 0.1); /* Subtle shadow for fixed navbar */
    background-color: rgba(244, 246, 246, 0.9); /* Slight transparency for eco-minimalism */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}
.navbar-item img {
    max-height: 3.75rem; /* As per HTML */
}
.navbar-item, .navbar-link {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-dark);
}
.navbar-item:hover, .navbar-link:hover {
    background-color: var(--neutral-light-shadow-dark) !important;
    color: var(--primary-color) !important;
}
.navbar-burger span {
    background-color: var(--primary-color); /* Burger lines color */
    height: 2px; /* Thinner lines */
}
.navbar-menu.is-active {
    background-color: rgba(244, 246, 246, 0.95);
    box-shadow: 0 8px 16px rgba(10,10,10,.1);
}

/* -------------------------------------------------------------------------
   6. Hero Section
   ------------------------------------------------------------------------- */
#hero.hero {
    /* Fullscreen hero logic is handled by is-fullheight-with-navbar */
    /* Background image and overlay are handled by .has-parallax-background and .hero::before */
}
#hero .hero-body .title.is-1 {
    font-size: 3.5rem; /* Larger for hero */
    font-weight: 700;
    margin-bottom: 1.5rem;
}
#hero .hero-body .subtitle.is-4 {
    font-size: 1.3rem;
    line-height: 1.8;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2.5rem;
}

/* -------------------------------------------------------------------------
   7. Timeline (Proceso Consulta)
   ------------------------------------------------------------------------- */
.timeline {
    position: relative;
    margin: 2em auto;
    padding: 2em 0;
    list-style-type: none;
}
.timeline:before {
    position: absolute;
    left: 50%;
    top: 0;
    content: ' ';
    display: block;
    width: 6px;
    height: 100%;
    margin-left: -3px;
    background: linear-gradient(to bottom, var(--primary-color), var(--accent-color-1));
    z-index: 5;
    border-radius: 3px;
}
.timeline li {
    padding: 2em 0;
    position: relative; /* For ::after */
}
.timeline li:after { /* Clearfix */
    content: "";
    display: block;
    height: 0;
    clear: both;
    visibility: hidden;
}
.timeline .direction-l, .timeline .direction-r {
    position: relative;
    width: calc(50% - 40px); /* Adjust based on icon and arrow */
}
.timeline .direction-l { float: left; text-align: right; }
.timeline .direction-r { float: right; text-align: left; }

.timeline .flag-wrapper {
    position: relative;
    display: inline-block;
    text-align: left; /* Keep text in flag left-aligned */
}
.timeline .flag {
    position: relative;
    display: inline-block; /* Changed from inline for better padding and structure */
    background: var(--neutral-light);
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius-medium);
    font-weight: 500; /* Adjusted from 600 */
    color: var(--text-dark);
    box-shadow: var(--shadow-neumorphic-outset);
}
.timeline .direction-l .flag { text-align: right; }
.timeline .direction-r .flag { text-align: left; }

.timeline .direction-l .flag:before, .timeline .direction-r .flag:before { /* Arrow */
    position: absolute;
    top: 50%;
    content: ' ';
    display: block;
    width: 0;
    height: 0;
    margin-top: -10px; /* Half of height */
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    z-index: 10;
}
.timeline .direction-l .flag:before {
    right: -20px; /* Adjusted position to connect to line */
    border-left: 10px solid var(--neutral-light);
}
.timeline .direction-r .flag:before {
    left: -20px; /* Adjusted position to connect to line */
    border-right: 10px solid var(--neutral-light);
}
.timeline .time-wrapper {
    display: block;
    position: relative;
    margin: 0.5em 0 0 0; /* Spacing */
    font-size: 0.9em;
    font-weight: bold;
    color: var(--primary-color);
}
.timeline .direction-l .time-wrapper { text-align: right; }
.timeline .direction-r .time-wrapper { text-align: left; }

.timeline .desc {
    margin: 1em 0.75em 0 0;
    font-size: 0.95em;
    line-height: 1.6;
    color: var(--text-dark);
}
.timeline .direction-r .desc { margin: 1em 0 0 0.75em; }

.timeline .icon-point {
    position: absolute;
    top: 50%;
    left: 50%; /* Center of the main timeline bar */
    width: 30px;
    height: 30px;
    margin-left: -15px;
    margin-top: -15px; /* Adjust if flag height varies a lot */
    background: var(--accent-color-1);
    border-radius: 50%;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.1em;
    font-weight: bold;
    box-shadow: 0 0 0 4px var(--neutral-light), inset 1px 1px 3px rgba(0,0,0,0.2), 0 0 8px var(--accent-color-1);
}
/* Adjust icon point to sit ON the line for L/R directions correctly */
.timeline .direction-l .icon-point {
    left: auto;
    right: -15px; /* (icon-width / 2) relative to the timeline center */
    transform: translateX(50%); /* This moves it to align with the center line from the right */
}
.timeline .direction-r .icon-point {
    right: auto;
    left: -15px; /* (icon-width / 2) relative to the timeline center */
    transform: translateX(-50%); /* This moves it to align with the center line from the left */
}


@media screen and (max-width: 768px) {
    .timeline:before { left: 20px; } /* Move line to the left */
    .timeline .direction-l, .timeline .direction-r {
        float: none;
        width: 100%;
        text-align: left;
        padding-left: 50px; /* Space for timeline line and icon */
        margin-bottom: 1rem;
    }
    .timeline .direction-l .flag, .timeline .direction-r .flag {
        text-align: left;
    }
    .timeline .direction-l .flag:before, .timeline .direction-r .flag:before {
        left: -15px; /* Pointing to the line */
        right: auto;
        top: 50%; /* Centered with flag middle */
        margin-top: -10px;
        border-left: none;
        border-right: 10px solid var(--neutral-light);
    }
    .timeline .direction-l .time-wrapper, .timeline .direction-r .time-wrapper { text-align: left; }
    .timeline .icon-point,
    .timeline .direction-l .icon-point,
    .timeline .direction-r .icon-point {
        left: 20px; /* Aligned with the line */
        right: auto;
        transform: translateX(-50%); /* Center on the line */
        margin-left: 0; /* Reset margin from desktop */
    }
    .timeline .desc { margin: 1em 0 0 0; }
}


/* -------------------------------------------------------------------------
   8. Modals (Bulma based)
   ------------------------------------------------------------------------- */
.modal-card.neo-card { /* Style Bulma's modal card with neomorphism */
    border-radius: var(--border-radius-medium);
    box-shadow: var(--shadow-neumorphic-outset);
    overflow: hidden; /* Ensure content respects border radius */
}
.modal-card-head, .modal-card-foot {
    background-color: var(--primary-color);
    border: none;
}
.modal-card-head {
    border-radius: var(--border-radius-medium) var(--border-radius-medium) 0 0;
}
.modal-card-foot {
     border-radius: 0 0 var(--border-radius-medium) var(--border-radius-medium);
     justify-content: flex-end; /* Align buttons to the right */
}
.modal-card-title {
    color: var(--text-light);
    font-family: var(--font-heading);
}
.modal-card-body {
    background-color: var(--neutral-light);
    color: var(--text-dark);
}
.modal-card-body .title.is-5 {
    color: var(--text-heading-dark);
    margin-top: 1.5rem;
}
.modal-card-body .title.is-5:first-child {
    margin-top: 0;
}
.modal .delete { /* Bulma's close button */
    background-color: rgba(10,10,10,.3);
}
.modal .delete:hover {
    background-color: rgba(10,10,10,.5);
}

/* "Leer Más" style buttons for case studies */
.button.modal-trigger {
    /* Uses .neo-button styles, can add specific overrides if needed */
    font-size: 0.9rem;
}


/* -------------------------------------------------------------------------
   9. Forms (Contact Section & general)
   ------------------------------------------------------------------------- */
#contact-form .label {
    color: var(--text-dark);
    font-family: var(--font-heading);
    font-weight: 500;
    margin-bottom: 0.75rem;
}
#contact-form .checkbox label, #contact-form .checkbox {
    color: var(--text-dark);
    font-size: 0.95rem;
}
#contact-form .checkbox input[type="checkbox"] {
    margin-right: 8px;
    box-shadow: var(--shadow-neumorphic-inset);
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 5px;
    background-color: var(--neutral-light);
    position: relative;
    cursor: pointer;
    vertical-align: middle;
}
#contact-form .checkbox input[type="checkbox"]:checked {
    background-color: var(--primary-color);
}
#contact-form .checkbox input[type="checkbox"]:checked::after {
    content: '✔';
    font-size: 14px;
    color: white;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* -------------------------------------------------------------------------
   10. Footer
   ------------------------------------------------------------------------- */
.footer {
    background-color: var(--neutral-dark);
    color: var(--neutral-light);
    padding: 3rem 1.5rem;
}
.footer .title {
    color: var(--text-light);
    font-family: var(--font-heading);
}
.footer .title.is-4 { font-size: 1.5rem; }
.footer .title.is-5 { font-size: 1.25rem; }

.footer p, .footer li {
    color: var(--neutral-medium); /* Lighter gray for footer text */
    font-size: 0.95rem;
}
.footer a {
    color: var(--primary-color);
    font-weight: 500; /* Normal weight for footer links */
}
.footer a:hover {
    color: var(--accent-color-1);
    text-decoration: underline;
}
.footer ul {
    list-style: none;
    margin-left: 0;
}
.footer ul li {
    margin-bottom: 0.5rem;
}

/* Footer Social Links (Text based) */
.footer .column:last-child ul li a { /* Targeting social links column */
    display: inline-block;
    padding: 0.25rem 0; /* Minimal padding for text links */
    /* Add more distinct styling if needed */
}
.footer .content p { /* Copyright text */
    color: var(--neutral-medium);
}

/* -------------------------------------------------------------------------
   11. Animations & Transitions (Helper for JS or CSS based)
   ------------------------------------------------------------------------- */
.animated-text, .animated-button, .is-visible {
    /* Initial state set by JS (opacity: 0, translateY) */
    /* Transition can be handled by Anime.js as in the HTML script */
    /* Or add CSS transitions here if .is-visible just adds opacity:1, transform:none */
    /* Example CSS transition (if JS only adds class):
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    */
}
/*
.is-visible {
    opacity: 1;
    transform: translateY(0);
}
*/

/* -------------------------------------------------------------------------
   12. Utility Classes (Example)
   ------------------------------------------------------------------------- */
.mt-3 { margin-top: 1rem !important; } /* Bulma has .mt-3, example */
.mb-3 { margin-bottom: 1rem !important; }


/* -------------------------------------------------------------------------
   13. Cookie Popup (from HTML, slightly refined)
   ------------------------------------------------------------------------- */
#cookie-popup {
    font-family: var(--font-body); /* Ensure consistent font */
    box-shadow: 0 -5px 15px rgba(0,0,0,0.2);
}
#cookie-popup p {
    color: var(--text-light); /* Override if needed for contrast */
}
#accept-cookie {
    font-family: var(--font-heading);
    background-color: var(--accent-color-1);
    color: var(--neutral-dark);
}
#accept-cookie:hover {
    background-color: var(--accent-color-1-darker);
}

/* Ensure images within general neo-cards (not Bulma .card component) are responsive */
.neo-card img:not(.card .card-image img) { /* Exclude images already handled by Bulma card structure */
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-medium); /* If image is direct child or needs rounding */
}
/* Ensure centered images for non-Bulma cards */
.neo-card.has-text-centered img:not(.card .card-image img) {
    margin-left: auto;
    margin-right: auto;
    display: block;
}

/* Section specific image styling if an image is directly in a section and needs neomorphic border */
.section .neo-card img.is-showcased {
    /* Example, if an image itself is styled as a neo-card visual element */
    padding:0; /* Reset padding if the image itself is the card content */
    border-radius: var(--border-radius-large);
    overflow:hidden;
    box-shadow: var(--shadow-neumorphic-outset); /* This would be for image itself, not parent */
}

/* Ensure Bulma columns distribute content fairly */
.columns.is-centered .column.is-two-thirds {
    /* Bulma handles width, CSS ensures content within is styled well */
    margin-left: auto;
    margin-right: auto;
}

/* Make sure text is always readable */
.section, .card .card-content, .footer, .modal-card-body {
    /* General check for text contrast - already handled by variable choices */
}