/* Estilos personalizados para el hover de botones */
.btn-primary:hover {
    background-color: transparent !important;
    color: #dc3545 !important;
    border-color: #dc3545 !important;
}

/* Estilos para selección de texto y scrollbar */
*::selection {
    color: #BF0311;
    background-color: #E5E5E5;
}

*::-webkit-scrollbar { 
    background-color: #e5e5e5; 
    width: 8px;
}

*::-webkit-scrollbar-thumb {
    background-color: #BF0311;
    border-radius: 4px;
}

*::-webkit-scrollbar-thumb:active {
    background-color: #8c0000;
}

*::-webkit-scrollbar-thumb:hover {
    background-color: #A30211;
}

/* Compatibilidad con Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #BF0311 #F2F2F2;
}

.btn-outline-primary:hover {
    background-color: transparent !important;
    color: #dc3545 !important;
    border-color: #dc3545 !important;
}

/* Aplicar estilo diferente a botones light en hover */
.btn-light:hover {
    background-color: transparent !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
}

/* Estilo para botón fijo de WhatsApp */
.whatsapp-btn {
    position: fixed;
    right: 30px;
    bottom: 30px;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #25d366 !important;
    border-color: #25d366 !important;
    transition: all 0.5s;
    width: 45px;
    height: 45px;
}

.whatsapp-btn:hover {
    background-color: #20ba5a !important;
    color: #ffffff !important;
    border-color: #20ba5a !important;
    transform: scale(1.1);
}

/* Ajustar posición del botón back-to-top */
.back-to-top {
    bottom: 90px !important;
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    right: 30px;
    width: 45px;
    height: 45px;
}

/* Asegurar que el back-to-top también tenga borde rojo en hover */
.back-to-top:hover {
    background-color: #bb2d3b !important;
    color: #ffffff !important;
    border-color: #bb2d3b !important;
}

/* Estilos para el slider comparador de imágenes */
.img-comparison-slider {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 420px;
    overflow: hidden;
    border-radius: 0.25rem;
}

.img-comparison-slider img {
    display: block;
    max-width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    min-height: 420px;
    object-fit: cover;
}

.img-comparison-slider img:first-child {
    position: relative;
    z-index: 1;
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
}

.comparison-slider-handle {
    position: absolute;
    z-index: 3;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: var(--primary);
    transform: translateX(-50%);
    cursor: ew-resize;
}

.comparison-slider-handle::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: -10px;
    right: -10px;
}

.handle-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.handle-icon i {
    font-size: 14px;
}

.handle-icon i:first-child {
    margin-right: 4px;
}

/* Estilos para la sección de personalización */
.custom-feature-box {
    background-color: #f8f9fa;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    height: 100%;
    transition: all 0.3s;
}

.custom-feature-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.custom-feature-img {
    height: 280px;
    overflow: hidden;
}

.custom-feature-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.custom-feature-box:hover .custom-feature-img img {
    transform: scale(1.05);
}

.custom-feature-content {
    padding: 25px;
}

.custom-feature-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--primary);
}

.custom-feature-text {
    margin-bottom: 20px;
    color: #6c757d;
} 

/* Estilos para el carrusel, extraídos del HTML */
.afix-carousel-bg {
    height: 70vh;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Estilos del grid de productos */
.product-item {
    height: 300px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    background-color: #ffffff;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #f0f0f0;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    padding: 15px;
}

@media (max-width: 992px) {
    .product-item {
        height: 270px;
    }
    
    .afix-carousel-bg {
        height: 60vh;
        min-height: 350px;
    }
}

@media (max-width: 768px) {
    .product-item {
        height: 240px;
    }
    
    .col-md-4 {
        width: 50%;
    }
    
    .afix-carousel-bg {
        height: 50vh;
        min-height: 300px;
    }
}

@media (max-width: 576px) {
    .col-md-4 {
        width: 100%;
    }
}

.product-item img {
    max-height: 80%;
    max-width: 85%;
    object-fit: contain;
    transition: transform 0.5s, opacity 0.3s ease;
    opacity: 0; /* Inicialmente invisible */
}

.product-item img.loaded {
    opacity: 1;
}

.product-item:hover img {
    transform: scale(1.05);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.75);
    opacity: 0;
    transition: opacity 0.3s;
    padding: 15px;
    text-align: center;
}

.product-overlay h5 {
    font-weight: 600;
    margin-bottom: 10px;
}

