/* ==========================================================================
   COMPARADOR DE ORTOFOTOS HISTÓRICAS Y ACTUALES (RefCatastral.es)
   Estilos optimizados sin dependencias externas, 60fps y responsive móvil.
   ========================================================================== */

:root {
    --co-primary: #2563eb;
    --co-primary-dark: #1d4ed8;
    --co-primary-light: #eff6ff;
    --co-amber: #d97706;
    --co-amber-light: #fef3c7;
    --co-emerald: #059669;
    --co-emerald-light: #ecfdf5;
    --co-slate-800: #1e293b;
    --co-slate-900: #0f172a;
    --co-border: #e2e8f0;
    --co-card-bg: #ffffff;
    --co-radius: 12px;
    --co-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --co-shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
}

/* ── Hero & Cabecera ────────────────────────────────────────────── */
.co-hero {
    text-align: center;
    padding: 2.25rem 1rem 1.5rem;
    max-width: 960px;
    margin: 0 auto;
}

.co-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--co-amber-light);
    color: #92400e;
    border: 1px solid #fde68a;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.co-hero h1 {
    font-size: clamp(1.65rem, 3.5vw, 2.5rem);
    font-weight: 800;
    color: var(--co-slate-900);
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.co-hero p {
    font-size: clamp(0.95rem, 1.8vw, 1.125rem);
    color: #475569;
    line-height: 1.55;
    max-width: 780px;
    margin: 0 auto;
}

/* ── Pills de Lugares Emblemáticos (Presets) ────────────────────── */
.co-presets-wrap {
    max-width: 1240px;
    margin: 0 auto 1.25rem;
    padding: 0 1rem;
}

.co-presets-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}

.co-presets-scroll {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.co-presets-scroll::-webkit-scrollbar {
    display: none;
}

.co-preset-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    background: #ffffff;
    border: 1px solid var(--co-border);
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.co-preset-btn:hover {
    background: var(--co-primary-light);
    border-color: #bfdbfe;
    color: var(--co-primary);
    transform: translateY(-1px);
}

.co-preset-btn.active {
    background: var(--co-primary);
    border-color: var(--co-primary);
    color: #ffffff;
}

/* ── Contenedor Principal del Comparador ────────────────────────── */
.co-app-container {
    max-width: 1240px;
    margin: 0 auto 2.5rem;
    padding: 0 1rem;
}

.co-card {
    background: var(--co-card-bg);
    border: 1px solid var(--co-border);
    border-radius: var(--co-radius);
    box-shadow: var(--co-shadow);
    overflow: hidden;
}

/* ── Barra Superior: Búsqueda y Capas ───────────────────────────── */
.co-toolbar {
    background: #f8fafc;
    border-bottom: 1px solid var(--co-border);
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 900px) {
    .co-toolbar {
        padding: 0.85rem 1.25rem;
    }
}

/* Fila de Búsqueda */
.co-search-row {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.co-search-input-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

.co-search-icon {
    position: absolute;
    left: 0.85rem;
    color: #94a3b8;
    pointer-events: none;
}

.co-search-input {
    width: 100%;
    padding: 0.65rem 2.25rem 0.65rem 2.5rem;
    border: 1.5px solid var(--co-border);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--co-slate-900);
    background: #ffffff;
    transition: all 0.15s ease;
}

.co-search-input:focus {
    outline: none;
    border-color: var(--co-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.co-search-clear {
    position: absolute;
    right: 0.6rem;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.25rem;
    display: none;
    border-radius: 50%;
}

.co-search-clear:hover {
    color: #475569;
}

.co-btn-search {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 1.15rem;
    background: var(--co-primary);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
    white-space: nowrap;
}

.co-btn-search:hover {
    background: var(--co-primary-dark);
}

.co-btn-gps {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 0.9rem;
    background: #ffffff;
    color: #334155;
    border: 1.5px solid var(--co-border);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.co-btn-gps:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: var(--co-primary);
}

/* Fila de Capas y Controles */
.co-controls-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.co-selectors-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    flex: 1;
}

.co-select-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: #ffffff;
    border: 1.5px solid var(--co-border);
    border-radius: 8px;
    padding: 0.3rem 0.6rem;
}

.co-select-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.co-badge-left {
    background: #fef3c7;
    color: #92400e;
}

.co-badge-right {
    background: #ecfdf5;
    color: #065f46;
}

.co-select {
    border: none;
    background: transparent;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--co-slate-900);
    font-family: inherit;
    cursor: pointer;
    outline: none;
    max-width: 200px;
}

