:root {
  --primary-color: #F26A21;
  --secondary-color: #008C8C;
  --dark-color: #0A2836;
  --light-bg: #F5F7F9;
  --text-muted: #6C757D;
  --white: #FFFFFF;
}

body {
  font-family: 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--dark-color);
  background-color: var(--white);
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand,
.btn {
  font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 500;
}

h1,
h2,
h3 {
  font-weight: 700;
}

/* Typography & Colors Override */
.text-primary {
  color: var(--primary-color) !important;
}

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

.text-dark {
  color: var(--dark-color) !important;
}

.bg-light {
  background-color: var(--light-bg) !important;
}

.bg-dark-blue {
  background-color: var(--dark-color) !important;
}

.bg-primary-theme {
  background-color: var(--primary-color) !important;
}

/* Buttons */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--white);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: #d95e1d;
  /* slightly darker orange */
  border-color: #d95e1d;
  box-shadow: 0 4px 8px rgba(242, 106, 33, 0.3);
  color: var(--white);
}

.btn-outline-secondary {
  color: var(--secondary-color);
  border-color: var(--secondary-color);
  transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
  background-color: var(--secondary-color);
  color: var(--white);
  box-shadow: 0 4px 8px rgba(0, 140, 140, 0.3);
}

/* Navbar */
.navbar {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  background-color: var(--white);
}

.navbar-nav .nav-link {
  color: var(--dark-color);
  font-weight: 500;
  margin: 0 10px;
  position: relative;
  transition: color 0.3s ease;
}

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

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after {
  width: 100%;
}

/* Hero Slider */
.hero-slider .carousel-item {
  height: calc(100vh - 86px);
  /* 86px is the approximate height of the sticky navbar */
  min-height: 500px;
  background: no-repeat center center scroll;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
  position: relative;
  overflow: hidden;
}

.hero-slider .carousel-item::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(135deg, rgba(10, 40, 54, 0.7) 0%, rgba(10, 40, 54, 0.4) 100%);
}

.hero-slide-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  transition: transform 8s ease-out;
  z-index: -1;
}

.carousel-item.active .hero-slide-img {
  transform: scale(1.0);
}

.hero-content {
  position: relative;
  z-index: 1;
  color: var(--white);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* Service Cards */
.service-card {
  background: var(--white);
  border: none;
  border-bottom: 3px solid transparent;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  height: 100%;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  border-bottom-color: var(--secondary-color);
}

.service-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}

/* Timeline/Steps */
.step-item {
  text-align: center;
  position: relative;
  padding: 20px;
}

.step-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-color);
  opacity: 0.2;
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 0;
}

.step-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: var(--light-bg);
  color: var(--primary-color);
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  position: relative;
  z-index: 1;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Timeline styles */
.timeline-step {
  position: relative;
}

.timeline-step::before {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 100%;
  background-color: var(--bs-primary);
  left: 50%;
  z-index: 0;
  opacity: 0.2;
}

@media (max-width: 991.98px) {
  .timeline-step::before {
    display: none;
  }
}

/* Utilities Extended */
.mt-n5 {
  margin-top: -3rem !important;
}

/* Counter styles */
.counter-value {
  display: inline-block;
  min-width: 80px;
}

/* Logo Image styling */
.logo-brand img {
  max-height: 50px;
  width: auto;
  object-fit: contain;
}

/* Metrics/Counters */
.counter-box {
  padding: 30px;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.counter-box:last-child {
  border-right: none;
}

.counter-number {
  font-size: 3.5rem;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  margin-bottom: 10px;
}

/* Footer styles */
footer {
  font-size: 0.95rem;
}

footer a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: all 0.3s ease;
}

footer a:hover {
  color: var(--bs-white);
  text-decoration: underline;
}

/* Floating WhatsApp Button */
.floating-whatsapp {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #25d366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  text-align: center;
  font-size: 35px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
  text-decoration: none;
}

.floating-whatsapp:hover {
  transform: scale(1.1);
  color: white;
  text-decoration: none;
}

