/* ==========================================================================
   1. Global Styles & CSS Variables
   ========================================================================== */

:root {
    /* Color Palette (Tetradic Scheme + Neutrals) */
    --primary-color: #0077C8;   /* YPF Blue */
    --primary-color-dark: #005A9A;
    --secondary-color: #FFC72C; /* Vibrant Yellow */
    --accent-color-1: #4CAF50;    /* Green - Sustainability */
    --accent-color-2: #E53935;    /* Red - Strong CTAs/Alerts */

    /* Neutral & Text Colors */
    --dark-color: #222222;
    --text-color: #333333;
    --text-light: #FFFFFF;
    --light-bg-color: #F4F4F4;
    --border-color: #000000;

    /* Typography */
    --font-header: 'Oswald', sans-serif;
    --font-body: 'Nunito', sans-serif;

    /* Spacing */
    --spacing-unit: 1rem;
    --header-height: 80px;

    /* Brutalism Elements */
    --border-strong: 3px solid var(--border-color);
}

/* Base & Reset Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg-color);
    overflow-x: hidden;
}

/* Adaptive Typography */
h1, h2, h3, h4 {
    font-family: var(--font-header);
    font-weight: 700;
    text-transform: uppercase;
    color: var(--dark-color);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.5rem, 5vw + 1rem, 4.5rem); /* Scales from 2.5rem to 4.5rem */
}

h2 {
    font-size: clamp(2rem, 4vw + 1rem, 3.5rem);
}

h3 {
    font-size: clamp(1.4rem, 2vw + 1rem, 1.8rem);
}

p {
    margin-bottom: var(--spacing-unit);
}

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

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

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

/* Utility Classes */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section {
    padding: 4rem 0;
    text-align: center;
}

.section-title {
    margin-bottom: 2rem;
}

.section-subtitle {
    max-width: 700px;
    margin: -1rem auto 3rem auto;
    font-size: 1.2rem;
    color: #555;
}

.section-dark {
    background-color: var(--dark-color);
    color: var(--text-light);
}
.section-dark h2, .section-dark h3 {
    color: var(--text-light);
}
.section-dark p {
    color: #ccc;
}
.section-dark a {
    color: var(--secondary-color);
}

.section-highlight {
    background-color: #e0f7fa;
}

/* ==========================================================================
   2. Global Components (Buttons, Forms)
   ========================================================================== */
.button, button {
    display: inline-block;
    padding: 12px 28px;
    font-family: var(--font-header);
    font-size: 1.1rem;
    font-weight: 500;
    text-transform: uppercase;
    text-align: center;
    cursor: pointer;
    border: var(--border-strong);
    transition: all 0.3s ease;
    background-color: transparent;
    color: var(--dark-color);
}

.button:hover, button:hover {
    transform: translate(-3px, -3px);
    box-shadow: 3px 3px 0 var(--border-color);
    text-decoration: none;
}

.button-primary {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.button-primary:hover {
    background-color: var(--primary-color-dark);
    color: var(--text-light);
}

.hero-section .button-primary {
    background-color: var(--secondary-color);
    color: var(--dark-color);
    border-color: var(--border-color);
}

.hero-section .button-primary:hover {
    background-color: var(--text-light);
}


/* ==========================================================================
   3. Header & Navigation
   ========================================================================== */

.header {
    width: 100%;
    padding: 1rem 0;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    border-bottom: var(--border-strong);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: top 0.3s;
}

.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-header);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}
.logo:hover {
    text-decoration: none;
}

.nav-list {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-item {
    margin-left: 2rem;
}

.nav-link {
    font-family: var(--font-header);
    font-size: 1rem;
    color: var(--dark-color);
    text-transform: uppercase;
    padding: 0.5rem;
    position: relative;
}

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

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

.cta-button {
    border: 3px solid var(--primary-color);
    padding: 8px 16px !important;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
}
.cta-button:hover::after {
    width: 0;
}

.burger-menu {
    display: none;
    cursor: pointer;
    background: transparent;
    border: none;
}

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

/* ==========================================================================
   4. Section Styles
   ========================================================================== */

/* Hero Section */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 100vh;
    color: var(--text-light);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-title {
    color: var(--text-light);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin: 1.5rem 0 2.5rem 0;
    max-width: 600px;
}

/* Services / Workshops Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--text-light);
    border: var(--border-strong);
    box-shadow: 5px 5px 0px var(--border-color);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s, box-shadow 0.3s;
}
.card:hover {
    transform: translate(-5px, -5px);
    box-shadow: 10px 10px 0px var(--primary-color);
}
.card-image {
    width: 100%;
    height: 250px; /* Fixed height for image container */
    overflow: hidden;
    border-bottom: var(--border-strong);
}
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image fills container without distortion */
}
.card-content {
    padding: 1.5rem;
}
.card-title {
    margin-bottom: 1rem;
}

