/*
* File: style.css
* Author: AI Assistant
* Description: Stylesheet for the YPF Argentina website, following a Retro design system with Hyperrealistic Textures.
*/

/* ----------------------------------------------------------------
   1. CSS Variables & Root Styles
   ---------------------------------------------------------------- */

:root {
    /* Color Palette (Split-Complementary) */
    --primary-color: #0061AF; /* YPF Blue */
    --primary-color-dark: #004a87;
    --secondary-color: #FFC300; /* Yellow-Orange Accent */
    --accent-color: #D2691E;   /* Warm Brown/Orange Accent */

    /* Typography */
    --font-heading: 'Raleway', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --text-dark: #222222;
    --text-light: #f8f9fa;
    --text-muted: #6c757d;

    /* Backgrounds */
    --bg-light: #F7F5F2; /* Light Beige for texture */
    --bg-dark: #1a1a1a;

    /* Spacing & Borders */
    --section-padding: 6rem 0;
    --border-radius: 5px;
}

/* ----------------------------------------------------------------
   2. Global Styles & Typography
   ---------------------------------------------------------------- */

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: #ffffff;
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-heading);
    font-weight: 900;
    color: var(--text-dark);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 2.8rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: var(--text-dark);
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    margin: 1rem auto 0;
    border-radius: 2px;
}

p.lead {
    font-size: 1.1rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-muted);
}

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

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

/* ----------------------------------------------------------------
   3. Reusable Components & Buttons
   ---------------------------------------------------------------- */

/* General Button Styles */
.btn, button, input[type='submit'] {
    font-family: var(--font-heading);
    font-weight: 700;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    transition: all 0.3s ease-in-out;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid transparent;
}

.retro-btn, .btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 97, 175, 0.3);
}

.retro-btn:hover, .btn-primary:hover {
    background-color: var(--primary-color-dark);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 97, 175, 0.4);
}

/* General Card Styles */
.card {
    border: none;
    background: #fff;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.card .card-image {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    overflow: hidden;
    margin: 0 auto;
}

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

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

.card .card-body, .card .card-content {
    padding: 1.5rem;
    flex-grow: 1; /* Allows card body to fill space */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-bg-texture {
    background-color: var(--bg-light);
    background-image: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%23e0e0e0" fill-opacity="0.2"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
}


/* ----------------------------------------------------------------
   4. Header / Navbar
   ---------------------------------------------------------------- */

.navbar {
    background: transparent;
    padding: 1rem 0;
    transition: background-color 0.4s ease, padding 0.4s ease;
}

.navbar.scrolled {
    background-color: rgba(10, 25, 41, 0.9);
    padding: 0.5rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.navbar-brand {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar .nav-link {
    font-family: var(--font-heading);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0.5rem;
    padding: 0.5rem 1rem;
    position: relative;
    transition: color 0.3s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: #fff;
}

.navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease-in-out;
}

.navbar .nav-link:hover::after,
.navbar .nav-link.active::after {
    width: 60%;
}

.navbar-toggler {
    border: 2px solid rgba(255,255,255,0.5);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ----------------------------------------------------------------
   5. Section-Specific Styles
   ---------------------------------------------------------------- */

/* Hero Section */
#hero {
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    color: var(--text-light);
}

.parallax-bg {
    background-attachment: fixed;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0, 40, 85, 0.6), rgba(0, 0, 0, 0.5));
    z-index: 1;
}

#hero .container {
    z-index: 2;
}

#hero h1 {
    color: #FFFFFF;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
}

#hero p.lead {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
}


/* Methodology Section */
#proceso {
    padding: var(--section-padding);
}
.method-card {
    background: #fff;
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 25px rgba(0,0,0,0.05);
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.method-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}
.method-icon {
    margin-bottom: 1.5rem;
    display: inline-block;
    background: var(--primary-color);
    padding: 20px;
    border-radius: 50%;
    line-height: 1;
}
.method-icon img {
    filter: brightness(0) invert(1);
}


/* Portfolio (Estaciones) Section */
#estaciones {
    padding: var(--section-padding);
}
.card-portfolio {
    position: relative;
    overflow: hidden;
}
.card-portfolio .card-image {
    height: 500px;
}
.card-portfolio .card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
    color: #fff;
    padding: 2rem;
    text-align: left;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.card-portfolio:hover .card-content {
    transform: translateY(0);
}
.card-portfolio h5 {
    color: #fff;
    font-size: 1.5rem;
}
.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: var(--primary-color);
    border-radius: 50%;
    padding: 1.5rem;
}


