/* style.css */

/* 1. CSS Variables */
:root {
    --primary-color: #E27D60; /* Vibrant Coral */
    --secondary-color: #87BD7D; /* Calm Green */
    --accent-color-1: #E8A87C; /* Lighter Peach */
    --accent-color-2: #4D8076; /* Darker Teal */
    
    --background-light: #FDF8F5; /* Very light warm off-white */
    --background-medium: #f0ebe8; /* Slightly darker for subtle contrasts */
    --text-dark: #2A3D45; /* Dark Slate Blue/Green */
    --text-dark-lighter: #525252; /* Lighter for body text */
    --text-light: #FFFFFF;
    --text-muted: #7a7a7a;
    --border-color: #D8C3A5; /* Earthy, subtle border */

    --font-heading: 'Archivo Black', 'Arial Black', sans-serif;
    --font-body: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;

    --primary-rgb: 226, 125, 96; /* For use in rgba() box-shadow */
    --secondary-rgb: 135, 189, 125;

    --bulma-card-radius: 8px; /* Custom card radius */
    --section-padding: 4rem 1.5rem;
    --section-padding-mobile: 2.5rem 1rem;
}

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

body {
    font-family: var(--font-body);
    color: var(--text-dark-lighter);
    background-color: var(--background-light);
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll */
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensure footer stays at bottom */
}
.main-container {
    flex-grow: 1; /* Allows main content to push footer */
}

h1, h2, h3, h4, h5, h6,
.title, .subtitle { /* Catch Bulma classes too */
    font-family: var(--font-heading);
    color: var(--text-dark);
    font-weight: normal; /* Archivo Black is bold */
}
/* Specific title styling */
.section-title { /* Main title for each section */
    font-size: 2.8rem;
    margin-bottom: 2.5rem;
    text-align: center;
    color: var(--text-dark);
    text-shadow: 1px 1px 2px rgba(42, 61, 69, 0.1);
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease, opacity 0.3s ease;
}
a:hover {
    color: var(--accent-color-2);
    opacity: 0.8;
}

/* Content styling (e.g. for static pages like privacy/terms) */
.content p, .content ul, .content ol {
    line-height: 1.7;
    color: var(--text-dark-lighter);
    font-size: 1.05rem;
}
.content li { margin-bottom: 0.5rem; }
.content h1, .content h2, .content h3, .content h4 {
    font-family: var(--font-heading);
    color: var(--text-dark);
    margin-top: 2em;
    margin-bottom: 1em;
    line-height: 1.3;
}
.content h1 { font-size: 2.5rem; color: var(--primary-color); }
.content h2 { font-size: 2rem; }
.content h3 { font-size: 1.75rem; }
.content h4 { font-size: 1.5rem; }


/* 3. Bulma Overrides & Enhancements */
.section {
    padding: var(--section-padding);
}
.container {
    max-width: 1140px; /* Consistent max width */
}

.card {
    background-color: var(--text-light);
    border-radius: var(--bulma-card-radius);
    box-shadow: 0 5px 15px rgba(42, 61, 69, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; /* Ensure flex context for children */
    flex-direction: column; /* Stack image and content vertically */
    height: 100%; /* For equal height cards in a row */
    overflow: hidden; /* Ensure borders are respected by content */
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(42, 61, 69, 0.12);
}

.card .card-image { /* This is the container for the img */
    height: 220px; /* Fixed height for card images */
    overflow: hidden;
    position: relative; /* For potential overlays on image */
    background-color: var(--background-medium); /* Placeholder if image fails to load */
}
.card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.card:hover .card-image img {
    transform: scale(1.05);
}

.card .card-content {
    padding: 1.5rem;
    flex-grow: 1; /* Allow content to fill space if card has fixed height overall */
    display: flex;
    flex-direction: column;
}
.card .card-content .title,
.card .card-content .subtitle {
    margin-bottom: 0.75rem;
}
.card .card-content .title { /* Titles inside cards */
    font-size: 1.4rem;
    color: var(--text-dark);
    line-height: 1.3;
}
.card .card-content .subtitle { /* Subtitles inside cards */
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.4;
}
.card .card-content .content { /* Paragraphs inside cards */
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-dark-lighter);
    flex-grow: 1;
}
.card .card-content .button { /* Buttons at the bottom of cards */
    margin-top: auto; /* Pushes button to bottom if content doesn't fill */
}