.product-item:hover .product-overlay {
    opacity: 1;
}

.product-grid {
    padding: 15px;
}

/* Optimización para columna izquierda en index.html */
.col-lg-6 .row g-2 h-100 {
    margin: 0;
}

.col-6.h-100 {
    padding-right: 5px;
}

.col-6 .row.g-2.h-100 {
    margin: 0;
}

.afix-h-49 {
    margin-bottom: 5px !important;
}

/* Ajuste para el tamaño del texto en pantallas grandes */
@media (min-width: 992px) {
    .col-lg-6 p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    /* Reducir el espacio entre imágenes en la columna izquierda */
    .afix-h-480 .row {
        gap: 5px !important;
    }
    .afix-h-480 .col-6 .row.g-2 {
        gap: 5px !important;
    }
    .afix-h-49 {
        height: calc(50% - 2.5px) !important;
    }
    .afix-h-49.mb-2 {
        margin-bottom: 5px !important;
    }
    
    /* Ajuste específico para la sección Para Cada Sector */
    .features-section .afix-h-480 .row.g-2 {
        margin: 0;
        gap: 5px !important;
    }
    
    .features-section .col-6 .row.g-2 {
        margin: 0;
        gap: 5px !important;
    }
    
    .features-section .col-12.mb-2 {
        margin-bottom: 5px !important;
    }
}

/* Dots tipo testimonial para el carrusel de productos */
.product-carousel .owl-dots {
    height: 40px;
    margin-top: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-carousel .owl-dot {
    position: relative;
    display: inline-block;
    margin: 0 5px;
    width: 20px;
    height: 20px;
    background: transparent;
    border: 2px solid var(--primary);
    transition: .5s;
}
.product-carousel .owl-dot.active {
    width: 40px;
    height: 40px;
    background: var(--primary);
}
.dropdown-menu .dropdown-item {
    color: #111 !important;
}
.dropdown-menu .dropdown-item.active, .dropdown-menu .dropdown-item:focus, .dropdown-menu .dropdown-item:hover {
    color: #dc3545 !important;
    background: #fff !important;
}

/* Estilos para el mapa interactivo */
.interactive-map-container {
    position: relative;
    padding: 30px 0;
    margin-bottom: 30px;
}

/* Contenedor de puntos del mapa */
.map-points-container {
    position: relative;
    height: 80px;
    margin: 0 auto;
    max-width: 80%;
}

/* Línea conectora */
.map-connector {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background-color: #f0f0f0;
    transform: translateY(-50%);
    z-index: 1;
}

.connector-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background-color: var(--primary);
    transition: width 0.6s ease-in-out;
}

/* Puntos del mapa */
.map-point {
    position: absolute;
    top: 50%;
    width: 50px;
    height: 50px;
    margin-top: -25px;
    z-index: 2;
    cursor: pointer;
    transition: all 0.3s ease;
}

.map-point:nth-child(1) { left: 0; }
.map-point:nth-child(2) { left: 33.33%; }
.map-point:nth-child(3) { left: 66.66%; }
.map-point:nth-child(4) { left: 100%; }

.map-point:nth-child(1) { transform: translateX(0); }
.map-point:nth-child(2) { transform: translateX(-50%); }
.map-point:nth-child(3) { transform: translateX(-50%); }
.map-point:nth-child(4) { transform: translateX(-100%); }

.point-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background-color: #fff;
    border: 2px solid #f0f0f0;
    border-radius: 50%;
    color: #999;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 3;
}

.point-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(220, 53, 69, 0.2);
    opacity: 0;
    z-index: 2;
}

/* Punto activo */
.map-point.active .point-indicator {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.5);
}

.map-point.active .point-pulse {
    animation: pulse 1.5s infinite;
}

