/*
  ========================================
  CSS for YPF Argentina Website
  ========================================
  - Design System: Neumorphism & Asymmetric Balance
  - Color Scheme: Analogous
  - Animation Style: 3D Effects
  - Typography: Oswald (Headings), Nunito (Body)
  ========================================
*/

/*
  1. CSS Variables (Root)
  ----------------------------------------
*/
:root {
    /* Color Palette (Analogous: Blue -> Blue-Green) */
    --color-background: #eef2f7;
    --color-background-light: #f9fbfd;
    --color-primary: #0073e6; /* YPF Blue */
    --color-primary-dark: #005bbd;
    --color-accent: #00a896; /* Teal accent */
    --color-text-dark: #2c3e50;
    --color-text-light: #FFFFFF;
    --color-text-medium: #5a6a7a;
    --color-border: #d1d9e6;

    /* Neumorphism Shadows */
    --shadow-light: rgba(255, 255, 255, 0.9);
    --shadow-dark: rgba(163, 177, 198, 0.7);
    --neumorphic-shadow: 10px 10px 20px var(--shadow-dark), -10px -10px 20px var(--shadow-light);
    --neumorphic-shadow-inset: inset 8px 8px 16px var(--shadow-dark), inset -8px -8px 16px var(--shadow-light);
    --neumorphic-shadow-hover: 15px 15px 30px var(--shadow-dark), -15px -15px 30px var(--shadow-light);
    
    /* Typography */
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Nunito', sans-serif;

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

/*
  2. Base Styles
  ----------------------------------------
*/
*,
*::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(--color-text-dark);
    background-color: var(--color-background);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-dark);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; text-align: center; margin-bottom: 2rem; }
h3 { font-size: 1.5rem; margin-bottom: 1rem; color: var(--color-primary); }
h4 { font-size: 1.2rem; margin-bottom: 0.5rem; }

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

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

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

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

/*
  3. Layout & Utility Classes
  ----------------------------------------
*/
.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.section {
    padding: 5rem 0;
}

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

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

/*
  4. Global Component Styles
  ----------------------------------------
*/

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    text-transform: uppercase;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-speed) ease-in-out;
    background: var(--color-background);
    color: var(--color-primary);
    box-shadow: var(--neumorphic-shadow);
}

.btn:hover {
    box-shadow: var(--neumorphic-shadow-hover);
    transform: translateY(-3px);
    color: var(--color-primary-dark);
}

.btn:active {
    box-shadow: var(--neumorphic-shadow-inset);
    transform: translateY(1px);
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-text-light);
    box-shadow: none; /* Solid buttons don't need neumorphic shadow */
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 115, 230, 0.3);
}

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

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--neumorphic-shadow-hover);
}

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

.card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers the area without distortion */
}

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

.link-more {
    font-family: var(--font-heading);
    font-weight: bold;
    display: inline-block;
    margin-top: 1rem;
    color: var(--color-accent);
    position: relative;
}

.link-more::after {
    content: '→';
    position: absolute;
    right: -20px;
    opacity: 0;
    transition: all var(--transition-speed) ease;
}

.link-more:hover::after {
    right: -25px;
    opacity: 1;
}

/*
  5. Header & Navigation
  ----------------------------------------
*/
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(238, 242, 247, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: var(--header-height);
    transition: all var(--transition-speed) ease;
}

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

.logo img {
    height: 40px;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    font-family: var(--font-heading);
    color: var(--color-text-medium);
    font-size: 1rem;
    text-transform: uppercase;
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition-speed) ease-in-out;
}

.nav-link:hover, .nav-link.active {
    color: var(--color-primary);
}

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-toggle {
    display: none;
    cursor: pointer;
}

/*
  6. Section-Specific Styles
  ----------------------------------------
*/

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

.hero-content {
    max-width: 800px;
}

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

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-light);
    margin-bottom: 2rem;
}

/* --- Vision & Community (Asymmetric Layout) --- */
.vision-container, .community-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.vision-image-container, .community-image-container {
    perspective: 1000px;
}

