/*=============================================
    MÓDULO DE NOSOTROS - Diseño WordPress
    Basado en Elementor - Packaging and Color
=============================================*/

:root {
    --nosotros-dark-bg: #1a2e3f;
    --nosotros-light-bg: #f8f9fa;
    --nosotros-text-dark: #333333;
    --nosotros-text-light: #ffffff;
    --nosotros-accent: #046bd2;
}

.nosotros-section {
    font-family: 'Ubuntu', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    width: 100%;
    overflow: hidden;
}

/* ========================================
   HERO SECTION - Fondo con imagen Equipo-Packing-and-Color.webp
   ======================================== */
.nosotros-hero {
    background-image: url('/public/images/nosotros/Equipo-Packing-and-Color.webp');
    background-size: cover;   
    background-repeat: no-repeat;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}



.nosotros-hero .hero-content {
    position: relative;
    z-index: 2;
    padding: 80px 20px;
    width: 100%;
}

.nosotros-hero .hero-title {
    color: var(--nosotros-text-light);
    font-size: 48px;
    font-weight: 400;
    line-height: 1.3;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    animation: fadeInUp 1s ease;
}

.nosotros-hero .hero-title strong {
    font-weight: 700;
    color: #f1c40f;
}

/* ========================================
   EQUIPO SECTION
   ======================================== */
.nosotros-equipo {
    padding: 80px 0;
    background-color: #ffffff;
}

.section-header {
    margin-bottom: 60px;
}

.section-title {
    color: var(--nosotros-text-dark);
    font-size: 42px;
    font-weight: 400;
    margin: 0;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--nosotros-accent);
}

.team-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.team-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.team-card:hover .team-image {
    transform: scale(1.05);
}

.team-info {
    padding: 25px 20px;
    text-align: center;
}

.team-name {
    color: var(--nosotros-text-dark);
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
}

.team-position {
    color: #666666;
    font-size: 16px;
    margin: 0;
    font-weight: 400;
}

/* ========================================
   HISTORIA SECTION
   ======================================== */
.nosotros-historia {
    background-color: var(--nosotros-light-bg);
}

