:root {
  --pv-primary: #1a6b3c;
  --pv-secondary: #f97316;
  --pv-dark: #0f1923;
  --pv-card-shadow: 0 4px 24px rgba(0,0,0,.10);
}

/* ── Override Bootstrap btn-warning → naranja ──
   Texto oscuro (no blanco): blanco sobre #f97316 da 2.8:1 de contraste,
   muy por debajo del mínimo WCAG AA (4.5:1). #0f1923 sobre el mismo
   naranja da 6.33:1 (Auditoría 2026-08-27, Etapa 7). */
.btn-warning {
  background-color: #f97316 !important;
  border-color: #f97316 !important;
  color: #0f1923 !important;
}
.btn-warning:hover, .btn-warning:focus {
  background-color: #ea6c0a !important;
  border-color: #ea6c0a !important;
  color: #0f1923 !important;
}
.btn-outline-warning {
  color: #f97316 !important;
  border-color: #f97316 !important;
}
.btn-outline-warning:hover {
  background-color: #f97316 !important;
  color: #0f1923 !important;
}

/* ── General ── */
html { overflow-x: hidden; }
body { overflow-x: hidden; max-width: 100%; font-family: 'Inter', sans-serif; color: #2d3748; }
*, *::before, *::after { box-sizing: border-box; }
#mainNav { width: 100%; max-width: 100vw; left: 0; right: 0; }
#navbarNav { max-width: 100%; }
h1,h2,h3,.display-1,.display-2,.display-3,.display-4 { font-family: 'Playfair Display', serif; }

/* ── Navbar ── */
#mainNav {
  background: transparent;
  transition: background .4s, box-shadow .4s;
  backdrop-filter: blur(0px);
}
#mainNav.scrolled {
  background: rgba(10,25,40,.95) !important;
  box-shadow: 0 2px 20px rgba(0,0,0,.3);
  backdrop-filter: blur(12px);
}
#mainNav .nav-link { font-size: .88rem; letter-spacing: .02em; white-space: nowrap; }
#mainNav .navbar-brand { font-size: 1.3rem; letter-spacing: -.02em; }

#navbar-search-wrap .nav-search-box { width: 170px; }

@media (min-width: 992px) {
  #mainNav .nav-link { padding-left: .55rem; padding-right: .55rem; }
  #navbarNav .navbar-nav.gap-1 { gap: 0 !important; }
}
@media (min-width: 992px) and (max-width: 1399px) {
  #mainNav .nav-link { font-size: .8rem; padding-left: .25rem; padding-right: .25rem; }
  #mainNav .nav-link i { display: none; }
  #navbar-search-wrap .nav-search-box { width: 165px; }
  #navAdminBtn { padding-left: .5rem !important; padding-right: .5rem !important; }
}

@media (max-width: 991px) {
  #navbarNav {
    overflow-x: hidden;
    background: rgba(10,20,15,.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 0 0 12px 12px;
    padding: .75rem 1rem 1rem;
    margin-top: .5rem;
    box-shadow: 0 8px 24px rgba(0,0,0,.4);
    border: 1px solid rgba(255,255,255,.08);
  }
  #navbarNav .nav-link {
    font-size: 1rem;
    padding: .6rem .5rem;
    border-bottom: 1px solid rgba(255,255,255,.12);
  }
  #navbarNav .nav-link:last-child { border-bottom: none; }

  #navbar-search-wrap {
    width: 100%;
    margin: .5rem 0 0 0 !important;
    padding-top: .75rem;
    border-top: 1px solid rgba(255,255,255,.12);
  }
  #navbar-search-wrap .nav-search-box { width: 100%; }
}