/* Testimonials Section */
#testimonios {
    padding: var(--section-padding);
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.testimonial-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 25, 41, 0.85);
}
#testimonios .section-title, #testimonios .lead {
    color: #FFFFFF;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
}
.testimonial-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 5px solid var(--secondary-color);
    margin: 0 auto 1.5rem auto;
    object-fit: cover;
}
.blockquote {
    font-size: 1.2rem;
    font-style: italic;
    max-width: 700px;
    margin: auto;
}
.blockquote-footer {
    font-style: normal;
    font-weight: 600;
    color: var(--secondary-color) !important;
}
#testimonios .carousel-control-prev, #testimonios .carousel-control-next {
    width: 5%;
}

/* Resources Section */
#recursos {
    padding: var(--section-padding);
    background-color: #fff;
}
.resource-card {
    padding: 1.5rem;
    border-left: 4px solid var(--primary-color);
    background: var(--bg-light);
    height: 100%;
    transition: all 0.3s ease;
}
.resource-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.07);
}
.resource-card h4 a {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-dark);
}
.resource-card h4 a:hover {
    color: var(--primary-color);
}
.resource-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Contact Form */
.retro-form .form-control {
    background-color: #fff;
    border: 2px solid #ddd;
    padding: 15px;
    border-radius: var(--border-radius);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.retro-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 97, 175, 0.2);
    background-color: #fff;
}
.retro-form .form-label {
    font-weight: 600;
    color: var(--text-muted);
}

/* ----------------------------------------------------------------
   6. Footer
   ---------------------------------------------------------------- */

.footer-dark {
    background-color: var(--bg-dark);
    color: var(--text-muted);
    padding-top: var(--section-padding);
    padding-bottom: 2rem;
}

.footer-dark .footer-title {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-dark .footer-link {
    color: var(--text-muted);
    display: inline-block;
    padding: 0.3rem 0;
}

.footer-dark .footer-link:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

.footer-dark .border-top {
    border-top-color: rgba(255, 255, 255, 0.1) !important;
}

/* ----------------------------------------------------------------
   7. Page-Specific Styles (Success, Privacy, etc.)
   ---------------------------------------------------------------- */

.success-page-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: var(--bg-light);
    text-align: center;
}

.success-container {
    max-width: 600px;
    padding: 3rem;
    background: #fff;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    border-radius: var(--border-radius);
}

.legal-content, .about-content, .contacts-page-content {
    padding-top: 120px; /* Offset for fixed header */
    padding-bottom: 6rem;
}
.legal-content h1, .about-content h1, .contacts-page-content h1 {
    margin-bottom: 2rem;
}
.legal-content h2, .about-content h2, .contacts-page-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* ----------------------------------------------------------------
   8. Animations & Transitions (ScrollReveal, Barba.js)
   ---------------------------------------------------------------- */

/* Initial state for ScrollReveal */
.reveal-up, .reveal-down, .reveal-left, .reveal-right {
    /*opacity: 0;*/
    transition: opacity 0.8s ease, transform 0.8s ease;
    will-change: transform, opacity;
}

.reveal-up { transform: translateY(40px); }
.reveal-down { transform: translateY(-40px); }
.reveal-left { transform: translateX(-40px); }
.reveal-right { transform: translateX(40px); }

/* Barba.js Page Transitions */
.barba-leave-active {
    animation: fade-out 0.5s ease-out forwards;
}

.barba-enter-active {
    animation: fade-in 0.5s ease-in forwards;
}

@keyframes fade-out {
    from { opacity: 1; transform: translateY(0); }
    /*to { opacity: 0; transform: translateY(20px); }*/
}

@keyframes fade-in {
    from { transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ----------------------------------------------------------------
   9. Responsive Design
   ---------------------------------------------------------------- */

@media (max-width: 991.98px) {
    .navbar-nav {
        background-color: rgba(10, 25, 41, 0.95);
        border-radius: var(--border-radius);
        padding: 1rem;
        margin-top: 1rem;
        text-align: center;
    }
    .section-title {
        font-size: 2.2rem;
    }
    .parallax-bg {
        background-attachment: scroll; /* Disables parallax on mobile for performance */
    }
    #hero {
        min-height: 80vh;
    }
}

@media (max-width: 767.98px) {
    :root {
        --section-padding: 4rem 0;
    }
    #hero h1 {
        font-size: 2.5rem;
    }
    p.lead {
        font-size: 1rem;
    }
}