body { background-color: #ffffff; }

/* Estilos del Header y Menú */
#main-header { 
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100%; 
  background: linear-gradient(to right, #ffffff 30%, #1d3557 100%); 
  padding: 15px 0; 
  z-index: 1050; 
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid #ddd;
}
.logo img { height: 80px; }
.desktop-nav { display: flex; align-items: center; }
.desktop-nav a { color: #ffffff; margin-left: 30px; text-decoration: none; font-weight: 500; text-shadow: 1px 1px 2px rgba(0,0,0,0.2); padding-bottom: 5px; position: relative; transition: color 0.4s ease, transform 0.2s ease; }
.desktop-nav a:active { transform: translateY(2px); }
.desktop-nav a:not(.btn-contact):hover { color: transparent; background: linear-gradient(90deg, #434343 0%, #000000 100%); -webkit-background-clip: text; background-clip: text; }
.desktop-nav a:not(.btn-contact)::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; background-color: #ffffff; transform: scaleX(0); transform-origin: center; transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1); }
.desktop-nav a:not(.btn-contact):hover::after { transform: scaleX(1); }
.desktop-nav a.btn-contact { border: 2px solid #ffffff; padding: 8px 25px; border-radius: 50px; background-color: transparent; transition: all 0.3s ease; }
.desktop-nav a.btn-contact:hover { background-color: #ffffff; color: #1d3557; transform: scale(1.05); box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2); }

.dropdown { position: relative; display: flex; align-items: center; padding-bottom: 20px; margin-bottom: -20px; }
.desktop-nav .dropdown-toggle::after { content: ' ▼'; font-size: 0.7em; }
.dropdown-menu { display: none; position: absolute; top: 100%; left: 0; background-color: #ffffff; min-width: 240px; box-shadow: 0 8px 16px rgba(0,0,0,0.2); border-radius: 5px; padding: 10px 0; z-index: 1; overflow: hidden; margin-top: -20px; }
.dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu .dropdown-item { color: #333; padding: 12px 18px; display: block; text-align: left; margin-left: 0; text-shadow: none; transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease; background: transparent; }

.desktop-nav .dropdown-menu a.dropdown-item:hover,
.desktop-nav .dropdown-menu a.dropdown-item:focus {
  background: #1d3557 !important;
  color: #ffffff !important;
  transform: translateX(5px);
}

/* Estilos del Menú Móvil */
.mobile-menu-toggle { display: none; background: none; border: none; cursor: pointer; height: 24px; width: 30px; position: relative; }
.mobile-menu-toggle span { 
  display: block; 
  position: absolute; 
  height: 4px; 
  width: 100%; 
  background: #ffffff; 
  border-radius: 4px; 
  left: 0; 
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out; 
}
.mobile-menu-toggle span:nth-child(1) { top: 0px; } 
.mobile-menu-toggle span:nth-child(2) { top: 10px; } 
.mobile-menu-toggle span:nth-child(3) { top: 20px; }
.mobile-menu-toggle.active span:nth-child(1) { transform: translateY(10px) rotate(45deg); } 
.mobile-menu-toggle.active span:nth-child(2) { opacity: 0; } 
.mobile-menu-toggle.active span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

.mobile-menu-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(10, 10, 10, 0.98); z-index: 1040; display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0.4s ease; }
.mobile-menu-overlay.active { opacity: 1; visibility: visible; } 
body.no-scroll { overflow: hidden; }
.mobile-nav { display: flex; flex-direction: column; align-items: center; text-align: center; } 
.mobile-nav a { color: #ffffff; text-decoration: none; font-size: 2rem; font-weight: 500; margin: 15px 0; }
.mobile-dropdown .dropdown-toggle { display: flex; align-items: center; gap: 10px; } 
.chevron-icon { border: solid white; border-width: 0 3px 3px 0; display: inline-block; padding: 4px; transform: rotate(45deg); transition: transform 0.3s ease; }
.mobile-dropdown.active .chevron-icon { transform: rotate(-135deg); } 
.mobile-submenu { display: none; margin-top: 15px; margin-bottom: 15px; padding-left: 20px; border-left: 2px solid rgba(255, 255, 255, 0.2); }
.mobile-submenu a { display: block; font-size: 1.4rem; margin: 12px 0; color: rgba(255, 255, 255, 0.7); transition: all 0.3s ease; } 
.mobile-submenu a:hover { color: #ffffff; background-color: rgba(255, 255, 255, 0.1); transform: scale(1.05); }
.mobile-dropdown.active .mobile-submenu { display: block; }

@media (max-width: 991px) { 
  .desktop-nav { display: none; } 
  .mobile-menu-toggle { display: block; } 
  .logo img { height: 60px; } 
}

/* --- ESTILOS GENERALES Y BOTONES --- */
.btn-orange-gradient {
  background-color: #F99F00 !important;
  color: #1d3557 !important;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: 700;
  text-transform: uppercase;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(249, 159, 0, 0.4);
}
.btn-orange-gradient:hover {
  background-color: #FFCD11 !important;
  color: #1d3557 !important;
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(249, 159, 0, 0.6);
}

/* Separación del carrusel del header */
.carousel-container {
  margin-top: 110px;
}

/* Estilos del Carrusel */
#carouselExampleCaptions {
  position: relative;
}
.carousel-item {
  height: 70vh;
}
.carousel-item img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

/* ===== ESTILOS DEFINITIVOS PARA EL TEXTO DEL CARRUSEL ===== */
.hero-text-overlay {
  position: absolute;
  top: 20%; 
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  padding: 0 20px;
  text-align: center;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out;
}
.hero-text-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}
.hero-text-overlay h1 {
  color: #000000 !important;
  font-weight: 700 !important;
  font-size: 3.8rem !important; 
  line-height: 1.1 !important;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.9), 0 0 30px rgba(255, 255, 255, 0.9) !important;
}
.slide-text-item { display: none; }
.slide-text-item.is-active { display: block; }
.slide-text-subtitle {
  font-size: 1.9rem; 
  font-weight: 400; 
  display: block;
  margin-top: 10px;
  letter-spacing: 1px;
  color: #FFCD11; 
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7); 
}

/* CORRECCIÓN: Media queries mejoradas para el texto del carrusel */
@media (max-width: 991px) {
  .hero-text-overlay h1 { 
    font-size: 3.0rem !important; 
    overflow-wrap: break-word; /* Asegura el ajuste de palabras largas */
  }
  .slide-text-subtitle { font-size: 1.5rem; }
}
@media (max-width: 767px) {
  .hero-text-overlay { top: 30%; } /* Baja un poco el texto para mejor composición */
  .hero-text-overlay h1 { font-size: 2.3rem !important; }
  .slide-text-subtitle { font-size: 1.15rem; }
}
@media (max-width: 480px) { /* Nueva regla para móviles pequeños */
  .hero-text-overlay h1 { font-size: 1.8rem !important; }
  .slide-text-subtitle { font-size: 1.0rem; }
}


/* ===== ESTILOS PARA LA NUEVA SECCIÓN DE SERVICIOS ===== */
.services-section-tabs {
  padding: 80px 0;
  background-color: #f8f9fa; 
}
.section-title {
  font-weight: 700;
  color: #1d3557;
  margin-bottom: 50px;
}
.services-section-tabs .nav-pills .nav-link {
  background-color: #ffffff;
  color: #1d3557;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  text-align: left;
  font-weight: 600;
  margin-bottom: 10px;
  padding: 15px 20px;
  transition: all 0.3s ease;
}
.services-section-tabs .nav-pills .nav-link:hover {
  background-color: #e9ecef;
  transform: translateX(5px);
}
.services-section-tabs .nav-pills .nav-link.active {
  background-color: #1d3557;
  color: #ffffff;
  border-color: #1d3557;
  box-shadow: 0 4px 15px rgba(29, 53, 87, 0.3);
  transform: translateX(10px);
}
.tab-pane-content h3 {
  color: #1d3557;
  font-weight: 700;
  margin-bottom: 15px;
}
.related-products-list {
  list-style: none;
  padding-left: 0;
  margin-top: 20px;
}
.related-products-list li {
  margin-bottom: 10px;
  font-size: 0.95rem;
}
.related-products-list i {
  color: #FFCD11;
  margin-right: 10px;
}
.tab-pane-img {
  width: 100%;
  height: 280px; 
  border-radius: 0.5rem;
  object-fit: cover;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); 
  transition: all 0.3s ease-in-out;
}
.tab-pane-img:hover {
  transform: scale(1.03); 
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25); 
}

/* ===== ESTILOS PARA LA SECCIÓN DE COMPUERTAS ===== */
.compuertas-section {
  background-color: #1d3557;
  color: #f8f9fa;
  padding: 80px 0;
}
.compuertas-title { font-weight: 700; }
.compuertas-section p { font-size: 1rem; line-height: 1.6; }
.text-highlight { color: #FFCD11; }
.compuertas-list { list-style: none; padding-left: 0; display: grid; gap: 1rem; }
/* CORRECCIÓN: Se elimina 'white-space: nowrap' para permitir el ajuste de texto en móvil */
.compuertas-list li { font-size: 0.95rem; }
.compuertas-list i { color: #FFCD11; margin-right: 10px; }
.compuertas-images-container { display: flex; justify-content: center; align-items: center; }

.compuertas-images-container img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
  transition: all 0.3s ease-in-out;
}
.compuertas-images-container img:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}

@media (min-width: 576px) { .compuertas-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .compuertas-list { grid-template-columns: repeat(3, 1fr); } }

/* ===== ESTILOS PARA EL FOOTER ===== */
.site-footer {
  background-color: #1d3557;
  color: #ced4da;
  padding: 60px 0 0; 
  font-size: 0.9rem;
  border-top: 1px solid #ffffff;
}
.site-footer .footer-logo { max-width: 300px; margin-bottom: 1rem; }
.site-footer h5 { color: #ffffff; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; margin-bottom: 20px; }
.site-footer p { margin-bottom: 1rem; }
.contact-list { list-style: none; padding: 0; }
.contact-list li { display: flex; align-items: flex-start; margin-bottom: 1rem; }
.contact-list i { color: #FFCD11; margin-right: 15px; font-size: 1.2rem; margin-top: 4px; width: 20px; text-align: center; }
.contact-list a { color: #ced4da; text-decoration: none; transition: color 0.3s ease; }
.contact-list a:hover { color: #FFCD11; }
.social-icons { margin-top: 1.5rem; }
.social-icons a { display: inline-flex; justify-content: center; align-items: center; width: 40px; height: 40px; border-radius: 50%; background-color: rgba(255, 255, 255, 0.1); color: #ffffff; font-size: 1.2rem; margin-right: 10px; text-decoration: none; transition: all 0.3s ease; }
.social-icons a:hover { background-color: #FFCD11; color: #1d3557; transform: scale(1.1); }
.footer-bottom-bar { background-color: #12233b; padding: 15px 0; text-align: center; }
.footer-bottom-bar p { margin: 0; font-size: 0.85rem; color: #ced4da; }

/* ===== ESTILOS PARA PÁGINAS INTERNAS (CONTACTO, PRODUCTOS) ===== */
.page-hero {
  background: url('../images/imagen-contacto.webp') no-repeat center center;
  background-size: cover;
  position: relative;
  padding: 100px 0;
  margin-top: 110px;
  text-align: center;
}
.page-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(29, 53, 87, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
}
.section-title-contact {
  color: #1d3557;
  font-weight: 600;
  border-bottom: 3px solid #FFCD11;
  padding-bottom: 10px;
  display: inline-block;
}
.contact-section .form-label {
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.contact-section .form-control {
  border: 1px solid #ced4da;
  background-color: #f8f9fa;
}
.contact-info-bold span, .contact-info-bold a {
  color: #212529 !important;
  font-weight: 500 !important;
}
.map-container {
  overflow: hidden;
  border-radius: 0.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}
.map-container iframe {
  border: 0;
  width: 100%;
  height: 400px;
}

/* ===== ESTILOS PARA LA PÁGINA DE AGRADECIMIENTO ===== */
.thank-you-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  margin-top: 110px;
}

/* ===== ESTILOS PARA MENSAJES DE ESTADO DEL FORMULARIO ===== */
#form-status {
  text-align: center;
  font-weight: 500;
}
#form-status.success {
  color: #198754;
}
#form-status.error {
  color: #dc3545;
}

/* ===== ESTILOS PARA LA PÁGINA DE PRODUCTOS ===== */
.products-section .nav-pills .nav-link {
  background-color: #ffffff;
  color: #1d3557;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  text-align: center;
  font-weight: 600;
  margin: 0 5px 10px 5px;
  padding: 12px 25px;
  transition: all 0.3s ease;
}
.products-section .nav-pills .nav-link:hover {
  background-color: #e9ecef;
  transform: translateY(-2px);
}
.products-section .nav-pills .nav-link.active {
  background-color: #1d3557;
  color: #ffffff;
  border-color: #1d3557;
  box-shadow: 0 4px 15px rgba(29, 53, 87, 0.3);
  transform: translateY(-2px);
}
.product-card {
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}
.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
}
.product-card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.product-card .card-title {
  color: #1d3557;
  font-weight: 600;
}
.product-card .card-text {
  font-size: 0.9rem;
  color: #6c757d;
}
.product-card .card-body {
  display: flex;
  flex-direction: column;
}
.specs-title {
  font-weight: 600;
  color: #1d3557;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}
.product-specs-list {
  list-style: none;
  padding-left: 0;
  margin-top: 0;
  font-size: 0.85rem;
  color: #495057;
}
.product-specs-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #e9ecef;
}
.product-specs-list li:last-child {
  border-bottom: none;
}
.product-specs-list ul {
  list-style: none;
  padding-left: 1rem;
  margin-top: 0.25rem;
  margin-bottom: 0;
}
.product-specs-list ul li {
  border-bottom: none;
  padding: 0.1rem 0;
}

/* ===== ESTILOS PARA BLOQUES DE ESPECIFICACIONES MÚLTIPLES EN MODAL ===== */
.product-spec-block {
  margin-bottom: 1.5rem; /* Crea la separación entre cada bloque de producto */
}
.product-spec-block:last-child {
  margin-bottom: 0; /* Elimina el margen extra del último elemento */
}
.spec-block-title {
  background-color: #1d3557; /* Fondo azul corporativo */
  color: #ffffff;            /* Texto blanco */
  font-weight: 700;           /* Texto en negrita */
  padding: 10px 15px;
  margin: 0;
  border-radius: 0.3rem 0.3rem 0 0; /* Redondea las esquinas superiores */
}
.spec-block-content {
  padding: 15px;
  border: 1px solid #dee2e6; /* Borde sutil que completa la caja */
  border-top: none; /* Evita doble borde con el título */
  border-radius: 0 0 0.3rem 0.3rem; /* Redondea las esquinas inferiores */
}
.spec-block-content p {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}
.spec-block-content p:last-child {
  margin-bottom: 0;
}

/* ===== ESTILOS PARA MODAL DE PRODUCTOS (SOLUCIÓN FINAL Y DEFINITIVA) ===== */
.modal-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}
.modal-title {
  color: #1d3557;
  font-weight: 600;
}
.product-card .btn-outline-primary {
  border-color: #1d3557;
  color: #1d3557;
}
.product-card .btn-outline-primary:hover {
  background-color: #1d3557;
  color: #ffffff;
}

/* Estilos para los botones del footer del modal */
.modal-footer .btn.btn-primary-solid.btn-quote {
  background-color: #1d3557 !important;
  color: #ffffff !important;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(29, 53, 87, 0.2);
}
.modal-footer .btn.btn-primary-solid.btn-quote:hover {
  background-color: #F99F00 !important;
  color: #1d3557 !important;
  box-shadow: 0 6px 20px rgba(249, 159, 0, 0.4);
  transform: translateY(-2px);
}
.modal-footer .btn.btn-secondary {
  background-color: #e9ecef !important;
  color: #212529 !important;
  box-shadow: none !important;
  border: 1px solid #ced4da;
}
.modal-footer .btn.btn-secondary:hover {
  background-color: #ced4da !important;
}

/* Reglas para el layout del modal SÓLO en pantallas medianas o más grandes */
@media (min-width: 768px) {
  .modal-product-row {
    display: flex;
    align-items: stretch; 
  }

  .modal-product-row > [class*="col-"] {
    display: flex;
    flex-direction: column;
    justify-content: center; 
  }
}
.modal-images-container {
  display: flex;
  flex-direction: column;
  justify-content: space-around; 
  height: 100%;
  width: 100%;
}
.modal-images-container img {
  margin-bottom: 1rem;
}
.modal-images-container img:last-child {
  margin-bottom: 0;
}