/* ============================================
   Presupuestos y Facturas — Tema unificado
   Premium Dark Mode + Gold Accent (Liquid Glass)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Playfair+Display:wght@700;800&display=swap');

:root {
    /* ---- Premium dark palette ---- */
    --app-bg: #070b16;
    --app-bg-gradient: linear-gradient(160deg, #070b16 0%, #0d1425 40%, #111d35 100%);
    --app-bg-elevated: #0f1729;
    --app-surface: rgba(16, 24, 48, 0.75);
    --app-surface-strong: rgba(22, 34, 62, 0.85);
    --app-border: rgba(120, 140, 190, 0.15);
    --app-border-subtle: rgba(120, 140, 190, 0.08);
    --app-border-accent: rgba(234, 179, 8, 0.25);
    --app-text: #eef2ff;
    --app-text-secondary: #a5b4d4;
    --app-text-muted: #6b7fa3;
    --app-accent: #eab308;
    --app-accent-hover: #facc15;
    --app-accent-soft: rgba(234, 179, 8, 0.12);
    --app-accent-glow: 0 0 20px rgba(234, 179, 8, 0.15);
    --app-ok: #34d399;
    --app-ok-glow: 0 0 16px rgba(52, 211, 153, 0.2);
    --app-warning: #f59e0b;
    --app-urgente: #f87171;
    --app-blur: 20px;
    --app-radius: 14px;
    --app-radius-sm: 8px;
    --app-radius-xl: 18px;
    --app-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --app-shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --app-transition: 200ms ease;

    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    --container-width: 1200px;
    --header-height: 70px;
}

/* ============================================
   Modo claro — Sobrescribe variables cuando data-theme="light"
   ============================================ */
[data-theme="light"] {
    --app-bg: #f8f9fb;
    --app-bg-gradient: #f8f9fb;
    --app-bg-elevated: #ffffff;
    --app-surface: rgba(255, 255, 255, 0.95);
    --app-surface-strong: #ffffff;
    --app-border: rgba(15, 23, 42, 0.08);
    --app-border-subtle: rgba(15, 23, 42, 0.05);
    --app-border-accent: rgba(30, 64, 128, 0.18);
    --app-text: #0f172a;
    --app-text-secondary: #475569;
    --app-text-muted: #94a3b8;
    --app-accent: #1e4080;
    --app-accent-hover: #163266;
    --app-accent-soft: rgba(30, 64, 128, 0.08);
    --app-accent-glow: 0 0 12px rgba(30, 64, 128, 0.08);
    --app-ok-glow: none;
    --app-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
    --app-shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.08);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--app-text);
    background: var(--app-bg-gradient, var(--app-bg));
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    color: var(--app-text);
}

h1 {
    font-size: 2.25rem;
}

h2 {
    font-size: 1.75rem;
}

h3 {
    font-size: 1.25rem;
}

p {
    margin-bottom: var(--spacing-sm);
}

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

a:hover {
    color: var(--app-accent-hover);
}

/* Keyboard accessibility: visible focus ring for tab navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--app-accent);
    outline-offset: 2px;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ============================================
   Header — Fondo oscuro, amarillo/negro/grises (como antes)
   ============================================ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(7, 11, 22, 0.85);
    backdrop-filter: blur(var(--app-blur));
    -webkit-backdrop-filter: blur(var(--app-blur));
    border-bottom: 1px solid var(--app-border);
    box-shadow: 0 1px 0 rgba(234, 179, 8, 0.08), 0 4px 16px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    height: var(--header-height);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.logo {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--app-text);
    text-decoration: none;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    width: auto;
    transition: opacity var(--app-transition);
}

.logo:hover {
    color: var(--app-accent);
}

.logo:hover img {
    opacity: 0.9;
}

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

.nav-menu a {
    color: var(--app-text-secondary);
    font-weight: 500;
    font-size: 0.9375rem;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--app-radius-sm);
    transition: all var(--app-transition);
}

.nav-menu a:hover {
    color: var(--app-text);
    background: var(--app-surface);
}

.nav-menu a.active {
    color: var(--app-bg);
    background: var(--app-accent);
}

.nav-menu a.active:hover {
    background: var(--app-accent-hover);
    color: var(--app-bg);
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--app-bg);
    background: var(--app-accent);
    border-radius: var(--app-radius-sm);
    transition: all var(--app-transition);
    margin-left: 0.5rem;
}

.nav-cta:hover {
    background: var(--app-accent-hover);
    color: var(--app-bg);
}

/* Toggle modo oscuro / claro */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    margin-left: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--app-text-secondary);
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
    cursor: pointer;
    transition: color var(--app-transition), background var(--app-transition), border-color var(--app-transition);
}

.theme-toggle:hover {
    color: var(--app-text);
    background: var(--app-surface-strong);
}

.theme-toggle svg {
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
}

.badge-alert {
    display: inline-block;
    margin-left: 0.25rem;
    padding: 0.1rem 0.4rem;
    font-size: 0.7rem;
    font-weight: bold;
    color: #fff;
    background: var(--app-urgente);
    border-radius: 50%;
    vertical-align: middle;
}

@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--app-bg-elevated);
        padding: 0 var(--spacing-md);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        border-bottom: 1px solid transparent;
        transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.3s ease, border-color 0.3s ease;
        display: flex;
    }

    .nav-menu.active {
        max-height: 600px;
        opacity: 1;
        pointer-events: auto;
        padding: var(--spacing-md);
        border-bottom-color: var(--app-border);
    }

    .nav-menu a {
        color: var(--app-text-secondary);
    }

    .nav-menu a.active {
        color: var(--app-bg);
        background: var(--app-accent);
    }
}

