/* ==========================================================================
   0. ROOT & GLOBAL STYLES
   ========================================================================== */

:root {
    /* Color Scheme: Complementary (YPF Blue & Energetic Orange) */
    --primary-color: #0073e6; /* YPF Blue */
    --primary-color-dark: #005bb7;
    --secondary-color: #ff8c00; /* Energetic Orange */

    /* Neutral & Text Colors */
    --text-color: #222222;
    --text-color-light: #555555;
    --light-text-color: #FFFFFF;
    --bg-color: #FFFFFF;
    --bg-color-light: #f8f9fa;
    --bg-color-dark: #121828;
    --border-color: #dddddd;
    --border-color-dark: #333333;

    /* Typography */
    --font-header: 'Manrope', sans-serif;
    --font-body: 'Rubik', sans-serif;
    
    /* Spacing & Borders */
    --container-padding: 1rem;
    --section-padding: 5rem 0;
    --border-radius: 4px; /* Minimal radius for a slightly less harsh brutalism */
    --brutalist-border: 3px solid var(--text-color);
}

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

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

.section {
    padding: var(--section-padding);
}

.section-dark {
    background-color: var(--bg-color-dark);
    color: var(--light-text-color);
}
.section-dark .section-title, .section-dark h3, .section-dark h4 {
    color: var(--light-text-color);
}
.section-dark p {
    color: rgba(255, 255, 255, 0.8);
}

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

.section-title {
    font-family: var(--font-header);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 800;
    color: var(--text-color);
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.05);
}

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

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

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-header);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-color);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}


/* ==========================================================================
   1. GLOBAL UI COMPONENTS (Buttons, Cards)
   ========================================================================== */

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-family: var(--font-header);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    border: var(--brutalist-border);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 5px 5px 0px var(--text-color);
}

.btn:hover {
    transform: translate(3px, 3px);
    box-shadow: 2px 2px 0px var(--text-color);
}

.btn:active {
    transform: translate(5px, 5px);
    box-shadow: none;
}

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

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

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--text-color);
    border-color: var(--text-color);
}

.btn-secondary:hover {
    background-color: #e67e00;
    color: var(--text-color);
}

/* --- Cards --- */
.card {
    background-color: var(--bg-color);
    border: var(--brutalist-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    text-align: center;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    perspective: 1000px;
}
.card:hover {
    transform: translateY(-10px) rotateY(-5deg);
    box-shadow: 10px 10px 0px var(--primary-color);
}
.section-dark .card {
     background-color: #2a3144;
     border-color: var(--light-text-color);
     color: var(--light-text-color);
}
.section-dark .card h3 {
    color: var(--light-text-color);
}
.section-dark .card p {
    color: rgba(255, 255, 255, 0.8);
}


.card-image {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    overflow: hidden;
    border-bottom: var(--brutalist-border);
}

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

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

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.read-more {
    font-weight: 700;
    color: var(--secondary-color);
    display: inline-block;
    margin-top: auto;
    padding-top: 1rem;
}
.read-more:hover {
    text-decoration: underline;
    color: #e67e00;
}


/* ==========================================================================
   2. HEADER & NAVIGATION
   ========================================================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(18, 24, 40, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    transition: background 0.3s ease;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.navbar-logo {
    font-family: var(--font-header);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--light-text-color);
    text-transform: uppercase;
}

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

.nav-link {
    font-family: var(--font-header);
    color: var(--light-text-color);
    font-weight: 700;
    position: relative;
    padding: 5px 0;
}

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

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

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

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

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

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

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.4));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 800;
    color: var(--light-text-color);
    text-shadow: 3px 3px 0px rgba(0, 0, 0, 0.2);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.25rem);
    max-width: 600px;
    margin: 0 auto 2rem;
    color: rgba(255, 255, 255, 0.9);
}

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

/* --- Behind The Scenes (Timeline) --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background-color: var(--primary-color);
}

.timeline-item {
    padding: 1rem 3rem;
    position: relative;
    width: 50%;
}
.timeline-item:nth-child(odd) {
    left: 0;
}
.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--light-text-color);
    border: 4px solid var(--primary-color);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
}
.timeline-item:nth-child(even)::after {
    left: -10px;
}

.timeline-content {
    padding: 1.5rem;
    background-color: var(--bg-color-light);
    border: 2px solid var(--border-color-dark);
    position: relative;
}
.timeline-content h4 {
    color: var(--primary-color);
}

/* --- Research Section --- */
.research-content {
    background-color: rgba(18, 24, 40, 0.8);
    backdrop-filter: blur(5px);
    padding: 3rem;
    border: 2px solid var(--primary-color);
    text-align: center;
    max-width: 800px;
    margin: auto;
}
.research-content .section-title, .research-content p {
    color: var(--light-text-color);
}
.research-content p {
    color: rgba(255, 255, 255, 0.85);
}

/* --- Case Studies --- */
.case-studies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

/* --- Instructors/Experts --- */
.instructors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    text-align: center;
}
.instructor-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.instructor-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    margin-bottom: 1rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.instructor-card h4 {
    margin-bottom: 0.25rem;
    font-size: 1.25rem;
}
.instructor-card h5 {
    color: var(--text-color-light);
    margin-bottom: 0.5rem;
}

