/* ============================================
   InferenciaLab - Estilos Principales v13.0
   Style Migration: SVG icons, video system, new interactions
   ============================================ */

/* ---- Variables CSS ---- */
:root {
    --il-blue: #3e5174;
    --il-blue-muted: #2A4A6F;
    --il-blue-hover: #4a6a94;
    --il-gray-brand: #B9B9B9;
    --il-gray-text: #969696;
    --il-gray-dim: #6B6B6B;
    --luxe-bg: #0D0D0D;
    --luxe-surface: #171717;
    --luxe-card: #1A1A1A;
    --luxe-border: #262626;
    --il-selection: #1A3A50;
    --il-white: #FFFFFF;
}

/* ---- Base & Reset ---- */
html { scroll-behavior: smooth; }

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background-color: rgba(52, 93, 138, 0.3);
    color: var(--il-white);
}

/* ---- Material Symbols (backward compat for article.html) ---- */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ---- SVG Icon System ---- */
.il-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.il-icon svg {
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}
.il-icon--sm svg { width: 16px; height: 16px; }
.il-icon--md svg { width: 20px; height: 20px; }
.il-icon--lg svg { width: 24px; height: 24px; }
.il-icon--xl svg { width: 32px; height: 32px; }

/* Squircle icon container */
.icon-sq {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: linear-gradient(145deg, #222222, #1a1a1a);
    box-shadow:
        3px 3px 6px rgba(0,0,0,0.4),
        -1px -1px 3px rgba(255,255,255,0.04),
        inset 0 1px 0 rgba(255,255,255,0.06);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.icon-sq svg {
    width: 22px; height: 22px;
    stroke: rgba(255,255,255,0.7);
    stroke-width: 1.25;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* ---- Animations ---- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes gentleBounce {
    0%, 100% { transform: translateY(-16%); }
    50% { transform: translateY(0); }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(-25%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.fade-in-up { animation: fadeInUp 0.7s ease-out forwards; }
.fade-in { animation: fadeIn 0.5s ease-out forwards; }
.animate-bounce-gentle { animation: gentleBounce 2.5s ease-in-out infinite; }
.animate-bounce { animation: bounce 1s infinite; }

.shimmer {
    background: linear-gradient(90deg, var(--luxe-surface) 0%, #252525 50%, var(--luxe-surface) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

/* ---- Gradients ---- */
.gradient-radial {
    background: radial-gradient(circle at center, rgba(52, 93, 138, 0.12) 0%, transparent 70%);
}

/* ---- Mobile Menu ---- */
.mobile-menu {
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
}
.mobile-menu.open { transform: translateX(0); }

/* ---- Inline Logo ---- */
.inline-logo { display: inline; white-space: nowrap; }

/* ---- Quote Highlight ---- */
.quote-highlight {
    line-height: 1.5;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

/* ---- Navigation Active State ---- */
.nav-link.active { color: var(--il-white); }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--luxe-bg); }
::-webkit-scrollbar-thumb { background: var(--luxe-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--il-gray-dim); }

/* ---- Video System ---- */
.video-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.video-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.video-overlay--hero {
    background:
        radial-gradient(ellipse at center, rgba(13,13,13,0.5) 0%, rgba(13,13,13,0.85) 70%),
        linear-gradient(to bottom, rgba(13,13,13,0.3) 0%, rgba(13,13,13,0.9) 100%);
}

.video-overlay--section {
    background: linear-gradient(to right, rgba(13,13,13,0.95) 0%, rgba(13,13,13,0.6) 50%, rgba(13,13,13,0.95) 100%);
}

.video-contained {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--luxe-border);
}
.video-contained video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.video-contained .video-tint {
    position: absolute;
    inset: 0;
    background: rgba(13,13,13,0.25);
    pointer-events: none;
}
.video-contained .video-webp-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---- Interaction System ---- */

/* CTA Link — arrow link */
.cta-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.01em;
    transition: color 0.2s ease, gap 0.25s ease;
    cursor: pointer;
    text-decoration: none;
}
.cta-link:hover { gap: 10px; }
.cta-link--primary { color: var(--il-white); }
.cta-link--primary:hover { color: var(--il-blue-hover); }
.cta-link--secondary { color: var(--il-gray-text); }
.cta-link--secondary:hover { color: var(--il-white); }
.cta-link svg {
    width: 14px; height: 14px;
    stroke: currentColor; stroke-width: 1.5;
    stroke-linecap: round; stroke-linejoin: round;
    fill: none;
    transition: transform 0.25s ease;
}
.cta-link:hover svg { transform: translateX(2px); }

/* Ghost Button — outlined */
.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: var(--il-gray-brand);
    background: transparent;
    border: 1px solid var(--luxe-border);
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.25s ease, color 0.25s ease;
}
.btn-ghost:hover {
    border-color: rgba(62, 81, 116, 0.5);
    color: var(--il-white);
}

/* Flat Button — solid fill */
.btn-flat {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: var(--il-white);
    background: var(--il-blue);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}
.btn-flat:hover { opacity: 0.85; }

/* Text Tab — filter tabs */
.text-tab {
    position: relative;
    padding: 4px 0;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--il-gray-dim);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease;
}
.text-tab::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0;
    width: 0; height: 1px;
    background: var(--il-blue);
    transition: width 0.25s ease;
}
.text-tab:hover { color: var(--il-gray-text); }
.text-tab.active { color: var(--il-white); font-weight: 600; }
.text-tab.active::after { width: 100%; }

/* Page Link — pagination */
.page-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--il-gray-dim);
    transition: color 0.2s ease;
    cursor: pointer;
    background: none; border: none;
}
.page-link:hover { color: var(--il-white); }
.page-link:disabled { opacity: 0.3; cursor: not-allowed; }
.page-link svg {
    width: 14px; height: 14px;
    stroke: currentColor; stroke-width: 1.5;
    fill: none; stroke-linecap: round; stroke-linejoin: round;
}

