﻿body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    padding-top: 80px;
    background: linear-gradient(to bottom, #f4f4f4 0%, #ffffff 100%);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

.hero{
  scroll-margin-top: 100px;
}

.productos,
.catalogo,
.distribuidores,
.nosotros,
.contacto {
  scroll-margin-top: 60px;
}

.hero,
.productos,
.catalogo,
.distribuidores,
.nosotros,
.contacto {
  padding: 30px 0;
  margin: 20px 0.75rem;
  border-radius: 15px;
}

.header,
.hero,
.distribuidores,
.contacto {
  box-shadow: 0 4px 20px rgba(0,0,1,0.75);
}

html {
  scroll-behavior: smooth;
}

/* -------------------------------------------------------------
 * ENCABEZADO Y MENÚ
 * ------------------------------------------------------------- */
.header {
    background-color: #f4f4f4;
    color: #1b9a00;
    padding: 15px 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    height: 100px;
    transition: height 0.3s ease;
    z-index: 1001;
}

.header.scrolled {
    padding: 5px 0;
}

.header.scrolled .logo {
    height: 60px;
}

/* Navegación */
.nav {
    display: flex;
    gap: 20px;
    transition: all 0.3s ease;
}

.nav a {
    color: #000000;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.nav a:hover {
    color: #ff0000;
}

/* Botón hamburguesa */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    background-color: #a20000;
    box-shadow: 0 2px 5px rgba(0,0,1,0.75);
    color: white;
    padding: 2px 6px;
    font-size: 28px;
    cursor: pointer;
    border-radius: 5px;
    z-index: 1002;
    position: relative;
}

/* -------------------------------------------------------------
 * SECCIÓN HERO
 * ------------------------------------------------------------- */
.hero {
    background: url('img/hero.webp') no-repeat center center/cover;
    color: #fff;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    padding-top: 200px;
    text-align: center;
    font-size: 2rem;
}

.hero h1 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.btn {
  background: linear-gradient(90deg, #000, #a20000);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  display: inline-block;
}

.btn:hover {
  background: #ff0000;
  transform: translateY(-3px);
}

/* -------------------------------------------------------------
 * SERVICIOS
 * ------------------------------------------------------------- */
.servicios {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.servicio {
    flex: 1 1 280px;
    background-size: cover;
    background-position: center;
    color: #ffffff;
    padding: 20px;
    border-radius: 5px;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,1,0.75);
}

.servicio::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.servicio.fm200 { background-image: url('img/Tarser/cocina.webp'); }
.servicio.deteccion { background-image: url('img/Tarser/detector.webp'); }
.servicio.extintores { background-image: url('img/Tarser/extintor.webp'); }
.servicio.supresion { background-image: url('img/Tarser/limpio.webp'); }
.servicio.placeholder { background-image: url('img/Tarser/agua.webp'); }

.servicio h3, .servicio p {
    position: relative;
    z-index: 2;
}

.servicio h3.auto-style1 {
    font-size: 2rem;
    line-height: 1.2;
}

/* -------------------------------------------------------------
 * CATÁLOGO - GRID DE PRODUCTOS
 * ------------------------------------------------------------- */
.catalogo {
  background: none;
}

.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin: 50px 0;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0,0,1,0.75);
  background: url('img/bhero.webp') no-repeat center/cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.producto-item {
/*----------------------------------------------------*/
  overflow: hidden;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 2px solid #FFFFFF75;
  border-left: 2px solid #FFFFFF75;
  box-shadow: 5px 5px 12px rgba(0,0,1,0.75);
  border-radius: 15px;
/*----------------------------------------------------*/
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  padding: 25px;
}

.product-image {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 180px; /* Altura fija para las imágenes */
}

.product-image img {
  max-width: 100%;
  max-height: 160px;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.product-info h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #fff;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-info p {
  font-size: 0.9rem;
  color: #fff;
  margin-bottom: 20px;
  line-height: 1.4;
  min-height: 80px;
  display: flex;
  align-items: center;
}

.btn-message {
  background: linear-gradient(90deg, #000, #a20000);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  display: inline-block;
}

.btn-message:hover {
  background: #ff0000;
  transform: translateY(-3px);
}

/* -------------------------------------------------------------
 * CATÁLOGOS (Botones WA y ML)
 * ------------------------------------------------------------- */
.catalogo-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0 40px;
    flex-wrap: wrap;
}

