/*
  STYLE.CSS
  Theme: YPF Argentina
  Design System: Retro
  Trend: Curved Grids
  Color Scheme: Neutral
  Animation Style: Morphing
*/

/* ---------------------------------- */
/*          CSS Variables             */
/* ---------------------------------- */
:root {
    --font-family-heading: 'Roboto', sans-serif;
    --font-family-body: 'Lato', sans-serif;

    /* Neutral Color Palette with a touch of brand color */
    --color-primary: #0062a3; /* YPF's classic blue */
    --color-primary-dark: #004b7f;
    --color-accent: #f39c12; /* A warm, retro orange */
    
    --color-text: #3d3d3d;
    --color-heading: #222222;
    --color-background: #f4f2ef; /* Warm, off-white retro feel */
    --color-surface: #ffffff;
    --color-border: #e0e0e0;
    --color-white: #ffffff;
    --color-black: #000000;
    
    --spacing-unit: 8px;
    --border-radius: 4px;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    --header-height: 80px;
}

/* ---------------------------------- */
/*          Global Styles             */
/* ---------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

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

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 calc(var(--spacing-unit) * 2);
}

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

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

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    color: var(--color-heading);
    margin-top: 0;
    margin-bottom: calc(var(--spacing-unit) * 2);
    font-weight: 700;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; text-align: center; }
h3 { font-size: 1.75rem; }
p { margin-bottom: calc(var(--spacing-unit) * 2); }

section {
    padding: calc(var(--spacing-unit) * 10) 0;
}

.section-title {
    margin-bottom: calc(var(--spacing-unit) * 6);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

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

/* ---------------------------------- */
/*         Buttons (Global)           */
/* ---------------------------------- */
.btn {
    display: inline-block;
    padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 4);
    font-family: var(--font-family-heading);
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: var(--color-white);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 98, 163, 0.3);
    text-decoration: none;
}

/* ---------------------------------- */
/*          Header & Navigation       */
/* ---------------------------------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: var(--header-height);
    transition: background-color 0.3s ease;
}

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

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

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: calc(var(--spacing-unit) * 4);
}

.nav-menu a {
    color: var(--color-text);
    font-weight: 700;
    position: relative;
    padding: 5px 0;
    text-decoration: none;
}

.nav-menu a::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 0.3s ease-in-out;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.burger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.burger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-heading);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* ---------------------------------- */
/*           Hero Section             */
/* ---------------------------------- */
.hero {
    min-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 calc(var(--spacing-unit) * 2);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    color: var(--color-white);
}

.hero-title {
    color: var(--color-white);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    margin-bottom: var(--spacing-unit);
}

.hero-subtitle {
    color: var(--color-white);
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    max-width: 800px;
    margin: 0 auto calc(var(--spacing-unit) * 4) auto;
    line-height: 1.5;
}

/* ---------------------------------- */
/*         Services Section           */
/* ---------------------------------- */
.section-services {
    background-color: var(--color-surface);
}

.curved-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: calc(var(--spacing-unit) * 5);
}

.card {
    background: var(--color-surface);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    text-align: center;
}

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

/* Curved Grid effect */
.curved-grid .card:nth-child(3n-1) {
    transform: translateY(25px);
}
.curved-grid .card:nth-child(3n-1):hover {
    transform: translateY(15px);
}

.card-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    margin: 0 auto;
}

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

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

.card-content {
    padding: calc(var(--spacing-unit) * 3);
    flex-grow: 1;
}

.card-content h3 {
    margin-bottom: calc(var(--spacing-unit) * 2);
}

/* ---------------------------------- */
/*        Innovation Section          */
/* ---------------------------------- */
.innovation-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: calc(var(--spacing-unit) * 6);
    align-items: center;
}

.innovation-text {
    font-size: 1.1rem;
    line-height: 1.7;
}

.stats-widgets {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 4);
}

.widget {
    background: rgba(255, 255, 255, 0.7);
    padding: calc(var(--spacing-unit) * 3);
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--color-border);
}