/* 4. Buttons (Global) */
.button, button, input[type="submit"], input[type="button"] {
    font-family: var(--font-body);
    font-weight: bold;
    border-radius: 6px;
    padding: 0.75em 1.5em;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    border-width: 2px; /* For outlined buttons */
    border-style: solid; /* Ensure border is always there to prevent jump on hover for outlined */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.button:hover, button:hover, input[type="submit"]:hover, input[type="button"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.button:active, button:active, input[type="submit"]:active, input[type="button"]:active {
    transform: translateY(0px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.button.is-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-light);
}
.button.is-primary:hover {
    background-color: var(--accent-color-2); /* Darker shade on hover */
    border-color: var(--accent-color-2);
    color: var(--text-light);
}
.button.is-primary.is-outlined {
    background-color: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.button.is-primary.is-outlined:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
}
.button.is-link.is-outlined { /* For 'Descargar' etc. */
    background-color: transparent;
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}
.button.is-link.is-outlined:hover {
    background-color: var(--secondary-color);
    color: var(--text-light);
}

/* 5. Header & Navigation */
.header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1030; /* Above most content, Bulma modal is 1040 */
    background-color: rgba(253, 248, 245, 0.85); /* --background-light with transparency */
    box-shadow: 0 2px 5px rgba(42, 61, 69, 0.07);
    backdrop-filter: blur(8px);
}
.navbar {
    background-color: transparent; /* Header provides background */
    min-height: 4.5rem; /* More space in navbar */
}
.navbar-item, .navbar-link {
    font-family: var(--font-body);
    font-weight: bold;
    color: var(--text-dark);
    font-size: 1rem;
    padding: 0.75rem 1.25rem;
}
.navbar-item:hover, .navbar-link:hover {
    background-color: var(--accent-color-1);
    color: var(--text-light);
}
.navbar-item.logo-text {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    color: var(--text-dark);
    padding-left: 0; /* Align with container edge */
}
.navbar-item.logo-text:hover {
    background-color: transparent; /* No hover bg for logo */
    color: var(--text-dark);
}
.logo-text .logo-accent {
    color: var(--primary-color);
}
.navbar-burger span {
    background-color: var(--primary-color);
    height: 3px; /* Thicker lines */
    width: 22px;
}
.navbar-menu.is-active {
    background-color: var(--background-light);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-top: 1px solid var(--border-color);
}

/* 6. Hero Section */
.hero {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative; /* For ::before overlay */
}
.hero::before { /* Darkening overlay */
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.55));
    z-index: 1;
}
.hero .hero-body {
    position: relative; /* Content above overlay */
    z-index: 2;
    padding-top: 8rem; /* More top padding */
    padding-bottom: 8rem; /* More bottom padding */
}
.hero-title {
    font-size: 3.8rem;
    color: var(--text-light) !important;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
    margin-bottom: 1rem;
}
.hero-subtitle {
    font-size: 1.6rem;
    color: var(--text-light) !important;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
    margin-bottom: 2.5rem;
    font-family: var(--font-body); /* Subtitle often better with body font */
    font-weight: 400;
}

/* 7. Parallax & Backgrounds */
.parallax-section {
    background-attachment: fixed; /* Simple parallax */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative;
}
.parallax-section::before { /* Overlay for parallax sections */
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5));
    z-index: 1;
}
.parallax-section > .container { /* Ensure content is above overlay */
    position: relative;
    z-index: 2;
}
/* Text on parallax sections should be light */
.parallax-section .section-title {
    color: var(--text-light);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}
.parallax-section .content p, /* For general text directly in parallax sections */
.parallax-section > .container > .columns > .column > p { /* For text like intro paras */
    color: rgba(255,255,255,0.9);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}
.parallax-section .card .title,
.parallax-section .card .subtitle,
.parallax-section .card .content {
    color: var(--text-dark); /* Text inside cards on parallax usually still dark on light card bg */
    text-shadow: none;
}
#testimonials.parallax-section .section-title { color: var(--text-light); }
#contact.parallax-section .section-title { color: var(--text-light); }


/* 8. Section Specific Styles */

/* Testimonials */
.testimonial-card {
    background-color: rgba(253, 248, 245, 0.85); /* --background-light with opacity */
    backdrop-filter: blur(6px);
    border: 1px solid rgba(224, 125, 96, 0.3); /* Subtle primary border */
}
.testimonial-card .media-left .image.is-64x64 img { /* Client image */
    border: 3px solid var(--primary-color);
    border-radius: 50%; /* Ensure it's round */
}
.testimonial-card .media-content .title { color: var(--text-dark); }
.testimonial-card .media-content .subtitle { color: var(--text-muted); }
.testimonial-card .content { color: var(--text-dark-lighter); }