.link-item {
    flex: 1 1 auto;
    text-align: center;
}

.btn-catalogo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #a20000;
    color: #fff;
    padding: 12px 20px;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease;
    font-size: 1rem;
    min-width: 220px;
    box-shadow: 0 2px 5px rgba(0,0,1,0.75);
}

.btn-whatsapp {
    background-color: #25d366;
}

.btn-ml {
    background-color: #ffe600;
    color: #000;
}

.btn-whatsapp:hover {
    background-color: #128c7e;
    transform: translateY(-3px);
}

.btn-ml:hover {
    background-color: #ccb700;
    transform: translateY(-3px);
}

.icon-btn {
    width: 25px;
    height: 25px;
    margin-right: 12px;
    filter: invert(1);
}

.btn-ml .icon-btn {
    filter: none;
}

.auto-style52 {
	font-size: 1rem;
	justify-content: center;
	text-align: center;
}

/* -------------------------------------------------------------
 * DISTRIBUIDORES
 * ------------------------------------------------------------- */
.distribuidores {
    background-color: #a20000;
    text-align: center;
}

.tarjetas-distribuidores {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.tarjeta-marca {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(0,0,1,0.75);
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 200px;
  position: relative;
  overflow: hidden;
}

.tarjeta-marca:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

.tarjeta-marca img {
  width: 100%;
  height: 100px;
  object-fit: contain;
  margin-bottom: 15px;
  transition: transform 0.3s ease;
}

.tarjeta-marca::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  border-radius: 12px;
  transition: background 0.3s ease;
}

.tarjeta-marca:hover img {
  transform: scale(1.05);
}

.tarjeta-marca:hover::before {
  background: rgba(0,0,0,0.25);
}

.tarjeta-marca h3 {
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.tarjeta-marca h3,
.tarjeta-marca p {
  position: relative;
  z-index: 1;
  margin: 0;
}

.tarjeta-marca p {
  font-size: 0.95rem;
  line-height: 1.3;
}

/* -------------------------------------------------------------
 * MENÚ LATERAL (Distribuidor)
 * ------------------------------------------------------------- */
.sidebar {
    height: 100%; 
    width: 0; 
    position: fixed; 
    z-index: 2000; 
    top: 0;
    left: 0;
    background-color: rgba(30, 30, 30, 0.75); 
    overflow-x: hidden; 
    transition: 0.5s; 
    padding-top: 10px;
    color: #fff;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-right: solid 2px rgba(255, 255, 255,0.25);
}

.sidebar.open {
    width: 300px; 
}

/* Contenido del menú */
.sidebar-content {
    padding: 20px;
    margin-top: 20px;
}

.sidebar h3 {
    color: #ff4d4d;
    font-size: 1.5rem;
    margin-top: 0;
}

.sidebar h4 {
    font-size: 1.2rem;
    margin-top: 10px;
}

.sidebar p {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* Botón de cerrar */
.close-btn {
    position: absolute;
    top: 0;
    right: 25px;
    font-size: 36px;
    margin-left: 50px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    line-height: 1;
    transition: 0.3s;
}

.close-btn:hover {
    color: #ff4d4d;
}

/* Botón de acción dentro del sidebar */
.sidebar-btn {
    display: inline-block;
    background-color: #a20000;
    color: #fff;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.sidebar-btn:hover {
    background-color: #ff0000;
}

.tarjeta-marca {
    cursor: pointer;
}

/* ============================
   CONTACTO
=============================== */
.contacto {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(64, 0, 0, 0.9) 100%), 
              url('img/nhero.png') no-repeat center center/cover;
  background-size: cover;
  background-position: center center;
  color: #fff;
  padding: 80px 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.contacto h2 {
  font-size: 2rem;
  text-align: left;
  margin-top:0px;
  margin-bottom: 30px;
  color: #ffffff;
}

.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: start;
}

.logo-contacto {
  width: 200px;
  margin-bottom: 20px;
}

.contacto-info p {
  font-size: 1rem;
  line-height: 1.6;
}

.redes-contacto {
  margin-top: 15px;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size:0.75rem
}

.btn-red {
  display: flex;
  background: linear-gradient(90deg, #000, #a20000);
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  text-decoration: none;
}

.btn-red img {
  width: 22px;
  height: 22px;
}

.btn-red:hover {
  background: #ff0000;
  transform: translateY(-3px);
}

.contacto-dual {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin: 20px 0;
}

.contacto-col {
  flex: 1;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top:1px solid #a9a9a950;
  border-left:1px solid #a9a9a950;
  border-bottom: 2px solid #FFFFFF75;
  border-right: 2px solid #FFFFFF75;
  box-shadow: 5px 5px 12px rgba(0,0,1,0.75);
  border-radius: 15px;
  padding: 15px;
}

.contacto-col h4 {
  margin-bottom: 10px;
  font-size: 1.1rem;
  color: #ff4d4d;
}

.contacto-col p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #ddd;
  min-width: 175px
}

.contacto-col a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
}