/* ── Hero ── */
.hero-section {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f1923 0%, #1a3a4a 50%, #1a6b3c 100%);
  position: relative;
  overflow: hidden;
  display: flex; align-items: center;
}
.hero-section::before {
  content: '';
  position: absolute; inset: 0;
  background: url('/static/img/hero-pattern.svg') repeat;
  opacity: .04;
}
.hero-particles { position: absolute; inset: 0; pointer-events: none; }
.hero-particles span {
  position: absolute;
  width: 4px; height: 4px;
  background: rgba(245,158,11,.6);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%,100% { transform: translateY(0) scale(1); opacity: .6; }
  50%      { transform: translateY(-20px) scale(1.3); opacity: 1; }
}
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(245,158,11,.15);
  border: 1px solid rgba(245,158,11,.3);
  color: #9a3412;
  border-radius: 50px;
  padding: .4rem 1.2rem;
  font-size: .8rem; font-weight: 600; letter-spacing: .06em;
}
.hero-title { font-size: clamp(2.5rem, 6vw, 5rem); line-height: 1.1; color: #fff; }
.hero-title .highlight {
  background: linear-gradient(135deg, #f97316, #ef4444);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-stats .stat-box {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  padding: 1.2rem 1.5rem;
  text-align: center;
  backdrop-filter: blur(6px);
}
.hero-stats .stat-number { font-size: 2rem; font-weight: 700; color: #f97316; font-family: 'Inter', sans-serif; }
.hero-search {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 60px;
  padding: .5rem .5rem .5rem 1.5rem;
  backdrop-filter: blur(10px);
}
.hero-search input {
  background: transparent; border: none; color: #fff; width: 100%;
}
.hero-search input::placeholder { color: rgba(255,255,255,.5); }
.hero-search input:focus { outline: none; box-shadow: none; }
.hero-search:focus-within { outline: 3px solid #f97316; outline-offset: 2px; }
.hero-scroll {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.5); font-size: .75rem; letter-spacing: .1em;
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  animation: bounce 2s ease-in-out infinite;
}
@keyframes bounce { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(8px); } }

/* ── Section titles ── */
.section-badge {
  display: inline-block;
  background: rgba(26,107,60,.1); color: var(--pv-primary);
  border-radius: 50px; padding: .3rem 1rem; font-size: .75rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; margin-bottom: .8rem;
}
.section-title { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.section-divider {
  width: 60px; height: 4px;
  background: linear-gradient(90deg, var(--pv-primary), var(--pv-secondary));
  border-radius: 2px; margin: 1rem auto;
}

/* ── Destination Cards ── */
.dest-card {
  border: none; border-radius: 20px; overflow: hidden;
  box-shadow: var(--pv-card-shadow);
  transition: transform .3s, box-shadow .3s;
  cursor: pointer;
}
.dest-card:hover { transform: translateY(-8px); box-shadow: 0 16px 40px rgba(0,0,0,.18); }
.dest-card .card-img-top { height: 220px; object-fit: cover; }
.dest-card .overlay-img {
  height: 220px; background-size: cover; background-position: center;
  position: relative;
}
.dest-card .overlay-img::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.6) 0%, transparent 60%);
}
.dest-card .card-body { padding: 1.4rem; }
.dest-card .country-badge {
  position: absolute; top: 1rem; right: 1rem; z-index: 2;
  background: rgba(255,255,255,.9); color: #333;
  border-radius: 50px; padding: .2rem .8rem; font-size: .75rem; font-weight: 600;
}
.dest-card .featured-badge {
  position: absolute; top: 1rem; left: 1rem; z-index: 2;
  background: linear-gradient(135deg, #f97316, #ef4444);
  color: #0f1923; border-radius: 50px; padding: .2rem .8rem; font-size: .7rem; font-weight: 700;
}
.dest-card .rating { color: #9a3412; font-size: .85rem; }

/* ── Article Cards ── */
.article-card {
  border: none; border-radius: 16px; overflow: hidden;
  box-shadow: var(--pv-card-shadow);
  transition: transform .3s, box-shadow .3s;
}
.article-card:hover { transform: translateY(-6px); box-shadow: 0 12px 32px rgba(0,0,0,.15); }
.article-card img { height: 200px; object-fit: cover; }
.article-card .category-tag {
  display: inline-block; background: var(--pv-primary); color: #fff;
  border-radius: 50px; padding: .2rem .8rem; font-size: .7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
}

/* ── Itinerary Cards ── */
.itin-card {
  border: none; border-radius: 20px;
  box-shadow: var(--pv-card-shadow);
  transition: transform .3s, box-shadow .3s;
  background: linear-gradient(135deg, #f8fafc, #fff);
  overflow: visible;
}
.itin-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(0,0,0,.15); }
.itin-card .itin-header {
  height: 180px; background-size: cover; background-position: center;
  position: relative; overflow: hidden; border-radius: 20px 20px 0 0;
}
.itin-card .itin-header::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15,25,35,.8) 0%, transparent 50%);
}
.itin-card .day-badge {
  position: absolute; top: .75rem; left: .75rem; z-index: 2;
  background: var(--pv-secondary); color: #0f1923;
  border-radius: 12px; padding: .4rem .9rem; font-weight: 700; font-size: .85rem;
}
.difficulty-badge {
  border-radius: 50px; padding: .2rem .7rem; font-size: .72rem; font-weight: 600;
}
.difficulty-Fácil { background: #d1fae5; color: #065f46; }
.difficulty-Moderado { background: #fef3c7; color: #92400e; }
.difficulty-Exigente { background: #fee2e2; color: #991b1b; }

/* ── Photo Gallery ── */
.photo-grid { columns: 3; gap: 1rem; }
.photo-grid-item {
  display: block; width: 100%; border: 0; padding: 0; background: none; font: inherit; text-align: inherit;
  break-inside: avoid; margin-bottom: 1rem;
  border-radius: 12px; overflow: hidden;
  cursor: pointer; position: relative;
}
.photo-grid-item img { width: 100%; display: block; transition: transform .4s; }
.photo-grid-item:hover img { transform: scale(1.05); }
.photo-grid-item .photo-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.7) 0%, transparent 60%);
  opacity: 0; transition: opacity .3s;
  display: flex; align-items: flex-end; padding: 1rem;
}
.photo-grid-item:hover .photo-overlay { opacity: 1; }
@media (max-width: 768px) { .photo-grid { columns: 2; } }
@media (max-width: 480px) { .photo-grid { columns: 1; } }

