/*
Theme Name: CWP Business Server Theme
Description: Estilos exclusivos para la sección de Filtro de Servicios y Detalles
*/

/* ==============================================
   FORZADO DE ANCHO COMPLETO
   ============================================== */
.servicios-filtro-section {
    width: 100vw !important;
    position: relative;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    max-width: 100vw !important;
    
    padding: 80px 0 100px 0;
    background-color: #ffffff;
    /* Patrón de fondo geométrico muy sutil */
    background-image: radial-gradient(#e0e5ea 1px, transparent 1px);
    background-size: 30px 30px;
    text-align: center;
}

/* ==============================================
   ENCABEZADO DE SERVICIOS
   ============================================== */
.sf-header h2 {
    font-size: 2.6rem; 
    color: var(--dark-blue);
    font-weight: 900;
    margin-bottom: 15px;
    line-height: 1.2;
}

.sf-header h2 .highlight {
    color: var(--primary-orange);
}

.sf-header p {
    font-size: 1rem; 
    color: var(--text-dark);
    margin-bottom: 35px;
    font-weight: 500;
}

/* ==============================================
   BOTONES DE FILTRO
   ============================================== */
.sf-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 45px;
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
}

.sf-filter-btn {
    background-color: #ffffff;
    border: 1px solid #d1d5db; 
    padding: 8px 20px; 
    border-radius: 30px;
    color: var(--dark-blue);
    font-weight: 800;
    font-size: 0.85rem; 
    cursor: pointer;
    transition: all 0.3s ease;
}

.sf-filter-btn.active, 
.sf-filter-btn:hover {
    background-color: var(--primary-orange);
    color: var(--white);
    border-color: var(--primary-orange);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 121, 0, 0.25);
}

/* ==============================================
   CUADRÍCULA Y TARJETAS DE SERVICIOS (CON HOVER)
   ============================================== */
.sf-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px; 
    max-width: 1100px;
    margin: 0 auto;
}

.sf-item {
    display: block;
    animation: sfFadeIn 0.5s ease forwards;
}

@keyframes sfFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.sf-card-link {
    text-decoration: none !important;
    display: block;
}

.sf-card {
    text-align: center;
    transition: transform 0.3s ease;
}

.sf-card:hover {
    transform: translateY(-5px);
}