.contacto-col a:hover {
  color: #ffb3b3;
}

/* ------------------------ FORMULARIO ------------------------*/
.contacto-form h3 {
  margin-bottom: 20px;
  font-size: 1.5rem;
  color: #fff;
}

.contacto-form form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contacto-form input,
.contacto-form textarea {
  padding: 12px;
  border-radius: 8px;
  border: none;
  outline: none;
  font-size: 1rem;
}

.contacto-form textarea {
  min-height: 205px;
}

.contacto-form button {
  background: linear-gradient(90deg, #000, #a20000);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  display: inline-block;
}

.contacto-form button:hover {
  background: #ff0000;
  transform: scale(1.05);
}

/* -------------------------------------------------------------
 *                                         RESPONSIVE (Móviles)
 * ------------------------------------------------------------- */
@media (max-width: 870px) {
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100%;
        width: 280px;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        background-color: rgba(30, 30, 30, 0.75);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border-left: solid 2px rgba(255, 255, 255, 0.25);
        overflow-x: hidden;
        transition: right 0.4s ease-in-out;
        z-index: 1001;
        text-align: center;
        padding-top: 50px;
        margin: 0;
    }
        
    .nav.open {
        right: 0;
        width: 300px;
    }

    .nav a {
        display: block;
        width: 80%;
        padding: 18px 0;
        font-size: 1.2rem;
        color: #fff;
        text-decoration: none;
        font-weight: bold;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
        transition: all 0.3s ease;
        margin: 0px 0;
     }
     
    .nav a:hover {
        background-color: rgba(255, 255, 255, 0.15);
        color: #ff4d4d;
        transform: translateY(-5px);
    }

    .nav a:last-child {
        border-bottom: none;
    }

    .menu-toggle {
        display: block;
        position: relative;
        z-index: 1002;
    }

    .nav::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .header {
        padding: 8px 0;
    }
    
    .header .logo {
        height: 50px;
    }

    .header.scrolled {
        padding: 8px 0;
    } 

    .header.scrolled .logo {
       height: 50px;
    }

    .hero {
        padding: 60px 0;
        scroll-margin-top: 50px;
    }

    .hero h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero p {
        font-size: 1rem;
        line-height: 1.4;
    }

    .servicio h3.auto-style1 {
        font-size: 1.5rem;
    }

    .servicios {
        flex-direction: column;
    }

    .productos, .nosotros, .contacto, .distribuidores {
        padding: 40px 0;
    }

    .marca img {
        max-height: 40px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .product-info p {
        display:none;
    }
    
    .contacto-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .logo-contacto {
        margin: 0 auto 20px;
        display: block;
    }

    .auto-style52 {
        font-size: 0.5rem;
    }
    
    .contacto-dual {
        flex-direction: column;
    }

    .contacto-form textarea {
        min-height: 90px; 
    }
    
    .tarjetas-distribuidores {
        grid-template-columns: repeat(2, 1fr);
    }
    
}

@media (max-width: 600px) {

    .redes-contacto a span {
        align-items: center;
        display: none
    }

    .btn-red {
        gap: 6px;
        align-items: center;
        padding: 12px 12px;
    }
    
    .tarjetas-distribuidores {
        grid-template-columns: 1fr;
    }
    
    .nav.open {
        width: 60%;
    }
    
    .sidebar.open {
        width: 80%;
    }
    
     .sidebar p {
        font-size: 0.75rem;
    }
    
    .productos-grid {
        grid-template-columns: 1fr;
    }

    .product-image {
        margin-bottom: 5px;
        height: auto;
    }
    
    .product-info h3 {
        display: none;
    }
    
}