/* ── Video Cards ── */
.video-card {
  border: none; border-radius: 16px; overflow: hidden;
  box-shadow: var(--pv-card-shadow); transition: transform .3s;
}
.video-card:hover { transform: translateY(-6px); }
.video-thumb {
  display: block; width: 100%; border: 0; padding: 0; margin: 0;
  position: relative; height: 200px;
  background: #0f1923; overflow: hidden; cursor: pointer;
}
.video-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.video-thumb:hover img { transform: scale(1.05); }
.video-thumb:focus-visible, .photo-grid-item:focus-visible { outline: 3px solid #f97316; outline-offset: 2px; }
.play-btn {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 60px; height: 60px; background: rgba(245,158,11,.9);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.4rem; transition: transform .2s, background .2s;
}
.video-thumb:hover .play-btn { transform: translate(-50%,-50%) scale(1.1); background: #f97316; }

/* ── Place Cards ── */
.place-card {
  border: none; border-radius: 16px; overflow: hidden;
  box-shadow: var(--pv-card-shadow); transition: transform .3s;
}
.place-card:hover { transform: translateY(-5px); }
.place-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: linear-gradient(135deg, var(--pv-primary), #2d9d5f);
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.3rem;
}

/* ── Continent filter ── */
.continent-filter .btn { border-radius: 50px; font-size: .82rem; }
.continent-filter .btn.active { background: var(--pv-primary); border-color: var(--pv-primary); color: #fff; }

/* ── Blog ── */
.blog-hero { background: linear-gradient(rgba(10,25,35,.55), rgba(10,25,35,.7)), url('/static/img/blog-header.jpg') center 45%/cover no-repeat; padding: 120px 0 60px; }
.blog-card-featured {
  border: none; border-radius: 24px; overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,.12);
}
.blog-card-featured img { height: 400px; object-fit: cover; }

/* ── Article detail ── */
.article-hero { min-height: 60vh; background-size: cover; background-position: center; position: relative; }
.article-hero::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.4), rgba(0,0,0,.7));
}
.article-content { line-height: 1.9; font-size: 1.05rem; }
.article-content h2 { font-family: 'Playfair Display', serif; margin-top: 2.5rem; color: #1a2733; }
.article-content p { color: #4a5568; margin-bottom: 1.4rem; }

/* ── Itinerary detail ── */
.day-timeline { position: relative; }
.day-timeline::before {
  content: ''; position: absolute; left: 24px; top: 0; bottom: 0;
  width: 2px; background: linear-gradient(to bottom, var(--pv-primary), var(--pv-secondary));
}
.day-node {
  width: 50px; height: 50px; border-radius: 50%;
  background: linear-gradient(135deg, var(--pv-primary), #2d9d5f);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem; flex-shrink: 0; position: relative; z-index: 1;
  box-shadow: 0 0 0 4px rgba(26,107,60,.2);
}
.day-card {
  background: #fff; border-radius: 16px; padding: 1.5rem;
  box-shadow: var(--pv-card-shadow); flex: 1;
}

/* ── Footer ── */
.footer-dark { background: #0a1520; }
.footer-dark p, .footer-dark small { color: #94a3b8 !important; }
.footer-dark a { color: #94a3b8 !important; transition: color .2s; }
.footer-dark a:hover { color: #f97316 !important; }
.footer-dark h5, .footer-dark h6 { color: #fff !important; }
.footer-dark .text-muted { color: #94a3b8 !important; }

/* ── Destination detail ── */
.dest-hero { min-height: 70vh; position: relative; display: flex; align-items: flex-end; overflow: hidden; }
.dest-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.dest-hero::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(0,0,0,.85) 30%, rgba(0,0,0,.2) 100%); }
.dest-hero-credit {
  position: absolute; right: .75rem; bottom: .5rem; z-index: 2;
  font-size: .68rem; color: rgba(255,255,255,.65); text-align: right;
}
.dest-hero-credit a { color: rgba(255,255,255,.75); text-decoration: none; }
.dest-hero-credit a:hover { color: #fff; text-decoration: underline; }
@media (max-width: 767px) {
  .dest-hero { min-height: 0 !important; height: 44vh; }
  .dest-hero .container { margin-top: 0 !important; padding-top: 1rem !important; padding-bottom: 1rem !important; }
  .dest-hero h1.display-3 { font-size: 1.8rem !important; margin-bottom: .25rem !important; }
  .dest-hero .breadcrumb { font-size: .75rem; margin-bottom: .25rem !important; }
  .dest-hero .badge { font-size: .7rem; }
  .dest-hero .d-flex.align-items-center { margin-bottom: .25rem !important; }
  .dest-hero .fs-5 { font-size: .9rem !important; }
}

/* ── Lightbox ── */
.lightbox-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.95);
  z-index: 9999; display: none;
  align-items: center; justify-content: center;
}
.lightbox-overlay.active { display: flex; }
.lightbox-overlay img { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: 8px; }
.lightbox-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  border: 0; background: rgba(0,0,0,.35); border-radius: 50%;
  color: #fff; font-size: 2rem; cursor: pointer; z-index: 2;
}
.lightbox-close:focus-visible { outline: 3px solid #f97316; outline-offset: 2px; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--pv-primary); border-radius: 3px; }

/* ── Animations ── */
.fade-up { opacity: 0; transform: translateY(30px); transition: opacity .6s, transform .6s; }
.fade-up.visible { opacity: 1; transform: translateY(0); }


/* ── Mobile typography — fuente más grande en smartphone ── */
@media (max-width: 767px) {
  html { font-size: 17px; }
  body { font-size: 1rem; }

  p, .text-muted, li, td, th, label, span:not(.badge):not(.day-badge) {
    font-size: .97rem !important;
    line-height: 1.7 !important;
  }

  h1 { font-size: 1.75rem !important; }
  h2 { font-size: 1.45rem !important; }
  h3 { font-size: 1.25rem !important; }
  h4 { font-size: 1.1rem  !important; }
  h5 { font-size: 1rem    !important; }
  h6 { font-size: .95rem  !important; }

  .small, small { font-size: .87rem !important; }

  /* Guía práctica */
  .transport-info-body p,
  .transport-info-body li { font-size: 1rem !important; line-height: 1.75 !important; }
  .transport-info-body .transport-title { font-size: 1.05rem !important; }

  /* Cards e itinerarios */
  .card { font-size: .97rem; }
}
