/* ==========================================================================
   1. ROOT VARIABLES
   ========================================================================== */

:root {
    /* Pastel Color Palette */
    --bg-color: #E6E7ED;
    --primary-color: #007A33; /* YPF Green */
    --accent-color: #00A3E0;  /* YPF Blue */
    --text-color: #3D405B;
    --heading-color: #2c2e42;
    --white-color: #FFFFFF;
    --light-gray: #f4f5f7;

    /* Neumorphism Shadows */
    --light-shadow: rgba(255, 255, 255, 0.9);
    --dark-shadow: #A3B1C6;
    --neumorphic-shadow: 8px 8px 16px var(--dark-shadow), -8px -8px 16px var(--light-shadow);
    --neumorphic-shadow-inset: inset 6px 6px 12px var(--dark-shadow), inset -6px -6px 12px var(--light-shadow);
    
    /* Typography */
    --font-primary: 'Roboto', sans-serif;
    --font-secondary: 'Lato', sans-serif;

    /* Sizing & Spacing */
    --header-height: 80px;
    --border-radius: 20px;
    --transition-speed: 0.3s;
}


/* ==========================================================================
   2. GENERAL & RESET STYLES
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-secondary);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--accent-color);
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--primary-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    color: var(--heading-color);
    font-weight: 700;
    line-height: 1.3;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}


/* ==========================================================================
   3. UTILITY CLASSES
   ========================================================================== */

.main-container {
    width: 100%;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--heading-color);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

.section-subtitle {
    text-align: center;
    max-width: 600px;
    margin: -2rem auto 3rem auto;
    font-size: 1.1rem;
}

.section-light-texture {
    background-color: var(--light-gray);
    box-shadow: var(--neumorphic-shadow-inset);
}

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

.section-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
}

/* For elements that will be animated on scroll */
.animate__animated {
    opacity: 0; /* Initially hidden */
}

.animate__animated.is-visible {
    opacity: 1; /* Made visible by JS */
}

/* Column structure */
.columns-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
}

.column {
    flex: 1 1 300px;
}

.column.is-two-thirds {
    flex: 2 1 600px;
}


/* ==========================================================================
   4. GLOBAL COMPONENT STYLES
   ========================================================================== */

/* Buttons */
.btn, button, input[type='submit'] {
    display: inline-block;
    padding: 15px 35px;
    border-radius: var(--border-radius);
    background-color: var(--bg-color);
    color: var(--primary-color);
    font-family: var(--font-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    box-shadow: var(--neumorphic-shadow);
    text-align: center;
}

.btn:hover, button:hover, input[type='submit']:hover {
    box-shadow: var(--neumorphic-shadow-inset);
    color: var(--accent-color);
}

.btn-primary {
    background: linear-gradient(145deg, var(--accent-color), var(--primary-color));
    color: var(--white-color);
    box-shadow: 5px 5px 10px #b5b5b5, -5px -5px 10px #ffffff;
}

.btn-primary:hover {
    color: var(--white-color);
    box-shadow: inset 5px 5px 10px #0082b9, inset -5px -5px 10px #00c4ff;
}

.btn-text {
    display: inline-block;
    margin-top: 1rem;
    color: var(--accent-color);
    font-weight: 700;
    position: relative;
}
.btn-text::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}
.btn-text:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Cards */
.card {
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--neumorphic-shadow);
    transition: all var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 12px 12px 24px var(--dark-shadow), -12px -12px 24px var(--light-shadow);
}

.card-image {
    width: 100%;
    height: 200px;
    border-radius: calc(var(--border-radius) / 2);
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: var(--neumorphic-shadow-inset);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Forms */
.contact-form {
    max-width: 700px;
    margin: 0 auto;
}
.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-input {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: var(--border-radius);
    background-color: var(--bg-color);
    box-shadow: var(--neumorphic-shadow-inset);
    color: var(--text-color);
    font-family: var(--font-secondary);
    font-size: 1rem;
    outline: none;
    transition: box-shadow var(--transition-speed) ease;
}

.form-input:focus {
    box-shadow: inset 3px 3px 6px var(--dark-shadow), inset -3px -3px 6px var(--light-shadow),
                2px 2px 4px var(--dark-shadow), -2px -2px 4px var(--light-shadow);
}

.form-label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: var(--text-color);
    opacity: 0.7;
    pointer-events: none;
    transition: all var(--transition-speed) ease;
}