@media (max-width: 640px) {
    .co-hero {
        padding: 1.5rem 0.75rem 0.75rem;
    }
    .co-hero-badge {
        font-size: 0.72rem;
        padding: 0.25rem 0.65rem;
    }
    .co-hero h1 {
        font-size: 1.45rem;
    }
    .co-hero p {
        font-size: 0.85rem;
        line-height: 1.45;
    }
    .co-presets-wrap {
        padding: 0 0.5rem;
        margin-bottom: 0.75rem;
    }
    .co-preset-btn {
        font-size: 0.75rem;
        padding: 0.3rem 0.65rem;
    }
    .co-presets-label {
        font-size: 0.75rem;
    }
    .co-app-container {
        padding: 0 0.4rem;
    }
    .co-toolbar {
        padding: 0.65rem 0.6rem;
        gap: 0.5rem;
    }

    /* Buscador: Input 100% en fila 1, botones en fila 2 */
    .co-search-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.45rem;
    }
    .co-search-input-wrap {
        grid-column: 1 / -1;
        width: 100%;
    }
    .co-search-input {
        font-size: 0.85rem;
        padding: 0.6rem 2rem 0.6rem 2.25rem;
    }
    .co-search-icon {
        left: 0.7rem;
        width: 16px;
        height: 16px;
    }
    .co-btn-search {
        width: 100%;
        justify-content: center;
        padding: 0.55rem 0.75rem;
        font-size: 0.825rem;
    }
    .co-btn-gps {
        width: 100%;
        justify-content: center;
        padding: 0.55rem 0.75rem;
        font-size: 0.825rem;
    }

    /* Selectores de capas */
    .co-controls-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    .co-selectors-group {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0.45rem;
    }
    .co-select-wrap {
        width: 100%;
        box-sizing: border-box;
        padding: 0.35rem 0.55rem;
        display: flex;
        align-items: center;
        gap: 0.45rem;
    }
    .co-select-badge {
        font-size: 0.7rem;
        padding: 0.18rem 0.45rem;
        flex-shrink: 0;
    }
    .co-select {
        flex: 1;
        min-width: 0;
        width: 100%;
        max-width: none;
        font-size: 0.8rem;
        text-align: left;
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
    }

    /* Fila de acciones y linderos */
    .co-actions-group {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.35rem;
    }
    .co-toggle-label {
        flex: 1 1 auto;
        padding: 0.38rem 0.45rem;
        font-size: 0.75rem;
        gap: 0.35rem;
        white-space: nowrap;
    }
    .co-toggle-label input[type="checkbox"] {
        width: 15px;
        height: 15px;
    }
    .co-btn-action {
        padding: 0.38rem 0.55rem;
        font-size: 0.75rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
}

.co-actions-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Toggle Linderos Catastro */
.co-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
    background: #ffffff;
    border: 1.5px solid var(--co-border);
    border-radius: 8px;
    padding: 0.4rem 0.65rem;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease;
}

