/* ============================================================
   EXPEDITION 33 STYLE — Japan 2026 Web
   Dark cinematic theme with amber/gold accents
   Fonts: IM Fell Double Pica, Portmanteau
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=IM+Fell+Double+Pica:ital@0;1&family=Portmanteau&display=swap');

/* ============================================================
   CSS VARIABLES — DARK MODE (default)
   ============================================================ */
:root {
  --bg-primary:    #0d0b08;
  --bg-secondary:  #1a1612;
  --bg-card:       #1e1a14;
  --bg-header:     #110f0b;
  --bg-filter:     #161310;
  --text-primary:  #e8dcc8;
  --text-secondary:#b8a88a;
  --text-muted:    #7a6a52;
  --accent-gold:   #c9a84c;
  --accent-amber:  #d4a843;
  --accent-dark:   #8b6914;
  --accent-glow:   rgba(201, 168, 76, 0.15);
  --border-color:  rgba(201, 168, 76, 0.2);
  --border-strong: rgba(201, 168, 76, 0.5);
  --shadow-dark:   rgba(0, 0, 0, 0.8);
  --overlay-bg:    rgba(0, 0, 0, 0.92);
  --btn-bg:        #2a2018;
  --btn-hover:     #3a2e1a;
  --select-bg:     #1e1a14;
  --nav-bg:        rgba(13, 11, 8, 0.95);
}

/* ============================================================
   CSS VARIABLES — LIGHT MODE
   ============================================================ */
body.light {
  --bg-primary:    #f5efe0;
  --bg-secondary:  #ede3cc;
  --bg-card:       #faf5ea;
  --bg-header:     #e8dcc8;
  --bg-filter:     #ede3cc;
  --text-primary:  #2a1f0e;
  --text-secondary:#5a4020;
  --text-muted:    #8a7050;
  --accent-gold:   #8b6914;
  --accent-amber:  #a07820;
  --accent-dark:   #c9a84c;
  --accent-glow:   rgba(139, 105, 20, 0.12);
  --border-color:  rgba(139, 105, 20, 0.25);
  --border-strong: rgba(139, 105, 20, 0.6);
  --shadow-dark:   rgba(0, 0, 0, 0.2);
  --overlay-bg:    rgba(0, 0, 0, 0.85);
  --btn-bg:        #d4c4a0;
  --btn-hover:     #c4b080;
  --select-bg:     #faf5ea;
  --nav-bg:        rgba(245, 239, 224, 0.97);
}

/* ============================================================
   BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'IMFellDoublePica', Georgia, serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: background 0.4s ease, color 0.4s ease;
  min-height: 100vh;
}

/* Grain texture overlay for cinematic feel */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

a {
  color: var(--accent-gold);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--accent-amber);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
nav {
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.4s ease;
}

nav .contenedor {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  flex-wrap: wrap;
  gap: 10px;
}

nav a {
  font-family: 'Portmanteau', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}
nav a:hover, nav a.active {
  color: var(--accent-gold);
  background: var(--accent-glow);
}

nav .nav-brand {
  font-family: 'Portmanteau', sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.12em;
  color: var(--accent-gold);
  text-transform: uppercase;
}

/* ============================================================
   HERO / HEADER
   ============================================================ */
.hero, .hero-ciudad {
  padding: 60px 20px 50px;
  text-align: center;
  background: var(--bg-header);
  color: var(--text-primary);
  transition: background 0.4s ease, color 0.4s ease;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

.hero::after, .hero-ciudad::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
}

.hero h1, .hero-ciudad h1 {
  font-family: 'Portmanteau', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin: 0 0 12px;
  text-shadow: 0 0 40px var(--accent-glow);
}

.hero p, .hero-ciudad p {
  font-family: 'IMFellDoublePica', Georgia, serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin: 0;
  letter-spacing: 0.05em;
}

/* ============================================================
   CONTENEDOR
   ============================================================ */
.contenedor {
  width: 90%;
  max-width: 1300px;
  margin: auto;
}

/* ============================================================
   FILTER SECTION
   ============================================================ */
.filtro-seccion {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.4s ease;
}

