/* assets/quienes-somos.css */
.quienes-somos-section {
    color: white;
    padding: 60px 0;
    font-family: Arial, sans-serif;
}

.quienes-somos-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.quienes-somos-title {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color, #8b5cf6);
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.quienes-somos-intro {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 50px;
}

.quienes-somos-intro .highlight {
    color: var(--primary-color, #8b5cf6);
    font-weight: bold;
}

/* Bloque de dos columnas: Estadísticas + Mapa */
.quienes-somos-stats-map {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 50px;
    align-items: center;
}

.stats-column {
    font-size: 1.1rem;
    line-height: 1.8;
}

.stats-column p {
    margin-bottom: 20px;
}

.map-column {
    display: flex;
    justify-content: center;
    align-items: center;
}

.spain-map {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* SVG Personalizado con efectos hover */
.custom-svg-map {
    width: 100%;
    max-width: 500px;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.custom-svg-map svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.3));
    border-radius: 10px;
    transition: all 0.3s ease;
}

/* Efectos para elementos del SVG personalizado */
.custom-svg-map svg path,
.custom-svg-map svg circle,
.custom-svg-map svg polygon,
.custom-svg-map svg rect {
    fill: #4a5568;
    stroke: rgba(255, 255, 255, 0.3);
    stroke-width: 0.8;
}

.custom-svg-map svg path:hover,
.custom-svg-map svg circle:hover,
.custom-svg-map svg polygon:hover,
.custom-svg-map svg rect:hover {
    filter: brightness(1.3) drop-shadow(0 0 20px var(--primary-color, #8b5cf6));
    stroke: var(--primary-color, #8b5cf6);
    stroke-width: 2;
    fill: var(--primary-color, #8b5cf6);
}

/* Si hay elementos con clases específicas */
.custom-svg-map svg .hover-element {
    transition: all 0.3s ease;
    cursor: pointer;
    filter: brightness(0.7);
}

.custom-svg-map svg .hover-element:hover {
    filter: brightness(1.5) drop-shadow(0 0 25px currentColor);
    transform: scale(1.05);
}

/* Efectos para texto dentro del SVG */
.custom-svg-map svg text {
    transition: all 0.3s ease;
    cursor: pointer;
    fill-opacity: 0.8;
}

.custom-svg-map svg text:hover {
    fill-opacity: 1;
    filter: drop-shadow(0 0 15px currentColor) brightness(1.3);
}

/* Mapa SVG anterior - mantener compatibilidad */
.spain-map-svg {
    width: 100%;
    max-width: 500px;
    height: auto;
}

.interactive-spain-map {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.3));
    border-radius: 10px;
    background-color: rgba(255,255,255,0.1);
    padding: 20px;
    box-sizing: border-box;
}

.spain-mainland {
    fill: #4a5568;
    stroke: rgba(255, 255, 255, 0.3);
    stroke-width: 0.8;
}

.spain-mainland:hover {
    fill-opacity: 1;
    filter: brightness(1.2) drop-shadow(0 0 15px var(--primary-color, #8b5cf6));
    transform: scale(1.02);
    transform-origin: center;
}

.balearic-islands,
.canary-islands {
    fill: #4a5568;
    stroke: rgba(255, 255, 255, 0.3);
    stroke-width: 0.8;
}

.balearic-islands:hover,
.canary-islands:hover {
    fill: #ffffff;
    filter: brightness(1.2) drop-shadow(0 0 10px #ffffff);
    transform: scale(1.2);
}

.delegation-point {
    transition: all 0.3s ease;
    cursor: pointer;
    stroke: #ffffff;
    stroke-width: 2;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
    opacity: 0.8;
}

.delegation-point:hover {
    fill: #ffffff;
    stroke: #ff4444;
    stroke-width: 3;
    transform: scale(1.5);
    filter: drop-shadow(0 0 15px #ff4444) brightness(1.3);
    opacity: 1;
}

.tooltip {
    transition: opacity 0.3s ease;
    font-family: Arial, sans-serif;
}

.tooltip rect {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Texto clientes */
.clients-intro {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 40px;
    text-align: center;
}

/* Carrusel de logos de clientes - CON DIFUMINADO */
.clients-carousel-container {
    margin-bottom: 50px;
    overflow: hidden;
    position: relative;
    padding: 30px 0;
    background: transparent;
}

/* Efecto de difuminado en los bordes */
.clients-carousel-container::before,
.clients-carousel-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 2;
    pointer-events: none;
}

.clients-carousel-container::before {
    left: 0;
    background: linear-gradient(to right, 
        #121212 0%,
        rgba(18, 18, 18, 0.8) 30%,
        rgba(18, 18, 18, 0) 100%);
}

.clients-carousel-container::after {
    right: 0;
    background: linear-gradient(to left, 
        #121212 0%,
        rgba(18, 18, 18, 0.8) 30%,
        rgba(18, 18, 18, 0) 100%);
}

.clients-carousel-track {
    display: flex;
    gap: 30px;
    width: max-content;
    animation: scroll-logos 90s linear infinite;
}

.client-logo-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    height: 110px;
    flex-shrink: 0;
    transition: all 0.4s ease;
    background: rgba(255, 255, 255, 1);
    backdrop-filter: blur(3px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 20px;
    opacity: 1;
}

.client-logo-slide:hover {
    transform: scale(1.03);
    background: rgba(255, 255, 255, 1);
}

.client-logo-slide img {
    max-width: 120px;
    max-height: 70px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(0.1) brightness(1);
    transition: all 0.4s ease;
    opacity: 1;
}

.client-logo-slide:hover img {
    filter: grayscale(0) brightness(1.05);
    transform: scale(1.02);
}

/* Animación del carrusel de logos - MÁS LENTA */
@keyframes scroll-logos {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-190px * var(--logo-count, 8)));
    }
}

/* Pausar animación al hover del contenedor */
.clients-carousel-container:hover .clients-carousel-track {
    animation-play-state: paused;
}

/* Texto final */
.final-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 40px;
    text-align: center;
}

/* Carrusel de máquinas - CON DIFUMINADO Y VELOCIDAD AJUSTADA */
.machines-carousel-container {
    margin-top: 40px;
    overflow: hidden;
    padding: 30px 0;
    position: relative;
    background: transparent;
}

/* Efecto de difuminado en los bordes para máquinas */
.machines-carousel-container::before,
.machines-carousel-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 2;
    pointer-events: none;
}

.machines-carousel-container::before {
    left: 0;
    background: linear-gradient(to right, 
        #121212 0%,
        rgba(18, 18, 18, 0.8) 30%,
        rgba(18, 18, 18, 0) 100%);
}

.machines-carousel-container::after {
    right: 0;
    background: linear-gradient(to left, 
        #121212 0%,
        rgba(18, 18, 18, 0.8) 30%,
        rgba(18, 18, 18, 0) 100%);
}

.machines-carousel-track {
    display: flex;
    gap: 25px;
    width: max-content;
    /* VELOCIDAD REDUCIDA: de 80s a 120s */
    animation: scroll-machines 200s linear infinite;
}

.machine-image-slide {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 280px;
    height: 280px; /* ALTURA AUMENTADA para reducir espacio en blanco */
    flex-shrink: 0;
    transition: all 0.4s ease;
    background: rgba(255, 255, 255, 1);
    backdrop-filter: blur(3px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px; /* PADDING REDUCIDO */
    overflow: hidden;
    opacity: 1;
    cursor: pointer; /* CURSOR POINTER para indicar que es clickeable */
}

.machine-image-slide:hover {
    transform: translateY(-5px) scale(1.05); /* ESCALA LIGERAMENTE MENOR */
    background: rgba(255, 255, 255, 1);
}

.machine-image-slide img {
    max-width: 100%;
    max-height: 250px; /* ALTURA MÁXIMA AUMENTADA */
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    transition: all 0.4s ease;
    opacity: 1;
}

.machine-image-slide:hover img {
    transform: scale(1.08); /* ESCALA AUMENTADA en hover */
    filter: brightness(1.05);
}

/* Animación del carrusel de máquinas - MÁS LENTA */
@keyframes scroll-machines {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-305px * var(--machine-count, 4)));
    }
}

