:root {
    --navy-950: #051629;
    --navy-900: #082340;
    --navy-800: #0d3560;
    --navy-700: #134b85;
    --ocean-500: #0284c7;
    --ocean-400: #0ea5e9;
    --ocean-100: #e0f2fe;
    --buoy-500: #f59e0b;
    --buoy-400: #fbbf24;
    --emerald-500: #10b981;
    --slate-900: #0f172a;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --bg-light: #f4f8fc;
    --white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(8, 35, 64, 0.06);
    --shadow-md: 0 10px 30px rgba(8, 35, 64, 0.10);
    --shadow-lg: 0 20px 45px rgba(5, 22, 41, 0.16);
    --radius-md: 12px;
    --radius-lg: 18px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 86px;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    color: var(--slate-900);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

.container {
    width: min(1200px, 92%);
    margin: 0 auto;
}

/* Barra institucional superior */
.gov-topbar {
    background: var(--navy-950);
    color: #cbd5e1;
    font-size: 0.78rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gov-topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.gov-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.tricolor-dot {
    display: inline-flex;
    gap: 2px;
}

.tricolor-dot span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.tricolor-dot span:nth-child(1) { background: #facc15; }
.tricolor-dot span:nth-child(2) { background: #2563eb; }
.tricolor-dot span:nth-child(3) { background: #dc2626; }

.gov-links {
    display: flex;
    gap: 1.2rem;
    align-items: center;
}

.gov-links a:hover {
    color: var(--buoy-400);
}

/* Navegación principal */
.main-header {
    position: sticky;
    top: 0;
    z-index: 900;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--slate-200);
    box-shadow: var(--shadow-sm);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 74px;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-logo {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
}

.brand-text strong {
    display: block;
    font-size: 1.15rem;
    color: var(--navy-900);
    letter-spacing: 0.04em;
    line-height: 1.1;
}

.brand-text span {
    display: block;
    font-size: 0.72rem;
    color: var(--slate-600);
    font-weight: 500;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-menu a {
    padding: 0.5rem 0.72rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--slate-700);
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: var(--ocean-100);
    color: var(--navy-800);
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: linear-gradient(135deg, var(--navy-800), var(--ocean-500));
    color: var(--white) !important;
    padding: 0.55rem 0.95rem !important;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
    transition: transform 0.2s, box-shadow 0.2s;
}

.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
}

.menu-toggle {
    display: none;
    background: var(--slate-100);
    border: 1px solid var(--slate-200);
    border-radius: 8px;
    padding: 0.45rem 0.65rem;
    cursor: pointer;
    color: var(--navy-900);
    font-size: 1.2rem;
}

/* Hero marítimo */
.hero {
    position: relative;
    background: radial-gradient(circle at 80% 20%, rgba(14, 165, 233, 0.28), transparent 45%),
                linear-gradient(135deg, var(--navy-950) 0%, var(--navy-900) 48%, var(--navy-700) 100%);
    color: var(--white);
    padding: 4.5rem 0 6rem;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.85fr;
    gap: 2.5rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.11);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.38rem 0.9rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #bae6fd;
    margin-bottom: 1.2rem;
}

.hero-pill .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--buoy-400);
    box-shadow: 0 0 10px var(--buoy-400);
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 3.1rem);
    line-height: 1.15;
    margin-bottom: 1.1rem;
    font-weight: 800;
}

.hero h1 span {
    color: #38bdf8;
}

.hero-lead {
    font-size: 1.05rem;
    color: #dbeafe;
    max-width: 62ch;
    margin-bottom: 1.8rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-bottom: 2.2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.82rem 1.35rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.94rem;
    cursor: pointer;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--buoy-500), #d97706);
    color: var(--navy-950);
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.32);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(245, 158, 11, 0.42);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.stat-box {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-md);
    padding: 0.9rem 1rem;
}

.stat-box strong {
    display: block;
    font-size: 1.25rem;
    color: var(--buoy-400);
}

.stat-box span {
    font-size: 0.78rem;
    color: #cbd5e1;
}

.hero-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
    border-radius: 22px;
    padding: 1.6rem;
    box-shadow: var(--shadow-lg);
}

.hero-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.hero-card-head h3 {
    font-size: 1.05rem;
    color: var(--white);
}

.live-tag {
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.4);
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
}

.quick-list {
    display: grid;
    gap: 0.75rem;
}

.quick-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: rgba(5, 22, 41, 0.45);
    padding: 0.78rem 0.9rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    transition: border-color 0.2s, transform 0.2s;
}

.quick-item:hover {
    border-color: rgba(56, 189, 248, 0.55);
    transform: translateX(3px);
}

.quick-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(14, 165, 233, 0.2);
    color: #38bdf8;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-weight: 700;
}

.quick-item strong {
    display: block;
    font-size: 0.9rem;
    color: var(--white);
}

.quick-item small {
    font-size: 0.78rem;
    color: #cbd5e1;
}

.hero-waves {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    width: 100%;
    height: 76px;
    z-index: 1;
}

/* Secciones generales */
.section {
    padding: 4.5rem 0;
    transition: box-shadow 0.4s ease;
}

.section-alt {
    background: var(--white);
}

.section-dark {
    background: linear-gradient(145deg, var(--navy-950), var(--navy-800));
    color: var(--white);
}

.section-highlight {
    animation: sectionPulse 1.6s ease;
}

@keyframes sectionPulse {
    0% { box-shadow: inset 0 0 0 0 rgba(14, 165, 233, 0); }
    30% { box-shadow: inset 0 0 0 6px rgba(14, 165, 233, 0.45); }
    100% { box-shadow: inset 0 0 0 0 rgba(14, 165, 233, 0); }
}

.section-header {
    max-width: 720px;
    margin-bottom: 2.5rem;
}