select {
  padding: 9px 14px;
  border-radius: 4px;
  background: var(--select-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  font-family: 'IMFellDoublePica', Georgia, serif;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
  outline: none;
}
select:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  padding: 9px 18px;
  border-radius: 4px;
  background: var(--btn-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  cursor: pointer;
  font-family: 'Portmanteau', sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.25s, color 0.25s, border-color 0.25s, box-shadow 0.25s;
  outline: none;
}
.btn:hover {
  background: var(--btn-hover);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  box-shadow: 0 0 12px var(--accent-glow);
}
.btn:active {
  transform: scale(0.97);
}

/* Dark mode toggle button — special style */
.btn-darkmode {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--accent-gold);
  font-size: 1.1rem;
  padding: 7px 13px;
  min-width: 44px;
}
.btn-darkmode:hover {
  background: var(--accent-glow);
  border-color: var(--accent-gold);
  box-shadow: 0 0 16px var(--accent-glow);
}

/* ============================================================
   GALLERY
   ============================================================ */
.galeria {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  padding: 20px 0;
}

.galeria img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  display: block;
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.galeria img:hover {
  transform: scale(1.02);
  border-color: var(--accent-gold);
  box-shadow: 0 4px 20px var(--accent-glow), 0 0 0 1px var(--accent-gold);
}

/* ============================================================
   VIDEO THUMBNAIL
   ============================================================ */
.video-thumb {
  position: relative;
  width: 100%;
  height: 220px;
  background: var(--bg-card);
  border-radius: 6px;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.video-thumb:hover {
  border-color: var(--accent-gold);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  position: absolute;
  top: 0;
  left: 0;
  transition: transform 0.3s ease;
}
.video-thumb:hover img {
  transform: scale(1.04);
}

.video-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px 10px 10px;
  background: linear-gradient(transparent, rgba(0,0,0,0.95));
  color: #FFD700;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  z-index: 2;
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0.02em;
  text-shadow: 0 0 8px rgba(0,0,0,1), 0 2px 4px rgba(0,0,0,1);
}

.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  pointer-events: none;
  opacity: 0.85;
  transition: opacity 0.25s, transform 0.25s;
}
.video-thumb:hover .play-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}
.play-btn svg {
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.7));
}

/* ============================================================
   SLIDER MODAL
   ============================================================ */
.slider-modal {
  position: fixed;
  inset: 0;
  background: var(--overlay-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  backdrop-filter: blur(4px);
}

.slider-content {
  width: 95%;
  max-width: 1300px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.slider-main {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 85vh;
}

.slider-main img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 6px;
  cursor: pointer;
  display: block;
  border: 1px solid var(--border-color);
}

.slider-main video {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 6px;
  cursor: pointer;
  display: block;
}

.info-strip {
  margin-top: 12px;
  padding: 12px 20px;
  color: var(--text-primary);
  background: rgba(13, 11, 8, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  width: 100%;
  box-sizing: border-box;
  font-family: 'IMFellDoublePica', Georgia, serif;
  font-style: italic;
}

body.light .info-strip {
  background: rgba(245, 239, 224, 0.85);
  color: var(--text-primary);
}

.close-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 9px 18px;
  background: var(--btn-bg);
  color: var(--accent-gold);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  cursor: pointer;
  font-family: 'Portmanteau', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 9001;
  transition: background 0.2s, box-shadow 0.2s;
}
.close-btn:hover {
  background: var(--btn-hover);
  box-shadow: 0 0 16px var(--accent-glow);
}

/* ============================================================
    NAVIGATION BUTTONS (Slider prev/next)
    ============================================================ */
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-color);
  color: var(--accent-gold);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  border-radius: 4px;
  transition: background 0.25s, box-shadow 0.25s;
  user-select: none;
}
.nav-btn:hover {
  background: rgba(0, 0, 0, 0.85);
  box-shadow: 0 0 16px var(--accent-glow);
  border-color: var(--accent-gold);
}
.nav-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.nav-prev {
  left: 15px;
}
.nav-next {
  right: 15px;
}

/* ============================================================
   BACK TO TOP
   ============================================================ */
#toTop {
  position: fixed;
  right: 24px;
  bottom: 24px;
  padding: 11px 15px;
  background: var(--btn-bg);
  color: var(--accent-gold);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  cursor: pointer;
  display: none;
  font-size: 16px;
  z-index: 1000;
  transition: background 0.2s, box-shadow 0.2s;
  font-family: 'Portmanteau', sans-serif;
}
#toTop:hover {
  background: var(--btn-hover);
  box-shadow: 0 0 16px var(--accent-glow);
}