/* Accolades - Bulma .message component */
#accolades .message {
    border-left-width: 5px;
    border-radius: var(--bulma-card-radius);
    box-shadow: 0 3px 10px rgba(42, 61, 69, 0.06);
}
#accolades .message .message-header {
    background-color: var(--text-dark);
    border-radius: var(--bulma-card-radius) var(--bulma-card-radius) 0 0;
}
#accolades .message .message-header p {
    color: var(--text-light);
    font-weight: bold;
}
#accolades .message .message-body {
    background-color: var(--text-light);
    color: var(--text-dark-lighter);
    border-width: 0 1px 1px 1px; /* Match header */
    border-style: solid;
    border-color: var(--border-color);
    border-radius: 0 0 var(--bulma-card-radius) var(--bulma-card-radius);
}
#accolades .message.is-info { border-left-color: var(--accent-color-1); }
#accolades .message.is-success { border-left-color: var(--secondary-color); }
#accolades .message.is-warning { border-left-color: var(--primary-color); } /* Using primary as warning */


/* External Links Section */
.external-link-card .card-content {
    background-color: var(--text-light); /* Card already has this, but explicit for direct content */
    padding: 1.25rem;
}
.external-link-card .title a {
    color: var(--primary-color);
    font-size: 1.2rem; /* Slightly smaller for these link titles */
}
.external-link-card .title a:hover {
    color: var(--accent-color-2);
}
.external-link-card .content {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* 9. Contact Form */
.contact-form-box {
    background-color: rgba(253, 248, 245, 0.92); /* --background-light with opacity */
    padding: 2.5rem;
    border-radius: var(--bulma-card-radius);
    box-shadow: 0 10px 30px rgba(42, 61, 69, 0.1);
}
.contact-form-box .label {
    color: var(--text-dark);
    font-weight: bold;
    font-size: 1rem;
}
.contact-form-box .input, .contact-form-box .textarea {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: none;
    font-size: 1rem;
    padding: 0.75em;
}
.contact-form-box .input:focus, .contact-form-box .textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.125em rgba(var(--primary-rgb), 0.25);
}
.contact-info { margin-top: 2rem; border-top: 1px solid var(--border-color); padding-top: 1.5rem; }
.contact-info p { margin-bottom: 0.5rem; color: var(--text-dark-lighter); }
.contact-info strong { color: var(--text-dark); }
.contact-info a { color: var(--primary-color); font-weight: bold; }
.contact-info a:hover { color: var(--accent-color-2); }
#contact .contact-form-box p.content { color: var(--text-dark-lighter); text-shadow: none; } /* Ensure form intro text is readable */

/* 10. Footer */
.footer {
    background-color: var(--text-dark);
    color: rgba(255,255,255,0.8); /* Slightly softer white for text */
    padding: 4rem 1.5rem 2rem;
    margin-top: auto; /* Push footer to bottom if content is short */
}
.footer .footer-title {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 1.25rem;
}
.footer p {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.7); /* Footer text slightly dimmer */
}
.footer .column:first-child p { /* Description text */
    color: rgba(255,255,255,0.8);
}
.footer a {
    color: var(--accent-color-1);
    font-weight: 500;
}
.footer a:hover {
    color: var(--text-light);
}
.footer .social-links p { margin-bottom: 0.5rem; }
.footer hr {
    background-color: rgba(255,255,255,0.2);
    height: 1px;
    margin: 2rem 0;
    border: none;
}
.footer .content p { /* Copyright text */
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
}
.footer .content p:last-child { margin-bottom: 0; }

/* 11. Animation & Utility Classes */
.fade-in, .slide-up { /* Base for JS controlled animations */
    opacity: 0;
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.is-visible.fade-in {
    opacity: 1;
    transform: translateY(0) !important; /* Ensure transform is reset */
}
.is-visible.slide-up {
    opacity: 1;
    transform: translateY(0) !important;
}
/* Initial states (JS will remove .is-visible, CSS applies these) */
.fade-in { transform: translateY(20px); }
.slide-up { transform: translateY(40px); }

/* Delay classes for staggered animations (add .is-visible through JS) */
.delay-1 { transition-delay: 0.15s !important; }
.delay-2 { transition-delay: 0.3s !important; }
.delay-3 { transition-delay: 0.45s !important; }


/* Button Morph animation for .button-morph class */
.button-morph {
    position: relative;
    overflow: hidden;
    z-index: 1;
    /* Other transitions are on .button already */
}
.button-morph::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(var(--secondary-rgb), 0.3); /* Morph color - secondary, softer */
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease-in-out, height 0.4s ease-in-out;
    z-index: -1;
}
.button-morph:hover::before {
    width: 250%; /* Large enough to cover button */
    height: 250%;
}


