/* 
 * Áreas de Especialización - Diseño de círculos moderno
 * Basado en la imagen de referencia proporcionada
 */

.areas-especializacion-container {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.areas-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* Círculos de áreas de especialización */
.area-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: #ffffff00;
    /* border: 2px solid #e9ecef; */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* Círculo destacado (Calidad) */
.area-circle.destacado {
    background: #ffffff00;
    /* border-color: #1f7971; */
    color: white;
    transform: scale(1.05);
    /* box-shadow: 0 8px 25px rgba(31, 121, 113, 0.3); */
}

.area-circle.destacado .area-content h4,
.area-circle.destacado .area-content p {
    color: white;
}

/* Iconos dentro de los círculos */
.area-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    filter: brightness(0.8);
}

.area-circle.destacado .area-icon {
    filter: brightness(0) invert(1);
}

/* Contenido del área */
.area-content h4 {
    font-size: 16px;
    font-weight: 700;
    color: #fbfbfb;
    margin: 0 0 8px 0;
    line-height: 1.2;
    text-transform: capitalize;
}

.area-content p {
    font-size: 12px;
    color: #666;
    margin: 0;
    line-height: 1.3;
    font-weight: 400;
}

/* Efectos hover */
.area-circle:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-color: #1f7971;
}

.area-circle.destacado:hover {
    transform: translateY(-5px) scale(1.08);
    box-shadow: 0 15px 35px rgba(31, 121, 113, 0.4);
}

.area-circle:hover .area-icon {
    transform: scale(1.1);
    filter: brightness(1.2);
}

.area-circle.destacado:hover .area-icon {
    transform: scale(1.1);
    filter: brightness(0) invert(1) brightness(1.2);
}

/* Efecto de ondas al hacer hover */
.area-circle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(31, 121, 113, 0.1);
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
    z-index: 0;
}

.area-circle:hover::before {
    width: 220px;
    height: 220px;
}

.area-circle.destacado::before {
    background: rgba(255, 255, 255, 0.1);
}

/* Asegurar que el contenido esté por encima del efecto */
.area-icon,
.area-content {
    position: relative;
    z-index: 1;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .areas-row {
        gap: 30px;
    }
    
    .area-circle {
        width: 180px;
        height: 180px;
        padding: 18px;
    }
    
    .area-icon {
        width: 55px;
        height: 55px;
    }
    
    .area-content h4 {
        font-size: 15px;
    }
    
    .area-content p {
        font-size: 11px;
    }
}

@media (max-width: 992px) {
    .areas-row {
        gap: 25px;
    }
    
    .area-circle {
        width: 160px;
        height: 160px;
        padding: 15px;
    }
    
    .area-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 12px;
    }
    
    .area-content h4 {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .area-content p {
        font-size: 10px;
    }
}

@media (max-width: 768px) {
    .areas-especializacion-container {
        padding: 30px 15px;
    }
    
    .areas-row {
        gap: 20px;
        justify-content: space-around;
    }
    
    .area-circle {
        width: 140px;
        height: 140px;
        padding: 12px;
    }
    
    .area-circle.destacado {
        transform: scale(1.02);
    }
    
    .area-icon {
        width: 45px;
        height: 45px;
        margin-bottom: 10px;
    }
    
    .area-content h4 {
        font-size: 13px;
        margin-bottom: 5px;
    }
    
    .area-content p {
        font-size: 9px;
        line-height: 1.2;
    }
}

@media (max-width: 480px) {
    .areas-row {
        flex-direction: column;
        gap: 25px;
        align-items: center;
    }
    
    .area-circle {
        width: 160px;
        height: 160px;
        padding: 15px;
    }
    
    .area-circle.destacado {
        transform: scale(1.05);
    }
    
    .area-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 12px;
    }
    
    .area-content h4 {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .area-content p {
        font-size: 10px;
    }
    
    /* En móviles, mostrar las 8 áreas en una sola columna */
    .areas-especializacion-container {
        flex-direction: column;
        gap: 25px;
    }
}

/* Animaciones de entrada */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.area-circle {
    animation: fadeInScale 0.6s ease-out;
}

.area-circle:nth-child(1) { animation-delay: 0.1s; }
.area-circle:nth-child(2) { animation-delay: 0.2s; }
.area-circle:nth-child(3) { animation-delay: 0.3s; }
.area-circle:nth-child(4) { animation-delay: 0.4s; }

/* Segunda fila con delay adicional */
.areas-row:nth-child(2) .area-circle:nth-child(1) { animation-delay: 0.5s; }
.areas-row:nth-child(2) .area-circle:nth-child(2) { animation-delay: 0.6s; }
.areas-row:nth-child(2) .area-circle:nth-child(3) { animation-delay: 0.7s; }
.areas-row:nth-child(2) .area-circle:nth-child(4) { animation-delay: 0.8s; }

/* Efecto de pulso sutil para el círculo destacado */
@keyframes pulse {
    0%, 100% { 
        box-shadow: 0 8px 25px rgba(31, 121, 113, 0.3);
    }
    50% { 
        box-shadow: 0 8px 25px rgba(31, 121, 113, 0.5);
    }
}

.area-circle.destacado {
    animation: fadeInScale 0.6s ease-out, pulse 3s ease-in-out infinite;
    animation-delay: 0.1s, 2s;
}

/* Mejoras de accesibilidad */
.area-circle:focus {
    outline: 3px solid #1f7971;
    outline-offset: 3px;
}

.area-circle:focus-visible {
    outline: 3px solid #1f7971;
    outline-offset: 3px;
}

/* Soporte para modo de alto contraste */
@media (prefers-contrast: high) {
    .area-circle {
        border: 3px solid #000;
        background: #fff;
    }
    
    .area-circle.destacado {
        background: #000;
        border-color: #fff;
        color: #fff;
    }
    
    .area-content h4,
    .area-content p {
        font-weight: 700;
    }
}

/* Soporte para movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    .area-circle,
    .area-circle.destacado {
        animation: none;
        transition: none;
    }
    
    .area-circle:hover {
        transform: none;
    }
    
    .area-circle::before {
        display: none;
    }
}

/* Estilos para tooltips mejorados */
.area-circle[data-toggle="tooltip"] {
    cursor: help;
}

/* Fondo sutil para la sección */
.processes {
    position: relative;
}

.processes .areas-especializacion-container {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Separador visual entre secciones */
.areas-especializacion-container::before {
    content: '';
    position: absolute;
    top: 0px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #1f7971, transparent);
    border-radius: 2px;
}

/* Título de la sección */
.areas-especializacion-container + .container h2 {
    position: relative;
    z-index: 2;
}

/* Mejoras para la integración con el tema existente */
.processes .areas-especializacion-container {
    margin-top: 40px;
    margin-bottom: 40px;
}

/* Asegurar que los círculos se vean bien en fondos oscuros */
.processes.dark-theme .area-circle:not(.destacado) {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 255, 255, 0.3);
}
