/* 1. ROOT VARIABLES & GLOBAL STYLES
-------------------------------------------------- */
:root {
    /* Analogous Color Scheme */
    --primary-color: hsl(195, 85%, 45%); /* Bright Cyan/Blue */
    --secondary-color: hsl(270, 80%, 60%); /* Vibrant Violet */
    --accent-color: hsl(160, 70%, 40%); /* Teal Green */
    
    --background-light: hsl(210, 20%, 98%);
    --background-dark: hsl(210, 30%, 15%);
    --text-light: hsl(0, 0%, 100%);
    --text-dark: hsl(210, 30%, 20%);
    --border-color: hsl(210, 20%, 85%);

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

    /* Neo-Brutalism Elements */
    --brutalist-border: 2px solid var(--text-dark);
    --brutalist-shadow: 4px 4px 0px var(--text-dark);
    --brutalist-shadow-light: 6px 6px 0px hsla(210, 30%, 20%, 0.1);

    /* Transitions */
    --transition-fast: all 0.2s ease-in-out;
}

html {
    scroll-behavior: smooth;
    background-color: var(--background-light);
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--background-light);
    line-height: 1.7;
    font-size: 16px;
    overflow-x: hidden;
}

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

.section-title {
    margin-bottom: 3rem !important;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
}

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

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

/* 3. LAYOUT & HELPERS
-------------------------------------------------- */
.section {
    padding: 4rem 1.5rem;
}

.main-container {
    opacity: 1; /* Initial state for script.js fade-in */
}

.h-100 {
    height: 100%;
}

/* 4. COMPONENTS (GLOBAL)
-------------------------------------------------- */

/* Neo-Brutalism Buttons */
.button.brutalist-button {
    font-family: var(--font-heading);
    border: var(--brutalist-border);
    box-shadow: var(--brutalist-shadow);
    transition: var(--transition-fast);
    font-weight: 700;
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.button.brutalist-button:hover,
.button.brutalist-button:focus {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px var(--text-dark);
}

.button.brutalist-button:active {
    transform: translate(4px, 4px);
    box-shadow: none;
}

/* Neo-Brutalism Cards */
.card.brutalist-card {
    border: var(--brutalist-border);
    box-shadow: var(--brutalist-shadow-light);
    border-radius: 0;
    transition: var(--transition-fast);
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Ensures content respects borders */
}

.card.brutalist-card:hover {
    transform: translateY(-8px);
    box-shadow: 12px 12px 0px hsla(210, 30%, 20%, 0.15);
}

.card.brutalist-card .card-content {
    flex-grow: 1;
}

/* Center images in cards */
.card .card-image {
    width: 100%;
    text-align: center;
}

.card .card-image img {
    width: 100%;
    height: 100%; /* Bulma sets this to auto, we need to control it */
    object-fit: cover; /* Ensures image covers the area without distortion */
}

/* Neo-Brutalism Inputs & Forms */
.input.brutalist-input,
.textarea.brutalist-input {
    border: var(--brutalist-border);
    border-radius: 0;
    box-shadow: none;
    transition: var(--transition-fast);
}

.input.brutalist-input:focus,
.textarea.brutalist-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px hsla(195, 85%, 45%, 0.25);
    outline: none;
}

/* 5. HEADER & NAVIGATION
-------------------------------------------------- */
.header.is-fixed-top .navbar {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar-item.logo {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.5rem;
}

.navbar-item, .navbar-link {
    font-family: var(--font-heading);
    font-weight: 700;
    transition: var(--transition-fast);
}

.navbar-item:hover {
    color: var(--primary-color);
    background-color: transparent !important;
}

.navbar-burger {
    color: var(--text-dark);
}

/* Responsive navigation */
@media screen and (max-width: 1023px) {
    .navbar-menu {
        background-color: var(--text-light);
        box-shadow: 0 8px 16px rgba(10, 10, 10, 0.1);
        padding: 0.5rem 0;
    }
}

/* 6. HERO SECTION
-------------------------------------------------- */
#hero {
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;
    color: var(--text-light);
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(10, 20, 40, 0.7), rgba(40, 10, 30, 0.6));
    z-index: 1;
}

#hero .hero-body {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

#hero .title, #hero .subtitle {
    color: var(--text-light) !important;
}

/* 7. TEAM SECTION
-------------------------------------------------- */
#expertos .card {
    text-align: center;
}

#expertos .is-rounded {
    border: 4px solid var(--border-color);
    padding: 5px;
}

/* 8. SUCCESS STORIES (TIMELINE)
-------------------------------------------------- */
.timeline .timeline-item .timeline-content {
    background: var(--background-light);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
}

.timeline .timeline-marker.is-image img {
    filter: invert(39%) sepia(85%) saturate(2320%) hue-rotate(170deg) brightness(95%) contrast(96%);
}

/* 9. NEWS (SLIDER)
-------------------------------------------------- */
.custom-slider-container {
    position: relative;
}

.custom-slider {
    display: flex;
    overflow-x: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.custom-slider .slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    padding: 0 1rem;
}

.slider-nav {
    text-align: center;
    margin-top: 1.5rem;
}

.slider-nav button {
    background-color: var(--primary-color);
    color: var(--text-light);
    border: none;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    cursor: pointer;
    margin: 0 0.5rem;
    transition: var(--transition-fast);
}

.slider-nav button:hover {
    background-color: var(--secondary-color);
}

@media screen and (min-width: 769px) {
    .custom-slider .slide {
        flex: 0 0 50%;
    }
}

@media screen and (min-width: 1024px) {
    .custom-slider .slide {
        flex: 0 0 33.333%;
    }
}

/* 10. EXTERNAL RESOURCES
-------------------------------------------------- */
#recursos .resource-list .resource-item {
    padding: 1.5rem;
    border: var(--brutalist-border);
    margin-bottom: 1.5rem;
    transition: var(--transition-fast);
}
#recursos .resource-list .resource-item:hover {
    background-color: hsl(195, 85%, 95%);
    border-color: var(--primary-color);
}
#recursos .resource-list .resource-item h3 a {
    font-weight: 700;
}

/* 11. FOOTER
-------------------------------------------------- */
.footer {
    background-color: var(--text-dark);
    color: var(--background-light);
    padding: 3rem 1.5rem 3rem;
}

.footer .title {
    color: var(--text-light);
}

.footer a {
    color: var(--border-color);
}

.footer a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

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

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

/* 12. SPECIFIC PAGE STYLES
-------------------------------------------------- */
/* success.html container */
.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);
}

/* privacy.html & terms.html content */
.static-page-content {
    padding-top: 10rem;
    padding-bottom: 4rem;
}

.static-page-content .content h2 {
    margin-top: 2rem;
}

/* 13. RESPONSIVE DESIGN
-------------------------------------------------- */
@media screen and (max-width: 768px) {
    .section {
        padding: 3rem 1rem;
    }

    .section-title {
        margin-bottom: 2rem !important;
        font-size: 1.8rem;
    }

    .hero.is-fullheight .hero-body {
        padding: 2rem;
    }

    #hero .title {
        font-size: 2.5rem;
    }

    #hero .subtitle {
        font-size: 1.25rem;
    }
    
    .timeline.is-centered::before {
        left: 15px;
    }

    .timeline.is-centered .timeline-item,
    .timeline.is-centered .timeline-header {
        margin-left: 38px; /* Adjust for marker position */
    }

    .timeline.is-centered .timeline-item .timeline-marker {
        left: -23px; /* Adjust marker position */
    }

}