.co-toggle-label:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.co-toggle-label input[type="checkbox"] {
    accent-color: var(--co-primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.co-btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.42rem 0.75rem;
    background: #ffffff;
    color: #334155;
    border: 1.5px solid var(--co-border);
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.co-btn-action:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: var(--co-primary);
}

/* ── Viewport del Mapa y Cortinilla ─────────────────────────────── */
.co-viewport-wrap {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    background: #0f172a;
}

@media (max-width: 768px) {
    .co-viewport-wrap {
        height: 400px;
    }
}
@media (max-width: 480px) {
    .co-viewport-wrap {
        height: 400px;
    }
}

.co-map-hud {
    position: absolute;
    bottom: 34px;
    left: 12px;
    z-index: 995;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    pointer-events: none;
}

.co-coords-badge {
    background: rgba(15, 23, 42, 0.84);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #f8fafc;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.74rem;
    padding: 4px 9px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
    pointer-events: none;
    white-space: nowrap;
}

.co-map-fs-btn {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.co-map-fs-btn:hover {
    background: #0f172a;
    border-color: rgba(96, 165, 250, 0.75);
    color: #ffffff;
}

.co-map-fs-btn:focus-visible {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}

.co-map-fs-btn .co-fs-exit-icon,
.co-map-fs-btn.is-fullscreen .co-fs-enter-icon {
    display: none;
}

.co-map-fs-btn .co-fs-enter-icon,
.co-map-fs-btn.is-fullscreen .co-fs-exit-icon {
    display: inline-flex;
}

@media (max-width: 640px) {
    .co-map-hud {
        bottom: 32px;
        left: 10px;
        gap: 5px;
    }
    .co-coords-badge {
        font-size: 0.68rem;
        padding: 3px 7px;
        max-width: calc(100vw - 88px);
    }
    .co-map-fs-btn {
        font-size: 0.72rem;
        padding: 4px 8px;
    }
    .co-viewport-wrap .leaflet-control-attribution {
        font-size: 9px;
        padding: 1px 4px;
        max-width: 62%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

#map-comparador {
    width: 100%;
    height: 100%;
    z-index: 10;
    background: #1e293b;
}

/* ── Pane de Linderos Catastrales Oficiales (DGC) ───────────────────
   Z-index 450 para situarse siempre sobre las ortofotos (leftPane 300 y tilePane 200).
   Doble halo blanco perimetral (drop-shadow) para resaltar con máxima nitidez
   tanto sobre vuelos oscuros (sombras B/N 1956) como sobre fotos PNOA en color. */
.leaflet-pane.leaflet-catastroPane-pane {
    z-index: 450 !important;
    pointer-events: none !important;
    filter: drop-shadow(0 0 1px #ffffff) drop-shadow(0 0 1.2px #ffffff);
    -webkit-filter: drop-shadow(0 0 1px #ffffff) drop-shadow(0 0 1.2px #ffffff);
}

.leaflet-pane.leaflet-catastroPane-pane img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Badges Flotantes sobre el Mapa */
.co-map-badge {
    position: absolute;
    top: 14px;
    z-index: 990;
    padding: 0.45rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.co-map-badge-left {
    left: 14px;
    background: rgba(15, 23, 42, 0.85);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.35);
}

.co-map-badge-right {
    right: 14px;
    background: rgba(6, 95, 70, 0.88);
    color: #ffffff;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

@media (max-width: 640px) {
    .co-map-badge {
        font-size: 0.68rem;
        padding: 0.22rem 0.48rem;
        top: 8px;
        max-width: calc(50% - 14px);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        box-sizing: border-box;
    }
    .co-map-badge-left {
        left: 8px;
    }
    .co-map-badge-right {
        right: 8px;
        justify-content: flex-end;
    }
}
@media (max-width: 380px) {
    .co-map-badge {
        font-size: 0.64rem;
        padding: 0.18rem 0.4rem;
        max-width: calc(50% - 12px);
    }
    .co-toggle-label span {
        font-size: 0.72rem;
    }
}

/* ── Divisor y Handle de la Cortinilla (Swipe Slider) ────────────── */
#co-divider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: #ffffff;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.6), 0 0 2px rgba(0, 0, 0, 0.9);
    z-index: 1000;
    cursor: ew-resize;
    pointer-events: auto;
    touch-action: none;
    will-change: left;
}

#co-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 46px;
    height: 46px;
    background: #ffffff;
    border: 2.5px solid var(--co-primary);
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), 0 0 0 4px rgba(37, 99, 235, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--co-primary);
    cursor: ew-resize;
    user-select: none;
    touch-action: none;
    transition: transform 0.1s ease, box-shadow 0.15s ease;
}

#co-handle:hover,
#co-handle:active {
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45), 0 0 0 6px rgba(37, 99, 235, 0.25);
    background: #eff6ff;
}

#co-handle svg {
    width: 22px;
    height: 22px;
    pointer-events: none;
}