/* ============================================
   Hero — Degradado oscuro + acento ámbar
   ============================================ */

.hero {
    position: relative;
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #070b16 0%, #0d1a35 30%, #152548 60%, #0d1425 100%);
    color: var(--app-text);
    padding-top: var(--header-height);
    overflow: hidden;
    border-bottom: 1px solid rgba(234, 179, 8, 0.12);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse 80% 60% at 30% 20%, rgba(234, 179, 8, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 70% 80%, rgba(52, 211, 153, 0.04) 0%, transparent 50%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    padding: var(--spacing-xl) var(--spacing-md);
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--app-text);
}

.hero-tagline {
    font-size: 1.125rem;
    color: var(--app-text-secondary);
}

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

    .hero-tagline {
        font-size: 1rem;
    }
}

/* ============================================
   Búsqueda hero — Mismo estilo que pg-search-bar
   ============================================ */

.search-hero-wrap {
    position: relative;
    z-index: 1;
    max-width: 640px;
    margin: var(--spacing-md) auto 0;
}

.search-hero {
    width: 100%;
    min-height: 52px;
    padding: 0 1.25rem 0 3rem;
    font-size: 1rem;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-xl);
    background: var(--app-surface);
    backdrop-filter: blur(var(--app-blur));
    -webkit-backdrop-filter: blur(var(--app-blur));
    color: var(--app-text);
    transition: border-color var(--app-transition), box-shadow var(--app-transition);
}

.search-hero::placeholder {
    color: var(--app-text-muted);
}

.search-hero:focus-visible {
    border-color: var(--app-accent);
    box-shadow: 0 0 0 3px var(--app-accent-soft);
}

.search-hero-results {
    margin-top: 0.5rem;
    border-radius: var(--app-radius);
    background: var(--app-surface-strong);
    border: 1px solid var(--app-border);
    box-shadow: var(--app-shadow);
    max-height: 70vh;
    overflow-y: auto;
    color: var(--app-text);
}

.search-hero-results section {
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 1px solid var(--app-border-subtle);
}

.search-hero-results section:last-child {
    border-bottom: none;
}

.search-hero-results h4 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--app-accent);
    margin-bottom: 0.5rem;
}

.search-hero-results ul {
    list-style: none;
}

.search-hero-results li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--app-border-subtle);
}

.search-hero-results li:last-child {
    border-bottom: none;
}

.search-hero-results a {
    color: var(--app-text-secondary);
    display: block;
    padding: 0.25rem 0;
    border-radius: var(--app-radius-sm);
    transition: background var(--app-transition), color var(--app-transition);
}

.search-hero-results a:hover {
    background: var(--app-accent-soft);
    color: var(--app-accent);
}

.search-hero-loading,
.search-hero-empty {
    padding: var(--spacing-md);
    color: var(--app-text-muted);
    text-align: center;
}

/* ============================================
   Section + Panel de contenido
   ============================================ */

section {
    padding: var(--spacing-xl) 0;
}

section.about {
    background: var(--app-bg);
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    color: var(--app-text);
    position: relative;
    padding-bottom: var(--spacing-sm);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--app-accent);
    border-radius: 2px;
}

/* ============================================
   Filtros — Superficie oscura
   ============================================ */

.filters-bar {
    background: var(--app-surface);
    backdrop-filter: blur(var(--app-blur));
    -webkit-backdrop-filter: blur(var(--app-blur));
    padding: var(--spacing-md);
    border-radius: var(--app-radius);
    border: 1px solid var(--app-border);
    box-shadow: var(--app-shadow);
    margin-bottom: var(--spacing-md);
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    align-items: flex-end;
}

.filters-bar .form-group {
    margin-bottom: 0;
    min-width: 160px;
}

.filters-bar label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-size: 0.875rem;
    color: var(--app-text-muted);
}

.filters-bar input,
.filters-bar select {
    width: 100%;
    padding: var(--spacing-xs) var(--spacing-sm);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
    font-size: 0.95rem;
    background: var(--app-bg-elevated);
    color: var(--app-text);
}

.filters-bar input:focus-visible,
.filters-bar select:focus-visible {
    border-color: var(--app-accent);
    box-shadow: 0 0 0 2px var(--app-accent-soft);
}

.btn {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--app-radius-sm);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--app-transition);
}

.btn-primary {
    background: var(--app-accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--app-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.35);
}

/* ============================================
   Tablas — Mismo estilo que pg-table
   ============================================ */

.table-wrap {
    overflow-x: auto;
    border-radius: var(--app-radius);
    background: var(--app-surface);
    backdrop-filter: blur(var(--app-blur));
    -webkit-backdrop-filter: blur(var(--app-blur));
    border: 1px solid var(--app-border);
    box-shadow: var(--app-shadow);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
}

.data-table th,
.data-table td {
    padding: var(--spacing-sm) var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid var(--app-border-subtle);
    color: var(--app-text);
}

.data-table th {
    background: rgba(16, 24, 48, 0.9);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--app-text-secondary);
}

.data-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.data-table .date {
    white-space: nowrap;
}

