/*
  File: style.css
  Description: Stylesheet for YPF Argentina website.
  Design System: Corporate with Curved Grids elements.
  Color Scheme: Analogous
  Animation Style: Bouncy Animations
*/

/* -------------------------------------------------- */
/* 1. CSS Variables & Root                           */
/* -------------------------------------------------- */
:root {
  /* Analogous Color Palette (Blue-centric with Yellow Accent) */
  --color-primary: #0073e6; /* YPF Main Blue */
  --color-primary-dark: #005bb5;
  --color-secondary: #00a9e0; /* Lighter Teal/Blue */
  --color-accent: #ffc72c; /* YPF Gold/Yellow */
  --color-accent-dark: #f0b90c;
  
  /* Neutral & Text Colors */
  --color-text: #212529; /* Dark Gray for high contrast */
  --color-text-muted: #6c757d;
  --color-text-light: #ffffff;
  --color-background: #ffffff;
  --color-background-section: #f8f9fa;
  --color-border: #dee2e6;
  --color-shadow: rgba(0, 91, 181, 0.1);
  --color-shadow-hover: rgba(0, 91, 181, 0.2);

  /* Typography */
  --font-heading: 'Inter', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  
  /* Sizing & Spacing */
  --header-height: 80px;
  --section-padding: 80px 0;
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 16px;

  /* Transitions & Animations */
  --transition-speed: 0.3s;
  --transition-easing: ease-in-out;
  --transition-bouncy: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* -------------------------------------------------- */
/* 2. Base & Global Styles                           */
/* -------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

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

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

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; text-shadow: 1px 1px 2px rgba(0,0,0,0.05); }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }

p {
  margin: 0 0 1rem 0;
}

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

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

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

/* -------------------------------------------------- */
/* 3. Layout & Utility Classes                        */
/* -------------------------------------------------- */
.container {
  max-width: 1200px;
  width: 90%;
  margin: 0 auto;
  padding: 0 15px;
}

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

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

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

.section-subtitle {
  text-align: center;
  max-width: 600px;
  margin: -2rem auto 3rem;
  color: var(--color-text-muted);
}

/* -------------------------------------------------- */
/* 4. Header & Navigation                            */
/* -------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 15px 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  transition: all var(--transition-speed) var(--transition-easing);
}

.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 50px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--color-text);
  position: relative;
  padding: 5px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition-bouncy);
}

.nav-links a:hover::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-text);
  margin: 5px 0;
  transition: all var(--transition-speed) var(--transition-easing);
}

/* -------------------------------------------------- */
/* 5. Hero Section                                    */
/* -------------------------------------------------- */
.hero-section {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed; /* Simple Parallax Effect */
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(0deg, rgba(0, 20, 40, 0.6) 0%, rgba(0, 40, 80, 0.4) 100%);
}

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

.hero-content h1, .hero-content p {
  color: var(--color-text-light);
}

.hero-content h1 {
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
  font-weight: 800;
}

.hero-content p {
  font-size: 1.25rem;
  max-width: 700px;
  margin: 1.5rem auto 2.5rem;
}

/* -------------------------------------------------- */
/* 6. Global Components (Buttons, Cards, Forms)     */
/* -------------------------------------------------- */

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: all var(--transition-speed) var(--transition-bouncy);
}

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

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

/* --- Cards (Portfolio, Blog, etc.) --- */
.card {
  background-color: var(--color-background);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 4px 20px var(--color-shadow);
  overflow: hidden;
  transition: transform var(--transition-speed) var(--transition-bouncy), box-shadow var(--transition-speed) ease;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px var(--color-shadow-hover);
}

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

.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;
  align-items: center;
}

.card-content h3 {
  margin-bottom: 0.75rem;
}

.card-content p {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  flex-grow: 1;
}

.read-more {
  font-weight: 700;
  color: var(--color-primary);
  margin-top: auto;
}

.read-more::after {
  content: ' →';
  transition: transform 0.2s ease;
  display: inline-block;
}

.read-more:hover::after {
  transform: translateX(5px);
}

/* --- Forms --- */
.contact-form {
  max-width: 700px;
  margin: 0 auto;
}

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

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  background-color: var(--color-background-section);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color var(--transition-speed) ease;
}

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

.form-group label {
  position: absolute;
  top: 15px;
  left: 15px;
  color: var(--color-text-muted);
  pointer-events: none;
  transition: all var(--transition-speed) ease;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
  top: -10px;
  left: 10px;
  font-size: 0.75rem;
  color: var(--color-primary);
  background-color: var(--color-background);
  padding: 0 5px;
}

