/* Base Styles for Rodtecnicos Website */

/* Reset some default browser styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  color: #333;
  background-color: #f7f9fb;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

a:hover {
  color: #f25c19;
}

img {
  max-width: 100%;
  display: block;
}

/* Container */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Top bar */
.top-bar {
  /* Actualizamos el color de la barra superior para que coincida con el turquesa del logotipo */
  background-color: #017f83;
  color: #fff;
  font-size: 0.875rem;
  padding: 0.5rem 0;
}

.top-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-bar .contact-info {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.top-bar i {
  margin-right: 0.25rem;
  color: #f7f9fb;
}

/* Navigation */
header {
  background-color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.logo {
  font-size: 1.6rem;
  font-weight: 700;
  /* El logotipo ahora se representa como imagen; mantenemos el color para el texto de fallback */
  color: #017f83;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links li a {
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
}

.nav-links li a:hover,
.nav-links li a.active {
  border-bottom-color: #f25c19;
  color: #f25c19;
}

/* Mobile menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* If the navigation bar accidentally includes multiple elements with the class
 * "menu-toggle", hide all but the first.  This prevents duplicate hamburger
 * icons from appearing on brand pages and ensures a single control for
 * toggling the mobile navigation. */
nav .menu-toggle + .menu-toggle {
  display: none;
}

/* Hero section */
/*
 * Hero principal.  Utilizamos una imagen sin textos ni botones impresos (hero3.webp)
 * para que los llamados a la acción se integren como elementos HTML reales.
 */
.hero {
  position: relative;
  background: url('images/hero3.webp') center/cover no-repeat;
  /* Mayor altura por defecto para que el contenido respire y se vea en móviles */
  min-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
}

/* Agrupación de botones dentro del héroe: alineación y separación coherente */
.hero-content > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

@media (max-width: 480px) {
  .hero-content > div {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }
}

.hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  transition: background-color 0.2s ease-in-out;
}

.btn-primary {
  background-color: #f25c19;
  color: #fff;
}

.btn-primary:hover {
  /* Ajuste ligero del color de hover para integrarlo mejor con el nuevo esquema */
  background-color: #c24a17;
}

.btn-secondary {
  background-color: #017f83;
  color: #fff;
  margin-left: 1rem;
}

.btn-secondary:hover {
  background-color: #015e64;
}

/* Sections */
section {
  padding: 4rem 0;
}

section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #017f83;
}

/* About Section */
.about {
  background-color: #ffffff;
}

.about-content {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
}

.about-text {
  flex: 1 1 60%;
}

.about-image {
  flex: 1 1 35%;
}

.about-image img {
  border-radius: 8px;
  width: 100%;
}

.features-list {
  margin-top: 1rem;
}

.features-list li {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.features-list li i {
  color: #f25c19;
  margin-right: 0.5rem;
  font-size: 1.2rem;
}

/* Services Section */
.services {
  background-color: #f7f9fb;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}

.service-card {
  background-color: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  text-align: center;
  transition: transform 0.2s ease-in-out;
}

.service-card:hover {
  transform: translateY(-5px);
}

.service-card i {
  font-size: 2rem;
  color: #017f83;
  margin-bottom: 0.5rem;
}

.service-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  color: #017f83;
}

.service-card p {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.service-card .btn {
  margin-top: auto;
}

/* Coverage section */
.coverage {
  background-color: #ffffff;
}

.coverage .coverage-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: center;
  font-size: 0.95rem;
}

.coverage-list span {
  background-color: #017f83;
  color: #fff;
  padding: 0.4rem 0.8rem;
  border-radius: 50px;
}

/* Testimonials */
.testimonials {
  background-color: #f7f9fb;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.testimonial {
  background-color: #ffffff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.testimonial .stars {
  color: #f25c19;
  margin-bottom: 0.5rem;
}

.testimonial p {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.testimonial .author {
  font-weight: 600;
  font-size: 0.95rem;
}

/* CTA section */
.cta {
  background-color: #017f83;
  color: #fff;
  padding: 3rem 1rem;
  text-align: center;
  border-radius: 8px;
}

.cta h2 {
  color: #fff;
  margin-bottom: 1rem;
}

.cta p {
  margin-bottom: 2rem;
}

/* Footer */
footer {
  background-color: #013d3e;
  color: #fff;
  padding: 3rem 1rem;
}

footer .footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

footer h3 {
  margin-bottom: 1rem;
  color: #ffffff;
}

footer ul {
  list-style: none;
}

footer ul li {
  margin-bottom: 0.5rem;
}

footer ul li a {
  color: #ffffff;
  font-size: 0.95rem;
}

footer .social-icons {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
}

footer .social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #ffffff1a;
  color: #fff;
  transition: background-color 0.2s ease-in-out;
}

footer .social-icons a:hover {
  background-color: #ffffff33;
}

.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.85rem;
  color: #cccccc;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid #eaeaea;
    display: none;
  }
  .nav-links li a {
    padding: 1rem;
    border-bottom: 1px solid #eaeaea;
  }
  .menu-toggle {
    display: block;
  }
  .nav-links.open {
    display: flex;
  }
  .about-content {
    flex-direction: column;
  }
  .about-image {
    order: -1;
    margin-bottom: 1rem;
  }

  /* Ajustes responsivos del héroe para móviles */
  .hero {
    min-height: 80vh;
    padding: 4rem 1rem;
  }
  .hero-content h1 {
    font-size: 2rem;
  }
  .hero-content p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  .btn-secondary {
    margin-left: 0;
    margin-top: 1rem;
  }
}