.data-table .col-archivo {
    font-size: 0.85rem;
    color: var(--app-text-muted);
    max-width: 12rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.empty-state {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--app-text-muted);
}

.empty-state--friendly {
    padding: 3rem 2rem;
    text-align: center;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.empty-state-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--app-text-secondary);
    margin-bottom: 0.5rem;
}

.empty-state-desc {
    font-size: 0.9375rem;
    color: var(--app-text-muted);
    margin-bottom: 1.25rem;
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
}

/* Chip en celdas de tabla (temática, tipo) */
.td-chip {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 999px;
    background: var(--app-accent-soft);
    color: var(--app-accent);
    border: 1px solid rgba(13, 148, 136, 0.25);
}

.data-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.015);
}

.data-table tbody tr:hover {
    background: rgba(234, 179, 8, 0.06);
}

.data-table tbody tr {
    transition: background var(--app-transition);
}

/* ============================================
   Value cards
   ============================================ */

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.value-card {
    background: var(--app-surface);
    backdrop-filter: blur(var(--app-blur));
    -webkit-backdrop-filter: blur(var(--app-blur));
    padding: 1.5rem;
    border-radius: var(--app-radius);
    border: 1px solid var(--app-border);
    box-shadow: var(--app-shadow);
    transition: transform var(--app-transition), box-shadow var(--app-transition), border-color var(--app-transition);
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    overflow: hidden;
}

.value-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(234, 179, 8, 0.3), transparent);
    opacity: 0;
    transition: opacity var(--app-transition);
}

.value-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), var(--app-accent-glow);
    border-color: var(--app-border-accent);
}

.value-card:hover::before {
    opacity: 1;
}

.value-card-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--app-accent);
    margin-bottom: 0.75rem;
    opacity: 0.95;
}

.value-card-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--app-radius-sm);
    background: var(--app-accent-soft);
    color: var(--app-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.value-title {
    color: var(--app-text);
    margin-bottom: var(--spacing-sm);
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.value-description {
    color: var(--app-text-secondary);
    line-height: 1.6;
    font-size: 0.9rem;
}

/* ============================================
   Forms (standalone)
   ============================================ */

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--app-text-secondary);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: var(--spacing-sm);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
    font-family: var(--font-primary);
    font-size: 1rem;
    background: var(--app-bg-elevated);
    color: var(--app-text);
    transition: border-color var(--app-transition);
}

.form-group input:focus-visible,
.form-group textarea:focus-visible,
.form-group select:focus-visible {
    border-color: var(--app-accent);
    box-shadow: 0 0 0 2px var(--app-accent-soft);
}

.submit-button {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--app-accent);
    color: #fff;
    border: none;
    border-radius: var(--app-radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--app-transition);
}

.submit-button:hover {
    background: var(--app-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.35);
}

/* ============================================
   Footer — Mismo oscuro
   ============================================ */

.footer {
    background: rgba(7, 11, 22, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--app-border);
    box-shadow: 0 -1px 0 rgba(234, 179, 8, 0.06);
    color: var(--app-text-secondary);
    padding: var(--spacing-lg) 0 var(--spacing-md);
    margin-top: var(--spacing-xl);
    position: relative;
    z-index: 1;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.footer-title {
    color: var(--app-text);
    margin-bottom: var(--spacing-sm);
    font-size: 1.1rem;
}

.footer-text {
    color: var(--app-text-muted);
    line-height: 1.7;
    font-size: 0.95rem;
}

.footer-text a:hover {
    color: var(--app-accent);
}

.footer-copyright {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--app-border-subtle);
    color: var(--app-text-muted);
    font-size: 0.875rem;
}

/* ============================================
   Alert
   ============================================ */

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: var(--app-radius);
    padding: 1rem;
    color: var(--app-text-secondary);
    margin-bottom: var(--spacing-md);
}

.table-summary {
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: var(--app-text-muted);
}

.alert-warning code {
    background: var(--app-surface);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}

/* ============================================
   LIGHT MODE — Callivio CRM-style clean overrides
   ============================================ */

[data-theme="light"] .header {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .hero {
    background: linear-gradient(160deg, #f8f9fb 0%, #eef2f7 50%, #f2f4f8 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .hero::before {
    background: radial-gradient(ellipse 80% 60% at 30% 20%, rgba(234, 179, 8, 0.04) 0%, transparent 60%);
}

[data-theme="light"] .data-table th {
    background: #f1f3f7;
    color: var(--app-text-muted);
}

[data-theme="light"] .data-table tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.015);
}

[data-theme="light"] .data-table tbody tr:hover {
    background: rgba(234, 179, 8, 0.05);
}

[data-theme="light"] .value-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .value-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: rgba(234, 179, 8, 0.25);
}

[data-theme="light"] .value-card::before {
    background: linear-gradient(90deg, transparent, rgba(234, 179, 8, 0.15), transparent);
}

[data-theme="light"] .footer {
    background: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.03);
    backdrop-filter: none;
}

[data-theme="light"] .table-wrap {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    backdrop-filter: none;
}

[data-theme="light"] .filters-bar {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    backdrop-filter: none;
}

