/* ==========================================================================
   CSS GLOBAL - FUNDACIÓN SANTIAGO VERGARA CRESPO
   ========================================================================== */

/* Importación de fuentes de Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    /* Paleta de colores HSL */
    --primary-hue: 224;
    --primary-sat: 64%;
    --primary-light: 33%; /* #1e3a8a */
    
    --primary: hsl(var(--primary-hue), var(--primary-sat), var(--primary-light));
    --primary-hover: hsl(var(--primary-hue), var(--primary-sat), 25%);
    --primary-light-bg: hsl(var(--primary-hue), var(--primary-sat), 96%);
    
    --accent-hue: 35;
    --accent-sat: 84%;
    --accent-light: 50%; /* #d97706 */
    --accent: hsl(var(--accent-hue), var(--accent-sat), var(--accent-light));
    --accent-hover: hsl(var(--accent-hue), var(--accent-sat), 40%);
    --accent-glow: 0 0 15px hsla(var(--accent-hue), var(--accent-sat), var(--accent-light), 0.5);
    
    --text-main: #1e293b; /* slate-800 */
    --text-muted: #64748b; /* slate-500 */
    --text-light: #94a3b8; /* slate-400 */
    
    --bg-white: #ffffff;
    --bg-light: #f8fafc; /* slate-50 */
    --bg-card: #ffffff;
    
    /* Fuentes */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Layout y espaciados */
    --header-height: 80px;
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); /* Rebote suave moderno */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 10px 15px -3px rgba(30, 58, 138, 0.05), 0 4px 6px -2px rgba(30, 58, 138, 0.03);
    --shadow-lg: 0 20px 25px -5px rgba(30, 58, 138, 0.08), 0 10px 10px -5px rgba(30, 58, 138, 0.04);
}

/* Reset de estilos básicos */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    color: var(--primary);
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Contenedores y Botones */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--bg-white);
    box-shadow: 0 4px 6px -1px rgba(30, 58, 138, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(30, 58, 138, 0.3);
}

.btn-accent {
    background-color: var(--accent);
    color: var(--bg-white);
    box-shadow: 0 4px 6px -1px rgba(217, 119, 6, 0.2);
}

.btn-accent:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(217, 119, 6, 0.3);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--bg-white);
    transform: translateY(-2px);
}

/* ==========================================================================
   HEADER Y NAVEGACIÓN (GLASSMORPHISM)
   ========================================================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    z-index: 1000;
    transition: var(--transition);
}

.header.scrolled {
    height: 70px;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-md);
}

.header .container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 52px;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
    transition: var(--transition);
}

.header.scrolled .logo-img {
    height: 44px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--primary);
    line-height: 1.1;
    letter-spacing: -0.025em;
}

.logo-subtitle {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Menú de Navegación */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
    position: relative;
    padding: 8px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2.5px;
    background-color: var(--accent);
    transition: var(--transition);
    border-radius: 1px;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: var(--primary);
}

/* Estilo destacado para Registro DIAN */
.nav-link.highlight {
    background-color: var(--primary-light-bg);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    border: 1px dashed rgba(30, 58, 138, 0.3);
}

.nav-link.highlight::after {
    display: none;
}

.nav-link.highlight:hover,
.nav-link.highlight.active {
    background-color: var(--primary);
    color: var(--bg-white);
    border-color: var(--primary);
}

/* Botón menú hamburguesa */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1010;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--primary);
    border-radius: 3px;
    transition: var(--transition);
}

/* ==========================================================================
   SECCIÓN HERO (INICIO)
   ========================================================================== */

.hero {
    min-height: 90vh;
    padding-top: calc(var(--header-height) + 40px);
    display: flex;
    align-items: center;
    background-color: var(--bg-white);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 70%;
    height: 140%;
    background: radial-gradient(circle, rgba(30, 58, 138, 0.03) 0%, rgba(30, 58, 138, 0) 70%);
    z-index: 1;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 48px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 650px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--primary-light-bg);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 24px;
    font-family: var(--font-heading);
    letter-spacing: 0.025em;
    border: 1px solid rgba(30, 58, 138, 0.1);
}

