/* ============================================================
   ESTILOS PRINCIPALES DE MACESUR
   Autor: Ivonne Hernández
   Fecha: 2025
   ============================================================ */

/* -------------------- RESETEO GLOBAL -------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: #fff;
  color: #333;
  line-height: 1.6;
}

/* -------------------- ENCABEZADO -------------------- */
header {
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Barra roja superior */
.barra-superior {
  background-color: #b10000;
  color: #fff;
  text-align: center;
  padding: 8px 0;
}

.barra-superior h1 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 1px;
}

/* Barra blanca inferior */
.barra-inferior {
  background-color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 30px;
}

.logo {
  width: 110px;
  height: auto;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}
header h1 a {
  color: white !important;
  text-decoration: none !important;
} 
header h1 {
  color: white;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-align: center;
}

/* -------------------- MENÚ DE NAVEGACIÓN -------------------- */
.navbar {
  flex: 1;
  text-align: center;
}
.menu {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 25px;
}

.menu li a {
  text-decoration: none;
  color: #333;
  font-weight: 600;
  transition: color 0.3s;
}

.menu li a:hover {
  color: #b10000;
}

/* Submenú */
.submenu {
  position: relative;
}

.submenu-content {
  display: none;
  position: absolute;
  background: #fff;
  top: 100%;
  left: 0;
  border: 1px solid #ddd;
  min-width: 150px;
  z-index: 10;
}

.submenu-content li {
  border-bottom: 1px solid #eee;
}

.submenu-content li:last-child {
  border-bottom: none;
}

.submenu-content a {
  display: block;
  padding: 10px;
  color: #333;
}

.submenu-content a:hover {
  background: #b1000057;
  color: #fff;
}

.submenu:hover .submenu-content {
  display: block;
}

/* Botón menú hamburguesa (solo visible en móvil) */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #b10000;
}

/* -------------------- SLIDER -------------------- */
.slider {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: auto;
}

.slide {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.slider img {
  width: 100%;
  height: auto;
}

/* Controles del slider */
.slider-controls {
  position: absolute;
  top: 90%;
  width: 100%;
  justify-content: space-between;
  transform: translateY(-50%);
  padding: 0 100px;
}

.slider-controls span {
  cursor: pointer;
  font-size: 2.5rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.3);
  padding: 5px 10px;
  border-radius: 70%;
  transition: background 0.01s;
}
.slider-controls .prev,
.slider-controls .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 30px;
  cursor: pointer;
  padding: 10px;
  z-index: 10;
}
.slider-controls .prev {
  left: 20px;  /* Mueve izquierda */
}
.slider-controls .next {
  right: 20px; /* Mueve derecha */
}
/* -------------------- SECCIÓN NOSOTROS -------------------- */
.bienvenida-nosotros {
  padding: 60px 20px;
  text-align: center;
  background: #fafafa;
}
/* === Corrección adicional: eliminar espacio del contenedor de sección #inicio === */

.bienvenida-nosotros h2 {
  color: #b10000;
  font-size: 2rem;
  margin-bottom: 10px;
}

.subtitulo {
  font-style: italic;
  color: #000000;
  margin-bottom: 30px;
}

.nosotros-texto {
  max-width: 800px;
  margin: auto;
  text-align: justify;
  line-height: 1.8;
}

/* Misión y visión */
.mision-vision {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin-top: 40px;
}

.mision, .vision {
  flex: 2 5 100px;
  background: #fff;
  padding: 25px;
  border: 2px solid #b10000;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.mision h4, .vision h4 {
  color: #b10000;
  margin-bottom: 15px;
}

/* Valores */
.valores {
  max-width: 900px;
  margin: 50px auto 0;
  text-align: justify;
}

.valores h4 {
  color: #b10000;
  margin-bottom: 10px;
}

.valores ul {
  list-style: none;
}

.valores li {
  margin-bottom: 8px;
}