/* --- Elementos adicionales --- */

/* Botón flotante de WhatsApp */
.whatsapp-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #25D366;
  color: #fff;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  text-decoration: none;
}

/* Ajuste del icono dentro del botón flotante */
.whatsapp-button i {
  color: #ffffff;
  font-size: 1.8rem;
  line-height: 1;
  /* Aseguramos que el icono utilice la familia de marcas de Font Awesome para que se muestre el ícono de WhatsApp en lugar de un check */
  font-family: 'Font Awesome 6 Brands';
  font-weight: 400;
}
.whatsapp-button:hover {
  background-color: #1ebe5d;
}

/* En dispositivos muy pequeños, subimos el botón flotante de WhatsApp para
 * asegurarnos de que sea visible al cargar la página, incluso cuando el
 * héroe ocupa casi toda la pantalla. */
@media (max-width: 480px) {
  .whatsapp-button {
    bottom: 80px;
  }
}

/* Carrusel de métodos de pago */
.payments {
  background-color: #ffffff;
  padding: 3rem 0;
}
/* Pagos: versión estática para mostrar métodos de pago sin scroll */
.payments {
  background-color: #ffffff;
  padding: 3rem 0;
}
.payments h2 {
  margin-bottom: 2rem;
  color: #017f83;
}
.payment-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}
.payment-item {
  flex: 0 0 120px;
  text-align: center;
}
/* Iconos en métodos de pago */
.payment-icon {
  font-size: 2.5rem;
  color: #017f83;
  display: block;
  margin: 0 auto 0.5rem;
}
.payment-item span {
  display: block;
  margin-top: 0.25rem;
  color: #333;
  font-size: 0.9rem;
}
/* Brand grid */
.brand-grid {
  display: grid;
  /* Use auto-fill to create as many columns as fit.  Each card has a minimum width
   * which makes the layout responsive.  On small screens the grid flows to
   * a single column for easy tapping. */
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}
.brand-card {
  border: 1px solid #e5e7eb;
  padding: 1.1rem;
  text-align: center;
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  color: #111827;
  transition: transform .12s ease, box-shadow .12s ease;
}
.brand-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.07); }
/* The brand name text should not wrap mid‑word.  Use display block for
 * consistent spacing beneath the logo. */
.brand-card span {
  display: block;
  font-weight: 600;
  margin-top: 0.5rem;
}

/* Base styling for the circular brand logo.  Each brand page will override
 * the background color via a modifier class. */
.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
  margin: 0 auto;
}

/* Individual brand colors to subtly evoke each brand.  These colors are
 * generic approximations and do not replicate exact branding guidelines. */
.brand-electrolux .brand-logo { background-color: #0b4e9e; }
.brand-whirlpool .brand-logo { background-color: #c29512; }
.brand-lg .brand-logo { background-color: #b30000; }
.brand-samsung .brand-logo { background-color: #1428a0; }
.brand-mabe .brand-logo { background-color: #00788d; }
.brand-haceb .brand-logo { background-color: #d49400; }
.brand-bosch .brand-logo { background-color: #b31217; }
.brand-general-electric .brand-logo { background-color: #012169; }
.brand-frigidaire .brand-logo { background-color: #a80024; }
.brand-kitchenaid .brand-logo { background-color: #aa0f0a; }
.brand-kalley .brand-logo { background-color: #006b62; }
.brand-panasonic .brand-logo { background-color: #003596; }
.brand-challenger .brand-logo { background-color: #0d477b; }
.brand-centrales .brand-logo { background-color: #f27b28; }
.brand-abba .brand-logo { background-color: #1e88e5; }
.brand-daewoo .brand-logo { background-color: #5c5c5c; }
.brand-koblenz .brand-logo { background-color: #b71c1c; }
.brand-whirlpool-gold .brand-logo { background-color: #c59b00; }
.brand-samsung-digital-inverter .brand-logo { background-color: #0073cf; }
/* Héroe reducido para páginas de marca: utiliza la misma imagen de fondo y ajusta la altura */
.hero-small {
  background: url('images/hero3.webp') center/cover no-repeat;
  min-height: 45vh;
}

@media (max-width: 480px) {
  .hero { min-height: 58vh; }

  /* For very small screens, reduce the number of columns in the brand grid
   * to two for easier tapping and readability. */
  .brand-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Simplify top bar on very small screens: hide email and reduce spacing */
  .top-bar .contact-info {
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  /* Hide the email address on narrow screens */
  .top-bar .contact-info span:last-child {
    display: none;
  }
  /* Hide the schedule on narrow screens to save space */
  .top-bar .schedule {
    display: none;
  }
  /* Reduce the size of the WhatsApp/phone link text */
  .top-bar .contact-info a {
    font-size: 0.75rem;
  }
}

/* Hide the schedule on medium screens and below */
@media (max-width: 768px) {
  .top-bar .schedule {
    display: none;
  }
  /* Tighten spacing of contact items on tablets */
  .top-bar .contact-info {
    gap: 0.75rem;
  }
}

/* Ensure mobile navigation opens above other elements */
.nav-links.open {
  z-index: 1100;
}

/* Animación de aparición para elementos que deben entrar suavemente en la página */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn-success { background-color: #25D366; color: #0b3d2f; }
.btn-success:hover { filter: brightness(1.05); }
