:root {
  --primary: #111b47;
  --accent: #505f98;
  --dark: #091133;
  --light-bg: #f4f6fc;
  --white: #ffffff;
  --premium-blue: #4a3aff;
  --transition: all 0.3s ease-in-out;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family:
    "Segoe UI",
    system-ui,
    -apple-system,
    sans-serif;
}

/* FONDO GLOBAL PREMIUM PARA TODA LA WEB */
body {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.456), rgba(255, 255, 255, 0)),
    url("../images/Torbelar_102.JPG");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--dark);
  overflow-x: hidden;
}

/* NAVBAR HORIZONTAL PC */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 8%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo-container {
  display: flex;
  align-items: center;
  text-decoration: none;
  height: 100%;
}

.navbar-logo {
  height: 75px;
  width: auto;
  object-fit: contain;
  display: block;
  transition: transform 0.2s ease;
}

.logo-container:hover .navbar-logo {
  transform: scale(1.02);
}

.nav {
  display: flex;
  align-items: center;
  gap: 35px;
}

.nav-link {
  text-decoration: none;
  color: var(--accent);
  font-weight: 600;
  font-size: 15px;
  position: relative;
  transition: var(--transition);
}

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

.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 3px;
  bottom: -6px;
  left: 0;
  background-color: var(--premium-blue);
  transition: var(--transition);
  border-radius: 2px;
}

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

.btn-cotizar {
  background: var(--premium-blue);
  color: var(--white);
  padding: 12px 26px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
  box-shadow: 0 6px 16px rgba(74, 58, 255, 0.25);
}

.btn-cotizar:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(74, 58, 255, 0.45);
}

/* BOTÓN DE MENÚ (ESCONDIDO EN PC) */
.menu-toggle {
  display: none;
  font-size: 32px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary);
  outline: none;
}

/* HERO PRINCIPAL */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  padding: 80px 8%;
  gap: 50px;
  min-height: 75vh;
  background: transparent;
}

.hero-content h1 {
  font-size: 48px;
  color: var(--primary);
  line-height: 1.15;
  margin-bottom: 25px;
  font-weight: 800;
}

.hero-content p {
  font-size: 19px;
  color: var(--accent);
  margin-bottom: 40px;
  line-height: 1.5;
  color: white;
}

.hero-buttons {
  display: flex;
  gap: 20px;
}

.btn {
  padding: 15px 34px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  transition: var(--transition);
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(17, 27, 71, 0.15);
}