.historia-image-side {
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.historia-image {
    width: 100%;
    height: auto;
    max-width: 550px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.historia-image:hover {
    transform: scale(1.02);
}

.historia-content-side {
    display: flex;
    align-items: center;
    padding: 60px 40px;
    min-height: 600px;
    background: #FFB200;
}

.historia-content-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.historia-logo {
    width: 280px;
    height: auto;
    max-width: 100%;
    transition: transform 0.3s ease;
}

.historia-logo:hover {
    transform: scale(1.02);
}

.historia-title {
    color: var(--nosotros-text-dark);
    font-size: 28px;
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
}

.historia-title strong {
    font-weight: 700;
    color: var(--nosotros-accent);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1200px) {
    .nosotros-hero .hero-title {
        font-size: 42px;
    }
    
    .section-title {
        font-size: 36px;
    }
    
    .historia-title {
        font-size: 26px;
    }
}

@media (max-width: 991.98px) {
    .nosotros-hero .hero-title {
        font-size: 36px;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .team-name {
        font-size: 20px;
    }
    
    .historia-image-side {
        min-height: 400px;
        padding: 40px 20px;
    }
    
    .historia-content-side {
        min-height: auto;
        padding: 50px 30px;
    }
    
    .historia-content-wrapper {
        text-align: center;
    }
    
    .historia-title {
        font-size: 24px;
    }
}

@media (max-width: 767.98px) {
    .nosotros-hero .hero-title {
        font-size: 30px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .team-card {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .team-name {
        font-size: 18px;
    }
    
    .historia-logo {
        width: 220px;
    }
    
    .historia-title {
        font-size: 22px;
    }
}

@media (max-width: 575.98px) {
    .nosotros-hero .hero-title {
        font-size: 26px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .team-info {
        padding: 20px 15px;
    }
    
    .team-name {
        font-size: 18px;
    }
    
    .team-position {
        font-size: 14px;
    }
    
    .historia-logo {
        width: 200px;
    }
    
    .historia-title {
        font-size: 20px;
    }
}

/* ========================================
   ANIMACIONES
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.8s ease forwards;
}

.animate-fadeIn {
    animation: fadeIn 0.8s ease forwards;
}


/* ========================================
   AJUSTES RESPONSIVE PARA LA IMAGEN
   ======================================== */
@media (max-width: 991.98px) {
    .nosotros-hero {
        min-height: 600px;
        background-position: center;
    }
}

@media (max-width: 767.98px) {
    .nosotros-hero {
        min-height: 500px;
        background-position: 70% center; /* Enfoca en la parte importante de la imagen */
    }
    
    .nosotros-hero .hero-title {
        font-size: 36px;
    }
}

@media (max-width: 575.98px) {
    .nosotros-hero {
        min-height: 400px;
    }
    
    .nosotros-hero .hero-title {
        font-size: 28px;
    }
    
    .nosotros-hero .hero-content {
        padding: 40px 15px;
    }
}


/* ========================================
   EQUIPO SECTION - Cards con márgenes y bordes de colores
   ======================================== */
.nosotros-equipo {
    padding: 80px 0;
    background-color: #ffffff;
}

.section-header {
    margin-bottom: 60px;
}

.section-title {
    color: var(--nosotros-text-dark);
    font-size: 42px;
    font-weight: 400;
    margin: 0;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--nosotros-accent);
}

/* Margen sutil para todas las cards */
.team-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 5px; /* Margen sutil de 5px alrededor de cada card */
}

.team-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

/* Bordes de colores específicos */
/* Primera card (Cristobal) */
.row .col-lg-4:first-child .team-card {
    border: 3px solid #FFB200;
}

/* Segunda card (Adrian) - en primera fila, segunda posición */
.row .col-lg-4:nth-child(2) .team-card {
    border: 3px solid #D8337F;
}

/* Tercera card (Cristian) - en segunda fila, primera posición */
.row.mt-2 .col-lg-4:first-child .team-card {
    border: 3px solid #FFB200;
}

/* Cuarta card (Juan) - en segunda fila, segunda posición */
.row.mt-2 .col-lg-4:nth-child(2) .team-card {
    border: 3px solid #D8337F;
}

.team-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.team-card:hover .team-image {
    transform: scale(1.05);
}

.team-info {
    padding: 25px 20px;
    text-align: center;
}

.team-name {
    color: var(--nosotros-text-dark);
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
}

.team-position {
    color: #666666;
    font-size: 16px;
    margin: 0;
    font-weight: 400;
}

/* ========================================
   RESPONSIVE - Ajustes para móviles
   ======================================== */
@media (max-width: 767.98px) {
    .team-card {
        margin: 8px; /* Margen un poco más grande en móviles para mejor separación */
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .team-name {
        font-size: 18px;
    }
}

@media (max-width: 575.98px) {
    .team-info {
        padding: 20px 15px;
    }
    
    .team-name {
        font-size: 18px;
    }
    
    .team-position {
        font-size: 14px;
    }
}



/* ========================================
   GALERÍA DE IMÁGENES
   ======================================== */
.nosotros-galeria {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.section-subtitle {
    color: #666666;
    font-size: 18px;
    margin-top: 15px;
    font-weight: 300;
}

.gallery-item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    cursor: pointer;
    aspect-ratio: 4/3; /* Proporción fija para todas las cards */
    width: 100%;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cubre el espacio sin deformarse */
    object-position: center;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: #ffffff;
    font-size: 40px;
    background: rgba(255,255,255,0.2);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    backdrop-filter: blur(5px);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay i {
    transform: scale(1);
}

/* ========================================
   MODAL DE GALERÍA - Imágenes sin deformar
   ======================================== */
.modal-content.bg-transparent {
    background: transparent !important;
}

.modal-header.border-0 {
    border: none;
    padding: 1rem 1.5rem;
}

.btn-close-white {
    filter: brightness(0) invert(1);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.btn-close-white:hover {
    opacity: 1;
}

#modalImage {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain; /* Mantiene la proporción original */
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    margin: 0 auto;
}

.modal-navigation .btn-light {
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.modal-navigation .btn-light:hover {
    background-color: #ffffff;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.modal-navigation .btn-light i {
    font-size: 14px;
}

.modal-counter {
    font-size: 16px;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Responsive */
@media (max-width: 991.98px) {
    .gallery-item {
        aspect-ratio: 16/9; /* Proporción más ancha para tablets */
    }
}

@media (max-width: 767.98px) {
    .modal-navigation .btn-light {
        padding: 8px 20px;
        font-size: 14px;
    }
    
    #modalImage {
        max-height: 70vh;
    }
    
    .gallery-overlay i {
        width: 60px;
        height: 60px;
        font-size: 30px;
    }
}

@media (max-width: 575.98px) {
    .gallery-item {
        aspect-ratio: 4/3; /* Volvemos a 4:3 en móviles */
    }
    
    .modal-navigation .btn-light {
        padding: 6px 15px;
        font-size: 13px;
    }
    
    .modal-navigation .btn-light i {
        font-size: 12px;
    }
    
    .section-subtitle {
        font-size: 16px;
    }
}