/* style.css */

/* -------------------------------------------------------------------------- */
/*                               Root Variables                               */
/* -------------------------------------------------------------------------- */
:root {
    --primary-color: #0D6EFD; /* Vibrant Blue */
    --primary-color-darker: #0a58ca;
    --primary-color-volumetric-shadow1: rgba(13, 110, 253, 0.4);
    --primary-color-volumetric-shadow2: rgba(13, 110, 253, 0.3);

    --secondary-color: #FFC107; /* Bright Yellow */
    --secondary-color-darker: #d39e00;

    --accent-color: #198754; /* Green */
    --accent-color-darker: #146c43;
    
    --danger-color: #DC3545; /* Red */

    --text-color-dark: #212529; /* Very Dark Gray/Black */
    --text-color-medium: #495057; /* Medium Gray */
    --text-color-light: #FFFFFF;
    --text-color-muted: #6c757d; /* Muted Gray */

    --background-light: #F8F9FA; /* Light Gray */
    --background-white: #FFFFFF;
    --background-dark: #212529; /* Dark Gray for footer */
    --background-overlay: rgba(0, 0, 0, 0.5); /* Overlay for images with text */

    --font-headings: 'Oswald', sans-serif;
    --font-body: 'Nunito', sans-serif;

    --border-radius-small: 0.25rem; /* 4px */
    --border-radius-medium: 0.5rem; /* 8px */
    --border-radius-large: 0.75rem; /* 12px */

    --shadow-volumetric: 
        0 4px 8px rgba(0, 0, 0, 0.1), 
        0 6px 20px rgba(0, 0, 0, 0.1);
    --shadow-volumetric-hover:
        0 8px 16px rgba(0, 0, 0, 0.15), 
        0 12px 40px rgba(0, 0, 0, 0.15);
    --shadow-volumetric-button: 
        0 2px 3px var(--primary-color-volumetric-shadow1),
        0 4px 8px var(--primary-color-volumetric-shadow2),
        inset 0 -2px 1px rgba(255,255,255,0.3), /* Inner highlight for top edge */
        inset 0 2px 3px rgba(0,0,0,0.1); /* Inner shadow for bottom edge */
    --shadow-volumetric-button-active:
        0 1px 2px var(--primary-color-volumetric-shadow2),
        inset 0 1px 2px rgba(0,0,0,0.2),
        inset 0 -1px 1px rgba(255,255,255,0.2);

    --transition-smooth: all 0.3s ease-in-out;
    --header-height: 60px; /* Adjust as needed */
}

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

body {
    font-family: var(--font-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 */
    position: relative; /* For Barba.js */
}

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

.title {
    color: var(--text-color-dark); /* Bulma override for consistency */
}
.subtitle {
    color: var(--text-color-medium); /* Bulma override for consistency */
}

h1.title, .is-1 { font-size: 3rem; margin-bottom: 1rem; }
h2.title, .is-2 { font-size: 2.5rem; margin-bottom: 0.75rem; }
h3.title, .is-3 { font-size: 2rem; margin-bottom: 0.5rem; }
h4.title, .is-4 { font-size: 1.5rem; margin-bottom: 0.25rem; }

p {
    font-family: var(--font-body);
    margin-bottom: 1rem;
    color: var(--text-color-medium);
}

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

a:hover {
    color: var(--primary-color-darker);
    text-decoration: underline;
}

.section {
    padding: 4rem 1.5rem; /* Natural height based on content */
}

.section-title {
    margin-bottom: 1rem;
    font-weight: 700;
    color: #222222 !important; /* Ensure dark title color */
    position: relative;
    padding-bottom: 0.5rem;
}
.section-title::after { /* Subtle underline for section titles */
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 0.5rem auto 0;
}

.section-subtitle {
    margin-bottom: 3rem !important; /* Bulma override */
    color: var(--text-color-medium) !important;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* -------------------------------------------------------------------------- */
/*                                  Buttons                                   */
/* -------------------------------------------------------------------------- */
.button, button, input[type="submit"], input[type="button"] {
    font-family: var(--font-body);
    font-weight: 600;
    border-radius: var(--border-radius-medium) !important; /* Bulma override */
    transition: var(--transition-smooth) !important;
    padding: 0.75em 1.5em !important; /* Bulma override for better padding */
    border: 1px solid transparent;
    cursor: pointer;
}

.button.is-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: var(--text-color-light) !important;
}
.button.is-primary:hover {
    background-color: var(--primary-color-darker) !important;
    border-color: var(--primary-color-darker) !important;
}

.button.is-link.is-outlined { /* For press section links */
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    background-color: transparent !important;
}
.button.is-link.is-outlined:hover {
    color: var(--text-color-light) !important;
    background-color: var(--primary-color) !important;
}

/* Volumetric Button Style */
.volumetric-button {
    box-shadow: var(--shadow-volumetric-button);
    text-shadow: 0 1px 1px rgba(0,0,0,0.2); /* Subtle text shadow for depth */
    position: relative; /* For transform */
    transform: translateY(0);
}

.volumetric-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px var(--primary-color-volumetric-shadow1),
                0 8px 15px var(--primary-color-volumetric-shadow2),
                inset 0 -2px 1px rgba(255,255,255,0.35),
                inset 0 2px 3px rgba(0,0,0,0.1);
}

