/* --- Reseteo Básico y Variables Globales --- */
:root {
  --color-primary: #f37f21;
  --color-secondary: #0033a0;
  --color-dark: #2c3e50;
  --color-text: #34495e;
  --color-light-gray: #f8f9fa;
  --color-white: #ffffff;
  --font-heading: "Oswald", sans-serif;
  --font-body: "Roboto", sans-serif;
  --container-width: 1100px;
  --border-radius: 8px;
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  --transition-speed: 300ms;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  line-height: 1.7;
  background-color: var(--color-white);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  color: var(--color-secondary);
  text-transform: uppercase;
}

/* --- Estilos de Contenedores Generales --- */
.header__container,
.services__container,
.about__container,
.vehicles__container,
.contact__container,
.footer__container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Estilos de Botones Genéricos --- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  text-decoration: none;
  text-align: center;
  font-weight: bold;
  font-family: var(--font-body);
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn--primary {
  background-color: var(--color-primary);
  color: var(--color-white) !important;
}

.btn--primary:hover {
  background-color: #d8680c;
  transform: scale(1.02);
}

.btn--secondary {
  background-color: var(--color-dark);
  color: var(--color-white) !important;
}

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

/* --- Bloque: Intro Hero (MODIFICADO PARA VIDEO) --- */
.intro-hero {
  position: relative;
  height: 70vh; /* Altura de la sección */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.intro-hero__video {
  position: absolute;
  top: 50%;
  left: -15%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  z-index: 1;
}

@media (min-width: 769px) {
  .intro-hero__video {
    left: 50%;
  }
}

.intro-hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* Capa oscura para legibilidad */
  z-index: 2;
}

.intro-hero__container {
  position: relative;
  z-index: 3;
  text-align: center;
}

.intro-hero__title {
  font-size: 3rem;
  color: var(--color-white);
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
  line-height: 1.2;
}

/* --- Bloque: Header --- */
.header {
  background-color: var(--color-white);
  box-shadow: var(--shadow);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

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

.header__logo img {
  height: 45px;
}

/* Navegación para Desktop */
.header__nav {
  display: none; /* Oculto por defecto (Mobile First) */
}

.header__nav-link {
  color: var(--color-dark);
  text-decoration: none;
  margin-left: 25px;
  font-weight: bold;
  transition: color 0.3s ease;
}

.header__nav-link:hover {
  color: var(--color-primary);
}

/* Menú Hamburguesa (Mobile) */
.header__nav-toggle-input {
  display: none;
}
.header__nav-toggle-label {
  display: flex;
  flex-direction: column;
  width: 30px;
  height: 30px;
  justify-content: space-around;
  cursor: pointer;
  z-index: 1001;
}
.header__nav-toggle-label span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--color-secondary);
  border-radius: 3px;
  transition: transform var(--transition-speed) ease,
    opacity var(--transition-speed) ease;
}

/* Animación de la hamburguesa a "X" */
.header__nav-toggle-input:checked
  ~ .header__nav-toggle-label
  span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}
.header__nav-toggle-input:checked
  ~ .header__nav-toggle-label
  span:nth-child(2) {
  opacity: 0;
}
.header__nav-toggle-input:checked
  ~ .header__nav-toggle-label
  span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Menú desplegable en Mobile */
.header__nav-toggle-input:checked ~ .header__nav {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--color-white);
  width: 100%;
  padding: 1rem 5%;
  border-top: 1px solid #eee;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.header__nav-link {
  margin: 0.5rem 0;
  padding: 0.5rem 0;
  width: 100%;
}

/* Media Query para mostrar menú normal en Desktop */
@media (min-width: 769px) {
  .header__nav-toggle-label {
    display: none;
  }
  .header__nav {
    display: flex !important; /* Asegura que se muestre */
    flex-direction: row;
    position: static;
    width: auto;
    padding: 0;
    border-top: none;
    box-shadow: none;
  }
  .header__nav-link {
    margin: 0 0 0 25px;
    padding: 0;
    width: auto;
  }
}

/* --- Bloque: Hero y Carrusel (BEM y Mobile First) --- */
.hero {
  padding: 2rem 0 4rem 0; /* Padding ajustado */
  text-align: center;
  background-color: var(--color-light-gray);
}

.hero__title {
  font-size: 2.2rem;
  margin-bottom: 2rem;
  padding: 0 20px;
}

.hero__carousel-wrapper {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.hero__carousel {
  width: 90%;
  height: 50vh;
  max-height: 300px;
  margin: auto;
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.hero__carousel .swiper-slide {
  height: 100%;
  display: block;
}

.hero__carousel-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.hero__carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.4) 40%
  );
  color: var(--color-white);
  padding: 1.5rem 1rem 1rem;
  text-align: left;
}

.hero__carousel-caption-title {
  font-family: var(--font-heading);
  color: var(--color-white);
  margin: 0;
  font-size: 1.2rem;
}

.hero__carousel-caption-text {
  margin: 0.5rem 0 0;
  font-size: 1rem;
  color: var(--color-primary);
}

/* Controles de Swiper */
.hero__carousel-pagination {
  bottom: 8px !important;
  z-index: 3;
}

.hero__carousel-pagination .swiper-pagination-bullet-active {
  background: var(--color-white) !important;
  transform: scale(1.2);
}

.hero__carousel-pagination .swiper-pagination-bullet {
  background: rgba(255, 255, 255, 0.7);
  opacity: 1;
}