/* Pantalla Completa (Fullscreen) */
.co-card.is-fullscreen,
.co-card:fullscreen,
.co-card:-webkit-full-screen {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    z-index: 999999 !important;
    display: flex;
    flex-direction: column;
}

.co-card.is-fullscreen .co-viewport-wrap,
.co-card:fullscreen .co-viewport-wrap,
.co-card:-webkit-full-screen .co-viewport-wrap {
    flex: 1;
    height: 100% !important;
    max-height: none !important;
    min-height: 0 !important;
}

/* Toast de Enlace Copiado */
.co-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--co-slate-900);
    color: #ffffff;
    padding: 0.65rem 1.25rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    z-index: 1000000;
    opacity: 0;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.co-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ── Guía Editorial y Casos Prácticos ───────────────────────────── */
.co-guide-section {
    max-width: 1240px;
    margin: 3.5rem auto 2.5rem;
    padding: 0 1rem;
}

.co-section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2.5rem;
}

.co-section-header h2 {
    font-size: clamp(1.4rem, 2.8vw, 2rem);
    font-weight: 800;
    color: var(--co-slate-900);
    margin-bottom: 0.6rem;
}

.co-section-header p {
    font-size: 1rem;
    color: #64748b;
    line-height: 1.5;
}

.co-grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.co-guide-card {
    background: #ffffff;
    border: 1px solid var(--co-border);
    border-radius: var(--co-radius);
    padding: 1.5rem;
    box-shadow: var(--co-shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.co-guide-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--co-shadow-lg);
}

.co-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.co-card-icon.amber {
    background: var(--co-amber-light);
    color: #b45309;
}

.co-card-icon.blue {
    background: var(--co-primary-light);
    color: var(--co-primary);
}

.co-card-icon.emerald {
    background: var(--co-emerald-light);
    color: var(--co-emerald);
}

.co-card-icon.purple {
    background: #f3e8ff;
    color: #7e22ce;
}

.co-guide-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--co-slate-900);
    margin-bottom: 0.5rem;
}

.co-guide-card p {
    font-size: 0.875rem;
    color: #475569;
    line-height: 1.55;
    margin: 0;
}

/* ── Tabla Resumen de Vuelos Históricos ─────────────────────────── */
.co-table-wrap {
    background: #ffffff;
    border: 1px solid var(--co-border);
    border-radius: var(--co-radius);
    box-shadow: var(--co-shadow);
    overflow-x: auto;
    margin-bottom: 3.5rem;
    padding: 1.25rem;
}

.co-table-wrap h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--co-slate-900);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.co-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    text-align: left;
}

.co-table th {
    background: #f8fafc;
    color: #334155;
    font-weight: 700;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--co-border);
    white-space: nowrap;
}

.co-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--co-border);
    color: #475569;
}

.co-table tr:last-child td {
    border-bottom: none;
}

.co-table tr:hover td {
    background: #f8fafc;
}

.co-table-pill {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    background: #e2e8f0;
    color: #334155;
}

/* ── FAQ Acordeón ───────────────────────────────────────────────── */
.co-faq-wrap {
    max-width: 900px;
    margin: 0 auto 3.5rem;
}

.co-faq-item {
    background: #ffffff;
    border: 1px solid var(--co-border);
    border-radius: 10px;
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: border-color 0.15s ease;
}

.co-faq-item:focus-within,
.co-faq-item.open {
    border-color: #93c5fd;
}

.co-faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.25rem;
    background: transparent;
    border: none;
    font-size: 1rem;
    font-weight: 700;
    color: var(--co-slate-900);
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    gap: 1rem;
}

.co-faq-question:hover {
    color: var(--co-primary);
}

