/*
Theme Name: CWP Business Server Theme
Description: Estilos exclusivos para la sección Empresa
*/

/* ==============================================
   FORZADO DE ANCHO COMPLETO PARA ELEMENTOR
   ============================================== */
.empresa-hero,
.empresa-mision,
.empresa-stats,
.empresa-historia,
.empresa-texto-slider-section {
    width: 100vw !important;
    position: relative;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    max-width: 100vw !important;
}

/* ==============================================
   SECCIÓN EMPRESA: HERO
   ============================================== */
.empresa-hero {
    background-color: #041e2c;
    /* Patrón de puntos para el fondo oscuro */
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.08) 1.5px, transparent 1.5px);
    background-size: 25px 25px;
    
    /* FIX: Ocupa exactamente el 100% de la pantalla (100vh) */
    margin-top: -249px !important; /* Sube la sección detrás de la cabecera transparente */
    padding: 100px 0 0 0 !important; /* Sin padding inferior para que la imagen toque el piso */
    
    color: var(--white);
    overflow: hidden;
    height: 100vh; /* Forzamos a que mida exactamente la altura del monitor */
    min-height: 68px !important;; 
}

.empresa-hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 50px;
    height: 100%;
    align-items: end; /* Ancla estrictamente la imagen al suelo de la sección */
}

.empresa-hero-content {
    align-self: center; /* Centra el texto verticalmente en la pantalla */
    padding-bottom: 50px; 
}

.empresa-flags {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.empresa-flags img {
    width: 35px;
    height: 35px;
    object-fit: contain;
    border-radius: 50%;
}

.empresa-hero-content h2 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 25px;
    line-height: 1.1;
}

.empresa-hero-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #e0e5ea;
    max-width: 90%;
}

.empresa-hero-image {
    display: flex;
    justify-content: center;
    height: 100%;
    align-items: flex-end; /* Fuerza la imagen a ir lo más abajo posible */
}

.empresa-hero-image img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 85vh; /* Límite para que no se vea inmensa en PC gigantes */
    display: block;
    object-fit: contain;
    object-position: bottom;
}

/* ==============================================
   SECCIÓN EMPRESA: MISIÓN Y VISIÓN
   ============================================== */
.empresa-mision {
    background-color: #F58B27; /* Verde corporativo */
    padding: 60px 0;
    color: var(--dark-blue);
    
    /* El bloque sólido empieza exactamente debajo de la pantalla, sin invadir */
    margin-top: 0 !important; 
    z-index: 2;
}

/* Curva superior estilo ola */
.empresa-mision-shape {
    position: absolute;
    /* Empujamos la pura curva 70px hacia arriba para que sea lo único que se asome en el fondo oscuro */
    top: -70px; 
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: -1;
}

.empresa-mision-shape svg {
    display: block;
    width: calc(100% + 1.3px);
    height: 71px; /* Curva más alta y definida, igual a tu imagen */
}

.empresa-mision-shape .shape-fill {
    fill: #F58B27;
}

.empresa-mision-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 60px;
}

.mision-box, .vision-box {
    flex: 1;
    display: flex;
    gap: 20px;
}

.mision-box h3, .vision-box h3 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    min-width: 130px;
    color: var(--dark-blue);
}

.mision-box p, .vision-box p {
    font-size: 1rem;
    margin: 0;
    line-height: 1.6;
    font-weight: 500;
}

.mision-separator {
    width: 2px;
    background-color: var(--dark-blue);
    height: 80px;
    opacity: 0.3;
    align-self: center;
}

/* ==============================================
   SECCIÓN EMPRESA: ESTADÍSTICAS
   ============================================== */
.empresa-stats {
    padding: 80px 0;
    background-color: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: left;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
}

.stat-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.stat-text h4 {
    font-size: 1.8rem;
    color: var(--primary-orange);
    font-weight: 800;
    margin-bottom: 5px;
    line-height: 1;
}

.stat-text p {
    font-size: 0.85rem;
    color: var(--text-grey);
    line-height: 1.4;
    margin: 0;
    font-weight: 500;
}

/* ==============================================
   SECCIÓN EMPRESA: HISTORIA (NUEVO)
   ============================================== */
.empresa-historia {
    background-color: #041e2c; 
    padding: 100px 0;
    color: var(--white);
}

.historia-header h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 60px;
    color: var(--white);
}

.historia-slider-wrapper {
    position: relative;
    margin-bottom: 50px;
}

/* La línea punteada que cruza toda la sección por detrás */
.historia-line {
    position: absolute;
    top: 7px; /* Centrada exactamente a la mitad del punto verde */
    left: 0;
    width: 100%;
    border-top: 2px dashed #ff7900;
    z-index: 1;
}

/* Contenedor que hace la magia de deslizarse (Slider) */
.historia-items {
    display: flex;
    gap: 50px;
    overflow-x: hidden;
    scroll-behavior: smooth;
    position: relative;
    z-index: 2;
    padding-bottom: 10px;
}