/* Puntos completados */
.map-point.completed .point-indicator {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Carrusel de pasos */
.steps-carousel {
    position: relative;
    overflow: hidden;
    min-height: 540px;
}

.step-content {
    position: absolute;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, transform 0.5s ease;
    transform: translateX(50px);
}

.step-content.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.step-title {
    color: #ffffff;
    font-weight: 700;
    z-index: 3;
    position: relative;
}

.step-image-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.step-image {
    width: auto !important;
    height: auto !important;
    max-width: 100%;
    max-height: 650px;
    object-fit: contain;
    margin: 0 auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    position: relative;
    z-index: 1;
}

.step-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

/* Ajustes para alineación superior del texto */
.steps-carousel .row.align-items-start {
    margin-bottom: 20px;
}

.steps-carousel .col-md-6:first-child {
    padding-top: 15px;
}

.step-description {
    margin-bottom: 0;
    line-height: 1.6;
}

@media (max-width: 767px) {
    .step-image-container img {
        height: 420px;
    }
    
    .step-title {
        font-size: 2rem !important;
    }
}

/* Animación de pulso */
@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.8;
    }
    70% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .map-points-container {
        height: 20px;
        margin-top: -160px;
        margin-bottom: -20px;
        position: relative;
        z-index: 10;
    }
    
    .map-point {
        width: 24px;
        height: 24px;
        margin-top: -12px;
    }
    
    .point-indicator {
        width: 20px;
        height: 20px;
        font-size: 11px;
    }
    
    .point-pulse {
        width: 24px;
        height: 24px;
    }
    
    .steps-carousel {
        min-height: 340px;
        margin-bottom: 0;
    }
    
    .step-image-container img {
        height: 320px;
    }
    
    .interactive-map-container {
        padding: 0;
        margin-bottom: 0;
    }
    
    .step-title {
        font-size: 1.8rem !important;
    }
}