.volumetric-button:active, .volumetric-button.is-active {
    transform: translateY(1px);
    box-shadow: var(--shadow-volumetric-button-active);
}

/* -------------------------------------------------------------------------- */
/*                                    Cards                                   */
/* -------------------------------------------------------------------------- */
.card { /* Bulma's .card base is fine, we add volumetric */
    background-color: var(--background-white);
    border-radius: var(--border-radius-large) !important; /* More rounded for volumetric */
    box-shadow: var(--shadow-volumetric) !important;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensure cards in a row have same height if needed by Bulma columns */
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-volumetric-hover) !important;
}

.card .card-image { /* For Bulma structure */
    border-top-left-radius: var(--border-radius-large);
    border-top-right-radius: var(--border-radius-large);
    overflow: hidden; /* Ensures image respects border radius */
    padding: 0; /* Remove Bulma padding */
}

.card .image-container { /* Custom container for direct img children */
    width: 100%;
    position: relative;
    overflow: hidden;
}

.card .image-container img, .card .card-image img {
    width: 100%;
    height: 100%; /* Will be controlled by aspect ratio or fixed height */
    object-fit: cover;
    display: block;
}
/* Specific aspect ratio for service cards */
.card#digital-start .image-container,
.card#estrategia-online .image-container,
.card#marketing-soporte .image-container {
    height: 200px; /* Fixed height for service card images */
}

.card .card-content {
    padding: 1.5rem; /* More padding */
    text-align: left; /* Default for content */
    flex-grow: 1; /* Allows footer of card to align */
    display: flex;
    flex-direction: column;
}
.card .card-content .title, .card .card-content .subtitle {
    color: var(--text-color-dark) !important;
}
.card .card-content .content {
    font-family: var(--font-body);
    color: var(--text-color-medium);
    font-size: 0.95rem;
    flex-grow: 1;
}
.card .card-content .button {
    margin-top: auto; /* Pushes button to bottom of card content */
}

/* Award Card Specifics */
.award-card .card-image {
    padding: 1rem; /* Padding around the award image */
    background-color: var(--background-light);
}
.award-card .image-container {
    width: 150px; /* Fixed size for award icons */
    height: 150px;
    margin: 0 auto; /* Center the image container */
    border-radius: 50%; /* Circular award image */
}
.award-card .card-content {
    text-align: center;
}

/* Resource Card Specifics */
.resource-card .card-content {
    text-align: left;
}
.resource-card .title a {
    color: var(--primary-color);
    font-size: 1.1rem;
}
.resource-card .title a:hover {
    color: var(--primary-color-darker);
}


/* -------------------------------------------------------------------------- */
/*                                   Header                                   */
/* -------------------------------------------------------------------------- */
.header.is-fixed-top {
    background-color: transparent; /* Initial transparent background */
    box-shadow: none;
    transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    height: var(--header-height);
}