.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label {
    top: -1.5rem;
    left: 0.5rem;
    font-size: 0.8rem;
    color: var(--primary-color);
    opacity: 1;
}

.btn-submit {
    width: 100%;
}


/* ==========================================================================
   5. HEADER & NAVIGATION
   ========================================================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    padding: 1rem 0;
    transition: all var(--transition-speed) ease;
}

.header.scrolled {
    background-color: var(--bg-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.nav-logo {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary-color);
}

.header.scrolled .nav-logo {
    color: var(--primary-color);
}

.header:not(.scrolled) .nav-logo,
.header:not(.scrolled) .nav-link {
    color: var(--white-color);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.header:not(.scrolled) .nav-link:hover {
    color: var(--accent-color);
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-weight: 700;
    font-family: var(--font-primary);
    transition: color var(--transition-speed) ease;
    color: var(--heading-color);
}

.nav-link:hover {
    color: var(--accent-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--primary-color);
}

.header:not(.scrolled) .bar {
    background-color: var(--white-color);
}


/* ==========================================================================
   6. SECTION STYLES
   ========================================================================== */

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white-color);
}

.hero-overlay {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.2) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: var(--white-color);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    font-weight: 400;
    color: var(--white-color);
}

/* Methodology / Our Process */
.process-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}
.process-step {
    text-align: center;
}
.process-icon-container {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-color);
    box-shadow: var(--neumorphic-shadow);
}
.process-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}
.process-title {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}
.progress-indicator-container {
    width: 100%;
    height: 10px;
    background-color: var(--bg-color);
    border-radius: 5px;
    margin-top: 1.5rem;
    box-shadow: var(--neumorphic-shadow-inset);
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    width: 0; /* Set by JS */
    border-radius: 5px;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
    transition: width 1s ease-in-out;
}

/* Gallery */
.gallery-container {
    display: grid;
    gap: 1.5rem;
}
.card.card-gallery {
    padding: 1rem;
}
.card.card-gallery .card-image {
    margin-bottom: 0;
    height: 250px;
}

/* Blog */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}
.blog-card .card-content {
    padding-top: 1rem;
}
.blog-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}
.blog-excerpt {
    font-size: 0.95rem;
}

/* External Links */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.link-card {
    display: block;
    text-align: left;
}
.link-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* FAQ */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}
.faq-item {
    margin-bottom: 1rem;
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--neumorphic-shadow);
    overflow: hidden;
}
.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--heading-color);
    display: block;
    position: relative;
}
.faq-question::-webkit-details-marker {
    display: none;
}
.faq-question::after {
    content: '+';
    position: absolute;
    right: 1.5rem;
    font-size: 1.5rem;
    transition: transform var(--transition-speed) ease;
}
.faq-item[open] .faq-question::after {
    transform: rotate(45deg);
}
.faq-answer {
    padding: 0 1.5rem 1.5rem 1.5rem;
    border-top: 1px solid var(--dark-shadow);
    margin-top: -0.5rem;
}

/* ==========================================================================
   7. FOOTER
   ========================================================================== */

.footer {
    background-color: #D1D9E6; /* Slightly darker than main bg */
    padding: 4rem 0 2rem 0;
    color: var(--text-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--heading-color);
}

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

.footer-links a {
    color: var(--text-color);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--dark-shadow);
    font-size: 0.9rem;
}


/* ==========================================================================
   8. SPECIFIC PAGE STYLES
   ========================================================================== */

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

/* Privacy & Terms Pages */
.legal-page-content {
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 4rem;
}
.legal-page-content h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
}
.legal-page-content h2 {
    font-size: 2rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}


/* ==========================================================================
   9. MEDIA QUERIES
   ========================================================================== */

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: var(--header-height);
        flex-direction: column;
        background-color: var(--bg-color);
        width: 100%;
        height: calc(100vh - var(--header-height));
        text-align: center;
        transition: 0.3s;
        gap: 2.5rem;
        padding-top: 3rem;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        color: var(--heading-color);
        font-size: 1.5rem;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-title {
        font-size: 3rem;
    }
    .hero-subtitle {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .columns-container {
        flex-direction: column;
    }
}