.hero-badge i {
    color: var(--accent);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

.hero-title span {
    color: var(--accent);
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 36px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.hero-visual {
    display: flex;
    justify-content: center;
    position: relative;
}

.hero-card {
    background-color: var(--bg-white);
    border-radius: var(--border-radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(226, 232, 240, 0.8);
    width: 100%;
    max-width: 380px;
    transform: rotate(2deg);
    transition: var(--transition);
}

.hero-card:hover {
    transform: rotate(0deg) translateY(-8px);
}

.hero-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.hero-card-icon {
    width: 56px;
    height: 56px;
    background-color: var(--primary-light-bg);
    border-radius: var(--border-radius-md);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.hero-card-tag {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    background-color: #f1f5f9;
    padding: 6px 12px;
    border-radius: 20px;
    color: var(--text-muted);
}

.hero-card-title {
    font-size: 1.35rem;
    margin-bottom: 12px;
}

.hero-card-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.hero-card-footer {
    border-top: 1px solid #e2e8f0;
    padding-top: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-card-avatar {
    width: 36px;
    height: 36px;
    background-color: var(--accent);
    color: var(--bg-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.hero-card-author {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
}

/* Headers Generales de Sección */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 80px auto;
}

.section-subtitle {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
    display: block;
}

.section-title {
    font-size: 2.75rem;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    color: var(--primary);
}

.section-description {
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* ==========================================================================
   SECCIÓN LÍNEA DE TIEMPO INTERACTIVA Y ANIMADA
   ========================================================================== */

.timeline-section {
    background-color: #0f172a; /* Slate 900 - Oscuro premium para destacar luces */
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

/* Efectos de luces de fondo sutiles */
.timeline-section::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 5%;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(30, 58, 138, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: 1;
}

.timeline-section::after {
    content: '';
    position: absolute;
    bottom: 10%;
    right: 5%;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(217, 119, 6, 0.08) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: 1;
}

/* Contenedor del Timeline */
.timeline-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    z-index: 2;
}

/* Eje vertical estático de fondo */
.timeline-background-line {
    position: absolute;
    width: 4px;
    background-color: #1e293b; /* Slate 800 */
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    z-index: 2;
}

/* Línea de progreso dinámica que crece con scroll */
.timeline-progress-line {
    position: absolute;
    width: 4px;
    background: linear-gradient(to bottom, var(--accent) 0%, #fbbf24 100%);
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    z-index: 3;
    height: 0; /* Llenado vía JS */
    box-shadow: 0 0 10px rgba(217, 119, 6, 0.4);
    transition: height 0.1s ease-out; /* Suavidad en el llenado */
}

/* Hitos individuales del timeline */
.timeline-item {
    position: relative;
    width: 50%;
    padding: 0 40px 60px 40px;
    box-sizing: border-box;
    /* Estado inicial invisible para animación Intersection Observer */
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.8s ease-out;
    z-index: 4;
}

/* Hitos izquierdos */
.timeline-left {
    left: 0;
    text-align: right;
    transform: translateX(-60px); /* Pre-animación: deslizar desde izquierda */
}

/* Hitos derechos */
.timeline-right {
    left: 50%;
    text-align: left;
    transform: translateX(60px); /* Pre-animación: deslizar desde derecha */
}

/* Activación de animación (Intersection Observer) */
.timeline-item.active {
    opacity: 1;
    transform: translateX(0);
}

/* Puntos de conexión en el eje */
.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #0f172a;
    border: 4px solid #1e293b;
    top: 24px;
    z-index: 5;
    transition: all 0.5s ease;
    cursor: pointer;
}

/* Posicionamiento de puntos */
.timeline-left .timeline-dot {
    right: -10px;
}

.timeline-right .timeline-dot {
    left: -10px;
}

/* Efecto activo del punto al pasar sobre el hito */
.timeline-item.active .timeline-dot {
    border-color: var(--accent);
    background-color: var(--accent);
    box-shadow: var(--accent-glow);
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(217, 119, 6, 0); }
    100% { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0); }
}

/* Tarjetas Históricas (Glassmorphism Moderno) */
.timeline-card {
    background-color: rgba(30, 41, 59, 0.5); /* Slate 800 semi-transparente */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 32px;
    border-radius: var(--border-radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
    position: relative;
}

.timeline-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(217, 119, 6, 0.4);
    background-color: rgba(30, 41, 59, 0.7);
    box-shadow: 0 15px 35px rgba(217, 119, 6, 0.12), 0 0 15px rgba(217, 119, 6, 0.05);
}

/* Decoraciones en las esquinas de las tarjetas */
.timeline-card::before {
    content: '';
    position: absolute;
    top: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(to right, var(--accent), transparent);
    transition: var(--transition);
}

.timeline-left .timeline-card::before {
    right: 0;
    background: linear-gradient(to left, var(--accent), transparent);
}

.timeline-right .timeline-card::before {
    left: 0;
}

.timeline-card:hover::before {
    width: 60%;
}

/* Detalles de contenido de tarjeta */
.timeline-year {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.timeline-card-title {
    font-size: 1.25rem;
    color: #ffffff;
    margin-bottom: 14px;
    font-weight: 700;
}

.timeline-card-text {
    font-size: 0.95rem;
    color: #94a3b8; /* Slate 400 */
    line-height: 1.7;
}

/* Visibilidad de los detalles colapsables de la tarjeta */
.timeline-card {
    cursor: pointer;
}

.timeline-card-details {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 0;
    padding-top: 0;
    border-top: 1px dashed rgba(255, 255, 255, 0);
    text-align: left; /* Asegurar que el texto siempre lea de izquierda a derecha de forma prolija */
}

.timeline-card.expanded .timeline-card-details {
    max-height: 400px;
    opacity: 1;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed rgba(217, 119, 6, 0.3);
}

.timeline-card-details-text {
    font-size: 0.9rem;
    color: #cbd5e1; /* Slate 300 - ligeramente más claro para el detalle */
    line-height: 1.6;
}

.timeline-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    margin-top: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: var(--transition);
}

.timeline-expand-btn i {
    transition: transform 0.3s ease;
}

.timeline-card.expanded .timeline-expand-btn i {
    transform: rotate(180deg);
}

.timeline-card:hover .timeline-expand-btn {
    color: #ffffff;
}

/* ==========================================================================
   FOOTER INSTITUCIONAL
   ========================================================================== */

.footer {
    background-color: #0f172a; /* slate-900 */
    color: #94a3b8; /* slate-400 */
    padding: 80px 0 30px 0;
    border-top: 1px solid #1e293b;
}

.footer-grid {
    display: grid;
    gap: 48px;
    margin-bottom: 60px;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo-title {
    color: var(--bg-white);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
    line-height: 1.15;
}

.footer-description {
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-contact-title {
    color: var(--bg-white);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 24px;
    position: relative;
}

.footer-contact-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--accent);
}

.footer-contact-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    list-style: none;
}

.footer-contact-item {
    display: flex;
    gap: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.footer-contact-item i {
    color: var(--accent);
    margin-top: 4px;
}

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.85rem;
}

.footer-copy {
    color: #64748b;
}

.footer-bottom-links {
    display: flex;
    gap: 24px;
}

.footer-bottom-link {
    color: #64748b;
    transition: var(--transition);
}

.footer-bottom-link:hover {
    color: var(--bg-white);
}

/* ==========================================================================
   MEDIA QUERIES - DISEÑO RESPONSIVO (TIMELINE ADAPTATIVO)
   ========================================================================== */

@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    /* Menú móvil */
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--bg-white);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 60px;
        gap: 32px;
        transition: var(--transition);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        font-size: 1.1rem;
    }
    
    .nav-link.highlight {
        padding: 12px 24px;
        font-size: 1.1rem;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
    
    /* Layout Hero */
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 48px;
    }
    
    .hero-content {
        margin: 0 auto;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-visual {
        margin-top: 20px;
    }
    
    .hero-card {
        transform: none;
    }
    
    /* REORGANIZACIÓN TOTAL DEL TIMELINE RESPONSIVO (MÓVIL) */
    .timeline-background-line,
    .timeline-progress-line {
        left: 20px; /* Líneas a la izquierda */
        transform: none;
    }
    
    .timeline-item {
        width: 100%; /* Ancho completo */
        padding-left: 50px; /* Margen para la línea */
        padding-right: 0;
        text-align: left;
    }
    
    .timeline-left {
        transform: translateX(50px); /* Entrada desde la derecha constante */
    }
    
    .timeline-right {
        left: 0;
        transform: translateX(50px);
    }
    
    .timeline-dot {
        left: 10px !important; /* Punto centrado sobre la línea */
        right: auto !important;
    }
    
    .timeline-left .timeline-card::before {
        left: 0;
        right: auto;
        background: linear-gradient(to right, var(--accent), transparent);
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.25rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .timeline-card {
        padding: 24px;
    }
}