@media (max-width: 576px) {
    .interactive-map-container {
        padding: 0;
        margin-bottom: 0;
    }
    
    .map-points-container {
        height: 18px;
        max-width: 90%;
        margin-top: -200px;
        margin-bottom: -30px;
    }
    
    .steps-carousel {
        min-height: 280px;
        margin-bottom: 0;
    }
    
    .step-image-container img {
        height: 260px;
    }
    
    .step-title {
        font-size: 1.4rem !important;
    }
    
    .map-point {
        width: 22px;
        height: 22px;
        margin-top: -11px;
    }
    
    .point-indicator {
        width: 18px;
        height: 18px;
        font-size: 9px;
        border-width: 1px;
    }
    
    /* Código existente */
    .text-start.mt-3 {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
    }
    
    .text-start.mt-3 .btn {
        font-size: 14px;
        padding: 8px 12px !important;
        width: 48%;
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 0 !important;
    }
    
    .text-start.mt-3 .btn-square {
        display: none !important;
    }
    
    .text-start.mt-3 .btn-outline-primary {
        border-width: 1px !important;
    }
    
    .text-start.mt-3 .px-3 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .text-start.mt-3 .d-inline-flex {
        justify-content: center;
    }
    
    /* Ocultar el segundo botón "Conocer Nuestros Sistemas" */
    .text-center.mt-5 .btn-outline-primary,
    .row .text-center .btn-outline-primary,
    .container .text-center .btn-outline-primary {
        display: none !important;
    }
    
    /* Si hay un contenedor que contiene ambos botones, hacer que el primero ocupe todo el ancho */
    .text-center.mt-5 .btn-primary,
    .row .text-center .btn-primary,
    .container .text-center .btn-primary {
        width: 100% !important;
        max-width: 280px;
    }
    
    /* Centrar testimonios en versión móvil */
    .testimonial-item {
        padding-left: 15px;
        padding-right: 15px;
        width: 100%;
        margin: 0 auto;
        text-align: center;
    }
    
    .testimonial-item p {
        font-size: 16px;
        line-height: 1.5;
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        max-width: 100%;
    }
    
    .testimonial-carousel .owl-item {
        padding: 0;
    }
    
    .testimonial-carousel {
        margin: 0 -15px;
        width: 100vw;
        max-width: 100%;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .testimonial-item img.img-fluid {
        margin-left: auto;
        margin-right: auto;
        width: 160px;
        height: 160px;
        object-fit: cover;
        aspect-ratio: 1/1;
        display: block;
    }
    
    .testimonial-item h5, 
    .testimonial-item span {
        text-align: center;
        padding-left: 0;
        padding-right: 0;
    }
    
    /* Ajustar el tamaño del contenedor principal si es necesario */
    .owl-carousel.testimonial-carousel {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }
    
    /* Reducir espacio entre newsletter y footer */
    .container-fluid.bg-dark.text-light.footer {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    /* Ajustar el espacio entre secciones del footer */
    .footer .row.g-5 {
        row-gap: 1rem !important;
    }
    
    /* Espacio más pequeño entre elementos del footer */
    .footer .col-lg-3, 
    .footer .col-md-6 {
        margin-bottom: 0.5rem;
        padding-top: 0;
        padding-bottom: 0;
    }
    
    /* Ocultar la columna de enlaces rápidos en mobile */
    .footer .col-lg-3.col-md-6:nth-child(2) {
        display: none !important;
    }
    
    /* Ajustar formulario de newsletter para que no quede tanto espacio */
    .footer h4.text-light {
        margin-bottom: 1rem !important;
    }
    
    .footer form {
        margin-bottom: 1rem;
    }
    
    /* Reducir márgenes entre elementos de redes sociales */
    .footer h6.text-white {
        margin-top: 1rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* Reducir espacio después del logo */
    .footer img.mb-4 {
        margin-bottom: 0.5rem !important;
    }
    
    /* Reducir espacio entre elementos de contacto */
    .footer p.mb-2 {
        margin-bottom: 0.25rem !important;
    }
    
    /* Ajustar copyright */
    .container-fluid.copyright {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
    
    /* Ajustes para el hero principal */
    .afix-carousel-bg {
        background-position: center top !important;
        object-fit: cover !important;
    }
    
    .carousel-caption.afix-carousel-caption {
        bottom: 0 !important;
        padding-bottom: 20px !important;
    }
    
    /* Asegurar que los botones del carrusel tengan espacio entre ellos */
    .carousel-caption .btn-primary,
    .carousel-caption .btn-light {
        margin: 5px 10px !important;
        font-size: 14px !important;
        padding: 8px 15px !important;
    }
    
    /* Hacer más angosto el botón Conocer Más */
    .carousel-caption .btn-primary {
        max-width: 140px !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    /* Asegurar que la imagen cubra todo el espacio sin dejar margen abajo */
    #header-carousel .carousel-item,
    #header-carousel .carousel-item .w-100 {
        background-size: cover !important;
        background-position: center !important;
    }
    
    /* Ajustar el espaciado del contenedor */
    #header-carousel .carousel-item {
        overflow: hidden !important;
    }
    
    /* Ajustar la posición del título del carrusel */
    .carousel-caption h1.display-2 {
        margin-bottom: 15px !important;
        font-size: 1.8rem !important;
    }
    
    /* Ocultar los indicadores del carrusel en versión móvil */
    .carousel-control-prev,
    .carousel-control-next,
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        display: none !important;
    }
    
    /* Ocultar las features resaltadas en "Para Cada Sector" */
    .features-section .col-sm-6,
    .features-section .row.g-2.mb-4.pb-2,
    .row.g-2.mb-4.pb-2 {
        display: none !important;
    }
    
    /* Ajustar espacio si es necesario */
    .features-section .mb-2,
    .features-section .mb-4 {
        margin-bottom: 0 !important;
    }
    
    /* Centrar botones */
    .features-section .row.g-4 {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .features-section .col-sm-6 {
        width: 100%;
        max-width: 280px;
        margin-bottom: 10px;
    }
    
    /* Ocultar las features/contadores */
    .container-fluid.facts {
        display: none !important;
    }
    
    .facts .container, 
    .facts .col-lg-4,
    .facts .bg-white.shadow,
    .afix-minh-150,
    .afix-circle-60 {
        display: none !important;
    }
    
    /* Eliminar espacio extra entre secciones cuando los facts están ocultos */
    .py-5.pt-lg-0 {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
    
    /* Ocultar el botón del teléfono en la sección Nosotros */
    .container-xxl.py-6 .text-start a.btn.btn-outline-primary,
    a.d-inline-flex.align-items-center.btn.btn-outline-primary,
    a.btn.btn-outline-primary.border-2.p-2.ms-3 {
        display: none !important;
    }
    
    /* Centrar y ajustar el botón Conocer Más */
    .container-xxl.py-6 .text-start .btn.btn-primary {
        display: block;
        margin: 0 auto !important;
        width: 100%;
        max-width: 280px;
        text-align: center;
    }
    
    .container-xxl.py-6 .text-start {
        text-align: center !important;
        width: 100%;
    }
    
    /* Reducir espacio entre header y primera sección */
    .navbar + .container-fluid,
    .navbar + .container-xxl {
        margin-top: -15px !important;
    }
    
    /* Ajustar todas las secciones para reducir espacio */
    .container-xxl.py-6 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    /* Ajustes específicos SOLO para la imagen de la sección Sobre Nosotros */
    .page-header + .container .position-relative.overflow-hidden.ps-5.pt-5.h-100.afix-minh-400,
    .about-page .position-relative.overflow-hidden.ps-5.pt-5.h-100.afix-minh-400 {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        left: 0 !important;
        right: 0 !important;
        border: none !important;
    }
    
    /* Ajustar SOLO la imagen específica de Sobre Nosotros */
    .page-header + .container .position-relative.overflow-hidden.ps-5.pt-5.h-100.afix-minh-400 img,
    .about-page .position-relative.overflow-hidden.ps-5.pt-5.h-100.afix-minh-400 img {
        width: calc(100% - 20px) !important;
        max-width: calc(100% - 20px) !important;
        margin: 0 auto !important;
        padding: 0 10px !important;
        object-fit: cover !important;
        display: block !important;
    }
    
    /* Mantener el resto del código existente... */
    
    /* Eliminar altura mínima de los divs de YouTube en la sección Nuestros Sistemas */
    .feature-section iframe,
    .feature-section .video-container,
    .feature-section div:has(iframe),
    iframe[src*="youtube"],
    iframe[src*="youtu.be"],
    .container-xxl iframe,
    .feature-section .youtube-embed,
    .feature-section .embed-responsive,
    div:has(> iframe[src*="youtube"]) {
        min-height: auto !important;
        height: auto !important;
        aspect-ratio: 16/9 !important;
    }
    
    /* Asegurar que los contenedores de YouTube no tengan altura mínima fija */
    .feature-section .position-relative.overflow-hidden:has(iframe),
    .container-xxl .position-relative.overflow-hidden:has(iframe),
    .feature-section .col-lg-6:has(iframe),
    .feature-section .col-md-6:has(iframe) {
        min-height: 0 !important;
        height: auto !important;
    }
    
    /* Ocultar la primera sección de Nuestros Sistemas */
    .dn {
        display: none !important;
    }
    
    /* Forzar el orden Video-Texto en todas las secciones de sistemas */
    .feature-section .row,
    .sistemas-section .row {
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Asegurar que las columnas con video siempre aparezcan primero */
    .feature-section .row .col-lg-6:has(iframe),
    .feature-section .row .col-md-6:has(iframe),
    .feature-section .row div:has(iframe),
    .sistemas-section .row div:has(iframe),
    .feature-section .row .col-lg-6:has(video),
    .sistemas-section .row div:has(video) {
        order: 1 !important;
        margin-bottom: 1.5rem !important;
    }
    
    /* Asegurar que las columnas con texto siempre aparezcan después */
    .feature-section .row .col-lg-6:not(:has(iframe)):not(:has(video)),
    .feature-section .row .col-md-6:not(:has(iframe)):not(:has(video)),
    .sistemas-section .row div:not(:has(iframe)):not(:has(video)),
    .feature-section .row div:has(h1),
    .feature-section .row div:has(h2),
    .feature-section .row div:has(.d-flex) {
        order: 2 !important;
    }
    
    /* Asegurar que el video de Marcos ClickClac se muestre en el área resaltada */
    .feature-section #sistema-clicclac iframe,
    .feature-section .marcos-clicclac iframe,
    .feature-section div:has(h2:contains("Marcos ClickClac")) iframe,
    .feature-section div:has(h2:contains("Marcos Clic")) iframe,
    .feature-section h2 + p + div iframe,
    .feature-section .container-xxl:has(h2:contains("Marcos")) iframe,
    iframe[src*="backlight"],
    iframe[src*="youtube"][data-sistema="clicclac"],
    div:has(> h2:contains("Marcos")) ~ div iframe {
        margin-top: 15px !important;
        margin-bottom: 0 !important;
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        aspect-ratio: 16/9 !important;
        display: block !important;
        order: 3 !important;
    }
    
    /* Asegurar que el contenedor del video esté bien posicionado */
    .feature-section .row div:has(> iframe),
    .sistemas-section .row div:has(> iframe) {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }
}

/* Estilos para la página de cotización */
.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
    border-color: #dc3545;
}

.form-floating>.form-control:focus~label,
.form-floating>.form-select:focus~label {
    color: #dc3545;
}

/* Asegurar que la imagen tenga la altura correcta */
@media (min-width: 992px) {
    .position-relative.overflow-hidden.h-100.rounded.shadow {
        min-height: 600px;  /* Altura mínima para coincidir con el formulario */
    }
    
    /* Eliminar margen superior extra en el formulario */
    .row.g-5.align-items-start {
        align-items: stretch !important;
    }
}

@media (max-width: 991px) {
    .position-relative.overflow-hidden.h-100.rounded.shadow {
        min-height: 400px;  /* Altura para móviles */
        margin-bottom: 2rem;
    }
}

/* Estilos para logos de clientes */
.client-item {
    padding: 15px;
    height: auto;
    display: block;
}

.client-item .client-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    padding: 20px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.client-item .client-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.client-item img {
    max-width: 100%;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0 !important;
    transition: all 0.3s ease;
    filter: none !important; /* Aseguramos que no haya ningún filtro */
}

.client-carousel .owl-stage {
    display: flex;
    padding: 10px 0;
}

/* Estilos para los botones de navegación del carousel */
.client-carousel .owl-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    padding: 0 -10px;
}

.client-carousel .owl-nav button {
    width: 40px;
    height: 40px;
    background: rgba(220, 53, 69, 0.8) !important;
    color: #fff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    transition: all 0.3s ease;
    margin: 0 10px;
}

.client-carousel .owl-nav button:hover {
    background: rgba(220, 53, 69, 1) !important;
}

.client-carousel .owl-nav button i {
    font-size: 20px;
    line-height: 1;
}

/* Estilo para testimonios - círculos con iconos */
.position-absolute.top-100.start-50.translate-middle.d-flex.align-items-center.justify-content-center.bg-white.rounded-circle {
    width: 60px;
    height: 60px;
}

/* Carrusel backgrounds específicos */
.carousel-bg-1 {
    background-image: url('../img/carousel-1.jpg');
}

.carousel-bg-2 {
    background-image: url('../img/carousel-2.jpg');
}

.carousel-bg-3 {
    background-image: url('../img/carousel-3.jpg');
}

/* Estilos para la página de contacto */
.contact-icon {
    font-size: 2rem;
    color: #dc3545;
    margin-right: 12px;
}

.contact-feature {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-feature i {
    font-size: 1.7rem;
    color: #dc3545;
}

.contact-socials a {
    font-size: 1.7rem;
    color: #dc3545;
    margin-right: 18px;
    transition: color 0.2s;
}

.contact-socials a:hover {
    color: #111;
}

.google-maps-pin {
    width: 100%;
    min-height: 350px;
    border-radius: 12px;
    border: 2px solid #eee;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

@media (max-width: 991px) {
    .google-maps-pin {
        min-height: 250px;
    }
}

/* Estilos para la página del equipo */
.team-member {
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

.team-img {
    position: relative;
    overflow: hidden;
}

.team-img img {
    width: 100%;
    transition: all 0.4s;
}

.team-social {
    position: absolute;
    bottom: -40px;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: all 0.4s;
    padding: 10px 0;
    background: rgba(220, 53, 69, 0.8);
}

.team-social a {
    color: #fff;
    margin: 0 8px;
    transition: all 0.4s;
}

.team-social a:hover {
    transform: translateY(-5px);
}

.team-content {
    padding: 20px;
    background: #fff;
    text-align: center;
}

.team-content h4 {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.team-content p {
    margin: 0;
    color: #dc3545;
}

.team-member:hover .team-img img {
    transform: scale(1.08);
}

.team-member:hover .team-social {
    bottom: 0;
    opacity: 1;
}

/* Estilos para las tarjetas de miembros del equipo */
.team-member-card {
    margin-bottom: 30px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    background-color: #fff;
    position: relative;
    transition: all 0.3s ease;
    border: 2px solid #dc3545;
}

.team-member-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border: 2px solid #a30211;
}

.team-img {
    position: relative;
    overflow: hidden;
}

.team-img img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
    background-color: #f8f9fa;
}

.team-member-card:hover .team-img img {
    transform: none;
}

.team-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.85);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.team-member-card:hover .team-overlay {
    opacity: 1;
}

.team-title {
    text-align: center;
    padding: 20px;
}

.team-title h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 5px;
    color: #000;
}

.team-title p {
    font-weight: bold;
    margin-bottom: 5px;
}

.team-title .team-quote {
    font-size: 14px;
    color: #555;
    font-style: italic;
}

.team-info { display: none; }

/* Estilos para el carrusel del equipo */
.team-carousel {
    position: relative;
}

.team-carousel .owl-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    left: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 1;
    padding: 0 -15px;
}

.team-carousel .owl-nav button.owl-prev,
.team-carousel .owl-nav button.owl-next {
    width: 40px;
    height: 40px;
    background-color: #dc3545 !important;
    color: #fff !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 -20px;
    pointer-events: auto;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.team-carousel .owl-nav button.owl-prev {
    left: 0;
    position: relative;
}

.team-carousel .owl-nav button.owl-next {
    right: 0;
    position: relative;
}

.team-carousel .owl-nav button:hover {
    opacity: 1;
    background-color: #c82333 !important;
}

.team-carousel .owl-dots {
    height: 40px;
    margin-top: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-carousel .owl-dot {
    position: relative;
    display: inline-block;
    margin: 0 5px;
    width: 20px;
    height: 20px;
    background: transparent;
    border: 2px solid var(--primary);
    transition: .5s;
}

.team-carousel .owl-dot.active {
    width: 40px;
    height: 40px;
    background: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .team-title h2 {
        font-size: 1.5rem;
    }
}

/* Ajustes para el nuevo diseño de pasos */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* Estilos para la carga progresiva de imágenes de productos */
/* Animaciones eliminadas para evitar problemas de carga */

/* Estilos para spinner de carga en imágenes */
.product-item {
    position: relative;
}

.product-item .img-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.product-item img.loaded + .img-placeholder {
    opacity: 0;
    pointer-events: none;
}

.product-loader {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #BF0311;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Estilo para aumentar la altura del textarea en el formulario de contacto */
textarea.form-control {
    min-height: 150px !important;
}

.form-floating textarea.form-control {
    height: 150px !important;
    padding-top: 1.625rem !important;
    resize: vertical;
}

/* Estilos para botones en versión móvil */
@media (max-width: 576px) {
    /* Hacer que el contenedor de botones use flexbox */
    .text-start.mt-3 {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
    }
    
    /* Ajustar el tamaño de los botones */
    .text-start.mt-3 .btn {
        font-size: 14px;
        padding: 8px 12px !important;
        width: 48%;
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 0 !important;
    }
    
    /* Ocultar el icono de YouTube */
    .text-start.mt-3 .btn-square {
        display: none !important;
    }
    
    /* Ajustar el segundo botón */
    .text-start.mt-3 .btn-outline-primary {
        border-width: 1px !important;
    }
    
    /* Eliminar padding extra en el texto del botón */
    .text-start.mt-3 .px-3 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* Centrar el texto en el segundo botón */
    .text-start.mt-3 .d-inline-flex {
        justify-content: center;
    }
    
    /* Ocultar el segundo botón "Conocer Nuestros Sistemas" */
    .text-center.mt-5 .btn-outline-primary,
    .row .text-center .btn-outline-primary,
    .container .text-center .btn-outline-primary {
        display: none !important;
    }
    
    /* Si hay un contenedor que contiene ambos botones, hacer que el primero ocupe todo el ancho */
    .text-center.mt-5 .btn-primary,
    .row .text-center .btn-primary,
    .container .text-center .btn-primary {
        width: 100% !important;
        max-width: 280px;
    }
}

/* Simplificar el grid a una sola imagen que ocupe todo el ancho */
.features-section .col-lg-6.wow.fadeInUp[data-wow-delay="0.5s"] .h-100 {
    height: 450px !important;
}

/* Ocultar completamente la segunda columna con las imágenes adicionales */
.features-section .col-lg-6.wow.fadeInUp[data-wow-delay="0.5s"] .col-6:nth-child(2) {
    display: none !important;
}

/* Hacer que la primera columna ocupe todo el ancho */
.features-section .col-lg-6.wow.fadeInUp[data-wow-delay="0.5s"] .col-6:first-child {
    width: 100% !important;
    height: 450px !important;
    padding: 0;
}

/* Ajustar imagen para que ocupe todo el espacio */
.features-section .col-lg-6.wow.fadeInUp[data-wow-delay="0.5s"] .afix-img-cover,
.features-section .col-lg-6.wow.fadeInUp[data-wow-delay="0.5s"] .afix-img-square {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

/* Ajustar contenedor de altura fija */
.features-section .afix-h-480 {
    height: 450px !important;
}

/* Hacer que la imagen inferior sea más ancha */
.about-section .row .col-12:last-child img,
.about-section .row div:last-child img,
.container-xxl img[src*="mesa"],
.gallery-grid img:last-child,
.about-section .gallery-images img:last-child {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin-top: 10px !important;
}

@media (max-width: 576px) {
    /* Código existente... se mantiene */
    
    /* Hacer que la imagen inferior sea más ancha en móvil */
    .about-section .row .col-12:last-child img,
    .about-section .row div:last-child img,
    .gallery-grid img:last-child,
    .about-section .gallery-images img:last-child {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        margin-top: 5px !important;
    }
}

.step-hover-info {
    position: absolute;
    top: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 844px;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    z-index: 2;
    color: #fff;
    text-align: center;
    padding: 30px 10px;
    transition: opacity 0.3s;
}

/* Hover más preciso - solo en el área de la imagen */
.step-image-container:hover .step-hover-info {
    opacity: 1;
    pointer-events: auto;
}

/* Asegurar que el hover se aplique solo en el área visible de la imagen */
.step-image-container {
    cursor: pointer;
}

.step-hover-info::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    border-radius: 12px;
    z-index: -1;
}

.step-hover-info h3 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #fff;
}

.step-hover-info p {
    font-size: 1.3rem;
    font-weight: 400;
    margin: 0;
    color: #fff;
}

/* Responsive para pantallas más pequeñas */
@media (max-width: 768px) {
    .step-hover-info h3 {
        font-size: 1.8rem;
    }
    
    .step-hover-info p {
        font-size: 1.1rem;
    }
}

/* Estilos para la página de FAQ */
.accordion-item {
    border: none;
    background-color: transparent;
    margin-bottom: 1rem;
}

.accordion-button {
    background-color: #f8f9fa;
    border: none;
    border-radius: 0 !important;
    padding: 1.25rem;
    font-weight: 500;
    color: #333;
}

.accordion-button:not(.collapsed) {
    background-color: #333;
    color: #fff;
}

.accordion-button:focus {
    box-shadow: none;
    border: none;
}

.accordion-button::after {
    background-size: 1.25rem;
    transition: all 0.3s ease;
}

.accordion-body {
    background-color: #fff;
    padding: 1.5rem;
    border: 1px solid #eee;
}

.accordion-body p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.accordion-body p:last-child {
    margin-bottom: 0;
}

.accordion-body img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
}

.accordion-body .ratio {
    margin: 1rem 0;
}

/* Estilos para las secciones */
.faq-section h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #F3BD00;
    display: inline-block;
}

#cotizacionCarousel {
    height: 0;
    padding-bottom: 100%; /* Hace que el contenedor sea cuadrado */
    position: relative;
}

#cotizacionCarousel .carousel-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#cotizacionCarousel .carousel-item {
    height: 100%;
    background-color: white;
}