/* 12. Specific Page Styles */
/* Success Page */
body.success-page { /* Applied to body tag on success.html */
    /* min-height, display, align, justify, bg already set for body */
    /* Ensure these styles are specifically for success.html's body */
    background-color: var(--background-medium);
}
.success-page .main-container { /* Ensure main-container centers content */
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1; /* Takes up space to center vertically */
}
.success-container { /* The box with success message */
    background-color: var(--text-light);
    padding: 2.5rem 3rem;
    border-radius: var(--bulma-card-radius);
    box-shadow: 0 12px 35px rgba(42, 61, 69, 0.12);
    max-width: 600px;
    width: 100%;
    text-align: center;
}
/* If using FontAwesome, this would be for an icon */
/* .success-container .icon.is-large { margin-bottom: 1.5rem; } */
/* .success-container .icon.is-large .fa-check-circle { font-size: 4rem; color: var(--secondary-color); } */
.success-container h1 {
    color: var(--secondary-color);
    font-size: 2.2rem;
    margin-bottom: 1rem;
}
.success-container p {
    color: var(--text-dark-lighter);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Privacy & Terms Pages */
body.privacy-page .main-container > section:first-of-type,
body.terms-page .main-container > section:first-of-type {
    padding-top: calc(4.5rem + 40px); /* header height + desired top margin */
    padding-bottom: 40px;
}
body.privacy-page .main-container > section:first-of-type .title:first-child,
body.terms-page .main-container > section:first-of-type .title:first-child { /* Main page title */
    font-size: 2.8rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 2rem;
}

/* 13. Responsive Adjustments */
@media screen and (max-width: 1023px) { /* Tablet and below */
    .navbar-menu.is-active {
        position: absolute;
        width: 100%;
        left: 0;
        right: 0;
        top: 100%; /* Position below navbar */
    }
}

@media screen and (max-width: 768px) { /* Mobile */
    .section {
        padding: var(--section-padding-mobile);
    }
    .section-title {
        font-size: 2.2rem;
        margin-bottom: 2rem;
    }
    .hero.is-large .hero-body {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }
    .hero-title {
        font-size: 2.6rem;
    }
    .hero-subtitle {
        font-size: 1.3rem;
    }
    /* Ensure columns stack properly and have spacing */
    .columns.is-multiline .column { 
        margin-bottom: 1.5rem;
    }
    .columns.is-multiline .column:last-child {
        margin-bottom: 0; /* Or handle by parent padding */
    }
    .card-section .column { /* For sections primarily made of cards */
         margin-bottom: 1.5rem; /* Spacing between stacked cards */
    }
    .card-section .column:last-child {
        margin-bottom: 0;
    }

    .footer {
        text-align: center;
        padding: 3rem 1rem 1.5rem;
    }
    .footer .columns > .column {
        margin-bottom: 2rem;
    }
     body.privacy-page .main-container > section:first-of-type,
     body.terms-page .main-container > section:first-of-type {
        padding-top: calc(4.5rem + 20px);
    }
     body.privacy-page .main-container > section:first-of-type .title:first-child,
     body.terms-page .main-container > section:first-of-type .title:first-child {
        font-size: 2.2rem;
    }
    .content h1 { font-size: 2rem; }
    .content h2 { font-size: 1.75rem; }
    .success-container {
        padding: 2rem 1.5rem;
    }
    .success-container h1 { font-size: 1.8rem; }
    .success-container p { font-size: 1rem; }
}

/* 'Read more' style for text links */
.read-more-link {
    color: var(--primary-color);
    font-weight: bold;
    text-decoration: none;
    display: inline-flex; /* Align icon with text */
    align-items: center;
    position: relative;
}
.read-more-link::after {
    content: '→';
    margin-left: 0.4em;
    transition: transform 0.3s ease;
}
.read-more-link:hover {
    color: var(--accent-color-2);
}
.read-more-link:hover::after {
    transform: translateX(4px);
}

#cookie-popup {
    /* Inline styles are primary, this is for overrides or structure */
    box-shadow: 0 -3px 10px rgba(0,0,0,0.1);
}
#cookie-popup p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.9);
}
#cookie-popup p a {
    /* color: var(--secondary-color); Set by inline style */
    font-weight: bold;
}
#accept-cookie {
    /* background-color: var(--primary-color); Set by inline style */
    /* color: var(--text-light); */
    font-weight: bold;
}