/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #003366;
    --primary-dark: #001a33;
    --primary-light: #004080;
    --accent: #FF6B00;
    --accent-light: #ff8533;
    --accent-dark: #cc5500;
    --gold: #FFD700;
    --bg: #f0f4f8;
    --bg-card: #ffffff;
    --text: #1a1a2e;
    --text-light: #555;
    --text-lighter: #888;
    --shadow: 0 2px 10px rgba(0, 51, 102, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 51, 102, 0.15);
    --radius: 10px;
    --radius-sm: 6px;
    --transition: 0.25s ease;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html { scroll-behavior: smooth; font-size: 16px; }
html::before {
    content: ''; position: fixed; inset: 0; z-index: -1;
    background: url('fondo.jpg') no-repeat center center;
    background-size: cover; opacity: 0.12;
}
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; padding-top: 48px; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ===== TOP NAV BAR ===== */
.top-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(0, 26, 51, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.nav-container {
    max-width: 1100px; margin: 0 auto; padding: 0 20px;
    display: flex; align-items: center; justify-content: space-between; height: 48px;
}
.nav-brand { display: flex; align-items: center; gap: 8px; }
.nav-logo-icon { width: 28px; height: 28px; }
.nav-brand span { color: #fff; font-weight: 700; font-size: 0.9rem; letter-spacing: 0.02em; }

.hamburger {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 4px;
}
.hamburger span {
    display: block; width: 24px; height: 2.5px; background: #fff;
    border-radius: 2px; transition: all 0.3s ease;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav-menu { display: flex; gap: 4px; }
.nav-link {
    color: rgba(255, 255, 255, 0.75); text-decoration: none;
    font-size: 0.78rem; font-weight: 500; padding: 6px 12px;
    border-radius: 6px; transition: all 0.2s ease;
}
.nav-link:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }

.hamburger { display: flex; }
.nav-menu {
    position: fixed; top: 48px; left: 0; right: 0;
    background: rgba(0, 26, 51, 0.98);
    flex-direction: column; padding: 12px 20px; gap: 2px;
    transform: translateY(-110%); opacity: 0;
    transition: all 0.35s ease; pointer-events: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 999;
}
.nav-menu.open { transform: translateY(0); opacity: 1; pointer-events: all; }
.nav-link {
    padding: 10px 14px; font-size: 0.9rem; border-radius: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.nav-link:last-child { border-bottom: none; }

/* ===== PROGRESS BAR ===== */
.progress-bar {
    position: fixed; top: 0; left: 0; height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--gold));
    z-index: 9999; width: 0%; transition: width 0.2s ease;
}

/* ===== HERO ===== */
.hero {
    position: relative; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; top: -50%; right: -20%; width: 80%; height: 80%;
    background: radial-gradient(circle, rgba(255, 107, 0, 0.08) 0%, transparent 70%);
    pointer-events: none;
}
.hero::after {
    content: ''; position: absolute; bottom: -30%; left: -10%; width: 60%; height: 60%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.05) 0%, transparent 70%);
    pointer-events: none;
}
.hero-overlay {
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L60 30L30 60L0 30Z' fill='none' stroke='rgba(255,255,255,0.02)' stroke-width='1'/%3E%3C/svg%3E") repeat;
    opacity: 0.5;
}
.hero-content {
    position: relative; z-index: 2; text-align: center; padding: 48px 20px 32px;
}
.hero-logo { margin-bottom: 12px; }
.hero-logo .logo-icon { width: 44px; height: 44px; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3)); }
.hero-title {
    font-size: 1.8rem; font-weight: 800; color: #fff;
    letter-spacing: -0.03em; margin-bottom: 6px; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
.hero-title .highlight { color: var(--gold); position: relative; }
.hero-title .highlight::after {
    content: ''; position: absolute; bottom: 2px; left: 0; width: 100%; height: 3px;
    background: var(--accent); border-radius: 2px; opacity: 0.6;
}
.hero-subtitle {
    font-size: 0.9rem; color: rgba(255, 255, 255, 0.85);
    font-weight: 400; margin-bottom: 20px; max-width: 450px; margin-left: auto; margin-right: auto;
}
.hero-stats { display: flex; justify-content: center; gap: 28px; }
.stat-item { display: flex; flex-direction: column; align-items: center; }
.stat-num { font-size: 1.4rem; font-weight: 800; color: var(--gold); line-height: 1; }
.stat-label { font-size: 0.68rem; color: rgba(255, 255, 255, 0.7); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 2px; }

/* Wave Divider */
.wave-divider { position: absolute; bottom: -1px; left: 0; width: 100%; line-height: 0; overflow: hidden; }
.wave-divider svg { width: 100%; height: 24px; display: block; }

/* ===== INTRO ===== */
.intro-section { padding: 20px 0 8px; }
.intro-card {
    background: var(--bg-card); border-radius: var(--radius); padding: 16px 20px;
    display: flex; align-items: center; gap: 14px;
    box-shadow: var(--shadow); border-left: 4px solid var(--accent);
}
.intro-icon svg { width: 32px; height: 32px; }
.intro-text { font-size: 0.85rem; line-height: 1.5; color: var(--text-light); }
.intro-text strong { color: var(--primary); }
.intro-source { font-size: 0.78rem; color: var(--text-lighter); margin-top: 4px; padding-top: 6px; border-top: 1px solid rgba(0, 51, 102, 0.1); }
.intro-source a { color: var(--accent); text-decoration: none; font-weight: 600; transition: color var(--transition); }
.intro-source a:hover { color: var(--accent-dark); text-decoration: underline; }

/* ===== SECTION TITLES ===== */
.section-title { font-size: 1.3rem; font-weight: 800; color: var(--primary); text-align: center; margin-bottom: 4px; letter-spacing: -0.02em; }
.section-subtitle { text-align: center; color: var(--text-lighter); font-size: 0.82rem; margin-bottom: 16px; }

/* ===== RUTA ===== */
.ruta-section { padding: 16px 0; }

.etapa {
    background: var(--bg-card); border-radius: var(--radius); margin-bottom: 8px;
    box-shadow: var(--shadow); overflow: hidden; transition: box-shadow var(--transition);
    border-left: 3px solid var(--primary);
}
.etapa:hover { box-shadow: var(--shadow-hover); }
.etapa-header {
    display: flex; align-items: center; gap: 10px; padding: 10px 14px;
    cursor: pointer; user-select: none; transition: background var(--transition);
    background: rgba(0, 51, 102, 0.02);
}
.etapa-header:hover { background: rgba(0, 51, 102, 0.06); }
.etapa-num {
    width: 30px; height: 30px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; font-weight: 700; flex-shrink: 0; transition: transform var(--transition);
}
.etapa.open .etapa-num { transform: scale(1.1); }
.etapa-info { flex: 1; min-width: 0; }
.etapa-titulo { font-size: 0.88rem; font-weight: 700; color: var(--primary); }
.etapa-desc { font-size: 0.72rem; color: var(--text-lighter); }
.etapa-toggle {
    width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
    transition: transform var(--transition); color: var(--primary); flex-shrink: 0;
}
.etapa.open .etapa-toggle { transform: rotate(90deg); }
.etapa-toggle svg { width: 16px; height: 16px; }
.etapa-content { max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.25s ease; padding: 0 14px; }
.etapa.open .etapa-content { max-height: 3000px; padding: 4px 14px 10px; }

.documento {
    display: flex; align-items: center; gap: 10px; padding: 8px 12px;
    margin-top: 4px; border-radius: var(--radius-sm); background: var(--bg);
    transition: all var(--transition); border: 1px solid transparent;
}
.documento:hover { border-color: var(--accent); background: #fff; transform: translateX(3px); }
.doc-num {
    width: 26px; height: 26px; background: var(--accent); color: #fff;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 0.68rem; font-weight: 600; flex-shrink: 0;
}
.doc-info { flex: 1; min-width: 0; }
.doc-title { font-size: 0.8rem; font-weight: 600; }
.doc-link {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}
.doc-link:hover {
    color: var(--accent);
    text-decoration: underline;
}
.doc-desc { font-size: 0.72rem; color: var(--text-lighter); line-height: 1.3; }
.btn-download {
    display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px;
    background: var(--primary); color: #fff; border: none; border-radius: var(--radius-sm);
    font-family: var(--font); font-size: 0.7rem; font-weight: 600;
    cursor: pointer; text-decoration: none; transition: all var(--transition);
    white-space: nowrap; flex-shrink: 0;
}
.btn-download:hover { background: var(--accent); transform: translateY(-1px); box-shadow: 0 3px 8px rgba(255, 107, 0, 0.3); }
.btn-download:active { transform: translateY(0); }
.btn-download svg { width: 13px; height: 13px; }

/* ===== TIPS ===== */
.tips-section { padding: 16px 0 24px; background: linear-gradient(180deg, var(--bg) 0%, #fff 100%); }
.tips-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.tip-card {
    background: var(--bg-card); border-radius: var(--radius); padding: 14px 12px;
    text-align: center; box-shadow: var(--shadow); transition: all var(--transition);
    border-bottom: 3px solid transparent;
}
.tip-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-bottom-color: var(--accent); }
.tip-icon { margin-bottom: 6px; }
.tip-icon svg { width: 28px; height: 28px; }
.tip-card h4 { font-size: 0.85rem; font-weight: 700; color: var(--primary); margin-bottom: 3px; }
.tip-card p { font-size: 0.74rem; color: var(--text-lighter); line-height: 1.4; }

/* ===== FOOTER ===== */
.footer { background: var(--primary-dark); color: rgba(255, 255, 255, 0.8); padding: 24px 0 16px; }
.footer-content { text-align: center; }
.footer-logo { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 10px; }
.footer-logo .logo-icon { width: 26px; height: 26px; }
.footer-logo span { font-size: 0.85rem; font-weight: 700; color: #fff; }
.footer-text { font-size: 0.78rem; margin-bottom: 6px; line-height: 1.5; }
.footer-text strong { color: var(--gold); }
.footer-link { font-size: 0.74rem; color: rgba(255, 255, 255, 0.7); margin-bottom: 6px; }
.footer-link a { color: var(--gold); text-decoration: none; font-weight: 500; transition: color var(--transition); }
.footer-link a:hover { color: var(--accent); text-decoration: underline; }
.footer-small { font-size: 0.68rem; color: rgba(255, 255, 255, 0.5); max-width: 450px; margin: 0 auto; }

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed; bottom: 16px; right: 16px; width: 36px; height: 36px;
    border-radius: 50%; background: var(--primary); color: #fff; border: none;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 3px 12px rgba(0, 51, 102, 0.25); transition: all var(--transition);
    opacity: 0; visibility: hidden; transform: translateY(16px); z-index: 999;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--accent); transform: translateY(-3px); box-shadow: 0 5px 16px rgba(255, 107, 0, 0.35); }
.back-to-top svg { width: 16px; height: 16px; }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.etapa { animation: fadeInUp 0.5s ease forwards; }
.etapa:nth-child(2) { animation-delay: 0.08s; }
.etapa:nth-child(3) { animation-delay: 0.15s; }
.etapa:nth-child(4) { animation-delay: 0.22s; }
.etapa:nth-child(5) { animation-delay: 0.3s; }
.etapa:nth-child(6) { animation-delay: 0.38s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .tips-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .container { padding: 0 14px; }
    .hero-content { padding: 36px 14px 24px; }
    .hero-title { font-size: 1.5rem; }
    .hero-subtitle { font-size: 0.82rem; }
    .hero-stats { gap: 20px; }
    .stat-num { font-size: 1.2rem; }
    .intro-card { flex-direction: column; padding: 16px 18px; gap: 10px; }
    .intro-text { font-size: 0.82rem; }
    .section-title { font-size: 1.1rem; }
    .etapa-header { padding: 10px 12px; gap: 10px; }
    .etapa-num { width: 28px; height: 28px; font-size: 0.78rem; }
    .etapa-titulo { font-size: 0.82rem; }
    .etapa.open .etapa-content { padding: 4px 12px 10px; }
    .documento { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 12px; }
    .doc-title { font-size: 0.78rem; }
    .doc-desc { font-size: 0.7rem; }
    .btn-download { justify-content: center; width: 100%; padding: 8px 14px; }
    .tips-grid { grid-template-columns: 1fr; gap: 10px; }
    .tip-card { padding: 12px 14px; }
    .footer { padding: 20px 0 14px; }
    .back-to-top { bottom: 14px; right: 14px; width: 34px; height: 34px; }
}
@media (max-width: 480px) {
    .hero-title { font-size: 1.3rem; }
    .hero-subtitle { font-size: 0.78rem; }
    .hero-stats { gap: 16px; }
    .stat-num { font-size: 1.1rem; }
    .stat-label { font-size: 0.62rem; }
    .section-title { font-size: 1rem; }
    .etapa-titulo { font-size: 0.78rem; }
    .etapa-desc { font-size: 0.68rem; }
}

/* ===== PRINT ===== */
@media print {
    .hero { padding: 24px 0; }
    .back-to-top, .progress-bar { display: none; }
    .etapa-content { max-height: none !important; padding: 8px 14px 12px !important; }
}