/* --------------------- Tablas -----------------------*/
table {
    width: 100%;
    margin-top: 15px;
    border-collapse: collapse;
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

th, td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

/* 🔹 Estilos para los enlaces a PDFs */
p a {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 15px;
    text-decoration: none;
    background-color: #007BFF;
    color: white;
    font-weight: bold;
    border-radius: 8px;
    transition: background 0.3s ease-in-out;
}

/* 🔹 Estilos responsivos */
@media (max-width: 768px) {
    .modal-contenido {
        width: 95%;
    }
    table {
        font-size: 14px;
    }
}
/* -------------------- PRODUCTOS -------------------- */
.tabla-productos {
    display: none;
}

.tabla-productos.active {
    display: block !important;
}

.tractor-btn.active {
    background-color: #d80000; /* ejemplo */
    color: white;
}


/* --- TABLAS DE PRODUCTOS --- */

table {
width: 100%;
border-collapse: collapse;
margin-bottom: 30px;
}


th, td {
padding: 15px;
border: 1px solid #ddd;
text-align: center;
}


th {
background:  #840000;
color: #fff;
}


/* --- RESPONSIVO --- */
@media (max-width: 768px) {
.tractor-btn {
padding: 8px 18px;
font-size: 16px;
}

th, td {
padding: 10px;
font-size: 14px;
}


}
/* -------------------- IMPLEMENTOS -------------------- */
.galeria-implementos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  padding: 40px;
  text-align: center;
}

.galeria-implementos img {
  width: 100%;
  border-radius: 10px;
  transition: transform 0.3s;
}

.galeria-implementos img:hover {
  transform: scale(1.05);
}
#implementos {
    padding: 0 20px;
}

/* -------------------- OTRAS MARCAS -------------------- */
.otras-marcas {
  background: #fafafa;
  text-align: center;
  padding: 60px 20px;
}

.otras-marcas h2 {
  color: #b10000;
  margin-bottom: 20px;
}

.logos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 25px;
  justify-items: center;
  align-items: center;
}

.logos img {
  max-width: 100%;
  width: 150px;
  transition: filter 0.3s ease, transform 0.3s ease;
}

.logos img:hover {
  filter: grayscale(0);
  transform: scale(1.1);
}

/* -------------------- POST-VENTA -------------------- */
.post-venta {
  text-align: center;
  padding: 60px 20px;
}

.btn-postventa {
  background: #b10000;
  color: #fff;
  padding: 15px 25px;
  border: none;
  border-radius: 6px;
  margin: 5px;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-postventa:hover {
  background: #800000;
}

/* Financiamiento */
.financiamiento {
  margin-top: 40px;
  text-align: left;
  max-width: 800px;
  margin-inline: auto;
}

.financiamiento-lista {
  margin: 15px 0 15px 20px;
}

/* -------------------- MODAL COTIZAR -------------------- */
.modal {
  display: none;
  position: fixed;
  z-index: 200;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: #fff;
  padding: 25px;
  border-radius: 8px;
  width: 90%;
  max-width: 450px;
  position: relative;
}

.cerrar {
  position: absolute;
  top: 10px;
  right: 15px;
  cursor: pointer;
  font-size: 1.5rem;
  color: #b10000;
}

/* -------------------- CONTACTO -------------------- */
#contacto {
  padding: 50px 20px;
  background: #fafafa;
  text-align: center;
}

#contacto form {
  max-width: 600px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

#contacto input, #contacto textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

#contacto button {
  background: #b10000;
  color: #fff;
  padding: 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
}

#contacto button:hover {
  background: #800000;
}

/* -------------------- UBICACIÓN -------------------- */
#ubicacion {
  text-align: center;
  padding: 50px 20px;
}

/* -------------------- PIE DE PÁGINA -------------------- */
footer {
  background: #b10000;
  color: #fff;
  text-align: center;
  padding: 15px;
  font-size: 0.9rem;
}
/* ============================================================
                         DISEÑO RESPONSIVO                      
   ============================================================ */