.header.is-fixed-top.scrolled {
    background-color: rgba(255, 255, 255, 0.95); /* Slightly transparent white */
    backdrop-filter: blur(10px); /* Glassmorphism effect */
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-item, .navbar-link {
    font-family: var(--font-body);
    font-weight: 600;
    /* color: var(--text-color-light); Initial text color for transparent header */
    transition: var(--transition-smooth);
}
.scrolled .navbar-item, .scrolled .navbar-link {
    color: var(--text-color-dark) !important; /* Text color on scrolled header */
}
.scrolled .navbar-link::after { /* Arrow for dropdown */
    border-color: var(--text-color-dark) !important;
}


.navbar-item:hover, .navbar-link:hover {
    background-color: transparent !important; /* Bulma override */
    color: var(--primary-color) !important;
}
.scrolled .navbar-item:hover, .scrolled .navbar-link:hover {
    color: var(--primary-color) !important;
}


.logo-text {
    font-family: var(--font-headings);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color) !important; /* Always primary color */
}
.scrolled .logo-text {
     color: var(--primary-color) !important; /* Stays primary */
}

.navbar-burger {
    color: var(--text-color-light); /* Initial burger color */
}
.scrolled .navbar-burger {
    color: var(--text-color-dark) !important; /* Burger color on scroll */
}
.navbar-burger span {
    background-color: currentColor !important; /* Use the burger's color */
    height: 2px; /* Thinner lines */
}

.navbar-menu {
    background-color: transparent;
}
.scrolled .navbar-menu {
    background-color: transparent; /* It's part of the scrolled header */
}

/* Mobile Menu */
@media screen and (max-width: 1023px) {
    .navbar-menu {
        background-color: var(--background-white) !important; /* Solid background for mobile menu */
        box-shadow: 0 8px 16px rgba(0,0,0,0.1);
        padding: 0.5rem 0;
    }
    .navbar-menu.is-active .navbar-item,
    .navbar-menu.is-active .navbar-link {
        color: var(--text-color-dark) !important; /* Dark text in mobile menu */
    }
     .navbar-menu.is-active .navbar-link::after {
        border-color: var(--text-color-dark) !important;
    }
    .navbar-menu.is-active .navbar-item:hover,
    .navbar-menu.is-active .navbar-link:hover {
        background-color: var(--background-light) !important;
        color: var(--primary-color) !important;
    }
    .header.is-fixed-top { /* Ensure header has background on mobile immediately if menu might be open */
         background-color: rgba(255, 255, 255, 0.95);
         box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    .header.is-fixed-top .navbar-item, .header.is-fixed-top .navbar-link {
        color: var(--text-color-dark) !important;
    }
     .header.is-fixed-top .navbar-link::after {
        border-color: var(--text-color-dark) !important;
    }
    .header.is-fixed-top .navbar-burger {
         color: var(--text-color-dark) !important;
    }
}

.navbar-dropdown {
    background-color: var(--background-white) !important;
    border-radius: var(--border-radius-medium) !important;
    box-shadow: var(--shadow-volumetric) !important;
    border-top: 2px solid var(--primary-color);
}
.navbar-dropdown .navbar-item {
    color: var(--text-color-dark) !important;
    font-size: 0.95rem;
}
.navbar-dropdown .navbar-item:hover {
    background-color: var(--background-light) !important;
    color: var(--primary-color) !important;
}

/* -------------------------------------------------------------------------- */
/*                                Hero Section                                */
/* -------------------------------------------------------------------------- */
#hero {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative; /* For parallax or pseudo-elements if needed */
}
#hero .hero-body {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}
#hero .hero-title {
    font-size: 3.5rem; /* Larger for hero */
    font-weight: 700;
    color: var(--text-color-light) !important; /* Strictly white */
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5); /* Text shadow for readability */
}
#hero .hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-color-light) !important; /* Strictly white */
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
    max-width: 700px;
    margin: 1rem auto 2rem auto;
}
#hero .button {
    font-size: 1.1rem;
    padding: 1em 2.5em !important;
}
#hero .hero-foot .icon {
    transition: transform 0.3s ease-in-out;
}
#hero .hero-foot .icon:hover {
    transform: translateY(5px);
}


