/*
* File: style.css
* Author: AI Assistant
* Description: Stylesheet for the 'YPF Argentina' website, featuring a Creative design system, Bright color scheme, and Morphing animations.
*/

/* --------------------------------
 * CSS Variables (Theme)
 * -------------------------------- */
:root {
  /* Colors */
  --primary-color: #0073e6; /* YPF Blue */
  --secondary-color: #ff9900; /* Bright Orange Accent */
  --dark-color: #222222;
  --body-text-color: #4a4a4a;
  --light-gray-color: #f8f9fa;
  --white-color: #ffffff;
  --success-color: #28a745;
  --error-color: #dc3545;

  /* Typography */
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Source Sans Pro', sans-serif;

  /* Spacing & Sizing */
  --border-radius: 15px;
  --header-height: 80px;
  --transition-speed: 0.4s;
}

/* --------------------------------
 * Global & Base Styles
 * -------------------------------- */
body {
  font-family: var(--font-body);
  color: var(--body-text-color);
  background-color: var(--white-color);
  line-height: 1.7;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--dark-color);
}

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

a:hover {
  color: var(--secondary-color);
  text-decoration: none;
}

section {
  padding: 80px 0;
  overflow: hidden;
  position: relative;
}

.section-title {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  color: var(--dark-color);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .section-title {
    font-size: 2.2rem;
  }
  section {
    padding: 60px 0;
  }
}

/* --------------------------------
 * Utility & Helper Classes
 * -------------------------------- */
.page-container {
  padding-top: var(--header-height);
  padding-bottom: 60px;
}

.bg-light-morph {
  background-color: var(--light-gray-color);
  clip-path: polygon(0 0, 100% 5%, 100% 100%, 0 95%);
}

.section-curved-top {
    margin-top: -1px;
    padding-top: 120px;
    background-color: var(--white-color);
    clip-path: ellipse(100% 55% at 48% 46%);
}

.section-curved-bottom {
    padding-bottom: 120px;
    background-color: var(--light-gray-color);
    clip-path: ellipse(120% 60% at 50% 50%);
}

/* --------------------------------
 * Header / Navbar
 * -------------------------------- */
.navbar {
  height: var(--header-height);
  background: rgba(10, 25, 47, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background-color var(--transition-speed) ease;
}

.navbar .navbar-brand {
  color: var(--white-color);
}

.navbar .nav-link {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  transition: color var(--transition-speed) ease;
  padding: 0.5rem 1rem;
  position: relative;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--white-color);
}

.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 var(--transition-speed) ease-in-out;
}

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

.navbar-toggler {
  border: none;
}

.navbar-toggler:focus {
  box-shadow: none;
}

/* --------------------------------
 * Buttons & Forms
 * -------------------------------- */
.custom-btn, .btn-primary {
  background-color: var(--primary-color);
  border: 2px solid var(--primary-color);
  color: var(--white-color);
  padding: 12px 30px;
  font-weight: 600;
  border-radius: 50px;
  transition: all var(--transition-speed) ease;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.custom-btn:hover, .btn-primary:hover {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  color: var(--white-color);
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
  padding: 10px 25px;
  border-radius: 50px;
  transition: all var(--transition-speed) ease;
}

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

.form-control {
  background-color: #f0f4f8;
  border: 2px solid transparent;
  border-radius: var(--border-radius);
  padding: 15px;
  transition: border-color var(--transition-speed) ease;
}

.form-control:focus {
  background-color: var(--white-color);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 115, 230, 0.25);
}

.form-label {
  font-weight: 600;
  color: var(--dark-color);
}

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

#hero h1, #hero .display-3 {
    color: var(--white-color);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

#hero .lead {
    color: var(--white-color);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}

/* --------------------------------
 * Section: Cards (Features, Testimonials, Resources)
 * -------------------------------- */
.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
  display: flex;
  flex-direction: column;
  text-align: center;
}

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

.card .card-image {
  width: 100%;
  height: 250px; /* Fixed height for image containers */
  overflow: hidden;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

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

.card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.testimonial-card .card-content {
  background: linear-gradient(135deg, var(--light-gray-color), var(--white-color));
}

.testimonial-card img {
  border: 4px solid var(--primary-color);
  margin: 0 auto;
}

/* --------------------------------
 * Section: Statistics
 * -------------------------------- */
#stats .stat-card {
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: var(--border-radius);
    transition: all var(--transition-speed) ease;
    backdrop-filter: blur(5px);
}

#stats .stat-card:hover {
    background-color: var(--white-color);
    transform: scale(1.05);
}

#stats .stat-number {
    font-size: 3.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

#stats .stat-label {
    font-size: 1.1rem;
    color: var(--dark-color);
    font-weight: 600;
}

/* --------------------------------
 * Section: Gallery (Carousel)
 * -------------------------------- */
#gallery .carousel-item {
  height: 60vh;
}

#gallery .carousel-item img {
  object-fit: cover;
  height: 100%;
  width: 100%;
}

#gallery .carousel-caption {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  border-radius: 0 0 var(--border-radius) var(--border-radius);
}

#gallery .carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--white-color);
    opacity: 0.7;
    transition: opacity var(--transition-speed) ease;
}

#gallery .carousel-indicators .active {
    opacity: 1;
    background-color: var(--primary-color);
}

/* --------------------------------
 * Section: Success Stories (Accordion)
 * -------------------------------- */
.accordion-item {
    border: none;
    margin-bottom: 1rem;
    border-radius: var(--border-radius) !important;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.accordion-header {
    border: none;
}

.accordion-button {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark-color);
    background-color: var(--white-color);
    border: none;
    transition: background-color var(--transition-speed) ease;
}

.accordion-button:not(.collapsed) {
    color: var(--primary-color);
    background-color: #e7f1ff;
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 115, 230, 0.25);
}

.accordion-body {
    background-color: var(--white-color);
}

/* --------------------------------
 * Section: Contact
 * -------------------------------- */
.contact-form {
    background: var(--white-color);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .contact-form {
        padding: 1.5rem;
    }
}

/* --------------------------------
 * Footer
 * -------------------------------- */
footer {
  background-color: var(--dark-color);
  color: rgba(255, 255, 255, 0.7);
}

footer h6 {
  color: var(--white-color);
}

footer .text-reset {
  color: rgba(255, 255, 255, 0.7) !important;
  text-decoration: none;
  transition: color var(--transition-speed) ease;
}

footer .text-reset:hover {
  color: var(--secondary-color) !important;
}

/* --------------------------------
 * Special Pages (Success, Privacy, Terms)
 * -------------------------------- */
.success-page-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--white-color);
}

.success-page-container h1 {
  color: var(--white-color);
  font-size: 4rem;
  text-shadow: 2px 2px 5px rgba(0,0,0,0.2);
}

.success-page-container p {
  font-size: 1.2rem;
}

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

.success-page-container .btn:hover {
  background-color: transparent;
  color: var(--white-color);
}