/* ========== VARIABLES DE COLOR (cambiar aquí para actualizar toda la página) ========== */
/* Si cambias --color-primario, actualiza también el stroke del menú hamburguesa en móvil
   (busca "navbar-toggler-icon" y el valor %23262262 en la URL del SVG). */
:root {
  --color-fondo: #E6E6E6;
  --color-primario: #262262;
  --color-acento: #dfb439;
  --color-blanco: #ffffff;
  --color-negro: #000000;
  --color-gris-hover: #8f8686;
  --color-texto-secundario: #666;
  --color-texto-oscuro: #333;
  --color-sombra: rgba(0, 0, 0, 0.7);
  --color-sombra-suave: rgba(0, 0, 0, 0.45);
  --color-sombra-boton: rgba(0, 0, 0, 0.35);
}

html {
  overflow-x: hidden;
}

body {
  background: var(--color-fondo);
  color: var(--color-negro);
  font-family: 'Open Sans', sans-serif;
  overflow-x: hidden;
}

/* Párrafos de más de una línea: alineación a la izquierda */
p {
  text-align: left;
}

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

/* Navbar fijo en toda la página (queda sobre el hero, sin reservar espacio arriba) */
.navbar {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  transition: background-color 0.35s ease, box-shadow 0.35s ease;
}

/* Estado inicial: transparente, letras blancas (el botón Contáctanos no cambia) */
.navbar.navbar-transparent {
  background-color: transparent !important;
  box-shadow: none !important;
}
.navbar.navbar-transparent .navbar-brand,
.navbar.navbar-transparent .nav-link:not(.btn-nav-contacto) {
  color: var(--color-blanco) !important;
}