/* ============================================================
   CITY CARDS (index page)
   ============================================================ */
.ciudad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 30px 0;
}

.ciudad-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
  text-decoration: none;
  color: var(--text-primary);
  display: block;
}
.ciudad-card:hover {
  border-color: var(--accent-gold);
  box-shadow: 0 6px 30px var(--accent-glow);
  transform: translateY(-3px);
}

.ciudad-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.ciudad-card:hover img {
  transform: scale(1.05);
}

.ciudad-card-info {
  padding: 16px;
}
.ciudad-card-info h3 {
  font-family: 'Portmanteau', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin: 0 0 6px;
}
.ciudad-card-info p {
  font-family: 'IMFellDoublePica', Georgia, serif;
  font-style: italic;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
}

/* ============================================================
   DECORATIVE DIVIDER
   ============================================================ */
.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
  margin: 30px 0;
  opacity: 0.5;
}

/* ============================================================
   SECTION TITLE
   ============================================================ */
.section-title {
  font-family: 'Portmanteau', sans-serif;
  font-size: 1.4rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin: 30px 0 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .galeria {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
  }
  .galeria img, .video-thumb {
    height: 160px;
  }
  .filtro-seccion {
    gap: 8px;
  }
  .hero h1, .hero-ciudad h1 {
    font-size: 1.8rem;
  }
  .ciudad-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
  }
}

@media (max-width: 480px) {
  .galeria {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  .galeria img, .video-thumb {
    height: 140px;
  }
  .btn {
    padding: 7px 12px;
    font-size: 0.75rem;
  }
}

/* ============================================================
   SCROLLBAR STYLING
   ============================================================ */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: var(--accent-dark);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-gold);
}

/* ============================================================
   LOADING STATE
   ============================================================ */
.loading {
  text-align: center;
  padding: 60px 20px;
  font-family: 'IMFellDoublePica', Georgia, serif;
  font-style: italic;
  color: var(--text-muted);
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}


/* ============================================================
   SKELETON LOADING — optimización conexiones lentas
   ============================================================ */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}

/* Skeleton solo en fotos, no en .video-thumb (tiene img interna) */
.galeria img:not(.loaded) {
  background: var(--bg-card);
  background-image: linear-gradient(
    90deg,
    var(--bg-card) 0px,
    var(--bg-secondary) 40px,
    var(--bg-card) 80px
  );
  background-size: 600px 100%;
  animation: shimmer 1.4s infinite linear;
}

.galeria img.loaded {
  animation: none;
  background: none;
}

/* Fade-in suave al cargar — excluir imgs dentro de video-thumb */
.galeria img:not(.video-thumb img) {
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.galeria img.loaded:not(.video-thumb img) {
  opacity: 1;
}
/* Video thumb img siempre visible */
.video-thumb img {
  opacity: 1 !important;
  animation: none !important;
  background: none !important;
}


/* ============================================================
   FULLSCREEN BUTTON
   ============================================================ */
.fullscreen-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  color: var(--accent-gold);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  cursor: pointer;
  z-index: 200;
  transition: background 0.2s, box-shadow 0.2s;
  user-select: none;
  backdrop-filter: blur(4px);
}
.fullscreen-btn:hover {
  background: rgba(0,0,0,0.85);
  box-shadow: 0 0 14px var(--accent-glow);
}
.fullscreen-btn svg {
  display: block;
}
@media (max-width: 480px) {
  .close-btn {
    top: 12px;
    right: 12px;
    padding: 7px 12px;
    font-size: 0.75rem;
  }
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  text-align: center;
  padding: 30px 20px;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: 'IMFellDoublePica', Georgia, serif;
  font-style: italic;
  font-size: 0.9rem;
  margin-top: 40px;
  background: var(--bg-secondary);
  transition: background 0.4s ease;
}

.btn-novedades {
  background: var(--btn-bg);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
}
.btn-novedades:hover, .btn-active {
  background: var(--accent-gold) !important;
  color: #1a1006 !important;
  box-shadow: 0 0 14px var(--accent-glow);
}