@media (max-width: 900px) {

  /* Ocultar hamburguesa */
  .menu-toggle {
    display: none !important;
  }

  /* Acomoda logos, título y menú en columna */
 .barra-inferior {
    display: flex;
    flex-direction: row;          /* Mantener izquierda-derecha */
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    gap: 0;
  }

  .menu-toggle {
    display: block !important;    /* Mostrar hamburguesa en celular */
  }

  .navbar {
    width: 100%;
  }

  /* Mostrar siempre el menú */
  .navbar {
    display: block !important;
    position: static !important;
    width: 100%;
    margin-top: 10px;
    background: none;
    box-shadow: none;
    border: none;
  }

  /* Menú visible y centrado */
  .menu {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }
  /* Submenú centrado también */
  .submenu-content {
    position: static;
    width: 100%;
    text-align: center;
    box-shadow: none;
    border: none;
  }

  /* Tamaño de logos */
  .logo {
    width: 90px;
  }

  /* Otros ajustes */
  .mision-vision {
    flex-direction: column;
  }

  .galeria-implementos {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
   .logos {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center;
    padding: 0 20px;
  }
}
/* ——— Submenú en escritorio ——— */
.submenu {
  position: relative;
}

.submenu-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  padding: 10px 0;
  border: 1px solid #ddd;
  z-index: 999;
}

.submenu:hover .submenu-content {
  display: block;
}

/* ======= FORZAR que solo la .slide.active esté visible ======= */

.slide {
  display: none !important;    /* oculta todas las slides */
}
.slide.active {
  display: block !important;   /* muestra solo la activa */
}

/* Evita que otra regla como .slider img vuelva a mostrar todas */
.slider img {
  /* deja aquí sólo lo necesario, SIN display */
  width: 100%;
  height: auto;
  object-fit: cover;
  display: inline-block; /* no necesario, pero no ponemos display:block que sobrescriba */
}
/* Centrar títulos como TRACTORES e IMPLEMENTOS */
#tractores h2,
#implementos h2 {
    text-align: center;
    margin: 20px 0;
}
/* ===================== TRACTORES ===================== */

/* Contenedor general */
.productos {
    padding: 20px;
    text-align: center;
}

/* ------------------ Botones (TABS) ------------------ */
.tractor-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.tractor-tabs button {
    padding: 10px 22px;
    border: none;
    background: #b30000;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: 0.3s ease;
}

.tractor-tabs button:hover {
    background: #e60000;
}

.tractor-tabs button.active {
    background: #333;
}

/* TABS DE TRACTORES */
.tractor-btn {
  padding: 10px 20px;
  margin: 5px;
  border: none;
  background: #ccc;
  cursor: pointer;
  border-radius: 5px;
}

.tractor-btn.activo {
  background: #840000;
  color: white;
}

/* Tablas ocultas */
.tabla-productos {
  display: none;
}
/* ------------------ Tablas ------------------ */
.tabla-productos {
    width: 100%;
    overflow-x: auto;
    margin-top: 10px;
    display: none;
}

.tabla-productos.active {
    display: block !important;
}

/* Centrar tabla */
.tabla-productos table {
    margin: auto;
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
}

/* Estilo celdas */
.tabla-productos th,
.tabla-productos td {
    padding: 10px;
    border: 1px solid #ccc;
    text-align: center;
}

.tabla-productos th {
    background: #b30000;
    color: white;
}

/* Responsivo */
@media (max-width: 768px) {
    .tabla-productos table {
        min-width: 500px;
    }
}

@media (max-width: 500px) {
    .tractor-tabs button {
        font-size: 14px;
        padding: 8px 14px;
    }
}
/* 1. ESTO HACE QUE EL MAPA SE VEA GRANDE Y CENTRADO EN PANTALLAS GRANDES */
.map-wrapper {
    /* Define el ancho máximo, ajústalo si quieres que sea más ancho o estrecho */
    max-width: 900px; 
    /* Centra el contenedor en la página */
    margin: 20px auto; 
    /* Padding para que no se pegue a los bordes en móvil */
    padding: 0 15px; 
}

/* 2. ESTO HACE QUE EL MAPA ESCALE PROPORCIONALMENTE EN PANTALLAS PEQUEÑAS */
/* ¡Asegúrate de que esta clase coincida con la que usaste en el HTML! */
.map-responsive { 
    position: relative;
    padding-bottom: 56.25%; /* Proporción 16:9 (altura / ancho) */
    height: 0;
    overflow: hidden;
}

.map-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}