/* -------------------------------------------------------------------------- */
/*                         Vision, History, Community                         */
/* -------------------------------------------------------------------------- */
#vision .content, #history .content, #community .content {
    font-size: 1.1rem;
    color: var(--text-color-dark);
}
#vision p, #history p, #community p {
    color: var(--text-color-dark); /* Override default p color for these sections */
}
#vision img, #history img, #community img {
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-volumetric);
    margin-top: 2rem;
}

/* -------------------------------------------------------------------------- */
/*                                Press Section                               */
/* -------------------------------------------------------------------------- */
.press-card .card-content {
    text-align: left;
}
.press-card .title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}
.press-card .subtitle { /* Publication name and date */
    font-size: 0.9rem;
    color: var(--text-color-muted) !important;
    margin-bottom: 1rem;
}
.press-card .button.is-link.is-outlined {
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* -------------------------------------------------------------------------- */
/*                                 FAQ Section                                */
/* -------------------------------------------------------------------------- */
.faq-item {
    margin-bottom: 1rem;
    border: 1px solid var(--neutral-medium);
    border-radius: var(--border-radius-medium);
    overflow: hidden; /* Ensures children respect border radius */
}
.faq-question {
    background-color: var(--background-white);
    color: var(--text-color-dark) !important;
    font-weight: 600;
    text-align: left;
    padding: 1rem 1.5rem !important;
    border: none !important;
    border-radius: 0 !important; /* Remove button default radius */
    box-shadow: none !important; /* Remove button default shadow */
    width: 100%;
}
.faq-question:hover {
    background-color: var(--background-light) !important;
    color: var(--primary-color) !important;
}
.faq-question .icon {
    transition: transform 0.3s ease-in-out;
}
.faq-question.active .icon {
    transform: rotate(45deg);
}
.faq-answer {
    padding: 0 1.5rem; /* Initially no top/bottom padding */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, padding 0.5s ease-in-out;
    background-color: var(--background-light);
    color: var(--text-color-medium);
}
.faq-answer.active {
    padding: 1.5rem;
    /* max-height will be set by JS based on content, or a large enough value */
}
.faq-answer p {
    margin-bottom: 0; /* Remove default p margin inside answer */
    color: var(--text-color-medium);
}

/* -------------------------------------------------------------------------- */
/*                             Contact CTA Section                            */
/* -------------------------------------------------------------------------- */
.contact-cta-section {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 5rem 1.5rem;
}
.contact-cta-section .title, .contact-cta-section .subtitle {
    color: var(--text-color-light) !important;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
}
.contact-cta-section .subtitle {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* -------------------------------------------------------------------------- */
/*                                   Footer                                   */
/* -------------------------------------------------------------------------- */
.footer {
    background-color: var(--background-dark);
    color: var(--text-color-muted);
    padding: 3rem 1.5rem 2rem; /* Less bottom padding */
}
.footer .title.footer-title { /* Custom class for footer titles */
    color: var(--text-color-light) !important;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}
.footer p, .footer li {
    font-size: 0.95rem;
    color: var(--text-color-muted);
}
.footer a.footer-link { /* Custom class for footer links */
    color: var(--text-color-muted);
    transition: var(--transition-smooth);
}
.footer a.footer-link:hover {
    color: var(--primary-color);
    text-decoration: none;
}
.footer hr {
    background-color: #444; /* Darker hr for dark footer */
    height: 1px;
    margin: 2rem 0;
}
.footer .content p {
    color: var(--text-color-muted); /* For copyright text */
}
/* Social media text links styling (if needed, but they use .footer-link) */
/* .footer .social-links a { display: inline-block; margin: 0 0.5rem; } */

/* -------------------------------------------------------------------------- */
/*                            Page Specific Styles                            */
/* -------------------------------------------------------------------------- */
/* Privacy & Terms pages */
.privacy-content-page, .terms-content-page, .about-content-page, .contact-form-page {
    padding-top: calc(var(--header-height) + 40px); /* Space for fixed header + extra */
    padding-bottom: 4rem;
    background-color: var(--background-white);
    min-height: calc(100vh - var(--header-height) - 180px); /* Adjust 180px based on actual footer height */
}
.privacy-content-page .content h1, .terms-content-page .content h1,
.about-content-page .content h1, .contact-form-page .content h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-color-dark);
}
.privacy-content-page .content h2, .terms-content-page .content h2,
.about-content-page .content h2, .contact-form-page .content h2 {
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color-dark);
}
.privacy-content-page .content p, .terms-content-page .content p,
.about-content-page .content p, .contact-form-page .content p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-color-medium);
}