/* Innovation Section */
.innovation-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    text-align: left;
}
.innovation-text {
    flex: 2;
}
.innovation-stats {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.stat-widget {
    background-color: rgba(255, 255, 255, 0.1);
    border: 3px solid var(--secondary-color);
    padding: 1.5rem;
    text-align: center;
}
.stat-number {
    display: block;
    font-family: var(--font-header);
    font-size: 3rem;
    font-weight: 700;
    color: var(--secondary-color);
}
.stat-label {
    font-size: 1rem;
    text-transform: uppercase;
    color: var(--text-light);
}

/* Team Section */
.team-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.team-carousel .card-image {
    height: 300px;
    border-radius: 50%;
    width: 200px; /* circular aspect ratio */
    height: 200px;
    margin: 1rem auto;
    border: var(--border-strong);
}
.card-subtitle {
    font-weight: 700;
    color: var(--primary-color);
    margin-top: -0.5rem;
    margin-bottom: 1rem;
}

/* Sustainability Section */
.two-columns {
    display: flex;
    gap: 3rem;
    align-items: center;
}
.column-text {
    flex: 1;
    text-align: left;
}
.section-title-left {
    text-align: left;
    margin-bottom: 1.5rem;
}
.column-image {
    flex: 1;
    border: var(--border-strong);
    padding: 10px;
    background-color: var(--text-light);
}
.column-image img {
    box-shadow: 5px 5px 0 var(--border-color);
}

/* Resources Section */
.resources-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}
.resource-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--text-light);
    border: var(--border-strong);
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}
.resource-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-decoration: none;
}
.resource-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    color: var(--dark-color);
}
.resource-description {
    margin: 0;
    color: #666;
}
.resource-link-icon {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    transition: transform 0.3s;
}
.resource-item:hover .resource-link-icon {
    transform: translateX(10px);
}

/* Contact Section */
.contact-form {
    max-width: 700px;
    margin: 2rem auto 0 auto;
    text-align: left;
}
.form-group {
    margin-bottom: 1.5rem;
}
.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-family: var(--font-header);
    text-transform: uppercase;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    font-family: var(--font-body);
    font-size: 1rem;
    border: var(--border-strong);
    background-color: var(--light-bg-color);
    color: var(--dark-color);
    transition: box-shadow 0.3s;
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--secondary-color);
}
.form-button {
    width: 100%;
    margin-top: 1rem;
}

/* ==========================================================================
   5. Footer
   ========================================================================== */

.footer {
    background-color: var(--dark-color);
    color: #ccc;
    padding: 4rem 0 2rem 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}
.footer-title {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}
.footer-links {
    list-style: none;
}
.footer-links li {
    margin-bottom: 0.75rem;
}
.footer-links a {
    color: #ccc;
    transition: color 0.3s;
}
.footer-links a:hover {
    color: var(--secondary-color);
    text-decoration: none;
}
.social-links a {
    font-weight: bold; /* Make social links stand out */
}
.footer-bottom {
    text-align: center;
    border-top: 1px solid #444;
    padding-top: 2rem;
    font-size: 0.9rem;
}

/* ==========================================================================
   6. Other Pages (Success, Privacy, Terms)
   ========================================================================== */

.success-page, .legal-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 100vh;
    padding: 2rem;
}
.success-content {
    max-width: 600px;
    border: var(--border-strong);
    padding: 3rem;
    background-color: var(--text-light);
}

.legal-page .container {
    padding-top: calc(var(--header-height) + 40px);
    text-align: left;
    padding-bottom: 4rem;
}

.legal-page h1 {
    margin-bottom: 2rem;
}

.legal-page h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* ==========================================================================
   7. Responsive Media Queries
   ========================================================================== */

@media (max-width: 992px) {
    .innovation-content, .two-columns {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: white;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: left 0.4s ease-in-out;
    }

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

    .nav-list {
        flex-direction: column;
    }

    .nav-item {
        margin: 1.5rem 0;
    }
    
    .nav-link {
        font-size: 1.5rem;
    }
    
    .cta-button {
        border: none;
        background-color: var(--primary-color);
        color: var(--text-light);
        padding: 1rem 2rem !important;
    }

    .burger-menu {
        display: block;
        z-index: 1001; /* Must be above nav-menu */
    }

    .burger-menu.toggle .burger-bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    .burger-menu.toggle .burger-bar:nth-child(2) {
        opacity: 0;
    }
    .burger-menu.toggle .burger-bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .section {
        padding: 3rem 0;
    }
    
    .footer-grid {
        text-align: center;
    }
    
    .column-text {
        text-align: center;
    }
    
    .section-title-left {
        text-align: center;
    }
}