/* ==========================================================================
   GUÍA CAZORLA - Estilos v2.2.0
   Mejoras móvil: header compacto 1-línea, cards horizontales, modal fullscreen,
   acciones sticky, safe-areas, landscape, thumb-zone, touch feedback
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CUSTOM PROPERTIES
   -------------------------------------------------------------------------- */
:root {
  --color-bg: #f8fafc;
  --color-bg-subtle: #f1f5f9;
  --color-surface: #ffffff;
  --color-text: #0f172a;
  --color-text-muted: #475569;
  --color-border: rgba(148, 163, 184, 0.2);
  --color-interactive: #0ea5e9;
  --color-interactive-hover: #0284c7;
  --color-interactive-fg: #ffffff;
  --color-gps-active: #10b981;
  --color-gps-hover: #059669;
  --color-audio-accent: #db2777;
  --color-error: #dc2626;
  --color-warning: #f59e0b;
  --color-success: #10b981;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 4px 15px rgba(14, 165, 233, 0.25);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-size-xs: 12px;
  --font-size-sm: 13px;
  --font-size-base: 15px;
  --font-size-lg: 17px;
  --font-size-xl: 20px;
  --font-size-2xl: 24px;
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
  --z-header: 100;
  --z-modal: 2000;
  --z-modal-legal: 2500;
  --z-toast: 3000;
  --z-offline: 3500;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0f172a;
    --color-bg-subtle: #1e293b;
    --color-surface: #1e293b;
    --color-text: #f1f5f9;
    --color-text-muted: #94a3b8;
    --color-border: rgba(255, 255, 255, 0.1);
    --color-interactive: #38bdf8;
    --color-interactive-hover: #7dd3fc;
    --color-interactive-fg: #0f172a;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
  }
}

/* --------------------------------------------------------------------------
   2. RESET Y BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  padding-top: var(--safe-top);
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 2px solid var(--color-interactive); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* --------------------------------------------------------------------------
   3. 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; }
  html { scroll-behavior: auto; }
  .card:hover { transform: none; }
  .card:hover .cardImg { transform: none; }
  .skeleton-card { animation: none; background: var(--color-bg-subtle); }
}

/* --------------------------------------------------------------------------
   4. BANNER OFFLINE
   -------------------------------------------------------------------------- */