.sf-card-img-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.sf-card-img-wrapper img {
    width: 100%;
    height: 220px; 
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

/* Capa overlay (Hover) */
.sf-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 121, 0, 0.85); /* Naranja translúcido */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.sf-overlay-icon {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 800;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.sf-card-link:hover .sf-card-img-wrapper img {
    transform: scale(1.1);
}

.sf-card-link:hover .sf-card-overlay {
    opacity: 1;
}

.sf-card-link:hover .sf-overlay-icon {
    transform: translateY(0);
}

.sf-card h4 {
    font-size: 0.95rem; 
    color: var(--text-dark);
    font-weight: 800; 
    line-height: 1.4;
    margin: 0;
    padding: 0 10px;
    transition: color 0.3s ease;
}

.sf-card-link:hover .sf-card h4 {
    color: var(--primary-orange);
}

/* ==============================================
   NUEVO WIDGET 15: DETALLE DE SERVICIOS / PRODUCTOS
   ============================================== */
.sd-section {
    width: 100vw !important;
    position: relative;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    max-width: 100vw !important;
    background-color: var(--white);
    padding-bottom: 80px;
}

.sd-header {
    background-color: #1e1e1e; /* Estilo oscuro tipo UNIX */
    background-image: repeating-linear-gradient(-45deg, #1a1a1a, #1a1a1a 4px, #222222 4px, #222222 8px);
    padding: 80px 20px;
    text-align: center;
    border-top: 5px solid var(--primary-blue);
    border-bottom: 5px solid var(--primary-blue);
}

.sd-header h2 {
    color: var(--primary-orange);
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.8);
}

.sd-header p {
    color: #f5f7fa;
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.sd-content {
    padding: 60px 0 0 0;
}

.sd-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.sd-card {
    background: var(--white);
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eaeaea;
}

.sd-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}

.sd-img-wrap {
    width: 100%;
    height: 380px;
    overflow: hidden;
    background: #fdfdfd; 
    display: flex;
    align-items: center;
    justify-content: center;
}

.sd-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.sd-card:hover .sd-img-wrap img {
    transform: scale(1.04);
}

.sd-title {
    background-color: var(--primary-orange);
    color: var(--white);
    text-align: center;
    padding: 16px 20px;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

/* ==============================================
   NUEVO WIDGET 16: DETALLE SERVICIO SLIDER + TEXTO
   ============================================== */
.sst-section {
    background-color: #f7f6f2; /* Color crema suave del diseño */
    padding: 60px 20px;
    width: 100vw !important;
    position: relative;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    max-width: 100vw !important;
}

.sst-container {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    max-width: 1200px;
    margin: 0 auto;
    background: #f7f6f2;
}

/* Alternancia: Cuando seleccionamos imagen a la derecha */
.sst-container.sst-layout-right {
    flex-direction: row-reverse;
}

.sst-slider-col {
    flex: 0 0 50%;
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

.sst-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    background-size: cover;
    background-position: center;
}

.sst-slide.active {
    opacity: 1;
    z-index: 2;
}

/* Controles manuales del slider */
.sst-slider-nav {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    z-index: 10;
    padding: 0 15px;
    pointer-events: none; /* Para no bloquear clics al centro de la imagen */
}

.sst-slider-nav button {
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.4);
    color: #ffffff;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.sst-slider-nav button:hover {
    background: var(--primary-orange);
}

.sst-text-col {
    flex: 0 0 50%;
    padding: 40px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sst-pill {
    display: inline-block;
    background-color: #ede2d3; /* Crema oscuro */
    color: #9c6843; /* Texto marrón */
    font-weight: 800;
    font-size: 0.85rem;
    padding: 6px 18px;
    border-radius: 20px;
    margin-bottom: 20px;
    text-transform: uppercase;
    align-self: flex-start;
}

.sst-title {
    color: #3b71b9; /* Azul de la imagen */
    font-size: 2.8rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 30px;
    line-height: 1.1;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

.sst-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sst-content ul li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    color: #1a3b63; /* Azul muy oscuro para el texto */
    font-weight: 600;
    font-size: 1.1rem;
}

.sst-content ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #3b71b9;
    font-weight: bold;
    font-size: 1.2rem;
}

/* ==============================================
   NUEVO WIDGET 17: VALORES EMPRESA (ICONOS)
   ============================================== */
.valores-section {
    padding: 50px 20px;
    background-color: transparent;
    text-align: center;
}

.valores-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.valor-item {
    flex: 0 0 calc(33.333% - 30px);
    min-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 20px;
}

.valor-icon {
    margin-bottom: 15px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.valor-icon img {
    max-height: 100%;
    width: auto;
    display: block;
}

.valor-title {
    font-size: 1.1rem;
    font-weight: 900;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}


/* ==============================================
   RESPONSIVO
   ============================================== */
@media (max-width: 992px) {
    .sf-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .sd-header h2 { 
        font-size: 2.3rem; 
    }
    .sd-grid { 
        gap: 20px; 
    }
    .sd-img-wrap { 
        height: 280px; 
    }
    
    /* Responsive Slider + Texto */
    .sst-container {
        /* En móviles o tablets pequeñas forzamos una sola columna (ignora el row-reverse) */
        flex-direction: column !important;
    }
    .sst-slider-col, .sst-text-col {
        flex: 0 0 100%;
        width: 100%;
    }
    .sst-slider-col {
        height: 350px;
    }
    .sst-text-col {
        padding: 40px 20px;
    }
}

@media (max-width: 768px) {
    .servicios-filtro-section {
        padding: 60px 0;
    }
    .sf-header h2 {
        font-size: 2rem;
    }
    .sf-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .sf-card-img-wrapper img {
        height: 180px;
    }
    .sf-filter-btn {
        padding: 6px 16px;
        font-size: 0.8rem;
    }

    /* Detalles Servicios Móvil */
    .sd-grid { 
        grid-template-columns: 1fr; 
    }
    .sd-header { 
        padding: 50px 15px; 
    }
    .sd-header h2 { 
        font-size: 2rem; 
    }

    /* Slider Texto Móvil */
    .sst-title {
        font-size: 2.2rem;
    }

    /* Valores Responsivo */
    .valor-item {
        flex: 0 0 calc(50% - 30px);
    }
}

@media (max-width: 480px) {
    .sf-grid {
        grid-template-columns: 1fr;
        max-width: 320px;
    }
    .sf-card-img-wrapper img {
        height: 220px;
    }
    .valor-item {
        flex: 0 0 100%;
    }
}