/* --- Testimonials --- */
#testimonials {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
}
#testimonials .container {
    position: relative;
    z-index: 2;
}
#testimonials::before {
    content: '';
    position: absolute;
    top:0; left: 0; width: 100%; height: 100%;
    background-color: rgba(18, 24, 40, 0.8);
    z-index: 1;
}
.testimonials-slider {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.testimonial-item {
    background-color: rgba(255,255,255,0.05);
    padding: 2rem;
    border-left: 5px solid var(--secondary-color);
}
.testimonial-item p {
    font-style: italic;
    margin-bottom: 1rem;
}
.testimonial-item cite {
    font-weight: 700;
    color: var(--secondary-color);
}

/* --- Partners --- */
.partners-logo-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 3rem;
}
.partner-logo img {
    max-height: 50px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}
.partner-logo img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* --- Webinars/Events (Accordion) --- */
.accordion {
    max-width: 800px;
    margin: 0 auto;
}
.accordion-item {
    border: 2px solid var(--border-color);
    margin-bottom: 10px;
}
.accordion-item:last-child {
    margin-bottom: 0;
}
.accordion-header {
    background-color: transparent;
    border: none;
    width: 100%;
    padding: 1rem 1.5rem;
    text-align: left;
    font-family: var(--font-header);
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.accordion-header .icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}
.accordion-header.active .icon {
    transform: rotate(45deg);
}
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    padding: 0 1.5rem;
}
.accordion-content p {
    padding: 1.5rem 0;
}

/* --- Blog Section --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}
.blog-grid .card-content {
    text-align: left;
}
.blog-grid .card {
    align-items: stretch; /* override global card center */
}

/* --- External Resources --- */
.resources-list {
    display: grid;
    gap: 1.5rem;
}
.resource-item {
    display: block;
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: all 0.2s ease-in-out;
}
.resource-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.07);
}
.resource-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}
.resource-item p {
    color: var(--text-color-light);
    margin-bottom: 0.5rem;
}
.resource-item small {
    color: var(--text-color-light);
    font-weight: 500;
}

/* --- Contact Section --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1000px;
    margin: auto;
    background: var(--bg-color-light);
    padding: 3rem;
    border: var(--brutalist-border);
}

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

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--text-color-light);
    border-radius: 0;
    background-color: transparent;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-color);
    transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.contact-form label {
    position: absolute;
    top: 10px;
    left: 10px;
    color: var(--text-color-light);
    pointer-events: none;
    transition: all 0.3s ease;
}

.contact-form input:focus + label,
.contact-form input:valid + label,
.contact-form textarea:focus + label,
.contact-form textarea:valid + label {
    top: -20px;
    left: 0;
    font-size: 0.8rem;
    color: var(--primary-color);
}
.contact-form .btn-submit {
    width: 100%;
}
.contact-form select {
    appearance: none;
}


/* ==========================================================================
   4. FOOTER
   ========================================================================== */
.footer {
    background-color: var(--bg-color-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 4rem var(--container-padding) 2rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}
.footer-col h4 {
    font-size: 1.2rem;
    color: var(--light-text-color);
    margin-bottom: 1rem;
}
.footer-col ul {
    list-style: none;
}
.footer-col ul li {
    margin-bottom: 0.5rem;
}
.footer-col a {
    color: rgba(255, 255, 255, 0.7);
}
.footer-col a:hover {
    color: var(--light-text-color);
    text-decoration: underline;
}
.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.social-links a {
    font-weight: 500;
}
.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color-dark);
    font-size: 0.9rem;
}

/* ==========================================================================
   5. OTHER PAGES (Privacy, Success, etc.)
   ========================================================================== */

/* For pages like Privacy & Terms */
.page-content {
    padding: 120px var(--container-padding) 60px; /* 120px top to clear fixed header */
    max-width: 800px;
    margin: 0 auto;
}
.page-content h1 {
    margin-bottom: 2rem;
}
.page-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

/* For success.html */
.success-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 100vh;
    background-color: var(--bg-color-dark);
    color: var(--light-text-color);
    padding: var(--container-padding);
}
.success-page h1 {
    color: var(--light-text-color);
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: 1rem;
}
.success-page p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}


/* ==========================================================================
   6. RESPONSIVE DESIGN (Media Queries)
   ========================================================================== */
@media (max-width: 992px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 768px) {
    .hamburger {
        display: block;
        z-index: 1001; /* Above nav menu */
    }
    .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);
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background-color: var(--bg-color-dark);
        width: 100%;
        height: 100vh;
        text-align: center;
        transition: 0.3s;
        gap: 2.5rem;
    }

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

    .nav-item {
        margin: 16px 0;
    }
    .nav-link {
        font-size: 1.5rem;
    }
    
    .timeline::before {
        left: 30px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    .timeline-item:nth-child(even) {
        left: 0%;
    }
    .timeline-item::after {
        left: 20px;
    }
}
.section-dark p {
    color: rgb(137 131 131 / 80%);
}