/* Pausar animación al hover del contenedor */
.machines-carousel-container:hover .machines-carousel-track {
    animation-play-state: paused;
}

/* MODAL DE PANTALLA COMPLETA PARA MÁQUINAS */
.machine-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.machine-modal.show {
    display: flex;
    animation: modalFadeIn 0.3s ease;
}

.machine-modal-content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
    cursor: default;
}

.machine-modal img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    animation: modalImageIn 0.4s ease;
}

.machine-modal-close {
    position: absolute;
    top: -50px;
    right: -50px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
}

.machine-modal-close:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

@keyframes modalImageIn {
    from { 
        opacity: 0;
        transform: scale(0.8);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

/* Modal para información de comunidades */
.comunidad-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #1a1a1a;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 320px;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-title {
    color: var(--primary-color, #8b5cf6);
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 20px;
}

.modal-info {
    color: white;
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
}

/* Animaciones del modal */
.comunidad-modal.show {
    display: block;
    animation: modalFadeIn 0.3s ease;
}

.comunidad-modal.show .modal-content {
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from { 
        opacity: 0;
        transform: translate(-50%, -60%) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .quienes-somos-title {
        font-size: 2.5rem;
    }

    .quienes-somos-stats-map {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .stats-column {
        order: 2;
    }

    .map-column {
        order: 1;
    }

    .clients-carousel-track {
        gap: 20px;
    }

    .client-logo-slide {
        min-width: 140px;
        width: 140px;
        height: 90px;
        padding: 15px;
        transition: all 0.4s ease;
    }

    .client-logo-slide img {
        max-width: 110px;
        max-height: 60px;
        transition: all 0.4s ease;
    }

    .machines-carousel-track {
        gap: 20px;
    }

    .machine-image-slide {
        width: 240px;
        height: 240px; /* ALTURA AJUSTADA para móvil */
        padding: 12px;
        transition: all 0.4s ease;
    }

    .machine-image-slide img {
        max-height: 200px; /* ALTURA MÁXIMA AJUSTADA */
        transition: all 0.4s ease;
    }

    /* Ajustar difuminado para móvil */
    .clients-carousel-container::before,
    .clients-carousel-container::after,
    .machines-carousel-container::before,
    .machines-carousel-container::after {
        width: 60px;
    }

    .quienes-somos-section {
        padding: 40px 0;
    }

    /* Modal responsive */
    .machine-modal-close {
        top: -40px;
        right: -40px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .client-logo-slide {
        min-width: 120px;
        width: 120px;
        height: 80px;
        padding: 12px;
    }
    
    .client-logo-slide img {
        max-width: 96px;
        max-height: 50px;
    }
    
    .machine-image-slide {
        width: 200px;
        height: 200px; /* ALTURA AJUSTADA para móvil pequeño */
        padding: 10px;
    }
    
    .machine-image-slide img {
        max-height: 180px; /* ALTURA MÁXIMA AJUSTADA */
    }
    
    .clients-carousel-container,
    .machines-carousel-container {
        padding: 20px 0;
    }

    /* Difuminado más pequeño para móvil */
    .clients-carousel-container::before,
    .clients-carousel-container::after,
    .machines-carousel-container::before,
    .machines-carousel-container::after {
        width: 40px;
    }

    /* Ajustar animaciones para móvil */
    @keyframes scroll-logos {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(calc(-140px * var(--logo-count, 8)));
        }
    }

    @keyframes scroll-machines {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(calc(-220px * var(--machine-count, 4)));
        }
    }

    /* Modal responsive para móvil pequeño */
    .machine-modal-content {
        max-width: 95vw;
        max-height: 95vh;
    }

    .machine-modal-close {
        top: -30px;
        right: -30px;
        width: 30px;
        height: 30px;
        font-size: 18px;
    }
}

/* WP Bakery specific styles */
.vc_row .quienes-somos-section {
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
}

.vc_row .quienes-somos-container {
    max-width: none;
    width: 100%;
    padding: 0 15px;
}