/* --- VARIABLES DE COLOR Y APARIENCIA PREMIUM --- */
:root {
    --azul-primario: #004a99;
    --azul-oscuro: #002b5e;
    --azul-claro: #e6f0fa;
    --texto-oscuro: #333;
    --texto-suave: #555;
    --texto-light: #64748b;
    --blanco: #ffffff;
    --gris-fondo: #f8fafc;
    --gris-borde: #e2e8f0;
    --sombra-premium: 0 10px 25px rgba(0, 74, 153, 0.05);
}

/* --- RESET Y BASES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.page-layout {
    font-family: 'Roboto', sans-serif;
    background-color: var(--gris-fondo);
    color: var(--texto-oscuro);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- HEADER --- */
.main-header {
    background-color: var(--blanco);
    padding: 15px 0;
    border-bottom: 2px solid var(--gris-borde);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: center;
}

.logo {
    height: 80px;
    width: auto;
}

/* --- HERO DEL ARTÍCULO --- */
.article-hero {
    background: linear-gradient(135deg, var(--azul-primario) 0%, var(--azul-oscuro) 100%);
    color: var(--blanco);
    padding: 60px 0;
    margin-bottom: 40px;
}

.breadcrumbs {
    font-size: 0.9rem;
    margin-bottom: 25px;
    color: rgba(255, 255, 255, 0.7);
}

.breadcrumbs a {
    color: var(--blanco);
    text-decoration: none;
    transition: opacity 0.2s;
}

.breadcrumbs a:hover { opacity: 0.8; }
.breadcrumbs .separator { margin: 0 8px; }
.breadcrumbs .current { font-weight: bold; }

.article-hero .badge {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--blanco);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 15px;
}

.article-title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 15px;
}

.article-subtitle {
    font-size: 1.15rem;
    max-width: 700px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

/* --- LAYOUT DEL DETALLE --- */
.detail-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 50px;
    padding-bottom: 80px;
}

/* --- SIDEBAR STICKY (CORREGIDO) --- */
.sidebar {
    position: relative;
}

.sidebar-inner {
    position: sticky;
    top: 110px; /* Se queda pegado al bajar */
}

.toc-box {
    background: var(--blanco);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--gris-borde);
    box-shadow: var(--sombra-premium);
    margin-bottom: 20px;
}

.toc-box h4 {
    font-family: 'Montserrat', sans-serif;
    color: var(--texto-oscuro);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.toc-list { list-style: none; padding: 0; }

.toc-link {
    display: block;
    padding: 10px 0;
    color: var(--texto-light);
    text-decoration: none;
    font-size: 0.95rem;
    border-left: 2px solid transparent;
    padding-left: 15px;
    margin-left: -15px;
    transition: all 0.3s ease;
}

.toc-link:hover, .toc-link.active {
    color: var(--azul-primario);
    font-weight: bold;
    border-left-color: var(--azul-primario);
    background-color: var(--azul-claro);
}

.btn-outline-back {
    display: block;
    text-align: center;
    padding: 12px;
    border: 1px solid var(--gris-borde);
    border-radius: 8px;
    text-decoration: none;
    color: var(--texto-oscuro);
    font-weight: 500;
    background: var(--blanco);
    transition: all 0.3s ease;
    box-shadow: var(--sombra-premium);
}

.btn-outline-back:hover {
    background: var(--azul-primario);
    color: var(--blanco);
    border-color: var(--azul-primario);
    transform: translateY(-2px);
}

/* --- CONTENIDO DEL ARTÍCULO --- */
.article-content {
    background: var(--blanco);
    padding: 45px;
    border-radius: 16px;
    border: 1px solid var(--gris-borde);
    box-shadow: var(--sombra-premium);
}

.legal-notice {
    background-color: #fff8e1;
    border-left: 4px solid #ffc107;
    padding: 15px 20px;
    border-radius: 0 8px 8px 0;
    color: #5c4a06;
    margin-bottom: 40px;
    font-size: 0.95rem;
}

.content-section { margin-bottom: 50px; }

.content-section h2 {
    font-family: 'Montserrat', sans-serif;
    color: var(--azul-oscuro);
    font-size: 1.8rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gris-fondo);
}

/* Tarjetas Informativas (Nacional) */
.grid-cards-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.pro-card {
    background: var(--blanco);
    border: 1px solid var(--gris-borde);
    padding: 25px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.pro-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--sombra-premium);
}

.card-icon {
    width: 35px; height: 35px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; margin-bottom: 15px;
}
.card-icon.check { background: #e6f4ea; color: #137333; }
.card-icon.alert { background: #fce8e6; color: #c5221f; }

/* Pasos (Internacional) */
.step-card {
    display: flex;
    gap: 20px;
    background: var(--gris-fondo);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 15px;
}

.step-number {
    background: var(--azul-primario);
    color: var(--blanco);
    min-width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold;
}

/* CAJA DE REQUISITOS PREMIUM */
.premium-box {
    background: linear-gradient(to right, #1e293b, #0f172a);
    color: var(--blanco);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.premium-box h3 {
    color: #f1c40f;
    margin-bottom: 15px;
}

.checklist { list-style: none; padding: 0; }
.checklist li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 12px;
    color: #e2e8f0;
}
.checklist li::before {
    content: "✓";
    position: absolute;
    left: 0; color: #38bdf8;
    font-weight: bold;
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .detail-container { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .article-content { padding: 25px; }
    .grid-cards-2 { grid-template-columns: 1fr; }
    .article-title { font-size: 2.2rem; }
    
}



/* --- BOTÓN FLOTANTE PARA MÓVILES --- */
.btn-float-back {
    display: none; /* OCULTO POR DEFECTO EN PC */
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background-color: var(--azul-primario);
    color: white;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.4);
    z-index: 9999;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-float-back:hover {
    transform: scale(1.1);
    background-color: var(--azul-oscuro);
}

/* --- SOLO SE MUESTRA EN PANTALLAS PEQUEÑAS (MÓVILES) --- */
@media (max-width: 992px) {
    .btn-float-back {
        display: flex; /* APARECE SOLO EN CELULAR Y TABLET */
    }
}