[data-theme="light"] .nav-menu a:hover {
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .theme-toggle {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filters-bar .form-group {
        min-width: 100%;
    }

    .values-grid {
        grid-template-columns: 1fr;
    }
}/* =====================================================
   dragon.css — Estilos web Spanish Dragon Class (SDC)
   Complementa oceanics.css (modo claro)
   ===================================================== */

/* ===================================================
   ANIMACIONES
   =================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* ===================================================
   SECCIONES
   =================================================== */
.section-light {
    background: #ffffff;
    padding: var(--spacing-xl) 0;
}

.section-soft {
    background: #f4f6fa;
    padding: var(--spacing-xl) 0;
}

.accent {
    color: var(--app-accent);
}

.highlight {
    color: var(--app-accent);
    font-weight: 600;
}

/* ===================================================
   NAV — extras
   =================================================== */
.nav-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.nav-burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--app-text);
    border-radius: 2px;
    transition: all 0.3s;
}

@media (max-width: 768px) {
    .nav-burger {
        display: flex;
    }
}

.nav-link.active-page {
    color: var(--app-bg) !important;
    background: var(--app-accent) !important;
}

/* Botón de idioma */
.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.85rem;
    border-radius: var(--app-radius-sm);
    border: 1.5px solid var(--app-border);
    color: var(--app-text-secondary) !important;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s ease;
    background: transparent;
    margin-left: 0.25rem;
}

.lang-btn:hover {
    border-color: var(--app-accent);
    color: var(--app-accent) !important;
    background: var(--app-accent-soft);
}

/* ===================================================
   HERO SPLIT — foto + texto con decorados
   =================================================== */
.hero-split {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding-top: var(--header-height);
    background: #fff;
    position: relative;
    overflow: hidden;
}

/* Lado texto */
.hero-split-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 5rem 4rem 5rem 5rem;
    position: relative;
    z-index: 1;
}

/* Decoración de fondo en el lado texto */
.hero-split-text::before {
    content: '';
    position: absolute;
    top: -80px;
    left: -80px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(30, 64, 128, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-split-text::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: 60px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(30, 64, 128, 0.07) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* Lado foto */
.hero-split-photo {
    position: relative;
    overflow: hidden;
}

.hero-split-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
    transition: transform 8s ease;
}

.hero-split-photo:hover img {
    transform: scale(1.03);
}

/* Overlay decorativo diagonal sobre la foto */
.hero-split-photo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.12) 0%,
            transparent 40%,
            rgba(30, 64, 128, 0.08) 100%);
    pointer-events: none;
}

/* Marco diagonal en la esquina izquierda de la foto */
.hero-split-photo::before {
    content: '';
    position: absolute;
    top: 0;
    left: -2px;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--app-accent), transparent);
    z-index: 2;
}

/* Cinta decorativa en la esquina superior derecha */
.hero-photo-badge {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(30, 64, 128, 0.3);
    border-radius: var(--app-radius);
    padding: 0.75rem 1rem;
    text-align: center;
    z-index: 3;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.hero-photo-badge-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--app-accent);
    line-height: 1;
}

.hero-photo-badge-label {
    font-size: 0.7rem;
    color: var(--app-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 0.2rem;
}

/* Contenido de texto del hero */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    background: rgba(30, 64, 128, 0.1);
    border: 1px solid rgba(30, 64, 128, 0.3);
    color: var(--app-accent);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease both;
    width: fit-content;
}

.hero-main-title {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
    animation: fadeInUp 0.7s 0.1s ease both;
    color: var(--app-text);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--app-text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
    animation: fadeInUp 0.7s 0.2s ease both;
    max-width: 420px;
}

.hero-cta-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.7s 0.3s ease both;
}

/* Decorador wave SVG al fondo del lado texto */
.hero-wave-deco {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    line-height: 0;
    pointer-events: none;
}

/* Responsive hero split */
@media (max-width: 900px) {
    .hero-split {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .hero-split-photo {
        height: 55vw;
        min-height: 280px;
        order: -1;
    }

    .hero-split-text {
        padding: 3rem 2rem;
    }

    .hero-split-text::before,
    .hero-split-text::after {
        display: none;
    }

    .hero-main-title {
        font-size: 2rem;
    }
}

/* Hero pequeño para páginas interiores */
.hero-inner {
    height: 45vh;
    min-height: 320px;
    background-size: cover;
    background-position: center bottom;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: var(--header-height);
    position: relative;
    overflow: hidden;
}

.hero-inner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0.05) 0%,
            rgba(0, 0, 0, 0.45) 100%);
}

.hero-inner-content {
    position: relative;
    z-index: 1;
    color: #fff;
}

.hero-inner-badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.hero-inner-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}

.hero-inner-sub {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 480px;
    margin: 0 auto;
}

/* ===================================================
   BOTONES
   =================================================== */
.btn-hero-primary {
    padding: 0.85rem 2rem;
    background: var(--app-accent);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: var(--app-radius);
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(30, 64, 128, 0.35);
    display: inline-block;
}

.btn-hero-primary:hover {
    background: var(--app-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(30, 64, 128, 0.5);
    color: #fff;
}

.btn-hero-secondary {
    padding: 0.85rem 2rem;
    background: transparent;
    color: var(--app-text);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--app-radius);
    border: 1.5px solid var(--app-border);
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
}

.btn-hero-secondary:hover {
    border-color: var(--app-accent);
    color: var(--app-accent);
}

.btn-outline {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    border: 2px solid var(--app-accent);
    color: var(--app-accent);
    border-radius: var(--app-radius);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-outline:hover {
    background: var(--app-accent);
    color: #fff;
}

/* ===================================================
   PILLARS — Misión / Visión / Valores
   =================================================== */
.pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin-top: 2.5rem;
}

