/* =============================================
   ESTILOS FRONTEND - FORMACIONES HOOKODE
   Coherente con el diseño elegante de la web
   ============================================= */

/* Variables CSS - Coherentes con la web principal */
:root {
    --primary-color: #C9A27C;
    --secondary-color: #D4A574;
    --dark-color: #2C2C2C;
    --light-bg: #FAF9F7;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Montserrat', sans-serif;
    --transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =============================================
   SECCIÓN PRINCIPAL
   ============================================= */
.formaciones-section {
    position: relative;
    background: linear-gradient(135deg, #FAF9F7 0%, #FFFFFF 100%);
    padding: clamp(4rem, 10vw, 8rem) 0;
    overflow: hidden;
    isolation: isolate;
}

/* Partículas animadas de fondo */
.formaciones-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    display: none; /* Ocultar partículas en tema claro */
}

.particle {
    position: absolute;
    background: radial-gradient(circle, var(--primary-color), transparent);
    border-radius: 50%;
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

.particle:nth-child(1) { width: 150px; height: 150px; top: 10%; left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { width: 100px; height: 100px; top: 60%; left: 80%; animation-delay: 2s; }
.particle:nth-child(3) { width: 200px; height: 200px; top: 40%; left: 50%; animation-delay: 4s; }
.particle:nth-child(4) { width: 120px; height: 120px; top: 80%; left: 20%; animation-delay: 6s; }
.particle:nth-child(5) { width: 180px; height: 180px; top: 20%; left: 70%; animation-delay: 8s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.1); }
    50% { transform: translate(-20px, 20px) scale(0.9); }
    75% { transform: translate(20px, 10px) scale(1.05); }
}

/* Container */
.formaciones-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 5vw, 3rem);
}

/* =============================================
   HEADER
   ============================================= */
.formaciones-header {
    text-align: center;
    margin-bottom: clamp(3rem, 8vw, 5rem);
    color: var(--dark-color);
}

.formaciones-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--dark-color);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: clamp(0.75rem, 2vw, 0.85rem);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(201, 162, 124, 0.3);
}

.formaciones-title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.formaciones-subtitle {
    font-family: var(--font-sans);
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    color: #6B7280;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* =============================================
   GRID DE FORMACIONES
   ============================================= */
.formaciones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: clamp(2rem, 5vw, 3rem);
    margin-bottom: clamp(3rem, 8vw, 5rem);
}

/* Tarjetas de formación */
.formacion-card {
    background: #FFFFFF;
    box-shadow: 0 10px 40px rgba(201, 162, 124, 0.08);
    border: 1px solid rgba(201, 162, 124, 0.1);
    border-radius: 20px;
    padding: clamp(2rem, 5vw, 2.5rem);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.formacion-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.formacion-card:hover::before {
    transform: scaleX(1);
}

.formacion-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 50px rgba(201, 162, 124, 0.15);
}

/* Imagen o Ícono */
.formacion-image {
    width: 100%;
    height: 200px;
    margin-bottom: 1.5rem;
    border-radius: 15px;
    overflow: hidden;
}

.formacion-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.formacion-icon {
    font-size: clamp(3rem, 8vw, 4rem);
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Estado */
.formacion-estado {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    margin-bottom: 1rem;
}

.formacion-estado.proximamente {
    background: rgba(255, 152, 0, 0.15);
    color: #ff9800;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.formacion-estado.disponible {
    background: rgba(76, 175, 80, 0.15);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.formacion-estado.finalizado {
    background: rgba(158, 158, 158, 0.15);
    color: #9e9e9e;
    border: 1px solid rgba(158, 158, 158, 0.3);
}

/* Título de la formación */
.formacion-title {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 1rem;
    line-height: 1.3;
}

/* Descripción */
.formacion-description,
.formacion-content {
    font-family: var(--font-sans);
    font-size: clamp(0.95rem, 2vw, 1.05rem);
    color: #6B7280;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.formacion-content ul,
.formacion-content ol {
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.formacion-content li {
    margin-bottom: 0.5rem;
}

/* Recursos de la formación (PDF y YouTube) */
.formacion-recursos {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: rgba(201, 162, 124, 0.05);
    border-radius: 12px;
    border-left: 3px solid var(--primary-color);
}

.formacion-recursos-title {
    font-family: var(--font-sans);
    font-size: clamp(1rem, 2vw, 1.1rem);
    font-weight: 700;
    color: var(--dark-color);
    margin: 0 0 1rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
}

.formacion-pdf,
.formacion-youtube {
    margin-bottom: 0.75rem;
}

.formacion-pdf:last-child,
.formacion-youtube:last-child {
    margin-bottom: 0;
}

.formacion-recurso-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: #FFFFFF;
    border: 1px solid rgba(201, 162, 124, 0.2);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(201, 162, 124, 0.1);
}

.formacion-recurso-link:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(201, 162, 124, 0.2);
    transform: translateY(-2px);
}

.formacion-recurso-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.formacion-recurso-text {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.formacion-recurso-text strong {
    font-family: var(--font-sans);
    font-size: clamp(0.9rem, 2vw, 1rem);
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 2px;
}

.formacion-recurso-text small {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: #6B7280;
}

.formacion-pdf-link:hover .formacion-recurso-icon {
    transform: rotate(15deg);
}

.formacion-youtube-link:hover .formacion-recurso-icon {
    transform: scale(1.1);
}

/* Precio */
.formacion-precio {
    font-family: var(--font-sans);
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(201, 162, 124, 0.15);
}

/* =============================================
   CTA (Call to Action)
   ============================================= */
.formaciones-cta {
    text-align: center;
    color: var(--dark-color);
}

.formaciones-cta-text {
    font-family: var(--font-serif);
    font-size: clamp(1.3rem, 3.5vw, 1.8rem);
    margin-bottom: 2rem;
    color: var(--dark-color);
}

.formaciones-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--dark-color);
    text-decoration: none;
    border-radius: 50px;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.03em;
    transition: all 0.3s ease;
    box-shadow: 0 6px 30px rgba(201, 162, 124, 0.4);
    position: relative;
    overflow: hidden;
}

.formaciones-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.formaciones-button:hover::before {
    opacity: 1;
}

.formaciones-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(201, 162, 124, 0.6);
}

.formaciones-button span {
    position: relative;
    z-index: 1;
}

/* =============================================
   ANIMACIONES
   ============================================= */
.fade-in-up-formaciones {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUpFormaciones 0.8s ease forwards;
}

@keyframes fadeInUpFormaciones {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
    .formaciones-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .formacion-card {
        padding: 1.5rem;
    }
    
    .particle {
        display: none; /* Ocultar partículas en móvil para mejor performance */
    }
}

@media (max-width: 480px) {
    .formaciones-section {
        padding: 3rem 0;
    }
    
    .formaciones-header {
        margin-bottom: 2rem;
    }
    
    .formaciones-button {
        width: 100%;
        padding: 1rem 2rem;
    }
}