#cotizacionCarousel .carousel-item img {
    object-fit: contain;
    width: 100%;
    height: 100%;
    padding: 2rem;
}

#cotizacionCarousel .carousel-caption {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    padding: 0;
    width: auto;
    background: none;
    text-align: center;
}

#cotizacionCarousel .carousel-caption h5 {
    margin: 0;
    padding: 0.75rem 2rem;
    font-size: 1.2rem;
    font-weight: 500;
    background: var(--primary);
    color: #ffffff;
    border-radius: 0;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#cotizacionCarousel .carousel-control-prev,
#cotizacionCarousel .carousel-control-next {
    width: 40px;
    height: 40px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    margin: 0 1rem;
    opacity: 1;
}

#cotizacionCarousel .carousel-control-prev-icon,
#cotizacionCarousel .carousel-control-next-icon {
    width: 30px;
    height: 30px;
    background-color: var(--primary);
    border-radius: 0;
    background-size: 60%;
}

#cotizacionCarousel .carousel-control-prev:hover .carousel-control-prev-icon,
#cotizacionCarousel .carousel-control-next:hover .carousel-control-next-icon {
    background-color: #000000;
}

@media (max-width: 768px) {
    #cotizacionCarousel .carousel-item {
        background-color: #000000;
        min-height: 300px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #cotizacionCarousel .carousel-item img {
        display: none;
    }

    #cotizacionCarousel .carousel-caption {
        position: static;
        transform: none;
        padding: 0 15px;
        width: 100%;
        text-align: center;
    }

    #cotizacionCarousel .carousel-caption h5 {
        display: inline-block;
        margin: 0 auto;
    }
} 