/* Quiet Card — subtle hover */
.card-quiet { transition: border-color 0.3s ease; }
.card-quiet:hover { border-color: rgba(62, 81, 116, 0.35); }

/* ---- Line Clamp ---- */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- Legacy Button Compat (article.html, admin.html) ---- */
.btn-primary {
    background: var(--il-blue);
    color: var(--il-white);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-top-color: rgba(255, 255, 255, 0.25);
    transition: all 0.2s ease;
}
.btn-primary:hover {
    background: var(--il-blue-hover);
    border-top-color: rgba(255, 255, 255, 0.35);
}

.btn-secondary {
    background: transparent;
    color: var(--il-gray-brand);
    border: 1px solid var(--luxe-border);
    transition: all 0.2s ease;
}
.btn-secondary:hover {
    color: var(--il-white);
    border-color: rgba(62, 81, 116, 0.6);
    border-top-color: rgba(62, 81, 116, 0.8);
}

/* ---- Legacy News Filter Compat (used by main.js restored state) ---- */
.news-filter {
    background: transparent;
    color: var(--il-gray-text);
    border: 1px solid var(--luxe-border);
}
.news-filter:hover {
    color: var(--il-white);
    border-color: var(--il-blue);
}
.news-filter.active {
    background: var(--il-blue);
    color: var(--il-white);
    border-color: var(--il-blue);
}

/* ---- Glow Effects (backward compat) ---- */
.glow-blue { box-shadow: 0 0 30px -5px rgba(52, 93, 138, 0.4); }
.glow-white { filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.3)); }

/* ---- Shadows (backward compat) ---- */
.shadow-luxe { box-shadow: 0 4px 24px 0 rgba(0, 0, 0, 0.4); }
.shadow-luxe-lg { box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.6); }

/* ---- Print ---- */
@media print {
    .no-print { display: none !important; }
}
