/* ==========================================================================
   Estilos compartidos: barra de marca, hero y navegación entre vistas.
   Usado en listado.php y mapa.php para garantizar que la parte superior
   de ambas páginas sea idéntica.
   ========================================================================== */

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scrollbar-gutter: stable;
}

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

:root {
    --color-primary: #0ea5e9;
    --color-primary-dark: #0284c7;
    --color-bg: #f1f5f9;
    --color-surface: #ffffff;
    --color-text: #1e293b;
    --color-text-soft: #475569;
    --color-muted: #64748b;
    --color-border: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 6px 20px rgba(15, 23, 42, 0.10);
    --shadow-lg: 0 18px 45px rgba(15, 23, 42, 0.16);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Barra de marca ---------- */
.brand-bar {
    background: #0f172a;
    color: #94a3b8;
    text-align: center;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 101;
    height: 28px;
    min-height: 28px;
    line-height: 28px;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-bar a {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    height: 100%;
}

.brand-bar a:hover {
    color: #cbd5e1;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.78), rgba(2, 132, 199, 0.72));
    color: #fff;
    text-align: center;
    flex-shrink: 0;
    overflow: hidden;
    height: 170px;
    min-height: 170px;
    box-sizing: border-box;
    padding: 0.5rem 1.25rem 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 30px;
    background: var(--color-surface);
    clip-path: ellipse(75% 100% at 50% 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 820px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.3rem;
    flex: 1;
}

.hero h1 {
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    margin: 0;
    padding: 0;
    white-space: nowrap;
    max-width: 100%;
}

.hero p {
    font-size: 0.85rem;
    opacity: 0.95;
    margin: 0;
    padding: 0;
    line-height: 1.4;
    height: 2.8em;
    overflow: hidden;
    max-width: 100%;
}

.hero-meta {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 0.5rem 1.25rem;
    justify-content: center;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #0c4a6e;
    background: rgba(186, 230, 253, 0.9);
    backdrop-filter: blur(8px);
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(125, 211, 252, 0.8);
    margin: 0;
    margin-top: auto;
    margin-bottom: 0.25rem;
    height: 2.4em;
    white-space: nowrap;
    overflow: hidden;
    max-width: 100%;
}

.hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.hero-meta .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

/* ---------- Menú de navegación entre vistas ---------- */
.page-nav {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 0 1rem;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
    z-index: 100;
    position: sticky;
    top: 28px;
    height: 60px;
    min-height: 60px;
    box-sizing: border-box;
    align-items: center;
}

.page-nav-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1.2rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-muted);
    text-decoration: none;
    border: 2px solid transparent;
    transition: var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.page-nav-item:hover {
    color: var(--color-primary-dark);
    background: rgba(14, 165, 233, 0.08);
}

.page-nav-item.active {
    color: #fff;
    background: var(--color-primary);
    border-color: var(--color-primary-dark);
}