.neumorphic-image {
    border-radius: var(--border-radius);
    box-shadow: var(--neumorphic-shadow);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.neumorphic-image:hover {
    transform: rotateY(5deg) scale(1.02);
    box-shadow: var(--neumorphic-shadow-hover);
}

/* --- Features, News, Gallery Grids --- */
.features-grid, .news-grid, .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.gallery-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--neumorphic-shadow);
}
.gallery-item .image-container {
    height: 350px;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-speed) ease;
}
.gallery-item:hover img {
    transform: scale(1.1);
}
.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: var(--color-text-light);
    transform: translateY(100%);
    transition: transform var(--transition-speed) ease;
}
.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}
.gallery-caption h3 {
    color: var(--color-text-light);
}
.gallery-caption p {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    margin-bottom: 0;
}


/* --- Timeline (Our Process) --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--color-border);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    box-shadow: var(--neumorphic-shadow-inset);
    border-radius: 2px;
}

.timeline-item {
    padding: 1rem 3rem;
    position: relative;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--color-background);
    border: 4px solid var(--color-primary);
    top: 20px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(odd)::after {
    right: -10px;
}

.timeline-item:nth-child(even)::after {
    left: -10px;
}

.timeline-content {
    padding: 1.5rem;
    background: var(--color-background);
    border-radius: var(--border-radius);
    box-shadow: var(--neumorphic-shadow);
}

/* --- External Resources --- */
.resources-list {
    display: grid;
    gap: 1.5rem;
}
.resource-card {
    display: block;
    padding: 1.5rem;
    background: var(--color-background-light);
    border-radius: var(--border-radius);
    border-left: 5px solid var(--color-accent);
    box-shadow: var(--neumorphic-shadow);
    transition: all var(--transition-speed) ease;
}
.resource-card:hover {
    transform: translateX(10px);
    box-shadow: var(--neumorphic-shadow-hover);
}
.resource-card h4 {
    color: var(--color-primary);
}
.resource-card p {
    color: var(--color-text-medium);
    margin-bottom: 0.5rem;
}
.resource-card .resource-url {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--color-accent);
}

/* --- Contact Form --- */
.contact-form-container {
    max-width: 700px;
    margin: 0 auto;
    background: var(--color-background);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--neumorphic-shadow);
}

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

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

.form-input:focus {
    outline: none;
    box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light), 0 0 0 2px var(--color-primary);
}

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

.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label {
    top: -1.5rem;
    left: 0;
    font-size: 0.8rem;
    color: var(--color-primary);
}
.contact-form .btn {
    width: 100%;
}

/*
  7. Footer
  ----------------------------------------
*/
.footer {
    background-color: var(--color-text-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 4rem 0 2rem;
}

.footer h4 {
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}

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

.footer-column ul {
    list-style: none;
}

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

.footer-column a {
    color: rgba(255, 255, 255, 0.7);
    transition: all var(--transition-speed) ease;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

/*
  8. Page-Specific & Animation Styles
  ----------------------------------------
*/
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--color-primary);
    z-index: 9999;
    transform: translateY(100%);
}

/* For pages like privacy, terms */
.static-page-content {
    padding-top: calc(var(--header-height) + 3rem);
    padding-bottom: 3rem;
    min-height: 80vh;
}

/* For success page */
body.success-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
}

.success-container {
    background: var(--color-background);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--neumorphic-shadow);
}
.success-container h1 {
    color: var(--color-accent);
}

/* GSAP Scroll Animation Initial States */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/*
  9. Responsive Design (Media Queries)
  ----------------------------------------
*/
@media (max-width: 992px) {
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2rem; }
    
    .vision-container, .community-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .vision-text-container {
        order: 1;
    }
    
    .vision-image-container {
        order: 2;
    }
}

@media (max-width: 768px) {
    /* --- Mobile Navigation --- */
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        right: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--color-background);
        padding: 2rem;
        transition: right var(--transition-speed) ease-in-out;
        z-index: 999;
    }
    .nav-menu.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 2.5rem;
    }
    .nav-link {
        font-size: 1.5rem;
    }
    .nav-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        width: 30px;
        height: 25px;
    }
    .nav-toggle span {
        background-color: var(--color-text-dark);
        height: 3px;
        width: 100%;
        border-radius: 2px;
        transition: all var(--transition-speed) ease;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    /* --- Timeline --- */
    .timeline::after {
        left: 31px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 15px;
    }
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        left: 0;
        text-align: left;
    }
    .timeline-item::after {
        left: 21px;
    }
}

@media (max-width: 576px) {
    h1 { font-size: 2.2rem; }
    .section { padding: 3rem 0; }
    .contact-form-container {
        padding: 1.5rem;
    }
}