.widget-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

.widget-label {
    font-size: 1rem;
    color: var(--color-text);
}

/* ---------------------------------- */
/*         Research Section           */
/* ---------------------------------- */
.section-research {
    background-color: var(--color-surface);
}

.research-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(var(--spacing-unit) * 6);
    align-items: center;
    margin-bottom: calc(var(--spacing-unit) * 8);
}

.research-item:last-child {
    margin-bottom: 0;
}

.research-item.reverse .research-image {
    order: 2;
}

.research-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

/* ---------------------------------- */
/*          Insights Section          */
/* ---------------------------------- */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: calc(var(--spacing-unit) * 4);
}

/* ---------------------------------- */
/*       Resources Section            */
/* ---------------------------------- */
.section-resources {
    background-color: var(--color-surface);
}
.section-subtitle {
    text-align: center;
    max-width: 700px;
    margin: 0 auto calc(var(--spacing-unit) * 5) auto;
}

.resource-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: calc(var(--spacing-unit) * 2);
}

.resource-link {
    display: inline-block;
    padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 3);
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.resource-link:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
    text-decoration: none;
    transform: translateY(-2px);
}

/* ---------------------------------- */
/*          Contact Section           */
/* ---------------------------------- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: calc(var(--spacing-unit) * 8);
    background: var(--color-surface);
    padding: calc(var(--spacing-unit) * 6);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

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

.contact-form .form-group {
    position: relative;
    margin-bottom: calc(var(--spacing-unit) * 4);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 2);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    background-color: var(--color-background);
    font-family: var(--font-family-body);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

.contact-form label {
    position: absolute;
    top: calc(var(--spacing-unit) * 1.5);
    left: calc(var(--spacing-unit) * 2);
    color: #999;
    pointer-events: none;
    transition: all 0.3s ease;
}

.contact-form input:focus + label,
.contact-form input:not(:placeholder-shown) + label,
.contact-form textarea:focus + label,
.contact-form textarea:not(:placeholder-shown) + label {
    top: calc(var(--spacing-unit) * -2.5);
    left: var(--spacing-unit);
    font-size: 0.8rem;
    color: var(--color-primary);
    background: var(--color-surface);
    padding: 0 5px;
}

.contact-form button {
    width: 100%;
}


/* ---------------------------------- */
/*          Footer                    */
/* ---------------------------------- */
.site-footer {
    background-color: var(--color-heading);
    color: #e0e0e0;
    padding: calc(var(--spacing-unit) * 6) 0;
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: calc(var(--spacing-unit) * 4);
}

.footer-col h4 {
    color: var(--color-white);
    margin-bottom: var(--spacing-unit);
    font-weight: 700;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col li {
    margin-bottom: var(--spacing-unit);
}

.footer-col a {
    color: #e0e0e0;
    text-decoration: none;
}

.footer-col a:hover {
    color: var(--color-white);
    text-decoration: underline;
}

/* ---------------------------------- */
/*     Static & Success Pages         */
/* ---------------------------------- */
.static-page-content {
    padding-top: calc(var(--header-height) + var(--spacing-unit) * 5);
    padding-bottom: calc(var(--spacing-unit) * 5);
    min-height: calc(100vh - var(--header-height));
}

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

.success-page h1 {
    color: var(--color-primary);
}

/* ---------------------------------- */
/*       Responsive Design            */
/* ---------------------------------- */

/* Tablets */
@media (max-width: 992px) {
    .innovation-content, .research-item {
        grid-template-columns: 1fr;
    }
    .research-item.reverse .research-image {
        order: 0;
    }
}

/* Mobile */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background-color: var(--color-surface);
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: right 0.4s ease-in-out;
    }

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

    .burger-menu {
        display: block;
    }
    
    .curved-grid .card:nth-child(3n-1) {
        transform: translateY(0);
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        padding: calc(var(--spacing-unit) * 4);
    }
}