/* Estado al hacer scroll: fondo sólido, letras azules (el botón se mantiene igual) */
.navbar.navbar-solid {
  background-color: var(--color-fondo) !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.navbar.navbar-solid .navbar-brand,
.navbar.navbar-solid .nav-link:not(.btn-nav-contacto) {
  color: var(--color-primario) !important;
}

textarea{
  color: var(--color-blanco);
}

input{
  color: var(--color-blanco);
}


.seccion-negra {
  padding: 150px 0;
  background: var(--color-fondo);
}

.titulo-amarillo {
  color: var(--color-primario);
  font-weight: bold;
  font-size: 40px;
}



/*INICIO*/

/* CONTENEDOR DE CADA TARJETA */
.card-producto{
  width: 320px;
  margin: auto;
  cursor: pointer;
  transition: 0.4s;
}

/* IMAGEN */
.card-img img{
  width: 100%;
  height: 260px;
  object-fit: contain;
  display: block;
}

/* BLOQUE NEGRO */
.card-info{
  background: var(--color-fondo);
  border: 4px solid var(--color-primario);
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.4s;
  margin-top: -40px;
}

/* TEXTO */
.card-info h5{
  color: var(--color-primario);
  font-size: 28px;
  letter-spacing: 4px;
  margin: 0;
  transition: 0.4s;
}

/* HOVER */
.card-producto:hover .card-info{
  border-color: var(--color-acento);
}

.card-producto:hover .card-info h5{
  color: var(--color-acento);
}

/* ACTIVA */
.card-producto.activa .card-info{
  border-color: var(--color-acento);
}

.card-producto.activa .card-info h5{
  color: var(--color-acento);
}

.service{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin: 80px 0;
}

.service-img img{
    width: 100%;
    height: 420px;
    object-fit: cover;
    border-radius: 10px;
}

/* Alterna solo */
.service:nth-child(even) .service-img{
    order: 2;
}

.service-info h3{
    font-size: 32px;
}

.service-info p{
    margin-top: 20px;
    font-size: 18px;
    line-height: 1.6;
}


/*HERO*/
/* HERO NEGRO */


.hero-wrapper{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:60px;
  flex-wrap:wrap;
}

/* Hero con banner en parallax (como las otras fotos) */
.hero-section{
  position: relative;
  background: var(--color-fondo);
  background-image: url('../img/motores_motoreductores_reductores_banner_inicial.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 75vh;
  padding: 80px 0;
  display: flex;
  align-items: center;
}
/* Overlay oscuro para que el contenido se lea bien sobre la imagen */
.hero-section::before{
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 0;
}
.hero-section .container,
.hero-section .hero-wrapper{
  position: relative;
  z-index: 1;
}

/* LOGO */
.hero-logo{
  width: 600px;
  max-width: 100%;
}

.hero-logo img{
  width:600px;
  max-width:90%;
  filter: drop-shadow(0 30px 35px var(--color-sombra)); 
}

/* Animaciones al cargar — hero */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Animaciones suaves en tarjetas (el hero usa AOS desde el HTML) */
.card-producto {
  animation: fadeIn 0.5s ease-out;
}

/* FORM AMARILLO */
.hero-form{
  padding:60px;
  background: var(--color-primario);
  max-width: 520px;
  width: 100%;
}


.hero-form h2{
  text-align:center;
  color: var(--color-blanco);
  font-weight:500;
  margin-bottom:50px;
}

.hero-form input,
.hero-form textarea{
  width:100%;
  background:transparent;
  border:none;
  border-bottom:3px solid var(--color-blanco);
  margin-bottom:35px;
  padding:10px;
  font-size:18px;
}

.hero-form textarea{
  height:110px;
  resize:none;
}

.hero-form input:focus,
.hero-form textarea:focus{
  outline: none;
  box-shadow: none;
  border-bottom: 3px solid var(--color-blanco);
  transform: scale(1.02);
  transition: 0.2s;
}


.hero-form button{
  width:100%;
  padding:16px;
  background: var(--color-fondo);
  color: var(--color-negro);
  border:none;
  font-size:18px;
}

/* HOVER industrial elegante */
.hero-form button:hover{
  background: var(--color-gris-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 25px var(--color-sombra-suave);
}

/* CLICK (efecto presión) */
.hero-form button:active{
  transform: translateY(0);
  box-shadow: 0 6px 12px var(--color-sombra-boton);
}


/* PARALLAX — SECCIÓN APARTE */
/* PARALLAX — solo desktop */
.hero-parallax {
  height: 45vh;
  background-image: url('/img/motores-reductores-motoreductos-riu-el-pollo.webp');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.parallax {
  height: 45vh;
  background-image: url('/img/reductores_motores_usados_RUI_banner.webp');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

@media (min-width: 993px) {
  .hero-parallax,
  .parallax {
    background-attachment: fixed;
  }
}

@media (max-width: 992px) {
  .hero-parallax,
  .parallax {
    height: 25vh;
    background-attachment: scroll;
  }
}

/* RESPONSIVE — Hero con imagen de fondo y logo centrado en móvil */
@media (max-width: 992px){ 
  .hero-section{
    min-height: 70vh;
    height: auto;
    padding: 60px 0;
    padding-bottom: 60px;
    background-attachment: scroll; /* Parallax desactivado en móvil (mejor rendimiento) */
  }
  .hero-section::before{
    background: rgba(0, 0, 0, 0.5);
  }

  .hero-wrapper{
    justify-content: center;
  }

  .hero-logo{
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .hero-logo img{
    margin-left: auto;
    margin-right: auto;
  }

  .hero-logo,
  .hero-form{
    position:relative;
    width:90%;
    margin:40px auto;
    top:0;
    left:0;
    right:0;
    transform: none;
  }
}

@media (max-width: 576px) {
  .hero-section{
    min-height: 65vh;
    padding: 40px 0;
  }
}

/* QUIENES */
.quienes-section {
  background: var(--color-fondo);
  padding: 100px 0;
}

.quienes-box {
  background: var(--color-primario);
  color: var(--color-blanco);
  padding: 40px;
  font-size: 18px;
  font-weight: 300;
}

/* CONTACTO / FOOTER */
.contacto-section {
  background: #3d3891;
  color: var(--color-blanco);
}
.contacto-section svg path {
  fill: #3d3891;
}

/* Enlaces de contacto (usan color acento) */
.contacto-section a {
  color: var(--color-acento);
  text-decoration: none;
}
/* Teléfono y Visítanos en blanco; "AQUÍ" en negrita */
.contacto-section a.contacto-texto-blanco {
  color: var(--color-blanco) !important;
  display: block;
  margin-top: 0.5rem;
}
.contacto-section a.contacto-texto-blanco:first-of-type {
  margin-top: 0;
}
.contacto-section a.contacto-texto-blanco strong {
  font-weight: 700;
}

.contacto-section svg {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Footer en escritorio: menos alto (menos espacio vacío) y contenido un poco más grande */
@media (min-width: 768px) {
  .contacto-section .container {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }
  .contacto-section h5 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
  }
  .contacto-section a {
    font-size: 1.1rem;
  }
  .contacto-section .contacto-texto-blanco {
    font-size: 1.1rem;
  }
  .contacto-section lord-icon {
    width: 5.5rem !important;
    height: 5.5rem !important;
  }
  .contacto-section .col-md-4 img.img-fluid {
    max-width: 320px;
  }
  .contacto-section p.text-center {
    font-size: 1.05rem;
  }
}

/* Más espacio entre elementos en celulares */
@media (max-width: 767px) {
  .contacto-section .container {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }
  .contacto-section .row > [class*="col-"] {
    margin-bottom: 2.5rem;
  }
  .contacto-section .row > [class*="col-"]:last-child {
    margin-bottom: 0;
  }
  .contacto-section h5 {
    margin-bottom: 1rem;
  }
  .contacto-section .col-md-4 a:not(.contacto-texto-blanco) {
    display: inline-block;
    margin-top: 0.5rem;
  }
  .contacto-section a.contacto-texto-blanco {
    display: block;
    margin-top: 0.6rem;
  }
  .contacto-section a.contacto-texto-blanco:first-of-type {
    margin-top: 0;
  }
  .contacto-section .col-md-4 a + a {
    margin-top: 0.75rem;
  }
  .contacto-section hr {
    margin-top: 2rem;
    margin-bottom: 1.5rem;
  }
}

/* Navbar: marca y enlaces usan variables */
.navbar-brand {
  color: var(--color-primario) !important;
  align-items: center;
  font-size: 1.3rem;
}

.navbar .nav-link {
  color: var(--color-negro) !important;
}

.navbar .nav-link.link-acento {
  color: var(--color-acento) !important;
}

/* Botón Contáctanos en navbar: estilo WhatsApp (verde, letras blancas) */
.navbar .btn-nav-contacto {
  background: #25D366 !important;
  color: var(--color-blanco) !important;
  font-weight: bold;
  padding: 8px 20px;
  border-radius: 8px;
  border: none;
  transition: opacity 0.2s, transform 0.2s;
}
.navbar .btn-nav-contacto:hover {
  background: #20bd5a !important;
  opacity: 0.95;
  transform: translateY(-1px);
  color: var(--color-blanco) !important;
}




  /*boton whatssap*/
  #botonWhatsApp {
    position: fixed;
    z-index: 1000;
    bottom: 20px;
    right: 15px;
    width: 80px;
}

@media only screen and (max-width: 768px) {
  #botonWhatsApp {
      width: 50px;
      height: 50px;
      margin: 10px;
  }
}

/* Menú hamburguesa en móvil: blanco cuando navbar transparente, azul cuando sólido */
@media (max-width: 991.98px) {
  .navbar.navbar-transparent .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
  }
  .navbar.navbar-solid .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23262262' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
  }
}


/*SERVICIOS*/

.services-section {
  padding-top:20px;
  background-color: var(--color-fondo);
  text-align: center;
}

.services-content{
  margin: 0 auto; 
}

.services-section h2 {
  font-size: 36px;
  color: var(--color-negro);
  margin-bottom: 40px; 
  margin-top: 40px;
}

.service-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px 0;
}

.service-item:last-child {
  border-bottom: none; 
}


.service-item img {
  width: 50%; 
  height: 250px; 
  object-fit: cover; 
  margin-left: -20px;
}

@media (max-width: 768px) {
  .service-item img {
    margin-left: 0;
  }
}

.service-content {
  width: 50%; 
  text-align: left;
  padding-left: 20px;
}


.service-content h3 {
  font-size: 28px;
  color: var(--color-negro);
  margin-bottom: 10px;
}

.service-content p {
  font-size: 18px;
  color: var(--color-texto-secundario);
  margin-bottom: 20px;
}

.service-content .contact-btn {
  padding: 10px 20px;
  background-color: var(--color-acento);
  color: var(--color-blanco);
  font-size: 1rem;
  border: none;
  cursor: pointer;
  border-radius: 25px; 
  font-weight: bold;
}

.service-content .contact-btn:hover {
  background-color: var(--color-blanco);
  color: var(--color-acento);
}

/* Galería dentro del detalle de producto (ej. al seleccionar Reductor) */
.galeria-producto {
  width: 100%;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.galeria-producto-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  max-width: 100%;
}
.galeria-producto-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--color-fondo);
  opacity: 0;
  animation: galeriaItemEntrada 0.6s ease forwards;
}
.galeria-producto-item:nth-child(1) { animation-delay: 0s; }
.galeria-producto-item:nth-child(2) { animation-delay: 0.1s; }
.galeria-producto-item:nth-child(3) { animation-delay: 0.2s; }
@keyframes galeriaItemEntrada {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.galeria-producto-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.galeria-producto-item:hover img {
  transform: scale(1.04);
}
@media (max-width: 768px) {
  .galeria-producto-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .galeria-producto-item {
    max-width: 400px;
    margin: 0 auto;
  }
  .galeria-producto-item:nth-child(2),
  .galeria-producto-item:nth-child(3) {
    animation-delay: 0.1s;
  }
  .galeria-producto-item:nth-child(3) {
    animation-delay: 0.2s;
  }
}

/* PARALLAX — SECCIÓN APARTE */
.parallax{
  height:45vh;
  background-image: url('/img/reductores_motores_usados_RUI_banner.webp');
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}
@media (max-width: 992px) {
  .parallax {
    background-attachment: scroll;
    background-size: cover;
    background-position: center center;
  }
}

