/*
  style.css
  Theme: Automatización para Talleres Mecánicos
  Design System: Futurista con Eco-minimalismo
  Color Scheme: Complementaria
  Animation Style: Animaciones dibujadas
  Fonts: Manrope (headings), Rubik (body)
*/

/* ---------------------------------- */
/*          CSS Variables             */
/* ---------------------------------- */
:root {
  --primary-color: #0D2B3E; /* Azul marino profundo y futurista */
  --secondary-color: #FF8C42; /* Naranja vibrante como complemento */
  --accent-color: #4AA7A6; /* Verde azulado para toques ecológicos */
  --bg-light: #f0f4f8; /* Fondo claro, limpio y minimalista */
  --bg-dark: var(--primary-color);
  --text-dark: #222222; /* Texto oscuro de alto contraste */
  --text-light: #FFFFFF;
  --text-muted: #6b7280;
  --border-color: #d1d5db;
  --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --border-radius-md: 0.5rem; /* 8px */
  --border-radius-lg: 1rem; /* 16px */
  --transition-cubic: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-duration: 0.4s;

  --font-heading: 'Manrope', sans-serif;
  --font-body: 'Rubik', sans-serif;
}

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

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

a {
  color: var(--secondary-color);
  transition: color var(--transition-duration) ease;
}

a:hover {
  color: var(--accent-color);
}

section {
  padding: 5rem 1.5rem; /* 80px 24px */
}

.container {
  max-width: 1200px;
}

/* Ensure background images cover their container and don't repeat */
[style*="background-image"] {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* ---------------------------------- */
/*       Header & Navigation          */
/* ---------------------------------- */
#header {
  transition: all 0.3s ease-in-out;
}

#header nav a {
    position: relative;
    padding-bottom: 0.5rem;
}

#header nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width var(--transition-duration) var(--transition-cubic);
}

#header nav a:hover::after {
    width: 100%;
}


/* ---------------------------------- */
/*       Buttons & Forms              */
/* ---------------------------------- */
/* Global button styles */
.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 9999px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: transform var(--transition-duration) var(--transition-cubic), box-shadow 0.3s ease;
  will-change: transform;
}

.btn-primary {
  background-color: var(--secondary-color);
  color: var(--text-light);
  box-shadow: 0 4px 14px 0 rgba(255, 140, 66, 0.39);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 7px 20px 0 rgba(255, 140, 66, 0.45);
  color: var(--text-light);
}

.btn-secondary {
  background-color: transparent;
  color: var(--secondary-color);
  border: 2px solid var(--secondary-color);
}

.btn-secondary:hover {
  background-color: var(--secondary-color);
  color: var(--text-light);
  transform: translateY(-3px);
  box-shadow: 0 7px 20px 0 rgba(255, 140, 66, 0.3);
}

/* Form Styles */
input[type="text"],
input[type="email"],
textarea {
  border-radius: var(--border-radius-md);
  padding: 0.8rem 1rem;
  border: 2px solid var(--border-color);
  transition: all 0.3s ease;
  font-family: var(--font-body);
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.2);
}

/* ---------------------------------- */
/*          Card Components           */
/* ---------------------------------- */
/* General card styles applied to all card-like elements */
.card, .info-card, .event-item {
  background-color: var(--text-light);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--card-shadow);
  transition: transform var(--transition-duration) var(--transition-cubic), box-shadow 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.card:hover, .info-card:hover, .event-item:hover {
  transform: translateY(-10px);
  box-shadow: var(--card-shadow-hover);
}

.card-content {
  padding: 1.5rem;
  flex-grow: 1; /* Allows footer elements to stick to the bottom */
  display: flex;
  flex-direction: column;
}

/* Strict centering for card images */
.card-image {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.card-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: cover;
  margin: 0 auto;
}

/* Ensure consistent image sizes in specific contexts */
.event-item .card-image img {
  height: 250px;
}


/* ---------------------------------- */
/*       Section Specific Styles      */
/* ---------------------------------- */

/* Hero Section */
#hero h1 {
  color: var(--text-light);
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}
#hero p {
  color: var(--text-light);
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}

/* Success Stories - Slick Slider */
.custom-slider .slick-slide {
  padding: 0 1rem;
}
.custom-slider .slick-dots {
  bottom: -40px;
}
.custom-slider .slick-dots li button:before {
  font-size: 14px;
  color: var(--secondary-color);
  opacity: 0.5;
}
.custom-slider .slick-dots li.slick-active button:before {
  opacity: 1;
}

/* Events Section Progress Bar */
@keyframes draw-progress {
  from {
    width: 0;
  }
}

.progress-bar-fill {
  background: linear-gradient(90deg, var(--accent-color), var(--secondary-color));
  animation: draw-progress 2s var(--transition-cubic) forwards;
}

/* "Read More" link style */
.read-more-link {
    font-weight: bold;
    color: var(--secondary-color);
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
}
.read-more-link::after {
    content: '→';
    position: absolute;
    right: -1.2em;
    opacity: 0;
    transition: right 0.3s ease, opacity 0.3s ease;
}
.read-more-link:hover::after {
    right: -1.5em;
    opacity: 1;
}

/* Footer */
footer a {
    color: var(--text-muted);
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--text-light);
}

footer .social-links a {
    margin: 0 0.5rem;
    font-size: 1.5rem;
}

/* ---------------------------------- */
/*        Special Page Styles         */
/* ---------------------------------- */
/* Styles for success.html */
.success-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    background-color: var(--bg-light);
    padding: 2rem;
}
.success-page .success-card {
    background-color: var(--text-light);
    padding: 3rem 4rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--card-shadow);
}
.success-page h1 {
    color: var(--accent-color);
    font-size: 3rem;
    margin-bottom: 1rem;
}
.success-page p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Styles for privacy.html & terms.html */
.legal-page, .about-page, .contact-page {
    padding-top: 120px; /* Offset for sticky header */
    padding-bottom: 80px;
}
.legal-page .content-wrapper, .about-page .content-wrapper, .contact-page .content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: var(--text-light);
    padding: 2rem 3rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--card-shadow);
}
.legal-page h1, .about-page h1, .contact-page h1 {
    margin-bottom: 2rem;
    text-align: center;
}
.legal-page h2, .about-page h2, .contact-page h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}
.legal-page p, .legal-page ul, .about-page p, .contact-page p {
    line-height: 1.8;
    margin-bottom: 1rem;
}
.legal-page ul {
    list-style-position: inside;
    list-style-type: disc;
}

/* ---------------------------------- */
/*          Responsive Design         */
/* ---------------------------------- */
@media (max-width: 768px) {
  section {
    padding: 3rem 1rem;
  }
  .section-title {
    font-size: 2.5rem; /* Adjust title size for smaller screens */
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .event-item .card-image {
    order: 0 !important; /* Reset order for mobile */
  }
}