/* ============================================
   SLIDE ALQUILER ASEGURADO - Nuevo slide hero
   ============================================ */

/* Fondo del slide */
.slide-alquiler-asegurado {
  background-color: var(--dark-color);
  position: relative;
  overflow: hidden;
}

/* Capa oscura (Overlay) específica para el slide del coche */
/* Reemplazamos la capa global del slider por una que difumine de oscuro a transparente */
.hero-slider .slide-alquiler-asegurado::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(90deg, rgba(10, 40, 54, 0.95) 0%, rgba(10, 40, 54, 0.8) 45%, rgba(10, 40, 54, 0.1) 100%);
  z-index: 1;
}

/* Badge de oferta */
.slide-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(242, 106, 33, 0.15);
  border: 1px solid rgba(242, 106, 33, 0.5);
  color: var(--primary-color);
  font-family: 'Poppins', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  padding: 6px 16px;
  border-radius: 50px;
  text-transform: uppercase;
}

/* Título principal */
.slide-main-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: #ffffff;
  text-transform: uppercase;
}

/* Palabra de acento en naranja */
.slide-accent-word {
  color: var(--primary-color);
  display: block;
  -webkit-text-stroke: 1px rgba(242, 106, 33, 0.3);
}

/* Subtítulo */
.slide-subtitle {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  border-left: 4px solid var(--primary-color);
  padding-left: 14px;
}

/* Texto de apoyo principal */
.slide-body-text {
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.7;
  max-width: 540px;
}

.slide-body-text strong {
  color: #fff;
  font-weight: 700;
}

/* Texto secundario */
.slide-secondary-text {
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.7;
  max-width: 520px;
}

/* Botón CTA del slide */
.btn-slide-cta {
  background-color: var(--primary-color);
  border: 2px solid var(--primary-color);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(242, 106, 33, 0.4);
}

.btn-slide-cta:hover {
  background-color: #d95e1d;
  border-color: #d95e1d;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(242, 106, 33, 0.5);
}

/* Texto legal pequeño */
.slide-legal-text {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.5;
  max-width: 520px;
  font-style: italic;
}

/* ============================================
   SECCIÓN OFERTA ESPECIAL PARALLAX
   ============================================ */
.parallax-oferta {
  /* Imagen placeholder de alta calidad de una vivienda */
  background-image: url('https://images.unsplash.com/photo-1512917774080-9991f1c4c750?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.parallax-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 40, 54, 0.88); /* Color oscuro de la marca con opacidad */
  z-index: 0;
}

.z-1 {
  z-index: 1;
}

.backdrop-blur {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.CTA-oferta {
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.CTA-oferta:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(242, 106, 33, 0.6) !important;
}

/* Media Queries */
@media (max-width: 991px) {
  .hero-slider .carousel-item {
    height: auto;
    min-height: 100vh;
  }

  .hero-slider .slide-alquiler-asegurado::before {
    /* En móvil, el coche quedará detrás del texto, por lo que necesitamos un fondo oscuro uniforme */
    background: rgba(10, 40, 54, 0.75);
  }

  .parallax-oferta {
    /* Desactivar parallax en móvil porque suele dar problemas de rendimiento en iOS Safari */
    background-attachment: scroll;
  }

  /* Slide asegurado en móvil */
  .slide-alquiler-asegurado .container {
    padding-top: 80px;
    padding-bottom: 60px;
  }

  .slide-main-title {
    font-size: 2.4rem;
  }

  .slide-subtitle {
    font-size: 1rem;
    border-left: none;
    padding-left: 0;
    text-align: center;
  }

  .slide-body-text,
  .slide-secondary-text,
  .slide-legal-text {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }

  .slide-badge {
    font-size: 0.65rem;
  }

  .counter-box {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .counter-box:last-child {
    border-bottom: none;
  }
}

@media (max-width: 575px) {
  .slide-main-title {
    font-size: 2rem;
  }

  .btn-slide-cta {
    font-size: 0.82rem;
    padding: 12px 24px !important;
    width: 100%;
    text-align: center;
  }

  .slide-body-text {
    font-size: 0.9rem;
  }
}