.co-faq-chevron {
    transition: transform 0.2s ease;
    flex-shrink: 0;
    color: #64748b;
}

.co-faq-item.open .co-faq-chevron {
    transform: rotate(180deg);
    color: var(--co-primary);
}

.co-faq-answer {
    padding: 0 1.25rem 1.25rem;
    font-size: 0.925rem;
    color: #475569;
    line-height: 1.6;
    display: none;
}

.co-faq-item.open .co-faq-answer {
    display: block;
}


/* ── Avisos en el Espacio del Mapa (Izquierda / Derecha) ───────────
   Aparecen centrados dentro del espacio correspondiente si el vuelo
   seleccionado no dispone de ortofotos registradas en ese territorio. */
.co-side-notice {
    position: absolute;
    top: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 350; /* Superior a ortofotos (leftPane 300, tilePane 200), inferior a cortinilla (1000) */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    box-sizing: border-box;
    overflow: hidden;
    transition: opacity 0.2s ease, width 0.05s linear, left 0.05s linear;
}

.co-side-notice-left {
    left: 0;
    width: 50%;
}

.co-side-notice-right {
    left: 50%;
    width: 50%;
}

.co-side-notice-card {
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1.5px solid rgba(245, 158, 11, 0.55);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    max-width: 340px;
    width: 90%;
    text-align: center;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
    pointer-events: auto;
    color: #f8fafc;
    animation: fadeInSideNotice 0.25s ease-out;
}

@keyframes fadeInSideNotice {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.co-side-notice-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.15);
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    margin-bottom: 0.55rem;
}

.co-side-notice-badge svg {
    color: #f59e0b;
    flex-shrink: 0;
}

.co-side-notice-layer {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.35rem;
}

.co-side-notice-desc {
    margin: 0 0 0.85rem;
    font-size: 0.8rem;
    line-height: 1.45;
    color: #cbd5e1;
}

.co-side-notice-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 7px;
    padding: 0.45rem 0.85rem;
    font-size: 0.775rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
}

.co-side-notice-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    .co-side-notice {
        padding: 0.5rem;
    }
    .co-side-notice-card {
        padding: 0.65rem 0.75rem;
        width: 95%;
        max-width: 280px;
    }
    .co-side-notice-badge {
        font-size: 0.65rem;
        padding: 0.18rem 0.5rem;
        margin-bottom: 0.4rem;
    }
    .co-side-notice-layer {
        font-size: 0.825rem;
        margin-bottom: 0.25rem;
    }
    .co-side-notice-desc {
        font-size: 0.72rem;
        line-height: 1.35;
        margin-bottom: 0.6rem;
    }
    .co-side-notice-btn {
        padding: 0.38rem 0.65rem;
        font-size: 0.72rem;
    }
}


/* ── Guía Editorial y Artículo Extenso en Español ────────────────── */
.co-article-wrap {
    background: #ffffff;
    border: 1px solid var(--co-border);
    border-radius: var(--co-radius);
    padding: clamp(1.75rem, 4vw, 3.5rem);
    box-shadow: var(--co-shadow);
    margin-bottom: 3.5rem;
}

.co-article-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.8125rem;
    font-weight: 700;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    margin-bottom: 1.25rem;
    border: 1px solid #bfdbfe;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.co-article-title {
    font-size: clamp(1.65rem, 3.2vw, 2.35rem);
    font-weight: 800;
    color: var(--co-slate-900);
    line-height: 1.25;
    margin-bottom: 1.25rem;
    letter-spacing: -0.025em;
}

.co-article-lead {
    font-size: 1.125rem;
    color: #334155;
    line-height: 1.75;
    margin-bottom: 2.25rem;
    font-weight: 500;
    border-left: 4px solid var(--co-primary);
    padding-left: 1.25rem;
    background: #f8fafc;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    border-radius: 0 8px 8px 0;
}