.section-kicker {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ocean-500);
    margin-bottom: 0.45rem;
}

.section-dark .section-kicker {
    color: var(--buoy-400);
}

.section-header h2 {
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    color: var(--navy-900);
    line-height: 1.2;
    margin-bottom: 0.65rem;
}

.section-dark .section-header h2 {
    color: var(--white);
}

.section-header p {
    color: var(--slate-600);
    font-size: 1rem;
}

.section-dark .section-header p {
    color: #cbd5e1;
}

/* Tarjetas y grillas */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
}

.card {
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    padding: 1.6rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: #bae6fd;
}

.card-accent {
    border-top: 4px solid var(--ocean-500);
}

.card-gold {
    border-top: 4px solid var(--buoy-500);
}

.card h3 {
    color: var(--navy-900);
    font-size: 1.15rem;
    margin-bottom: 0.65rem;
}

.card p {
    color: var(--slate-600);
    font-size: 0.94rem;
}

.check-list {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.85rem;
}

.check-list li {
    position: relative;
    padding-left: 1.4rem;
    font-size: 0.92rem;
    color: var(--slate-700);
}

.check-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--ocean-500);
    font-weight: 800;
}

/* Valores y Autoridades */
.values-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.value-chip {
    background: var(--bg-light);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    padding: 1.1rem;
}

.value-chip strong {
    display: block;
    color: var(--navy-800);
    font-size: 0.92rem;
    margin-bottom: 0.3rem;
}

.value-chip span {
    font-size: 0.82rem;
    color: var(--slate-600);
}

.authority-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-light);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    padding: 1.15rem;
}

.authority-card.is-main {
    background: linear-gradient(135deg, #eff6ff, #ffffff);
    border-color: #93c5fd;
}

.authority-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--navy-800);
    color: var(--white);
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
}

.authority-card small {
    display: block;
    color: var(--ocean-500);
    font-weight: 700;
    font-size: 0.76rem;
    text-transform: uppercase;
}

.authority-card strong {
    color: var(--navy-900);
    font-size: 0.98rem;
}

/* Tabs de Canales */
.channel-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 1.5rem;
}

.tab-btn {
    padding: 0.68rem 1.2rem;
    border-radius: 999px;
    border: 1px solid var(--slate-200);
    background: var(--white);
    color: var(--slate-700);
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active {
    background: var(--navy-800);
    color: var(--white);
    border-color: var(--navy-800);
    box-shadow: 0 6px 16px rgba(13, 53, 96, 0.2);
}

.channel-panel {
    display: none;
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    animation: fadeIn 0.3s ease;
}

.channel-panel.active {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 2rem;
    align-items: center;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.pill {
    background: var(--ocean-100);
    color: var(--navy-800);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
}

.channel-meta-box {
    background: linear-gradient(145deg, var(--navy-900), var(--navy-700));
    color: var(--white);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.channel-meta-box span {
    display: block;
    font-size: 0.75rem;
    color: #7dd3fc;
    text-transform: uppercase;
    font-weight: 700;
}

.channel-meta-box strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* BOYAVEN & Flota */
.boyaven-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    backdrop-filter: blur(8px);
}

.boyaven-card .serie-badge {
    display: inline-block;
    background: var(--buoy-500);
    color: var(--navy-950);
    font-weight: 800;
    font-size: 0.78rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    margin-bottom: 0.8rem;
}

.boyaven-card h3 {
    color: var(--white);
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.boyaven-card p {
    color: #dbeafe;
    font-size: 0.9rem;
}

.fleet-box {
    background: var(--bg-light);
    border: 1px solid var(--slate-200);
    border-left: 4px solid var(--navy-800);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.fleet-box h4 {
    color: var(--navy-900);
    margin-bottom: 0.4rem;
    font-size: 1rem;
}

.fleet-box p {
    color: var(--slate-600);
    font-size: 0.9rem;
}

/* Noticias */
.news-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--ocean-500);
    background: var(--ocean-100);
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    margin-bottom: 0.7rem;
}

/* Contacto y Footer */
.contact-card h3 {
    font-size: 1.05rem;
    color: var(--navy-900);
    margin-bottom: 0.5rem;
}

.contact-detail {
    font-size: 0.9rem;
    color: var(--slate-600);
    margin-bottom: 0.4rem;
}

.phone-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.6rem;
}

.phone-chip {
    background: var(--slate-100);
    border: 1px solid var(--slate-200);
    color: var(--navy-900);
    font-weight: 700;
    font-size: 0.82rem;
    padding: 0.3rem 0.65rem;
    border-radius: 8px;
}

.site-footer {
    background: var(--navy-950);
    color: #cbd5e1;
    padding: 3rem 0 1.5rem;
    font-size: 0.88rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid h4 {
    color: var(--white);
    margin-bottom: 0.85rem;
    font-size: 1rem;
}

.footer-links {
    display: grid;
    gap: 0.45rem;
}

.footer-links a:hover {
    color: var(--buoy-400);
}

.footer-bottom {
    padding-top: 1.25rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8rem;
    color: #94a3b8;
}

/* Responsivo */
@media (max-width: 1024px) {
    .hero-grid,
    .channel-panel.active {
        grid-template-columns: 1fr;
    }
    .values-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .menu-toggle {
        display: inline-flex;
    }
    .nav-menu {
        display: none;
        position: absolute;
        top: 74px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        align-items: stretch;
        padding: 1rem 4%;
        border-bottom: 1px solid var(--slate-200);
        box-shadow: var(--shadow-md);
    }
    .nav-menu.open {
        display: flex;
    }
    .grid-2, .grid-3, .footer-grid {
        grid-template-columns: 1fr;
    }
    .hero-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .values-strip, .grid-4 {
        grid-template-columns: 1fr;
    }
}
