/* ==========================================================================
   1. ROOT & GENERAL STYLES
   ========================================================================== */
:root {
    /* Color Palette (Triadic Inspired) */
    --primary-color: #0066b2; /* YPF Corporate Blue */
    --primary-dark-color: #004a80; /* Darker Blue for hovers/accents */
    --accent-color-gold: #ffc425; /* Energetic Gold */
    --accent-color-green: #009B77; /* Sustainability Green */

    /* Neutral Colors */
    --text-dark: #222222;
    --text-light: #f4f4f9;
    --background-dark: #1a1a1a;
    --background-light: #ffffff;
    --border-color: #e0e0e0;
    
    /* Typography */
    --font-header: 'Roboto', sans-serif;
    --font-body: 'Lato', sans-serif;

    /* Spacing & Borders */
    --section-padding: 6rem 2rem;
    --card-padding: 1.5rem;
    --border-radius: 8px;
}

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

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

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-header);
    font-weight: 900;
    color: var(--text-dark);
    line-height: 1.2;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

h1 { font-size: 3.5rem; margin-bottom: 1rem; }
h2 { font-size: 2.5rem; margin-bottom: 2.5rem; text-align: center; }
h3 { font-size: 1.75rem; margin-bottom: 1rem; }
h4 { font-size: 1.25rem; margin-bottom: 0.5rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

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

ul {
    list-style: none;
}

.main-container {
    width: 100%;
    margin: 0 auto;
}

.content-section, .content-section-dark {
    padding: var(--section-padding);
}

.content-section-dark {
    background-color: var(--background-dark);
    color: var(--text-light);
}

.content-section-dark h2, .content-section-dark h3 {
    color: var(--text-light);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* ==========================================================================
   2. HEADER & NAVIGATION
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(10px);
    transition: background-color 0.3s ease;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.nav-logo img {
    height: 40px;
    width: auto;
}

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

.nav-link {
    font-family: var(--font-header);
    font-weight: 700;
    color: var(--text-light);
    text-decoration: none;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--accent-color-gold);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

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

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

/* ==========================================================================
   3. HERO SECTION
   ========================================================================== */
.hero-section {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100vh;
    color: #FFFFFF; /* IMPORTANT: White text for readability */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.hero-content {
    max-width: 800px;
    padding: 0 2rem;
    z-index: 2;
}

.hero-title, .hero-subtitle {
    color: #FFFFFF; /* IMPORTANT: White text for readability */
}

/* ==========================================================================
   4. GLOBAL COMPONENTS (Buttons, Cards)
   ========================================================================== */
/* Global Button Style */
.cta-button, button[type="submit"] {
    display: inline-block;
    background: var(--primary-color);
    color: var(--text-light);
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-family: var(--font-header);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.cta-button:hover, button[type="submit"]:hover {
    background: var(--primary-dark-color);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-3px);
    color: white;
    text-decoration: none;
}

/* Global Card Style */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background: var(--background-light);
    border-radius: var(--border-radius);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; /* STRICTLY */
    flex-direction: column; /* STRICTLY */
    align-items: center; /* STRICTLY */
    text-align: center; /* STRICTLY */
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.card-image {
    width: 100%;
    height: 220px; /* STRICTLY */
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* STRICTLY */
    transition: transform 0.4s ease;
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: var(--card-padding);
}

/* ==========================================================================
   5. SECTION-SPECIFIC STYLES
   ========================================================================== */

/* --- Sustainability Section --- */
.parallax-section {
    position: relative;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.two-columns-container {
    display: flex;
    align-items: center;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

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

.column.image-column {
    flex: 1;
}

.image-column img {
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* --- Events Calendar Section --- */
.event-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: #f9f9f9;
    border-left: 5px solid var(--accent-color-gold);
}

.event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 1rem;
    border-radius: var(--border-radius);
    font-weight: 700;
}

.event-date .month {
    font-size: 0.9rem;
    text-transform: uppercase;
}

.event-date .day {
    font-size: 2rem;
    line-height: 1;
}

/* --- Innovation Section --- */
.content-section-dark.innovation-section {
    position: relative;
    overflow: hidden;
}

.parallax-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    z-index: 0;
}

.content-overlay {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

/* --- External Resources Section --- */
.resources-container {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    gap: 1.5rem;
}

.resource-item {
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.resource-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 102, 178, 0.1);
}

.resource-title {
    font-family: var(--font-header);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.resource-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0;
}

/* --- Contact Form Section --- */
.contact-form-container {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.contact-form {
    margin-top: 2rem;
    text-align: left;
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: #f9f9f9;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 178, 0.2);
}

.contact-form label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: #999;
    pointer-events: none;
    transition: all 0.3s ease;
}

.contact-form input:focus + label,
.contact-form textarea:focus + label,
.contact-form input:not(:placeholder-shown) + label,
.contact-form textarea:not(:placeholder-shown) + label {
    top: -0.75rem;
    left: 0.75rem;
    font-size: 0.8rem;
    color: var(--primary-color);
    background-color: var(--background-light);
    padding: 0 0.25rem;
}

.form-button {
    width: 100%;
}

/* ==========================================================================
   6. FOOTER
   ========================================================================== */
.footer {
    background-color: var(--background-dark);
    color: var(--text-light);
    padding: 4rem 2rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.footer-column h4 {
    color: var(--text-light);
    font-family: var(--font-header);
    margin-bottom: 1.5rem;
    position: relative;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 40px;
    height: 3px;
    background-color: var(--accent-color-gold);
}

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

.footer-column ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-column ul li a:hover {
    color: var(--text-light);
    padding-left: 5px;
    text-decoration: none;
}

.footer-logo {
    margin-bottom: 1rem;
}

.footer-column p {
    font-size: 0.9rem;
    color: #aaa;
}

/* ==========================================================================
   7. OTHER PAGES (SUCCESS, PRIVACY, TERMS)
   ========================================================================== */
.success-page, .static-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 100vh;
    padding: 4rem 2rem;
    background-color: var(--background-dark);
}

.success-content, .static-content {
    max-width: 800px;
    padding: 3rem;
    background: var(--background-light);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.static-page {
    background-color: var(--background-light);
    min-height: auto;
    align-items: flex-start;
    text-align: left;
    padding-top: 100px; /* IMPORTANT: Prevent overlap with header */
}

/* ==========================================================================
   8. ANIMATIONS & RESPONSIVENESS
   ========================================================================== */
/* ScrollReveal Animation */
.reveal {
    visibility: hidden;
}

/* Responsive Design */
@media (max-width: 992px) {
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2rem; }

    .two-columns-container {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px; /* Adjust to header height */
        flex-direction: column;
        background-color: var(--background-dark);
        width: 100%;
        height: calc(100vh - 70px);
        text-align: center;
        transition: 0.3s;
        gap: 0;
    }

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

    .nav-item {
        padding: 1.5rem 0;
        border-bottom: 1px solid #444;
    }
    
    .nav-link:hover::after {
        width: 0;
    }

    .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);
    }
}

@media (max-width: 576px) {
    :root {
        --section-padding: 4rem 1rem;
    }
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    
    .cta-button, button[type="submit"] {
        padding: 0.8rem 2rem;
        font-size: 0.9rem;
    }
}