/* Success Page */
.success-page-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 2rem;
    background-color: var(--background-light);
}
.success-page-container .success-icon {
    font-size: 5rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}
.success-page-container .title {
    color: var(--text-color-dark);
    margin-bottom: 1rem;
}
.success-page-container .subtitle {
    color: var(--text-color-medium);
    margin-bottom: 2rem;
}

/* Contact Page Form */
.contact-form-page .field {
    margin-bottom: 1.5rem;
}
.contact-form-page .label {
    color: var(--text-color-dark);
    font-weight: 600;
}
.contact-form-page .input, .contact-form-page .textarea {
    border-radius: var(--border-radius-medium) !important;
    border: 1px solid var(--neutral-medium) !important;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.075) !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
    padding: 0.75em 1em !important;
}
.contact-form-page .input:focus, .contact-form-page .textarea:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(var(--primary-color), 0.25) !important; /* Use RGB if var not working here */
}
.contact-form-page .is-danger .input, .contact-form-page .is-danger .textarea {
    border-color: var(--danger-color) !important;
}
.contact-form-page .help.is-danger {
    color: var(--danger-color) !important;
    font-size: 0.9rem;
}
.contact-form-page .switch-field {
    margin-bottom: 1.5rem;
    align-items: center;
}
.contact-form-page .switch-field input[type="checkbox"] {
    height: 0;
    width: 0;
    visibility: hidden;
}
.contact-form-page .switch-field label {
    cursor: pointer;
    text-indent: -9999px;
    width: 50px;
    height: 28px;
    background: var(--neutral-medium);
    display: block;
    border-radius: 100px;
    position: relative;
    margin-left: 10px; /* Space from text */
}
.contact-form-page .switch-field label:after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 90px;
    transition: 0.3s;
}
.contact-form-page .switch-field input:checked + label {
    background: var(--accent-color);
}
.contact-form-page .switch-field input:checked + label:after {
    left: calc(100% - 3px);
    transform: translateX(-100%);
}


/* -------------------------------------------------------------------------- */
/*                        Animations & Transitions                            */
/* -------------------------------------------------------------------------- */
/* Barba.js Page Transition */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--primary-color);
    z-index: 9999;
    transform: translateY(-100%); /* Start off-screen */
    pointer-events: none;
}

/* Example: Fade in up animation for scroll */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.fade-in {
    opacity: 0;
}
.animate-on-scroll.fade-in.is-visible {
    opacity: 1;
}
.animate-on-scroll.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
}
.animate-on-scroll.fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Parallax background (JS will manipulate background-position) */
.parallax-background {
    background-attachment: fixed; /* Simple CSS parallax, JS can do better */
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* -------------------------------------------------------------------------- */
/*                               Media Queries                                */
/* -------------------------------------------------------------------------- */
@media screen and (max-width: 768px) {
    html {
        font-size: 15px;
    }
    .section {
        padding: 3rem 1rem;
    }
    h1.title, .is-1 { font-size: 2.5rem; }
    #hero .hero-title { font-size: 2.8rem; }
    #hero .hero-subtitle { font-size: 1.3rem; }

    .columns.is-multiline .column.is-one-third,
    .columns.is-multiline .column.is-one-quarter {
        width: 100% !important; /* Stack cards on mobile */
        margin-bottom: 2rem;
    }
     .columns.is-multiline .column.is-half {
        width: 100% !important;
        margin-bottom: 2rem;
    }
    .footer .columns {
        text-align: center;
    }
    .footer .column {
        margin-bottom: 2rem;
    }
}

@media screen and (min-width: 769px) and (max-width: 1023px) {
    .columns.is-multiline .column.is-one-third {
        width: 50% !important; /* Two cards per row on tablet */
    }
    .columns.is-multiline .column.is-one-quarter {
        width: 50% !important;
    }
}