.co-article-body h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--co-slate-900);
    margin-top: 2.75rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.co-article-body h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.co-article-body p {
    font-size: 1rem;
    color: #475569;
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.co-article-body ul, .co-article-body ol {
    margin: 1rem 0 1.5rem 1.5rem;
    color: #475569;
    line-height: 1.75;
}

.co-article-body li {
    margin-bottom: 0.6rem;
}

.co-article-body strong {
    color: #0f172a;
}

/* Callouts y Diagramas */
.co-callout-box {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-left: 4px solid #3b82f6;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin: 1.75rem 0;
}

.co-callout-box.amber {
    background: #fffbeb;
    border-color: #fde68a;
    border-left-color: #f59e0b;
}

.co-callout-box.emerald {
    background: #ecfdf5;
    border-color: #a7f3d0;
    border-left-color: #10b981;
}

.co-callout-title {
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

/* Steps / Workflow */
.co-steps-flow {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.co-step-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.25rem;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.co-step-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.co-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: var(--co-primary);
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 800;
    border-radius: 50%;
    margin-bottom: 0.85rem;
}

.co-step-card h5 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.45rem;
    line-height: 1.35;
}

.co-step-card p {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.55;
    margin: 0;
}

/* ── Botón Descargar en Barra de Herramientas ─────────────────────── */
.co-btn-download {
    background: #ffffff;
    color: #1e293b;
    border-color: var(--co-border);
}

.co-btn-download:hover {
    background: #f0fdf4;
    border-color: #86efac;
    color: #15803d;
}

@media (max-width: 640px) {
    .co-btn-download span {
        display: none;
    }
}

/* ── Modal de Descarga de Ortofotos ────────────────────────────────── */
.co-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
    animation: coFadeIn 0.18s ease-out;
}

@keyframes coFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.co-modal-dialog {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 680px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: coSlideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes coSlideUp {
    from { transform: translateY(16px) scale(0.98); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.co-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.co-modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.co-modal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #dbeafe;
    color: #2563eb;
    border-radius: 8px;
    flex-shrink: 0;
}

.co-modal-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
}

.co-modal-close {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    line-height: 1;
    transition: background 0.15s ease, color 0.15s ease;
}

.co-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.co-modal-body {
    padding: 1.15rem 1.25rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

/* Contenedor de Vista Previa */
.co-preview-container {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.co-preview-wrapper {
    position: relative;
    width: 100%;
    height: 240px;
    background: #0f172a;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5e1;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.co-export-canvas {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.co-preview-loader {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
}

.co-preview-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

.co-preview-sep {
    color: #cbd5e1;
}

/* Opciones de Modal */
.co-modal-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.co-option-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.co-option-group-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.co-mode-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.co-mode-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    border: 1.5px solid #cbd5e1;
    background: #f8fafc;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
}

.co-mode-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #1e293b;
}

.co-mode-btn.active {
    background: #eff6ff;
    border-color: #2563eb;
    color: #1d4ed8;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.15);
}

.co-mode-btn svg {
    flex-shrink: 0;
}

.co-checkbox-row {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
}

.co-checkbox-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: #334155;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
}

.co-checkbox-item input[type="checkbox"] {
    accent-color: #2563eb;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Footer de Modal */
.co-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.25rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.co-format-select-wrap {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
}

.co-format-select {
    padding: 0.38rem 0.65rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    font-size: 0.82rem;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
}

.co-modal-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.co-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.95rem;
    background: #ffffff;
    color: #334155;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.co-btn-secondary:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.co-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1.15rem;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}

.co-btn-primary:hover {
    background: #1d4ed8;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.4);
}

@media (max-width: 640px) {
    .co-modal-dialog {
        max-height: 96vh;
    }
    .co-mode-buttons {
        grid-template-columns: 1fr;
    }
    .co-preview-wrapper {
        height: 180px;
    }
    .co-modal-footer {
        flex-direction: column;
        align-items: stretch;
    }
    .co-format-select-wrap {
        justify-content: space-between;
        width: 100%;
    }
    .co-modal-actions {
        flex-direction: column;
        width: 100%;
    }
    .co-modal-actions button {
        width: 100%;
        justify-content: center;
    }
}