.offline-banner { position: fixed; top: var(--safe-top); left: 0; right: 0; z-index: var(--z-offline); background: linear-gradient(135deg, #f59e0b, #d97706); color: white; text-align: center; padding: var(--space-sm) var(--space-md); font-size: var(--font-size-sm); font-weight: 600; box-shadow: var(--shadow-md); }
.offline-banner[hidden] { display: none; }
.offline-banner.online { background: linear-gradient(135deg, #10b981, #059669); }

/* --------------------------------------------------------------------------
   5. HEADER
   -------------------------------------------------------------------------- */
.header { position: sticky; top: 0; z-index: var(--z-header); background: rgba(255,255,255,0.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--color-border); padding: var(--space-sm) 0; }
@media (prefers-color-scheme: dark) { .header { background: rgba(15,23,42,0.95); } }
.headerInner { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--space-md); display: flex; flex-direction: column; align-items: center; gap: var(--space-sm); }
.brand { display: flex; align-items: center; justify-content: center; padding: var(--space-xs); border-radius: var(--radius-sm); transition: opacity var(--transition-fast); }
.brand:hover { opacity: 0.8; }
.brand b { font-size: var(--font-size-xl); font-weight: 800; letter-spacing: -0.5px; text-transform: uppercase; color: var(--color-text); }
.controls { display: flex; flex-wrap: wrap; gap: var(--space-sm); width: 100%; justify-content: center; }

/* ★ MÓVIL: Header compacto en una sola línea */
@media (max-width: 480px) {
  .header { padding: var(--space-xs) 0; }
  .headerInner { flex-direction: row; justify-content: space-between; align-items: center; gap: var(--space-xs); padding: 0 var(--space-sm); }
  .brand { padding: 2px; }
  .brand b { font-size: 14px; letter-spacing: 0; }
  .controls { width: auto; flex-wrap: nowrap; gap: var(--space-xs); }
  .controls .btn { padding: 6px 10px; font-size: 11px; min-height: 36px; flex: none; width: auto; }
  .controls .input { min-width: 65px; max-width: 95px; padding: 6px 8px; font-size: 11px; flex: none; }
}

/* --------------------------------------------------------------------------
   6. INPUTS Y SELECT
   -------------------------------------------------------------------------- */
.input { background: var(--color-bg-subtle); border: 1px solid transparent; color: var(--color-text); padding: var(--space-sm) var(--space-md); border-radius: var(--radius-full); font-size: var(--font-size-sm); outline: none; cursor: pointer; transition: all var(--transition-fast); flex: 1; min-width: 100px; text-align: center; }
.input:hover { border-color: var(--color-border); }
.input:focus { box-shadow: 0 0 0 3px rgba(14,165,233,0.2); border-color: var(--color-interactive); }

/* --------------------------------------------------------------------------
   7. BOTONES
   -------------------------------------------------------------------------- */
.btn { border: none; border-radius: var(--radius-md); padding: 10px 14px; font-size: var(--font-size-sm); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--color-bg-subtle); color: var(--color-text); transition: all var(--transition-fast); flex: 1; white-space: nowrap; min-height: 44px; }
.btn:hover { filter: brightness(0.95); }
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--color-interactive); color: var(--color-interactive-fg); box-shadow: var(--shadow-glow); }
.btn.primary:hover { background: var(--color-interactive-hover); }
.btn.ghost { background: transparent; color: var(--color-text-muted); }
.btn.ghost:hover { background: var(--color-bg-subtle); color: var(--color-text); }
.btn.full { width: 100%; }
.btn.gps { background: var(--color-gps-active); color: white; box-shadow: 0 4px 12px rgba(16,185,129,0.3); font-weight: 700; border: 1px solid rgba(255,255,255,0.1); }
.btn.gps:hover { background: var(--color-gps-hover); }
.btn.gps.active { opacity: 0.85; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 4px 12px rgba(16,185,129,0.3); } 50% { box-shadow: 0 4px 20px rgba(16,185,129,0.5); } }
.btn.install { background: linear-gradient(135deg, #6366f1, #a855f7); color: white; box-shadow: 0 4px 15px rgba(168,85,247,0.3); font-weight: 700; border: 1px solid rgba(255,255,255,0.1); }
.btn.back-btn { background: linear-gradient(135deg, #f97316, #ea580c); color: white; box-shadow: 0 4px 15px rgba(249,115,22,0.4); font-weight: 700; border: 1px solid rgba(255,255,255,0.1); order: -1; }
.btn.back-btn:hover { background: linear-gradient(135deg, #ea580c, #c2410c); }
.btn.back-btn[hidden] { display: none; }
.btn.back-btn svg { flex-shrink: 0; }
.btn.map-icon { background: rgba(14,165,233,0.1); color: var(--color-interactive); border: 1px solid rgba(14,165,233,0.3); width: 48px; height: 48px; flex: none; border-radius: var(--radius-md); padding: 0; }
.btn.map-icon svg { width: 24px; height: 24px; stroke-width: 2; }
.btn.map-icon:hover { background: var(--color-interactive); color: white; border-color: var(--color-interactive); }
.btn.audio-big { background: rgba(236,72,153,0.1); border: 1px solid rgba(236,72,153,0.3); color: var(--color-audio-accent); width: 48px; height: 48px; border-radius: var(--radius-md); flex: none; padding: 0; }
.btn.audio-big svg { width: 24px; height: 24px; fill: currentColor; }
.btn.audio-big:hover, .btn.audio-big:active { background: var(--color-audio-accent); color: white; }
.btn-close { padding: var(--space-sm); flex: none; }

/* --------------------------------------------------------------------------
   8. LAYOUT PRINCIPAL
   -------------------------------------------------------------------------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--space-lg) var(--space-2xl); padding-left: max(var(--space-lg), var(--safe-left)); padding-right: max(var(--space-lg), var(--safe-right)); }
@media (max-width: 480px) { .container { padding: 0 var(--space-sm) var(--space-xl); } }
.topRow { display: flex; align-items: center; justify-content: space-between; margin: var(--space-lg) 0; gap: var(--space-md); }
@media (max-width: 480px) { .topRow { margin: var(--space-sm) 0; gap: var(--space-sm); } }
.loc-status { font-size: var(--font-size-sm); color: var(--color-text-muted); min-height: 20px; }
.viewToggle { background: var(--color-bg-subtle); padding: var(--space-xs); border-radius: var(--radius-full); display: flex; }
.tabBtn { border: none; background: transparent; color: var(--color-text-muted); padding: var(--space-sm) var(--space-md); font-size: var(--font-size-sm); font-weight: 600; border-radius: var(--radius-full); cursor: pointer; transition: all var(--transition-fast); min-height: 40px; }
.tabBtn[aria-selected="true"] { background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-sm); }
.tabBtn:hover:not([aria-selected="true"]) { color: var(--color-text); }

/* --------------------------------------------------------------------------
   9. GRID Y CARDS
   -------------------------------------------------------------------------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--space-lg); container-type: inline-size; }

/* ★ MÓVIL: Cards horizontales compactas */
@media (max-width: 480px) {
  .grid { grid-template-columns: 1fr; gap: var(--space-sm); }
  .card { flex-direction: row; min-height: 0; border-radius: var(--radius-md); }
  .card .imgBtn { width: 105px; min-width: 105px; aspect-ratio: 1/1; border-radius: var(--radius-md) 0 0 var(--radius-md); }
  .card .cardBody { padding: var(--space-sm) var(--space-md); gap: 2px; }
  .card .cardTitle b { font-size: 14px; line-height: 1.2; }
  .card .desc { font-size: 12px; -webkit-line-clamp: 2; margin-bottom: var(--space-xs); line-height: 1.3; }
  .card .cardActions { gap: var(--space-xs); }
  .card .cardActions .btn.primary { padding: 5px 8px; font-size: 11px; min-height: 32px; border-radius: var(--radius-sm); }
  .card .btn.map-icon, .card .btn.audio-big { width: 32px; height: 32px; min-height: 32px; border-radius: var(--radius-sm); }
  .card .btn.map-icon svg, .card .btn.audio-big svg { width: 16px; height: 16px; }
  .card .card-quick-actions { margin-top: 2px; padding-top: var(--space-xs); }
  .card .quick-action-btn { padding: 4px; }
  .card .quick-action-btn span { display: none; }
  .card .quick-action-btn svg { width: 16px; height: 16px; }
  .card .card-indicators { top: var(--space-xs); right: auto; left: var(--space-xs); }
  .card .card-indicator { padding: 2px 5px; font-size: 10px; }
  .card .badge { font-size: 9px; padding: 2px 5px; }
}

.skeleton-card { background: linear-gradient(90deg, var(--color-bg-subtle) 25%, var(--color-bg) 50%, var(--color-bg-subtle) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-lg); height: 320px; }
@media (max-width: 480px) { .skeleton-card { height: 100px; border-radius: var(--radius-md); } }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.card { background: var(--color-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--color-border); position: relative; transition: transform var(--transition-slow), box-shadow var(--transition-slow); }
@media (hover: hover) { .card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); } .card:hover .cardImg { transform: scale(1.05); } }
.card:focus-within { box-shadow: 0 0 0 3px rgba(14,165,233,0.3); }
.card:active { transform: scale(0.98); transition-duration: 80ms; }
.imgBtn { border: 0; padding: 0; width: 100%; aspect-ratio: 16/9; cursor: pointer; background: var(--color-bg-subtle); position: relative; overflow: hidden; }
.cardImg { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.cardBody { padding: var(--space-lg); display: flex; flex-direction: column; flex: 1; gap: var(--space-sm); }
.cardTitle { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-sm); }
.cardTitle b { font-size: var(--font-size-lg); font-weight: 700; line-height: 1.3; }
.badge { font-size: 10px; font-weight: 700; text-transform: uppercase; background: var(--color-bg-subtle); color: var(--color-text-muted); padding: 4px 8px; border-radius: 6px; white-space: nowrap; height: fit-content; flex-shrink: 0; }
.desc { font-size: 14px; color: var(--color-text-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: var(--space-md); line-height: 1.5; }
.cardActions { margin-top: auto; display: flex; gap: var(--space-sm); align-items: center; }
.card-indicators { position: absolute; top: var(--space-sm); right: var(--space-sm); display: flex; gap: var(--space-xs); z-index: 10; }
.card-indicator { background: rgba(255,255,255,0.95); border-radius: var(--radius-full); padding: 4px 8px; font-size: 12px; box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 4px; }
.card-indicator.favorite { color: var(--color-audio-accent); }
.card-indicator.visited { color: var(--color-success); }
.card-quick-actions { display: flex; gap: var(--space-xs); margin-top: var(--space-sm); padding-top: var(--space-sm); border-top: 1px solid var(--color-border); }
.quick-action-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px; padding: var(--space-sm); background: transparent; border: none; border-radius: var(--radius-sm); font-size: 11px; font-weight: 600; color: var(--color-text-muted); cursor: pointer; transition: all var(--transition-fast); }
.quick-action-btn:hover { background: var(--color-bg-subtle); color: var(--color-text); }
.quick-action-btn.active { color: var(--color-interactive); }
.quick-action-btn.favorite.active { color: var(--color-audio-accent); }
.quick-action-btn.visited.active { color: var(--color-success); }
.quick-action-btn svg { width: 16px; height: 16px; }

/* --------------------------------------------------------------------------
   10. MAPA
   -------------------------------------------------------------------------- */
.mapSection[hidden] { display: none; }
.map-header { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-md); padding: var(--space-md); background: var(--color-surface); border-radius: var(--radius-md); border: 1px solid var(--color-border); box-shadow: var(--shadow-sm); }
.map-header .btn { flex: none; min-width: auto; padding: var(--space-sm) var(--space-md); }
.map-point-name { font-weight: 600; font-size: var(--font-size-sm); color: var(--color-text); flex: 1; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 480px) {
  .map-header { flex-direction: column; align-items: stretch; gap: var(--space-sm); margin-bottom: var(--space-sm); padding: var(--space-sm); }
  .map-header .btn { width: 100%; justify-content: center; }
  .map-point-name { text-align: center; padding: var(--space-xs) 0; }
}
.map { width: 100%; height: 60vh; min-height: 400px; border-radius: var(--radius-lg); border: 1px solid var(--color-border); }
@media (max-width: 480px) { .map { min-height: 50vh; border-radius: var(--radius-md); } }
.mapList { margin-top: var(--space-lg); display: flex; flex-direction: column; gap: var(--space-sm); }
.mapItem { display: flex; justify-content: space-between; align-items: center; background: var(--color-surface); padding: var(--space-md); border-radius: var(--radius-md); border: 1px solid var(--color-border); transition: background var(--transition-fast); }
.mapItem:hover { background: var(--color-bg-subtle); }

/* --------------------------------------------------------------------------
   11. MODALES
   -------------------------------------------------------------------------- */
.modalBack { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: var(--z-modal); display: none; padding: var(--space-md); align-items: center; justify-content: center; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modalBack[aria-hidden="false"] { display: flex; animation: fadeIn 0.2s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal { background: var(--color-surface); width: 100%; max-height: calc(100vh - 32px); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.modal-detail { max-width: 1000px; }

/* ★ MÓVIL: Modal detalle full-screen */
@media (max-width: 600px) {
  .modalBack { padding: 0; align-items: stretch; }
  .modal { max-height: 100vh; max-height: 100dvh; border-radius: 0; height: 100%; }
  .modal-detail { max-width: 100%; }
}

.modal-legal { max-width: 600px; height: auto; max-height: 85vh; }
#legalModalBack { z-index: var(--z-modal-legal); }
#legalModalBack .modalHeader { background: var(--color-interactive); color: white; border-bottom: none; padding: var(--space-lg); }
#legalModalBack .modal-title { color: white; font-size: var(--font-size-lg); max-width: none; }
#legalModalBack .btn-close { background: rgba(255,255,255,0.2); color: white; border-radius: var(--radius-full); width: 40px; height: 40px; padding: 0; display: flex; align-items: center; justify-content: center; transition: background var(--transition-fast); }
#legalModalBack .btn-close:hover { background: rgba(255,255,255,0.3); }
#legalModalBack .btn-close svg { width: 24px; height: 24px; }
.modal-ios { max-width: 360px; text-align: center; height: auto; }

/* Legal y iOS mantienen diseño modal, no fullscreen */
@media (max-width: 600px) {
  .modal-legal, .modal-ios { border-radius: var(--radius-lg); max-height: 85vh; height: auto; }
  #legalModalBack, #iosInstallModal { padding: var(--space-md); align-items: center; justify-content: center; }
}

.modalHeader { padding: var(--space-md) var(--space-lg); border-bottom: 1px solid var(--color-border); display: flex; justify-content: space-between; align-items: center; background: var(--color-surface); gap: var(--space-sm); position: sticky; top: 0; z-index: 10; }
@media (max-width: 600px) { .modalHeader { padding: var(--space-sm) var(--space-md); padding-top: max(var(--space-sm), var(--safe-top)); } }
.modalHeader-centered { justify-content: center; border: none; padding-bottom: 0; }
.modal-title { font-size: var(--font-size-base); font-weight: 700; margin: 0; max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) { .modal-title { max-width: calc(100vw - 140px); font-size: var(--font-size-sm); } }
.modalContent { overflow-y: auto; padding: 0; flex: 1; min-height: 0; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.legal-content { padding: var(--space-lg); font-size: 14px; }
.legal-content h3 { font-size: var(--font-size-base); margin: var(--space-lg) 0 var(--space-sm); color: var(--color-text); }
.legal-content h3:first-child { margin-top: 0; }
.legal-content p { margin: 0 0 var(--space-md); color: var(--color-text-muted); }
.legal-content ul { margin: 0 0 var(--space-md); padding-left: var(--space-lg); color: var(--color-text-muted); }
.legal-content li { margin-bottom: var(--space-xs); }
.legal-content a { color: var(--color-interactive); }
.legal-content .btn.primary { margin-top: var(--space-lg); padding: var(--space-md) var(--space-lg); font-size: var(--font-size-base); font-weight: 700; }
.ios-content { padding: var(--space-lg); }
.ios-steps { margin-bottom: var(--space-lg); }
.ios-step { display: flex; align-items: flex-start; gap: var(--space-md); margin-bottom: var(--space-md); text-align: left; }
.ios-step-num { width: 28px; height: 28px; border-radius: var(--radius-full); background: var(--color-interactive); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: var(--font-size-sm); flex-shrink: 0; }
.ios-step p { margin: 0; color: var(--color-text-muted); line-height: 1.5; }
.ios-icon { font-size: 18px; }

/* --------------------------------------------------------------------------
   12. DETAIL LAYOUT
   -------------------------------------------------------------------------- */
.detailLayout { display: grid; grid-template-columns: 1fr; }
@media (min-width: 800px) { .detailLayout { grid-template-columns: 1fr 340px; } }
.detailMain { padding: var(--space-lg); min-width: 0; }
@media (max-width: 480px) { .detailMain { padding: var(--space-md); } }
.detailSidebar { background: var(--color-bg-subtle); padding: var(--space-lg); border-left: 1px solid var(--color-border); display: flex; flex-direction: column; gap: var(--space-lg); }
@media (max-width: 799px) { .detailSidebar { border-left: none; border-top: 1px solid var(--color-border); } }
@media (max-width: 480px) { .detailSidebar { padding: var(--space-md); } }
.detail-img-wrap { margin-bottom: var(--space-md); }
.heroImg { width: 100%; height: auto; max-height: 350px; object-fit: cover; border-radius: var(--radius-md); }

/* ★ MÓVIL: Imagen edge-to-edge en modal fullscreen */
@media (max-width: 600px) {
  .heroImg { border-radius: 0; max-height: 220px; margin: calc(-1 * var(--space-md)); margin-bottom: var(--space-md); width: calc(100% + 2 * var(--space-md)); max-width: none; }
}

.detailTitle { font-size: var(--font-size-2xl); font-weight: 800; margin: 0 0 var(--space-md); line-height: 1.2; }
@media (max-width: 480px) { .detailTitle { font-size: var(--font-size-xl); } }
.detailText { font-size: var(--font-size-base); color: var(--color-text); line-height: 1.7; margin-bottom: var(--space-2xl); word-wrap: break-word; overflow-wrap: break-word; }
@media (max-width: 480px) { .detailText { font-size: 14px; line-height: 1.6; margin-bottom: var(--space-lg); } }
.audioContainer { margin-bottom: var(--space-lg); padding: var(--space-md); background: var(--color-bg-subtle); border-radius: var(--radius-md); }
.audioContainer[hidden] { display: none; }
.audio-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-sm); flex-wrap: wrap; gap: var(--space-sm); }
.audio-label { font-size: var(--font-size-sm); font-weight: 600; color: var(--color-text-muted); }
.audio-speed { display: flex; gap: 2px; background: var(--color-surface); border-radius: var(--radius-sm); padding: 2px; }
.speed-btn { border: none; background: transparent; color: var(--color-text-muted); font-size: 11px; font-weight: 600; padding: 4px 8px; border-radius: var(--radius-sm); cursor: pointer; transition: all var(--transition-fast); min-height: 32px; min-width: 40px; }
.speed-btn:hover { color: var(--color-text); }
.speed-btn.active { background: var(--color-interactive); color: white; }
audio { width: 100%; height: 44px; border-radius: var(--radius-md); display: block; }
.detail-actions-mobile { display: flex; gap: var(--space-sm); margin-bottom: var(--space-md); }
.detail-actions-mobile .btn { flex: 1; }

/* ★ MÓVIL: Botones fav/visitado/compartir sticky abajo */
@media (max-width: 600px) {
  .detail-actions-mobile { position: sticky; bottom: 0; background: var(--color-surface); padding: var(--space-sm) 0; padding-bottom: max(var(--space-sm), var(--safe-bottom)); margin: 0 calc(-1 * var(--space-md)); padding-left: var(--space-md); padding-right: var(--space-md); border-top: 1px solid var(--color-border); z-index: 5; box-shadow: 0 -2px 10px rgba(0,0,0,0.05); }
}

.miniMap { height: 180px; width: 100%; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--color-border); }
.h3 { margin: 0 0 var(--space-sm); font-size: var(--font-size-xs); text-transform: uppercase; letter-spacing: 0.5px; color: var(--color-text-muted); font-weight: 700; }
.detail-actions { margin-top: var(--space-md); display: flex; flex-direction: column; gap: var(--space-sm); }
.detail-meta { font-size: 14px; color: var(--color-text-muted); display: flex; flex-direction: column; gap: 6px; }

/* --------------------------------------------------------------------------
   13. BOTÓN RESERVA (CTA)
   -------------------------------------------------------------------------- */
.btn-reserva { background: linear-gradient(135deg, #10b981, #059669); color: white; font-size: var(--font-size-base); font-weight: 800; padding: 18px var(--space-lg); text-transform: uppercase; letter-spacing: 0.5px; border: 1px solid rgba(255,255,255,0.2); box-shadow: 0 4px 20px rgba(16,185,129,0.4); margin-top: var(--space-lg); width: 100%; display: block; text-align: center; text-decoration: none; border-radius: var(--radius-md); transition: transform var(--transition-fast), box-shadow var(--transition-fast); }
.btn-reserva:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(16,185,129,0.5); }
@media (max-width: 480px) { .btn-reserva { padding: 14px var(--space-md); font-size: 13px; } }

/* --------------------------------------------------------------------------
   13b. ENLACE PROMOCIONAL 4x4
   -------------------------------------------------------------------------- */
.promo-4x4 { display: flex; align-items: center; gap: var(--space-md); margin-top: var(--space-lg); padding: var(--space-md) var(--space-lg); background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #f0f9ff 100%); border: 1px solid #bbf7d0; border-radius: var(--radius-md); text-decoration: none; color: var(--color-text); transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast); cursor: pointer; }
.promo-4x4:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16,185,129,0.2); border-color: #86efac; }
.promo-4x4:active { transform: scale(0.98); }
.promo-4x4-icon { font-size: 28px; line-height: 1; flex-shrink: 0; }
.promo-4x4-content { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.promo-4x4-title { font-size: var(--font-size-sm); font-weight: 700; color: #065f46; line-height: 1.3; }
.promo-4x4-sub { font-size: var(--font-size-xs); color: #047857; line-height: 1.3; }
.promo-4x4-arrow { flex-shrink: 0; color: #10b981; transition: transform var(--transition-fast); }
.promo-4x4:hover .promo-4x4-arrow { transform: translateX(3px); }
@media (max-width: 480px) { .promo-4x4 { padding: var(--space-sm) var(--space-md); gap: var(--space-sm); margin-top: var(--space-md); } .promo-4x4-icon { font-size: 24px; } .promo-4x4-title { font-size: 12px; } .promo-4x4-sub { font-size: 11px; } }
@media (prefers-color-scheme: dark) { .promo-4x4 { background: linear-gradient(135deg, rgba(16,185,129,0.1), rgba(6,95,70,0.15)); border-color: rgba(16,185,129,0.3); } .promo-4x4:hover { border-color: rgba(16,185,129,0.5); box-shadow: 0 6px 20px rgba(16,185,129,0.15); } .promo-4x4-title { color: #6ee7b7; } .promo-4x4-sub { color: #a7f3d0; } .promo-4x4-arrow { color: #6ee7b7; } }

/* --------------------------------------------------------------------------
   14. TOAST NOTIFICATIONS
   -------------------------------------------------------------------------- */
.toast { position: fixed; bottom: var(--space-lg); left: var(--space-lg); right: var(--space-lg); z-index: var(--z-toast); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-md); box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: var(--space-md); animation: slideUp 0.3s ease-out; }
@media (max-width: 480px) { .toast { bottom: max(var(--space-md), var(--safe-bottom)); left: var(--space-sm); right: var(--space-sm); } }
.toast[hidden] { display: none; }
.toast-close { border: 0; padding: var(--space-xs); background: transparent; cursor: pointer; color: var(--color-text-muted); flex-shrink: 0; min-height: 44px; min-width: 44px; display: flex; align-items: center; justify-content: center; }
.toast-content { flex: 1; min-width: 0; }
.toast-label { font-size: var(--font-size-xs); color: var(--color-text-muted); display: block; margin-bottom: 2px; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.feedback-toast { position: fixed; bottom: var(--space-lg); left: 50%; transform: translateX(-50%); background: var(--color-text); color: var(--color-bg); padding: var(--space-sm) var(--space-lg); border-radius: var(--radius-full); font-size: var(--font-size-sm); font-weight: 600; box-shadow: var(--shadow-lg); z-index: var(--z-toast); white-space: nowrap; animation: feedbackIn 0.2s ease-out; }
@media (max-width: 480px) { .feedback-toast { bottom: max(var(--space-md), var(--safe-bottom)); font-size: var(--font-size-xs); padding: var(--space-sm) var(--space-md); } }
.feedback-toast[hidden] { display: none; }
@keyframes feedbackIn { from { transform: translateX(-50%) translateY(10px); opacity: 0; } to { transform: translateX(-50%) translateY(0); opacity: 1; } }

/* --------------------------------------------------------------------------
   15. LEGAL FOOTER Y TABS
   -------------------------------------------------------------------------- */
.legal-footer { text-align: center; margin-top: var(--space-2xl); padding-bottom: var(--space-lg); }
.legal-btn { font-size: var(--font-size-xs); opacity: 0.7; }
.legalTabWrap { margin-top: var(--space-md); display: flex; justify-content: center; }
.legalTab { appearance: none; border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text-muted); font-size: var(--font-size-xs); padding: var(--space-sm) var(--space-md); border-radius: var(--radius-full); cursor: pointer; transition: all var(--transition-fast); }
.legalTab:hover { background: var(--color-bg-subtle); }

/* --------------------------------------------------------------------------
   16. EMPTY STATE
   -------------------------------------------------------------------------- */
.empty { grid-column: 1/-1; padding: var(--space-2xl); text-align: center; color: var(--color-text-muted); }
.empty-error { color: var(--color-error); }

/* --------------------------------------------------------------------------
   17. AD CARD
   -------------------------------------------------------------------------- */
.adCard { display: block; position: relative; border-radius: var(--radius-md); overflow: hidden; text-decoration: none; box-shadow: var(--shadow-md); height: 160px; width: 100%; background: #0f172a; }
.adImg { width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: 0.9; }
.adOverlay { position: absolute; inset: 0; background: linear-gradient(to right, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 60%, transparent 100%); padding: 0 var(--space-lg); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: var(--space-sm); }
.adLabel { color: white; font-size: 18px; font-weight: 700; text-shadow: 0 2px 4px rgba(0,0,0,0.5); line-height: 1.2; max-width: 80%; }
.adCta { background: var(--color-interactive); color: white; font-size: var(--font-size-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: var(--space-sm) 14px; border-radius: var(--radius-full); box-shadow: var(--shadow-md); }

/* --------------------------------------------------------------------------
   18. RESPONSIVE BREAKPOINTS
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .controls { flex-direction: row; }
  .topRow { flex-direction: row; gap: var(--space-sm); }
  #btnBackBottom { padding: var(--space-md); }
}

@media (min-width: 768px) {
  .headerInner { flex-direction: row; justify-content: space-between; }
  .brand { width: auto; }
  .controls { width: auto; flex-wrap: nowrap; }
}

/* --------------------------------------------------------------------------
   19. PRINT STYLES
   -------------------------------------------------------------------------- */
@media print {
  .header, .controls, .btn, .toast, .modalBack, .offline-banner { display: none !important; }
  body { background: white; color: black; }
  .card { break-inside: avoid; box-shadow: none; border: 1px solid #ccc; }
}

/* --------------------------------------------------------------------------
   20. LANDSCAPE MOBILE
   -------------------------------------------------------------------------- */
@media (max-height: 500px) and (orientation: landscape) {
  .header { padding: 2px 0; }
  .headerInner { flex-direction: row; gap: var(--space-xs); }
  .brand b { font-size: var(--font-size-sm); }
  .map { min-height: 200px; height: 50vh; }
  .heroImg { max-height: 150px; }
}
