/* ========================================
   SERVICIOS BLOCK - ESTILOS BASADOS EN FIGMA
   ======================================== */

/* ========================================
   CONTENEDOR PRINCIPAL
   ======================================== */

.servicios-block {
    position: relative;
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding: 60px 0;
    background: #EAF8FD;
}

.servicios-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

/* ========================================
   HEADER DEL BLOQUE
   ======================================== */

.servicios-header {
    text-align: center;
    margin-bottom: 48px;
    padding-top: 2rem;
    padding-bottom: 1rem;
}

.servicios-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: #1A1A1A;
    margin: 0 0 16px 0;
    line-height: 1.2;
}

.servicios-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.125rem;
    font-weight: 400;
    color: #666666;
    margin: 0;
    line-height: 1.6;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   GRID DE SERVICIOS
   ======================================== */

.servicios-block .servicios-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 32px !important;
    margin-bottom: 48px;
    width: 100%;
    align-items: stretch;
    grid-auto-rows: 1fr;
}

/* ========================================
   TARJETA DE SERVICIO
   ======================================== */

.servicios-block .servicio-card-link {
    text-decoration: none;
    display: flex;
    height: 100%;
}


.servicios-block .servicio-card {
    background: #264067;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 77px 8px 77px 8px;
    padding: 77px 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: visible;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.servicios-block .servicio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(38, 64, 103, 0.4) 0%, rgba(38, 64, 103, 0.9) 100%);
    border-radius: 77px 8px 77px 8px;
    pointer-events: none;
    z-index: 1;
}

.servicios-block .servicio-card::after {
    content: '';
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
    background-image: url('../../images/plus.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.3s ease;
    opacity: 0.8;
    z-index: 3;
}

.servicios-block .servicio-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.servicios-block .servicio-card:hover::after {
    transform: rotate(90deg);
}

/* ========================================
   IMAGEN DE FONDO DEL SERVICIO
   ======================================== */

/* La imagen se muestra como background en .servicio-card */
/* El overlay se crea con .servicio-card::before para mantener legibilidad del texto */

/* ========================================
   CONTENIDO DEL SERVICIO
   ======================================== */

.servicios-block .servicio-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
    z-index: 2;
}

/* Sobrescribir estilos de Astra para los enlaces dentro de servicios */
.servicios-block .servicio-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.375rem;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0 0 16px 0;
    line-height: 1.3;
    text-align: center;
    text-decoration: underline;
    transition: text-decoration 0.3s ease;
    border-bottom: none !important;
    box-shadow: none !important;
}

.servicios-block .servicio-card-link:hover .servicio-title {
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

.servicios-block .servicio-excerpt {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9375rem;
    font-weight: 400;
    color: #FFFFFF;
    line-height: 1.6;
    margin-bottom: 28px;
    flex: 1;
    text-align: center;
    opacity: 0.9;
}

/* ========================================
   FOOTER DEL SERVICIO (BOTÓN)
   ======================================== */

.servicios-block .servicio-footer {
    display: none;
}

/* ========================================
   BOTÓN VER TODOS
   ======================================== */

.servicios-block .servicios-view-all-wrapper {
    text-align: center;
    margin-top: 48px;
    padding-top: 2rem;
    padding-bottom: 1rem;
}

.servicios-block .servicios-view-all-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 98px;
    background: transparent;
    border: 2px solid #264067;
    border-radius: 30px;
    color: #264067;
    text-decoration: none !important;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.servicios-block .servicios-view-all-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: #264067;
    transition: width 0.3s ease;
    z-index: -1;
}

.servicios-block .servicios-view-all-button:hover {
    color: #FFFFFF !important;
    border-color: #264067;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(38, 64, 103, 0.25);
}

.servicios-block .servicios-view-all-button:hover::before {
    width: 100%;
}

.ast-single-post .entry-content .servicios-container a{
    text-decoration:none !important;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablet */
@media (max-width: 1024px) {
    .servicios-block .servicios-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 24px !important;
    }
    
    .servicios-title {
        font-size: 2.25rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .servicios-block {
        padding: 40px 0;
    }
    
    .servicios-container {
        padding: 0 16px;
    }
    
    .servicios-header {
        margin-bottom: 32px;
    }
    
    .servicios-block .servicios-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        grid-auto-rows: auto !important;
    }
    
    .servicios-title {
        font-size: 2rem;
    }
    
    .servicios-subtitle {
        font-size: 1rem;
    }
    
    .servicios-block .servicio-card-link {
        height: auto;
    }
    
    .servicios-block .servicio-card {
        padding: 60px 8px;
        height: auto;
    }
    
    
    .servicio-title {
        font-size: 1.25rem;
    }
    
    .servicio-button {
        padding: 12px 28px;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    .servicios-title {
        font-size: 1.75rem;
    }
    
    .servicios-block .servicio-card {
        padding: 50px 8px;
        height: auto;
    }
    
    
    .servicio-button {
        padding: 12px 24px;
        font-size: 0.875rem;
    }
    
    .servicios-block .servicios-view-all-button {
        padding: 16px 32px !important;
    }
}

/* ========================================
   ANIMACIONES
   ======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.servicio-card {
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
}

.servicio-card:nth-child(1) { animation-delay: 0.1s; }
.servicio-card:nth-child(2) { animation-delay: 0.2s; }
.servicio-card:nth-child(3) { animation-delay: 0.3s; }
.servicio-card:nth-child(4) { animation-delay: 0.4s; }
.servicio-card:nth-child(5) { animation-delay: 0.5s; }
.servicio-card:nth-child(6) { animation-delay: 0.6s; }
