/* Importar Fuente Outfit desde Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* Fondo Forest Dark Premium (#105e2c) y Variaciones */
    --bg-primary: #105e2c;
    --bg-secondary: #083016;
    --card-bg: rgba(8, 48, 22, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-muted: #a7f3d0;
    
    /* Marca Principal: Verde Esmerilado Premium */
    --accent-brand: #4ade80;
    --accent-brand-rgb: 74, 222, 128;
    --accent-brand-dark: #105e2c;
    --accent-brand-dark-rgb: 16, 94, 44;
    
    /* Colores de Categorías Coordenadas */
    --color-dev: #4ade80;
    --color-dev-rgb: 74, 222, 128;
    
    --color-test: #fbbf24;
    --color-test-rgb: 251, 191, 36;
    
    --color-tool: #22d3ee;
    --color-tool-rgb: 34, 211, 238;
}

html,
body {
    height: 100%;
    min-height: 100vh;
}

body {
    background: radial-gradient(circle at top left, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Contenido Principal */
.content {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.container-scroll {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Efecto de Vidrio Esmerilado Oscuro (Glassmorphism) */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

/* Contenedor Circular del Logo con Resplandor */
.logo-circle-container {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 3px solid var(--accent-brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 0 25px rgba(74, 222, 128, 0.3);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.5s ease, border-color 0.3s ease;
}

.logo-circle-container:hover {
    transform: scale(1.05) rotate(3deg);
    box-shadow: 0 0 35px rgba(74, 222, 128, 0.5);
    border-color: #86efac;
}

.logo-circle-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Estilización del Acordeón */
.accordion {
    --bs-accordion-bg: transparent;
    --bs-accordion-border-color: transparent;
    border-radius: 16px;
}

.accordion-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px !important;
    margin-bottom: 16px;
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.accordion-item:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.accordion-button {
    background: transparent;
    color: var(--text-primary) !important;
    font-size: 1.05rem;
    font-weight: 600;
    padding: 20px 24px;
    border: none;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    gap: 12px;
}

.accordion-button::after {
    filter: invert(1) brightness(0.9);
    transition: transform 0.3s ease;
}

.accordion-button:not(.collapsed) {
    background: linear-gradient(90deg, rgba(74, 222, 128, 0.12) 0%, rgba(34, 211, 238, 0.04) 100%);
    border-bottom: 1px solid var(--border-color);
}

/* Iconos Lucide */
.icon-lucide {
    width: 20px;
    height: 20px;
    stroke-width: 2px;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}

/* Estilos de Elementos del Listado */
.list-group-item {
    color: var(--text-primary);
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.list-group-item:last-child {
    border-bottom: none;
}

/* Clases específicas para enlaces */
.tool-item {
    border-left: 4px solid var(--color-tool);
    background-color: rgba(var(--color-tool-rgb), 0.04);
}
.tool-item:hover {
    background-color: rgba(var(--color-tool-rgb), 0.12) !important;
    color: var(--text-primary);
    transform: translateX(4px);
}
.tool-item .icon-lucide {
    color: var(--color-tool);
}

.test-item {
    border-left: 4px solid var(--color-test);
    background-color: rgba(var(--color-test-rgb), 0.03);
}
.test-item:hover {
    background-color: rgba(var(--color-test-rgb), 0.1) !important;
    color: var(--text-primary);
    transform: translateX(4px);
}
.test-item .icon-lucide {
    color: var(--color-test);
}

.dev-item {
    border-left: 4px solid var(--color-dev);
    background-color: rgba(var(--color-dev-rgb), 0.04);
}
.dev-item:hover {
    background-color: rgba(var(--color-dev-rgb), 0.12) !important;
    color: var(--text-primary);
    transform: translateX(4px);
}
.dev-item .icon-lucide {
    color: var(--color-dev);
}

/* Efecto Click / Presionado para Móviles (Feedbacks Físico) */
.list-group-item:active,
.accordion-button:active {
    transform: scale(0.985);
    background-color: rgba(255, 255, 255, 0.08) !important;
}

/* Pie de Página */
footer {
    flex-shrink: 0;
    background: rgba(8, 48, 22, 0.85) !important;
    border-top: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

footer a {
    color: var(--accent-brand);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

footer a:hover {
    color: #86efac;
    text-decoration: underline;
}

/* Toast Flotante Personalizado */
.toast-container-custom {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 1050;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    opacity: 0;
    width: auto;
    max-width: 90vw;
}

.toast-custom {
    background: rgba(74, 222, 128, 0.95);
    color: #060a04;
    backdrop-filter: blur(8px);
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(8, 48, 22, 0.35);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.toast-container-custom.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Media Queries para Responsive Móvil Fino */
@media (max-width: 576px) {
    .container-scroll {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    .glass-panel {
        border-radius: 20px;
        padding: 24px 16px !important;
    }
    .accordion-button {
        padding: 16px 18px;
        font-size: 0.95rem;
    }
    .list-group-item {
        padding: 14px 18px;
        font-size: 0.9rem;
    }
    .logo-glow {
        max-height: 140px !important;
    }
}

/* Botón Flotante de WhatsApp Premium */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    display: flex;
    align-items: center;
    text-decoration: none;
    border-radius: 50px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: whatsapp-pulse 2s infinite;
}

.whatsapp-icon-container {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.whatsapp-icon-container svg {
    width: 28px;
    height: 28px;
    transition: transform 0.3s ease;
}

.whatsapp-text {
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    transition: max-width 0.3s ease, padding 0.3s ease;
    padding-left: 0;
}

/* Interacciones Hover */
.whatsapp-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 30px rgba(37, 211, 102, 0.6);
    background: linear-gradient(135deg, #2ee071 0%, #149c8c 100%);
    animation: none; /* Detiene el pulso en hover para una interacción fluida */
}

.whatsapp-btn:hover .whatsapp-text {
    max-width: 200px;
    padding-left: 20px;
    padding-right: 5px;
}

.whatsapp-btn:hover .whatsapp-icon-container svg {
    transform: rotate(10deg) scale(1.1);
}

/* Click / Feedback táctil */
.whatsapp-btn:active {
    transform: translateY(-2px) scale(0.98);
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.5);
}

/* Animación de Pulso */
@keyframes whatsapp-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6), 0 8px 24px rgba(37, 211, 102, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0), 0 8px 24px rgba(37, 211, 102, 0.4);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0), 0 8px 24px rgba(37, 211, 102, 0.4);
    }
}

/* Botón Flotante de Hoja de Vida Premium */
.cv-btn {
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 1000;
    display: flex;
    align-items: center;
    text-decoration: none;
    border-radius: 50px;
    background: linear-gradient(135deg, #a855f7 0%, #4f46e5 100%);
    box-shadow: 0 8px 24px rgba(168, 85, 247, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: cv-pulse 2s infinite;
}

.cv-icon-container {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.icon-lucide-cv {
    width: 24px;
    height: 24px;
    stroke-width: 2px;
    transition: transform 0.3s ease;
}

.cv-text {
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    transition: max-width 0.3s ease, padding 0.3s ease;
    padding-left: 0;
}

/* Interacciones Hover */
.cv-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 30px rgba(168, 85, 247, 0.6);
    background: linear-gradient(135deg, #b866ff 0%, #5f56f5 100%);
    animation: none; /* Detiene el pulso en hover para una interacción fluida */
}

.cv-btn:hover .cv-text {
    max-width: 200px;
    padding-left: 20px;
    padding-right: 5px;
}

.cv-btn:hover .cv-icon-container .icon-lucide-cv {
    transform: scale(1.1) rotate(5deg);
}

/* Click / Feedback táctil */
.cv-btn:active {
    transform: translateY(-2px) scale(0.98);
    box-shadow: 0 6px 15px rgba(168, 85, 247, 0.5);
}

/* Animación de Pulso CV */
@keyframes cv-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.6), 0 8px 24px rgba(168, 85, 247, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(168, 85, 247, 0), 0 8px 24px rgba(168, 85, 247, 0.4);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(168, 85, 247, 0), 0 8px 24px rgba(168, 85, 247, 0.4);
    }
}

/* Adaptabilidad para Móviles */
@media (max-width: 576px) {
    .whatsapp-btn {
        bottom: 20px;
        right: 20px;
    }
    .whatsapp-icon-container {
        width: 50px;
        height: 50px;
    }
    .whatsapp-icon-container svg {
        width: 24px;
        height: 24px;
    }
    /* En móviles, permitimos que se expanda al pulsar (tocar) */
    .whatsapp-btn:active .whatsapp-text {
        max-width: 200px;
        padding-left: 15px;
        padding-right: 5px;
    }

    .cv-btn {
        bottom: 82px;
        right: 20px;
    }
    .cv-icon-container {
        width: 50px;
        height: 50px;
    }
    .cv-icon-container .icon-lucide-cv {
        width: 20px;
        height: 20px;
    }
    /* En móviles, permitimos que se expanda al pulsar (tocar) */
    .cv-btn:active .cv-text {
        max-width: 200px;
        padding-left: 15px;
        padding-right: 5px;
    }
}
