/*
 *  YPF Argentina - Brutalist Style
 *  File: style.css
 *  Author: AI Assistant
 *  Description: Custom styles complementing Tailwind CSS for a brutalist, block-based UI.
*/

/* 1. ROOT VARIABLES & GLOBAL STYLES
-------------------------------------------------- */
:root {
    /* Color Palette */
    --color-primary: #0072CE; /* YPF Blue */
    --color-accent: #FFD700;  /* YPF Yellow */
    --color-dark-bg: #111827;
    --color-light-bg: #F3F4F6;
    --color-dark-text: #1F2937;
    --color-light-text: #E5E7EB;
    --color-black: #000000;
    --color-white: #FFFFFF;
    --color-gray-border: #374151;

    /* Typography */
    --font-display: 'Montserrat', sans-serif;
    --font-body: 'Merriweather', serif;

    /* Shadows & Borders */
    --shadow-brutalist: 5px 5px 0px 0px var(--color-black);
    --shadow-brutalist-blue: 5px 5px 0px 0px var(--color-primary);
    --shadow-brutalist-yellow: 5px 5px 0px 0px var(--color-accent);
    --border-width: 2px;
    --border-style: solid;
    --border-color: var(--color-black);
}

/* Base HTML and Body styles */
html {
    scroll-behavior: smooth;
}

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

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

section {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

@media (min-width: 768px) {
    section {
        padding-top: 8rem;
        padding-bottom: 8rem;
    }
}

.text-shadow-lg {
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
}


/* 2. HEADER & NAVIGATION
-------------------------------------------------- */
header.sticky {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Mobile Menu Animation */
#mobile-menu {
    transition: all 0.3s ease-in-out;
    max-height: 0;
    overflow: hidden;
}

#mobile-menu.active {
    max-height: 500px; /* Adjust as needed */
}

/* 3. HERO SECTION & PARTICLES.JS
-------------------------------------------------- */
#hero {
    background-attachment: fixed; /* Parallax effect */
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    color: var(--color-white);
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

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

#hero h1 {
    color: var(--color-white);
}


/* 4. COMPONENT STYLES
-------------------------------------------------- */

/* Global Button Styles */
.btn, button, input[type='submit'] {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: var(--border-width) var(--border-style) var(--border-color);
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease-in-out;
    box-shadow: var(--shadow-brutalist);
}

.btn:hover, button:hover, input[type='submit']:hover {
    transform: translate(3px, 3px);
    box-shadow: none;
}

/* Card Styles (used in Innovation, Workshops etc.) */
.card {
    background-color: var(--color-white);
    border: var(--border-width) var(--border-style) var(--border-color);
    box-shadow: var(--shadow-brutalist);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
}

.card .card-image, .image-container {
    width: 100%;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: var(--border-width) var(--border-style) var(--border-color);
}

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

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

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

/* Resources List */
#resources article {
    box-shadow: var(--shadow-brutalist-yellow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#resources article:hover {
    transform: translateY(-5px);
    box-shadow: 7px 7px 0px 0px var(--color-accent);
}

/* FAQ Accordion */
.faq-item {
    transition: all 0.3s ease-in-out;
}

.faq-question {
    background: none;
    border: none;
    padding: 1.5rem;
    width: 100%;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question:hover {
    background-color: rgba(0,0,0,0.03);
}

.faq-question .faq-icon {
    transition: transform 0.3s ease-in-out;
}

.faq-item.active .faq-question .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0, 1, 0, 1), padding 0.5s ease;
    padding: 0 1.5rem;
}

.faq-item.active .faq-answer {
    max-height: 500px; /* Adjust if content is longer */
    transition: max-height 1s cubic-bezier(1, 0, 1, 0), padding 0.5s ease;
    padding: 1.5rem;
}

/* Form Styles */
#contact-form input[type="text"],
#contact-form input[type="email"],
#contact-form textarea {
    background-color: var(--color-light-bg);
    color: var(--color-dark-text);
    border: var(--border-width) var(--border-style) var(--color-black);
    padding: 0.75rem 1rem;
    width: 100%;
    transition: all 0.2s ease;
}

#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 114, 206, 0.4);
}

#contact-form label {
    font-family: var(--font-display);
    font-weight: 700;
}

#contact-form button[type='submit'] {
    background-color: var(--color-accent);
    color: var(--color-dark-text);
    box-shadow: var(--shadow-brutalist-blue);
}

#contact-form button[type='submit']:hover {
    background-color: var(--color-white);
}

/* 5. PAGE-SPECIFIC STYLES
-------------------------------------------------- */

/* Success Page Centering */
.success-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    padding: 2rem;
    background-color: var(--color-dark-bg);
    color: var(--color-light-text);
}

.success-page .success-content {
    background-color: var(--color-light-bg);
    color: var(--color-dark-text);
    padding: 3rem;
    border: 4px solid var(--color-black);
    box-shadow: var(--shadow-brutalist-yellow);
    max-width: 600px;
}
.success-page h1 {
    color: var(--color-dark-text);
}


/* Privacy & Terms Pages */
.page-content {
    padding-top: 120px; /* Offset for fixed header */
    padding-bottom: 80px;
}

.page-content h1 {
    margin-bottom: 2rem;
    font-size: 2.5rem;
}

.page-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 1.75rem;
}

.page-content p, .page-content ul {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.page-content ul {
    list-style-position: inside;
    list-style-type: disc;
}

/* 6. FOOTER
-------------------------------------------------- */
footer a:not(.btn) {
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
}

footer a:not(.btn)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--color-accent);
    transition: width 0.3s ease-in-out;
}

footer a:not(.btn):hover::after {
    width: 100%;
}

/* 7. UTILITY & ANIMATION
-------------------------------------------------- */
/* For ScrollReveal.js */
[data-scroll] {
    visibility: hidden;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    /*opacity: 0;*/
    transform: translateY(50px);
}

[data-scroll="in"] {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

/* Custom Progress Bar for Innovation section */
.progress-bar-container {
    width: 100%;
    background-color: var(--color-gray-border);
    height: 1.5rem;
    border: var(--border-width) var(--border-style) var(--border-color);
}

.progress-bar {
    background-color: var(--color-primary);
    height: 100%;
    text-align: center;
    line-height: 1.5rem;
    color: var(--color-white);
    font-size: 0.8rem;
    font-family: var(--font-display);
    transition: width 2s ease-in-out;
}

/* 'Read More' style link */
.read-more-link {
    font-family: var(--font-display);
    font-weight: bold;
    color: var(--color-primary);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.read-more-link:hover {
    color: var(--color-accent);
    text-decoration: none;
}