.hero__carousel-button--prev,
.hero__carousel-button--next {
  display: none;
}

/* --- Bloque: Services --- */
.services {
  padding: 5rem 0;
}

.services__container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.services__card {
  background: var(--color-white);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow);
  border-radius: var(--border-radius);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.services__card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

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

/* --- Bloque: About --- */
.about {
  padding: 5rem 0;
  background-color: var(--color-white);
}

.about__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
}

.about__text-content {
  text-align: center;
}

.about__title {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
}

.about__image-content img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

/* --- Bloque: Vehicles --- */
.vehicles {
  padding: 5rem 0;
  background-color: var(--color-light-gray);
}

.vehicles__container {
  text-align: center;
}

.vehicles__title {
  font-size: 2.2rem;
  margin-bottom: 3rem;
}

.vehicles__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.vehicle-card {
  background: var(--color-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-align: left;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.vehicle-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.vehicle-card__image {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.vehicle-card__body {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.vehicle-card__title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.vehicle-card__specs {
  color: #777;
  margin-bottom: 1rem;
}

.vehicle-card__price {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.vehicle-card__button {
  display: inline-block;
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  text-decoration: none;
  text-align: center;
  font-weight: bold;
  transition: background-color 0.3s ease;
  margin-top: auto;
}

.vehicle-card__button:hover {
  background-color: #d8680c;
}

.vehicles__view-all-container {
  text-align: center;
  margin-top: 3rem;
}

/* --- Bloque: Contact & Form --- */
.contact {
  padding: 5rem 0;
  background-color: var(--color-white);
}

.contact__container {
  max-width: 700px;
  text-align: center;
}

.contact__title {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.contact__subtitle {
  margin-bottom: 2rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  text-align: left;
}

.contact-form__group {
  display: flex;
  flex-direction: column;
}

.contact-form__label {
  margin-bottom: 0.5rem;
  font-weight: bold;
  color: var(--color-dark);
}

.contact-form__input,
.contact-form__textarea {
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-family: var(--font-body);
}

.contact-form__input:focus,
.contact-form__textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 5px rgba(243, 127, 33, 0.5);
}

.contact-form__button {
  background-color: var(--color-primary);
  color: var(--color-white);
  border: none;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-family: var(--font-body);
  text-transform: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.contact-form__button:hover {
  background-color: #d8680c;
  transform: scale(1.02);
}

.form-message {
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: var(--border-radius);
  text-align: center;
  font-weight: bold;
  display: none;
}
.form-message.success {
  display: block;
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}
.form-message.error {
  display: block;
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.honeypot-field {
  display: none;
}

/* --- Elemento: WhatsApp Floating Action Button --- */
.whatsapp-fab {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background-color: #25d366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 100;
  transition: transform 0.3s ease;
}

.whatsapp-fab:hover {
  transform: scale(1.1);
}

.whatsapp-fab svg {
  width: 32px;
  height: 32px;
}

/* --- Bloque: Footer --- */
.footer {
  background-color: var(--color-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 4rem 0 2rem;
  text-align: center;
}

.footer__container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer__logo {
  height: 40px;
  margin-bottom: 1rem;
}

.footer__title {
  font-size: 1.2rem;
  color: var(--color-white);
  margin-bottom: 1rem;
}

.footer__contact-list {
  list-style: none;
  padding: 0;
}

.footer__contact-list li {
  margin-bottom: 0.75rem;
}

.footer__social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.footer__social-links a {
  color: var(--color-white);
  transition: color 0.3s ease;
}
.footer__social-links a:hover {
  color: var(--color-primary);
}

.footer__social-links svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.footer__copyright {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer__admin-link {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer__admin-link:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.footer__developer-credit {
  text-align: center;
  padding: 1rem 0;
  margin-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer__developer-credit a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.footer__developer-credit a:hover {
  color: var(--color-white);
}

/* --- Media Queries para Responsividad (Desktop) --- */

@media (min-width: 769px) {
  .intro-hero__title {
    font-size: 4.5rem;
  }
  h2.hero__title,
  h2.about__title,
  h2.vehicles__title,
  h2.contact__title {
    font-size: 2.8rem;
  }

  .services__container {
    flex-direction: row;
  }

  .about__container {
    flex-direction: row;
    text-align: left;
  }

  .vehicles__grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }

  .footer__container {
    flex-direction: row;
    text-align: left;
  }

  .footer__social-links {
    justify-content: flex-start;
  }

  .hero__carousel {
    width: 85%;
    max-height: 450px;
  }
  .hero__carousel-caption-title {
    font-size: 1.5rem;
  }
  .hero__carousel-caption-text {
    font-size: 1.2rem;
  }
}

@media (min-width: 1024px) {
  .hero__carousel {
    width: 100%;
    max-width: 800px; /* Hacemos el carrusel un poco más angosto */
    height: 550px; /* Y un poco más alto */
    max-height: 550px;
  }

  .hero__carousel-button--prev,
  .hero__carousel-button--next {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white) !important;
    background-color: rgba(0, 51, 160, 0.5);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    top: 50%;
    transform: translateY(-50%);
    transition: background-color 0.3s ease;
    z-index: 3;
  }

  .hero__carousel-button--prev:hover,
  .hero__carousel-button--next:hover {
    background-color: rgba(0, 51, 160, 0.8);
  }

  .hero__carousel-button--prev {
    left: 20px !important;
  }

  .hero__carousel-button--next {
    right: 20px !important;
  }
}