@media (max-width: 768px) {
    .pillars-grid {
        grid-template-columns: 1fr;
    }

    .pillar-item+.pillar-item {
        border-top: 1px solid var(--app-border);
        border-left: none;
        padding-top: 2rem;
    }
}

.pillar-item {
    padding: 0 2.5rem 0 0;
    position: relative;
}

.pillar-item+.pillar-item {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
    border-left: 1px solid var(--app-border);
}

.pillar-item:last-child {
    padding-right: 0;
}

.pillar-num {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--app-accent);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    opacity: 0.7;
}

.pillar-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--app-text);
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.pillar-text {
    color: var(--app-text-secondary);
    font-size: 0.92rem;
    line-height: 1.75;
    margin: 0;
}



/* ===================================================
   ESTADÍSTICAS
   =================================================== */
.stats-strip {
    background: var(--app-accent);
    padding: 2rem 0;
}

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

@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-item {
    text-align: center;
    padding: 0.75rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    margin-bottom: 0.3rem;
    letter-spacing: -0.03em;
}

.stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ===================================================
   HISTORIA DEL DRAGÓN
   =================================================== */
.dragon-story {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

@media (max-width: 768px) {
    .dragon-story {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.dragon-visual {
    position: relative;
    border-radius: var(--app-radius-xl);
    overflow: hidden;
    aspect-ratio: 4/3;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(30, 64, 128, 0.2);
}

.dragon-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
    transition: transform 0.6s ease;
}

.dragon-visual:hover img {
    transform: scale(1.04);
}

.dragon-visual-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.3) 0%, transparent 50%);
}

.story-text h2 {
    font-size: 2rem;
    margin-bottom: 1.25rem;
}