/* -------------------------------------------------- */
/* 7. Section Specific Styles                         */
/* -------------------------------------------------- */

/* --- Process Section --- */
.process-section {
    background-color: var(--color-background-section);
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.process-card {
    text-align: center;
    padding: 2rem;
    position: relative;
}

.process-icon {
    font-size: 3rem;
    font-weight: 800;
    color: var(--color-primary);
    opacity: 0.2;
    margin-bottom: 1rem;
}

.process-card h3 {
    margin-bottom: 1rem;
}

/* --- Portfolio & Blog Grid --- */
.portfolio-grid, .blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.blog-date {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
    display: block;
}

/* --- Resources Section --- */
.resources-section {
    background-color: var(--color-background-section);
}

.resource-item {
    background: var(--color-background);
    padding: 1.5rem;
    border-radius: var(--border-radius-md);
    margin-bottom: 1rem;
    border: 1px solid var(--color-border);
    transition: all var(--transition-speed) ease;
}

.resource-item:hover {
    border-left: 5px solid var(--color-primary);
    transform: translateX(5px);
}

.resource-item h4 {
    margin: 0 0 0.5rem 0;
}
.resource-item h4 a {
    color: var(--color-text);
}
.resource-item h4 a:hover {
    color: var(--color-primary);
}
.resource-item p {
    margin-bottom: 0;
    color: var(--color-text-muted);
}

/* --- FAQ Section --- */
.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.accordion-item {
    border-bottom: 1px solid var(--color-border);
}

.accordion-header {
    width: 100%;
    background: none;
    border: none;
    padding: 1.5rem 0;
    text-align: left;
    font-size: 1.25rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-body);
}

.accordion-icon {
    width: 20px;
    height: 20px;
    position: relative;
    transition: transform var(--transition-speed) ease;
}

.accordion-icon::before,
.accordion-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 2px;
    background-color: var(--color-primary);
    transform: translate(-50%, -50%);
    transition: transform var(--transition-speed) ease;
}
.accordion-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.accordion-header[aria-expanded="true"] .accordion-icon {
    transform: rotate(180deg);
}

.accordion-header[aria-expanded="true"] .accordion-icon::after {
    transform: translate(-50%, -50%) rotate(0deg);
}


.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
}

.accordion-content p {
    padding: 0 0 1.5rem;
    margin: 0;
    color: var(--color-text-muted);
}

/* -------------------------------------------------- */
/* 8. Footer                                          */
/* -------------------------------------------------- */
.site-footer {
    background-color: var(--color-text);
    color: var(--color-text-light);
    padding: 3rem 0 0;
}

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

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

.footer-column p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

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

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

.footer-column ul a, .social-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: color var(--transition-speed) ease, padding-left var(--transition-speed) ease;
}

.footer-column ul a:hover, .social-links a:hover {
    color: var(--color-accent);
    padding-left: 5px;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

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

.footer-bottom p {
    margin: 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

/* -------------------------------------------------- */
/* 9. Static & Special Pages                          */
/* -------------------------------------------------- */
.static-page-content,
.success-page-content {
    padding: calc(var(--header-height) + 40px) 0;
}

.static-page-content h1 {
    margin-bottom: 2rem;
}
.static-page-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.success-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 100vh;
    background-color: var(--color-background-section);
}
.success-page-content {
    max-width: 600px;
}
.success-page-content h1 {
    color: var(--color-primary);
}


/* -------------------------------------------------- */
/* 10. Responsive Media Queries                       */
/* -------------------------------------------------- */

/* --- Tablet (up to 768px) --- */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%; /* Start off-screen */
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--color-background);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: right var(--transition-speed) var(--transition-easing);
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    }
    
    .nav-links.active {
        right: 0; /* Slide in */
    }

    .burger-menu {
        display: block;
    }

    .hero-section {
        background-attachment: scroll; /* Disable parallax on mobile for performance */
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-column ul {
        display: inline-block;
        text-align: center;
    }
    .social-links {
      align-items: center;
    }
}

/* --- Mobile (up to 480px) --- */
@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }

    .container {
        width: 95%;
    }
    
    .section-padding {
        padding: 60px 0;
    }

    .portfolio-grid, .blog-grid, .process-grid {
        grid-template-columns: 1fr;
    }

    .btn {
        padding: 12px 24px;
        width: 100%;
    }
    
    .contact-form .btn {
      width: auto;
    }
}