.btn-primary:hover {
  background: var(--dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(17, 27, 71, 0.3);
}

.btn-secondary {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-secondary:hover {
  background: rgba(17, 27, 71, 0.05);
  transform: translateY(-3px);
}

.image-wrapper {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.premium-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
  transition: var(--transition);
}

/* HERO PESTAÑAS INTERNAS */
.internal-hero {
  background: linear-gradient(
    135deg,
    rgba(17, 27, 71, 0.788) 0%,
    rgba(9, 17, 51, 0.788) 100%
  ) !important;
  color: var(--white);
  padding: 90px 8%;
  text-align: center;
}

.internal-title h1 {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 15px;
}

.internal-title p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.75);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

/* GRILLA DE PRODUCTOS HOME */
.products-section {
  padding: 90px 8%;
  background: transparent;
  text-align: center;
}

.section-title {
  color: var(--primary);
  font-size: 32px;
  margin-bottom: 55px;
  font-weight: 800;
}

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

.product-card {
  background: rgba(255, 255, 255, 0.619);
  backdrop-filter: blur(4px);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  text-align: left;
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.card-image-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 25px;
}

.card-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card h3 {
  color: var(--primary);
  margin-bottom: 12px;
  font-size: 20px;
  font-weight: 700;
}

.product-card p {
  color: var(--accent);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 25px;
}

.card-link {
  text-decoration: none;
  color: var(--premium-blue);
  font-weight: 700;
  font-size: 14px;
  display: inline-block;
}

/* SECCIÓN CATÁLOGO INTERNO */
.catalog-section {
  height: auto !important;
  padding: 80px 8%;
  background: transparent;
  display: block;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.catalog-card {
  background: rgba(255, 255, 255, 0.619);
  backdrop-filter: blur(4px);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  border: 1px solid #e2e8f0;
}

.catalog-card img {
  width: 100%;
  height: 360px;
  object-fit: cover;
}

.catalog-info {
  padding: 30px;
}

.catalog-info h3 {
  color: var(--primary);
  font-size: 22px;
  margin-bottom: 12px;
}

.catalog-info p {
  color: var(--accent);
  font-size: 15px;
  line-height: 1.6;
}

.tech-tag {
  display: inline-block;
  background: var(--light-bg);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 12px;
}

/* BANNER DE CALIDAD */
.quality-banner {
  padding: 90px 8%;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
  align-items: center;
}

.quality-box {
  background: rgba(17, 27, 71, 0.93);
  color: var(--white);
  padding: 45px;
  border-radius: 8px;
}

.quality-box h3 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 15px;
}

.features-grid {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.feature-item {
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 16px;
}

/* CARRUSEL SLIDER DINÁMICO */
.carousel-slider {
  position: relative;
  width: 100%;
  height: 350px;
  overflow: hidden;
}

.carousel-slider .slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.8s ease-in-out,
    visibility 0.8s ease-in-out;
  z-index: 1;
}

.carousel-slider .slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

/* BANNER DE ANCHO COMPLETO AZUL CORPORATIVO (MARCAS) */
.polimold-full-banner {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  background-color: var(--primary);
  padding: 25px 8%;
  margin-top: 50px;
  margin-bottom: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 15px;
  box-shadow: inset 0 10px 20px rgba(0, 0, 0, 0.1);
}

.polimold-banner-title {
  color: var(--white);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.representations-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  width: 100%;
}

.polimold-banner-image-box {
  width: 100%;
  height: 140px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.polimold-banner-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* FOOTER GLOBAL */
.footer {
  background: rgba(244, 246, 252, 0.85);
  backdrop-filter: blur(6px);
  padding: 90px 8% 50px 8%;
  border-top: 1px solid #e2e8f0;
  clear: both !important;
}

.footer-cols {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 70px;
}

.footer-info h3,
.footer-form h3 {
  color: var(--primary);
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 15px;
}

.btn-whatsapp {
  display: inline-block;
  background: #25d366;
  color: white;
  padding: 14px 28px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 700;
  margin: 25px 0 35px 0;
}

.contact-list {
  list-style: none;
}

.contact-list li {
  margin-bottom: 14px;
  color: var(--accent);
  font-weight: 500;
  font-size: 15px;
}

.footer-form form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

input,
textarea {
  padding: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  font-size: 14px;
  outline: none;
  background: var(--white);
}

.btn-submit {
  background: var(--premium-blue);
  color: var(--white);
  border: none;
  padding: 14px;
  font-weight: 700;
  cursor: pointer;
}

/* ==========================================================================
   MÓVIL RESPONSIVE EXCLUSIVO COMPLETO (SANEADO AL 100% SIN COMENTARIOS ROTOS)
   ========================================================================== */
@media (max-width: 900px) {
  .menu-toggle {
    display: block !important;
    z-index: 2500 !important;
    position: relative !important;
    color: var(--primary) !important;
  }

  .header:has(.nav.open) .menu-toggle {
    color: var(--white) !important;
  }
  .nav {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    right: -100% !important;
    width: 100vw !important;
    height: 100vh !important;
    background: var(--dark) !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 40px !important;
    gap: 30px !important;
    z-index: 2000 !important;
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
  }
  .nav.open {
    right: 0 !important;
  }
  .nav-link {
    font-size: 24px !important;
    color: rgba(255, 255, 255, 0.85) !important;
    text-align: center !important;
    width: auto !important;
    display: block !important;
    padding: 10px 0;
  }
  .nav-link:hover,
  .nav-link.active {
    color: var(--white) !important;
    font-weight: 700;
  }
  .nav-link::after {
    display: none !important;
  }
  .btn-cotizar {
    width: 80% !important;
    max-width: 280px !important;
    text-align: center !important;
    margin-top: 20px !important;
    padding: 15px !important;
    display: inline-flex !important;
    justify-content: center;
  }
  .navbar-logo {
    height: 38px;
  }
  .carousel-slider {
    height: 250px;
  } /* REORGANIZACIÓN VERTICAL SANA DEL PIE DE PÁGINA (SISTEMA DE FILAS ÚNICAS) */
  .hero,
  .products-grid,
  .quality-banner,
  .footer-cols,
  .catalog-grid {
    grid-template-columns: 1fr !important;
    padding: 40px 6% !important;
    gap: 35px !important;
  }
  .form-row {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }
  .hero-content h1 {
    font-size: 32px !important;
    text-align: center;
  }
  .hero-content p {
    font-size: 16px !important;
    text-align: center;
  }
  .hero-buttons {
    flex-direction: column;
  }
  .premium-img {
    height: 250px !important;
  }
  .catalog-card img {
    height: 220px !important;
  }
  .catalog-section {
    padding-bottom: 40px !important;
  }
  .representations-container {
    grid-template-columns: 1fr !important;
    gap: 15px;
  }
  .polimold-full-banner {
    padding: 20px 6% !important;
    margin-top: 35px;
    gap: 12px;
  }
  .polimold-banner-title {
    font-size: 18px;
  }
  .polimold-banner-image-box {
    height: 110px;
  }
}