.story-text p {
    color: var(--app-text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* ===================================================
   GALERÍA 3 FOTOS
   =================================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

.gallery-item {
    position: relative;
    border-radius: var(--app-radius-xl);
    overflow: hidden;
    aspect-ratio: 4/3;
    border: 1px solid var(--app-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: flex-end;
    padding: 1rem;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-caption {
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ===================================================
   LÍNEA DEL TIEMPO
   =================================================== */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: calc(2rem + 6px);
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(30, 64, 128, 0.5), var(--app-accent), rgba(30, 64, 128, 0.5), transparent);
}

.timeline-items {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.timeline-item {
    text-align: center;
    position: relative;
}

.timeline-dot {
    width: 12px;
    height: 12px;
    background: var(--app-accent);
    border-radius: 50%;
    margin: 0 auto 0.75rem;
    box-shadow: 0 0 12px rgba(30, 64, 128, 0.5);
}

.timeline-year {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--app-accent);
    margin-bottom: 0.3rem;
}

.timeline-desc {
    font-size: 0.8rem;
    color: var(--app-text-muted);
    line-height: 1.4;
}

@media (max-width: 768px) {
    .timeline::before {
        display: none;
    }

    .timeline-items {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
}

/* ===================================================
   REGATAS
   =================================================== */
.regatas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.regata-card {
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-xl);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.regata-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
    border-color: rgba(30, 64, 128, 0.4);
}

.regata-card-header {
    padding: 1.25rem 1.25rem 0;
    display: flex;
    justify-content: flex-end;
}

.regata-badge {
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.badge-proxima {
    background: rgba(30, 64, 128, 0.12);
    color: #163266;
    border: 1px solid rgba(30, 64, 128, 0.3);
}

.badge-clasica {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-campeonato {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.regata-card-body {
    padding: 0.75rem 1.25rem 1.25rem;
}

.regata-titulo {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--app-text);
    margin-bottom: 0.4rem;
}

.regata-lugar {
    font-size: 0.88rem;
    color: var(--app-text-secondary);
    margin-bottom: 0.5rem;
}

.regata-fecha {
    font-size: 0.85rem;
    color: var(--app-accent);
    font-weight: 600;
}

.regata-accent-line {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--app-accent), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.regata-card:hover .regata-accent-line {
    opacity: 1;
}

/* ===================================================
   FOTOTECA (GALLERY.HTML)
   =================================================== */

/* Barra de filtros / ordenación */
.fototeca-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.5rem 0 0.5rem;
    border-bottom: 1px solid var(--app-border);
    margin-bottom: 0.5rem;
}

.fototeca-count {
    font-size: 0.85rem;
    color: var(--app-text-secondary);
    font-weight: 500;
}

.fototeca-sort-group {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(30, 64, 128, 0.2);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(30, 64, 128, 0.08), inset 0 1px 0 rgba(255,255,255,0.8);
}

.fototeca-sort-btn {
    padding: 0.45rem 1.1rem;
    background: transparent;
    border: none;
    color: var(--app-text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.22s ease;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    letter-spacing: 0.02em;
}

.fototeca-sort-btn:hover {
    color: var(--app-accent);
    background: rgba(30, 64, 128, 0.06);
}

.fototeca-sort-btn.active {
    background: linear-gradient(135deg, rgba(30, 64, 128, 0.92), rgba(30, 64, 128, 0.75));
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}

.fototeca-sort-btn + .fototeca-sort-btn {
    border-left: 1px solid rgba(30, 64, 128, 0.15);
}

.fototeca-event {
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-xl);
    margin: 1.25rem 0;
    padding: 1rem 1rem 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.fototeca-event-head {
    margin-bottom: 0.5rem;
}

.fototeca-event-title {
    margin: 0;
    font-size: 1.2rem;
    color: var(--app-primary);
    font-family: 'Playfair Display', serif;
}

.fototeca-event-meta {
    color: var(--app-text-muted);
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

.fototeca-event-desc {
    margin: 0.55rem 0 0;
    color: var(--app-text-secondary);
    font-size: 0.94rem;
    line-height: 1.55;
}

.fototeca-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1rem;
    padding: 1rem 0;
}

.fototeca-thumb {
    position: relative;
    border-radius: var(--app-radius);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
    background: #f0f0f0;
}

.fototeca-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.fototeca-thumb:hover img {
    transform: scale(1.05);
}

.fototeca-thumb-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 1rem;
}

.fototeca-thumb:hover .fototeca-thumb-overlay {
    opacity: 1;
}

.fototeca-thumb-caption {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.fototeca-thumb:hover .fototeca-thumb-caption {
    transform: translateY(0);
}

.fototeca-more-btn {
    margin-top: 0.15rem;
}

/* Modal 70% Screen */
.fototeca-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.fototeca-modal.active {
    opacity: 1;
    pointer-events: all;
}

.fototeca-modal-content {
    position: relative;
    width: 70vw; /* 70% de la pantalla */
    height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.fototeca-slide-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.fototeca-modal-img {
    max-width: 100%;
    max-height: calc(100% - 40px);
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: fadeInUp 0.3s ease;
}

.fototeca-modal-caption {
    color: #fff;
    margin-top: 1rem;
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
}

/* Controles Fototeca Modal */
.fototeca-close {
    position: absolute;
    top: -40px;
    right: -40px;
    background: none;
    border: none;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.fototeca-close:hover {
    opacity: 1;
}

.fototeca-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.fototeca-nav:hover {
    background: rgba(255,255,255,0.2);
}

.fototeca-prev {
    left: -80px;
}

.fototeca-next {
    right: -80px;
}

@media (max-width: 900px) {
    .fototeca-modal-content {
        width: 90vw;
        height: 80vh;
    }
    .fototeca-nav {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    .fototeca-prev { left: 10px; }
    .fototeca-next { right: 10px; }
    .fototeca-close { right: 0; top: -50px; }
}

/* Notice banner */
.notice-banner {
    background: linear-gradient(135deg, rgba(30, 64, 128, 0.08) 0%, rgba(30, 64, 128, 0.04) 100%);
    border: 1.5px solid rgba(30, 64, 128, 0.25);
    border-radius: var(--app-radius-xl);
    padding: 1.75rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-top: 2.5rem;
}

.notice-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.notice-text h3 {
    color: #163266;
    margin-bottom: 0.2rem;
    font-size: 1.05rem;
}

.notice-text p {
    color: var(--app-text-secondary);
    margin: 0;
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .notice-banner {
        flex-direction: column;
        text-align: center;
    }
}

/* ===================================================
   MISIÓN / VISIÓN
   =================================================== */
.mission-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .mission-grid {
        grid-template-columns: 1fr;
    }
}

.mission-card {
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-xl);
    padding: 2rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.mission-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    border-color: rgba(30, 64, 128, 0.3);
}

.mission-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.mission-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.mission-text {
    color: var(--app-text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ===================================================
   JUNTA DIRECTIVA
   =================================================== */
.junta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 900px) {
    .junta-grid {
        grid-template-columns: 1fr;
        max-width: 380px;
        margin-left: auto;
        margin-right: auto;
    }
}

.junta-card {
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-xl);
    padding: 2.5rem 1.75rem;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
}

.junta-card.president {
    border-color: rgba(30, 64, 128, 0.4);
}

.junta-card.president::before {
    content: '👑';
    position: absolute;
    top: -0.6rem;
    right: 1rem;
    font-size: 1.4rem;
}

.junta-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0 auto 1rem;
    border: 3px solid;
}

.avatar-pres {
    background: rgba(30, 64, 128, 0.12);
    color: #163266;
    border-color: rgba(30, 64, 128, 0.35);
}

.avatar-vice {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border-color: rgba(16, 185, 129, 0.3);
}

.avatar-sec {
    background: rgba(99, 102, 241, 0.1);
    color: #4f46e5;
    border-color: rgba(99, 102, 241, 0.25);
}

.cargo-badge {
    display: inline-block;
    padding: 0.2rem 0.8rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
}

.badge-pres {
    background: rgba(30, 64, 128, 0.1);
    color: #163266;
    border: 1px solid rgba(30, 64, 128, 0.3);
}

.badge-vice {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-sec {
    background: rgba(99, 102, 241, 0.1);
    color: #4f46e5;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.junta-nombre {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.junta-bio {
    font-size: 0.88rem;
    color: var(--app-text-secondary);
    line-height: 1.6;
}

.junta-divider {
    width: 40px;
    height: 2px;
    background: var(--app-accent);
    margin: 0.75rem auto;
    border-radius: 2px;
    opacity: 0.4;
}

/* ===================================================
   QUOTE
   =================================================== */
.quote-block {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
    padding: 2.5rem;
    background: #fff;
    border: 1px solid rgba(30, 64, 128, 0.25);
    border-radius: var(--app-radius-xl);
    box-shadow: 0 4px 24px rgba(30, 64, 128, 0.08);
    position: relative;
}

.quote-mark {
    font-size: 5rem;
    line-height: 0.5;
    color: var(--app-accent);
    opacity: 0.25;
    font-family: Georgia, serif;
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
}

.quote-text {
    font-size: 1.15rem;
    font-style: italic;
    color: var(--app-text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.quote-author {
    color: var(--app-accent);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
}

/* ===================================================
   GALERÍA EMOJI
   =================================================== */
.galeria-wrap {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .galeria-wrap {
        grid-template-columns: repeat(3, 1fr);
    }
}

.galeria-item {
    aspect-ratio: 1;
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.galeria-item:hover {
    transform: scale(1.06);
    box-shadow: 0 4px 16px rgba(30, 64, 128, 0.15);
    border-color: rgba(30, 64, 128, 0.3);
}

/* ===================================================
   CONTACTO
   =================================================== */
.contact-layout {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 900px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }
}

.contact-form-card {
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-xl);
    padding: 2.5rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.contact-form-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.contact-form-subtitle {
    color: var(--app-text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.75rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-group {
    margin-bottom: 1.1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--app-text-secondary);
    font-weight: 500;
    font-size: 0.88rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    background: #f9fafb;
    color: var(--app-text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus-visible,
.form-group textarea:focus-visible,
.form-group select:focus-visible {
    border-color: var(--app-accent);
    box-shadow: 0 0 0 3px rgba(30, 64, 128, 0.1);
    background: #fff;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-submit {
    width: 100%;
    padding: 0.85rem;
    background: var(--app-accent);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    border-radius: var(--app-radius-sm);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.form-submit:hover {
    background: var(--app-accent-hover);
    transform: translateY(-1px);
}

.form-success {
    display: none;
    text-align: center;
    padding: 2rem;
}

.form-success-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.form-success h3 {
    color: #059669;
    margin-bottom: 0.5rem;
}

.form-success p {
    color: var(--app-text-secondary);
}

.contact-info-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-card {
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    padding: 1.25rem;
    transition: border-color 0.3s, transform 0.3s;
}

.info-card:hover {
    border-color: rgba(30, 64, 128, 0.4);
    transform: translateX(3px);
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
}

.info-icon {
    width: 2.2rem;
    height: 2.2rem;
    background: rgba(30, 64, 128, 0.1);
    border-radius: var(--app-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.info-card-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.info-card-content {
    color: var(--app-text-secondary);
    font-size: 0.88rem;
    line-height: 1.6;
    margin-left: 2.95rem;
}

.info-card-content a {
    color: var(--app-accent);
}

.junta-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .junta-mini-grid {
        grid-template-columns: 1fr;
    }
}

.junta-mini {
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    padding: 1.25rem;
    text-align: center;
    transition: transform 0.3s;
}

.junta-mini:hover {
    transform: translateY(-3px);
    border-color: rgba(30, 64, 128, 0.3);
}

.junta-mini-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 auto 0.6rem;
}

.av-pres {
    background: rgba(30, 64, 128, 0.12);
    color: #163266;
    border: 2px solid rgba(30, 64, 128, 0.3);
}

.av-vice {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 2px solid rgba(16, 185, 129, 0.25);
}

.av-sec {
    background: rgba(99, 102, 241, 0.1);
    color: #4f46e5;
    border: 2px solid rgba(99, 102, 241, 0.2);
}

.junta-mini-cargo {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--app-accent);
    margin-bottom: 0.25rem;
}

.junta-mini-nombre {
    font-size: 0.88rem;
    font-weight: 600;
}

.junta-mini-email {
    font-size: 0.75rem;
    color: var(--app-text-muted);
    margin-top: 0.2rem;
}

.junta-mini-email a {
    color: var(--app-accent);
}

/* ===================================================
   FAQ
   =================================================== */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 2rem;
}

.faq-item {
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 1rem 1.25rem;
    text-align: left;
    background: none;
    border: none;
    color: var(--app-text);
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: color 0.2s;
}

.faq-question:hover {
    color: var(--app-accent);
}

.faq-icon {
    color: var(--app-accent);
    font-size: 1.2rem;
    transition: transform 0.3s;
    flex-shrink: 0;
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0 1.25rem;
    color: var(--app-text-secondary);
    font-size: 0.88rem;
    line-height: 1.7;
}

.faq-item.open .faq-answer {
    max-height: 200px;
    padding: 0 1.25rem 1rem;
}

/* ===================================================
   LANGUAGE SWITCHER (JS)
   =================================================== */
.lang-switch {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-left: 0.5rem;
}

.lang-btn-js {
    background: none;
    border: 1px solid var(--app-border);
    color: var(--app-text-secondary);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn-js:hover {
    background: rgba(30, 64, 128, 0.05);
    border-color: var(--app-accent);
}

.lang-btn-js.active {
    background: var(--app-accent);
    color: #fff;
    border-color: var(--app-accent);
}

@media (max-width: 768px) {
    .lang-switch {
        margin-top: 1rem;
        justify-content: center;
    }
}

/* ===================================================
   HEADER DINÁMICO (SCROLL)
   =================================================== */
.header {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header.scrolled {
    padding: 0.5rem 0;
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header.scrolled .logo {
    transform: scale(0.95);
}

/* ===================================================
   ANIMACIONES DE REVELADO (SCROLL)
   =================================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered transition delays for timeline items */
.timeline-item.reveal:nth-child(1) {
    transition-delay: 0.1s;
}

.timeline-item.reveal:nth-child(2) {
    transition-delay: 0.3s;
}

.timeline-item.reveal:nth-child(3) {
    transition-delay: 0.5s;
}

.timeline-item.reveal:nth-child(4) {
    transition-delay: 0.7s;
}

/* Timeline minimalism enhancement */
.timeline-dot {
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.5);
    background: var(--app-accent);
    box-shadow: 0 0 15px var(--app-accent);
}

.timeline-year {
    transition: color 0.3s ease;
}

.timeline-item:hover .timeline-year {
    color: var(--app-accent);
    font-weight: 700;
}/* news.css - Estilos específicos para la sección de Noticias */

.news-article {
    background: var(--app-bg-surface);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 31, 63, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-article:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

@media (min-width: 768px) {
    .news-article {
        flex-direction: row;
    }
}

.news-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

@media (min-width: 768px) {
    .news-image {
        width: 40%;
        height: 100%;
        min-height: 350px;
    }
}

.news-content {
    padding: 2.5rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (min-width: 768px) {
    .news-content {
        width: 60%;
        padding: 3rem 4rem;
    }
}

.news-date {
    font-size: 0.85rem;
    color: var(--app-accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.news-title {
    font-size: 1.8rem;
    color: var(--app-primary);
    margin-bottom: 1.5rem;
    line-height: 1.3;
    font-family: 'Playfair Display', serif;
}

.news-text {
    color: var(--app-text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
    transition: max-height 0.4s ease;
}

.news-text.collapsed {
    max-height: 10.2em;
    overflow: hidden;
    position: relative;
}

.news-text.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3em;
    background: linear-gradient(transparent, var(--app-bg-surface));
    pointer-events: none;
}

.news-text p {
    margin-bottom: 1.25rem;
}

.news-text p:last-child {
    margin-bottom: 0;
}

.news-toggle-btn {
    background: none;
    border: none;
    color: var(--app-accent);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    display: none;
    align-items: center;
    gap: 0.35rem;
    transition: color 0.2s ease;
}

.news-toggle-btn:hover {
    color: var(--app-primary);
}

.news-toggle-btn.visible {
    display: inline-flex;
}
/* admin.css - Estilos compartidos para paneles de administración */

body {
    background: #f4f7f6;
}

.admin-container {
    max-width: 800px;
    margin: 4rem auto;
    background: #fff;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.admin-title {
    margin: 0;
    color: var(--app-primary);
    font-family: 'Playfair Display', serif;
}

.admin-links a {
    color: var(--app-text-secondary);
    text-decoration: none;
    margin-left: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.admin-links a:hover {
    color: var(--app-accent);
}

.btn-submit {
    background: var(--app-accent);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    font-size: 1rem;
    transition: background 0.3s;
}

.btn-submit:hover {
    background: #004c99;
}

/* ===================================================
   MOBILE / TOUCH — Correcciones responsivas
   =================================================== */

/* En dispositivos táctiles (sin hover real):
   mostrar siempre los overlays de galería y fototeca */
@media (hover: none) {
    /* Gallery overlay siempre visible en móvil */
    .gallery-item-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, transparent 60%);
    }

    /* Fototeca overlay siempre visible en móvil */
    .fototeca-thumb-overlay {
        opacity: 1;
    }

    .fototeca-thumb-caption {
        transform: translateY(0);
    }

    /* Desactivar elevación en cards (evita el efecto pegado al tocar) */
    .gallery-item:hover,
    .regata-card:hover,
    .news-article:hover,
    .junta-mini:hover,
    .galeria-item:hover,
    .fototeca-thumb:hover {
        transform: none;
        box-shadow: none;
    }

    /* Desactivar scale en imágenes al tocar */
    .gallery-item:hover img,
    .fototeca-thumb:hover img,
    .dragon-visual:hover img,
    .hero-split-photo:hover img {
        transform: none;
    }

    /* Asegurar que los botones de idioma sean fáciles de tocar */
    .lang-btn-js {
        min-height: 44px;
        min-width: 44px;
    }

    /* Área mínima táctil para el botón Ver más */
    .news-toggle-btn {
        min-height: 44px;
    }
}

/* Fix botón cerrar modal fototeca en móvil pequeño */
@media (max-width: 600px) {
    .fototeca-modal-content {
        width: 95vw;
        height: 85vh;
    }

    .fototeca-close {
        top: 0;
        right: 0;
        font-size: 2rem;
        background: rgba(0, 0, 0, 0.5);
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 1;
    }

    .fototeca-prev {
        left: 4px;
    }

    .fototeca-next {
        right: 4px;
    }

    /* Hero inner más compacto en móvil */
    .hero-inner {
        height: 38vh;
        min-height: 240px;
    }

    /* Texto hero interior más pequeño */
    .hero-inner-title {
        font-size: clamp(1.6rem, 6vw, 2.2rem);
    }

    .hero-inner-sub {
        font-size: 0.95rem;
        padding: 0 1rem;
    }

    /* News content padding más ajustado */
    .news-content {
        padding: 1.5rem;
    }

    /* News title más pequeño */
    .news-title {
        font-size: 1.4rem;
    }

    /* Secciones con menos padding vertical */
    .section-light,
    .section-soft {
        padding: var(--spacing-lg) 0;
    }

    /* Container con menos margen lateral */
    .container {
        padding: 0 1rem;
    }
}

/* ===================================================
   ACCESIBILIDAD — prefers-reduced-motion
   =================================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
