/* ==========================================
   MAPA MENTAL — Estilos específicos de página
   Extraído del <style> inline de mapa-mental.html
   para modularización y rendimiento.
   ========================================== */

/* ---- Utilidades del menú off-canvas ---- */
.menu-divider {
    height: 1px;
    background-color: rgba(0, 0, 0, 0.1);
    margin: 6px 0;
}

.dark-mode .menu-divider {
    background-color: rgba(255, 255, 255, 0.1);
}

.menu-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
    padding: 8px 16px 4px;
    font-weight: 600;
    display: block;
}

.dark-mode .menu-label {
    color: #adb5bd;
}

/* ==========================================
   MODAL DE LAYOUTS — ESTILOS PREMIUM
   ========================================== */

/* Header Premium */
.layout-modal-header {
    background: linear-gradient(135deg, #0D009E 0%, #07004F 100%);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    overflow: hidden;
}

.layout-modal-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.layout-modal-title {
    font-family: 'Outfit', 'Segoe UI', system-ui, sans-serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    gap: 12px;
}

.layout-modal-title svg {
    flex-shrink: 0;
}

/* Botón de cierre del modal de layouts */
.layout-modal-close {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    padding: 0;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.layout-modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    transform: translateY(-50%) scale(1.08) rotate(90deg);
}

/* ---- Tarjetas de opción de layout ---- */
.layout-option-card {
    background: var(--bg-secondary, #f8faff);
    border: 1px solid rgba(13, 0, 158, 0.15);
    border-radius: 16px;
    padding: 28px 20px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.layout-option-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.layout-option-card:hover::before {
    opacity: 1;
}

.layout-option-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(13, 0, 158, 0.15);
    background: #ffffff;
}

/* Hover por color según posición */
.layout-option-card:nth-child(1):hover {
    border-color: var(--primary, #4263eb);
    box-shadow: 0 8px 24px rgba(66, 99, 235, 0.2);
}

.layout-option-card:nth-child(2):hover {
    border-color: #10b981;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.2);
}

.layout-option-card:nth-child(3):hover {
    border-color: #8b5cf6;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.2);
}

.layout-option-card:active {
    transform: translateY(-2px) scale(0.98);
}

/* Iconos de las tarjetas */
.layout-option-card svg {
    display: block;
    margin: 0 auto 16px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
}

.layout-option-card:hover svg {
    transform: scale(1.1) rotate(5deg);
}

.layout-option-card:active svg {
    transform: scale(1.05) rotate(0deg);
}

/* Títulos y descripciones dentro de las tarjetas */
.layout-option-card h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary, #1a1a2e);
    transition: color 0.2s ease;
}

.layout-option-card p {
    font-size: 0.85rem;
    color: var(--text-muted, #6c7a94);
    margin: 0;
    line-height: 1.4;
}

/* Animación de entrada escalonada */
#layout-modal-overlay.active .layout-option-card {
    animation: layoutCardFadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

#layout-modal-overlay.active .layout-option-card:nth-child(1) {
    animation-delay: 0.1s;
}

#layout-modal-overlay.active .layout-option-card:nth-child(2) {
    animation-delay: 0.15s;
}

#layout-modal-overlay.active .layout-option-card:nth-child(3) {
    animation-delay: 0.2s;
}

@keyframes layoutCardFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* ==========================================
   RESPONSIVE — MODAL DE LAYOUTS (MÓVIL)
   ========================================== */
@media (max-width: 768px) {
    .modal-card {
        max-height: 85vh;
        margin-top: 60px;
        display: flex;
        flex-direction: column;
    }

    .modal-body {
        overflow-y: auto;
        padding: 16px !important;
    }

    .layout-modal-header {
        padding: 16px 20px;
    }

    .layout-modal-title {
        font-size: 1.15rem;
    }

    .layout-modal-close {
        width: 32px;
        height: 32px;
        font-size: 22px;
        border-radius: 8px;
    }

    .modal-body p {
        margin-bottom: 20px !important;
        font-size: 0.9rem !important;
    }

    /* Grid vertical en móvil */
    .layout-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    /* Tarjetas compactas horizontales */
    .layout-option-card {
        padding: 12px 16px;
        display: flex;
        align-items: center;
        text-align: left;
        gap: 16px;
        min-height: auto;
    }

    .layout-option-card svg {
        margin: 0;
        height: 32px;
        width: 32px;
        min-width: 32px;
        flex-shrink: 0;
    }

    .layout-option-card h3 {
        margin: 0 0 4px 0;
        font-size: 1rem;
    }

    .layout-option-card p {
        font-size: 0.8rem;
        margin: 0 !important;
        line-height: 1.3;
    }

    .layout-card-content {
        flex: 1;
    }

    /* Difuminar FAB Carpincho cuando el menú está abierto */
    body.menu-open #capinchoFab {
        z-index: 1000 !important;
        filter: blur(4px);
        opacity: 0.6;
        pointer-events: none;
        transition: all 0.3s ease;
    }
}