.historia-item {
    flex: 0 0 auto;
    width: 320px;
}

.historia-dot {
    width: 16px;
    height: 16px;
    background-color: #ff7900;
    border-radius: 50%;
    margin-bottom: 25px;
}

.historia-year {
    font-size: 2.2rem;
    font-weight: 800;
    color: #ff7900;
    margin-bottom: 15px;
    line-height: 1;
}

.historia-text {
    font-size: 0.95rem;
    color: #e0e5ea;
    line-height: 1.6;
}

/* Controles (Botones verdes de flecha) */
.historia-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.historia-btn {
    background-color: #ff7900;
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s, background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.historia-btn:hover {
    background-color: #6da61d;
    transform: scale(1.1);
}

/* ==============================================
   WIDGET: QUIÉNES SOMOS (INICIO) - DISEÑO EXACTO
   ============================================== */
.quienes-somos-section {
    padding: 80px 0;
    background-color: #ffffff;
    overflow: hidden;
    width: 100%;
}

.qs-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center; 
    justify-content: space-between;
    gap: 40px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.qs-content {
    flex: 0 0 calc(45% - 20px);
    max-width: calc(45% - 20px);
}

.qs-content h2 {
    font-size: 3.2rem;
    color: #0b2239;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 25px;
    line-height: 1.1;
}

.qs-content h2 .highlight {
    color: #ff7900;
}

.qs-main-text {
    color: #555555;
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 30px;
}

.qs-featured-text {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.qs-featured-text .qs-icon {
    width: 55px; 
    height: auto;
    flex-shrink: 0;
}

.qs-featured-text p {
    color: #555555;
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0;
}

.qs-image {
    flex: 0 0 calc(55% - 20px);
    max-width: calc(55% - 20px);
    position: relative;
}

.qs-image-wrapper {
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1); 
    overflow: hidden;
    width: 100%;
}

/* ==============================================
   NUEVO WIDGET: TEXTO SLIDER CENTRADO
   ============================================== */
.empresa-texto-slider-section {
    background-color: #041e2c;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.08) 1.5px, transparent 1.5px);
    background-size: 25px 25px;
    padding: 120px 20px 140px 20px;
    position: relative;
    text-align: center;
    overflow: hidden;
}

.ets-shape-bottom {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 1;
}

.ets-shape-bottom svg {
    display: block;
    width: calc(100% + 1.3px);
    height: 70px; /* Tamaño de la ola */
}

.ets-shape-bottom .shape-fill {
    fill: #F58B27; /* Ola naranja sólida para conectar */
}

.ets-container {
    position: relative;
    z-index: 2;
    max-width: 800px !important;
    margin: 0 auto;
}

.ets-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 30px;
    line-height: 1.2;
}

.ets-slider-wrapper {
    position: relative;
    min-height: 140px; 
}

.ets-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
}

.ets-slide.active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

.ets-slide p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #e0e5ea;
    margin: 0;
}

.ets-nav {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.ets-dots {
    display: flex;
    gap: 12px;
}

.ets-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.ets-dot.active, .ets-dot:hover {
    background-color: #ff7900;
}


/* ==============================================
   RESPONSIVO PARA SECCIÓN EMPRESA
   ============================================== */
@media (max-width: 992px) {
    .empresa-hero {
        height: auto; 
        padding-top: 150px !important;
    }
    .empresa-hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 20px;
        align-items: center;
    }
    .empresa-hero-content {
        padding-bottom: 0;
    }
    .empresa-flags {
        justify-content: center;
    }
    .empresa-hero-content p {
        margin: 0 auto 30px auto;
    }
    .empresa-mision-grid {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    .mision-separator {
        width: 100%;
        height: 2px;
        margin: 10px 0;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .historia-item {
        width: 280px;
    }
    .qs-grid {
        flex-direction: column;
    }
    .qs-content, .qs-image {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .qs-content h2 {
        font-size: 2.8rem;
    }
    .qs-image {
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .empresa-hero {
        padding: 180px 0 0 0 !important;
    }
    .empresa-hero-image img {
        max-height: 50vh; 
    }
    .empresa-hero-content h2 {
        font-size: 2.5rem;
    }
    .mision-box, .vision-box {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    .mision-box h3, .vision-box h3 {
        min-width: auto;
    }
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .stat-item {
        justify-content: center;
        text-align: center;
        flex-direction: column;
    }
    .qs-content h2 {
        font-size: 2.2rem;
    }
    .quienes-somos-section {
        padding: 50px 15px;
    }
    .historia-header h2 {
        font-size: 2.3rem;
        text-align: center;
    }
    .historia-item {
        width: 85vw; /* Ocupa casi toda la pantalla en celular */
    }
    .ets-title {
        font-size: 2.5rem;
    }
    .ets-slide p {
        font-size: 1.05rem;
    }
    .empresa-texto-slider-section {
        padding: 80px 20px 100px 20px;
    }
}