/* ===== TEMA ===== */
body {
	--bg-2: #ede0c0;
	--surface: #ffffff; --surface-2: #fff8eb;
	--text: #1a2b3c; --text-dim: hsl(210deg 16.36% 30%);
	--primary: #0891b2; --primary-2: #22d3ee;
	--accent: #ea580c;
	--land: hsl(109deg 51% 76%); --land-hover: hsl(109 91% 36%); --land-stroke: #1a2b3c;
	--shadow: 0 10px 30px rgba(8,145,178,.15);
	--gradient-hero: linear-gradient(180deg, #fde7c7 0%, #f4ecd8 60%, #c9d8e0 100%);
	--font-head: 'Inter', system-ui, sans-serif; 
	--font-body: 'Inter', system-ui, sans-serif;
	--radius: 6px;
	--card: #ffffff;
	--card-border:  #bae6fd;
	--shadow: 0 4px 24px rgba(0,0,0,0.10);
	--text: #0c4a6e;
	--text-muted:   #0284c7;
}

/* ========== RESET & BASE ========== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
	font-family: var(--font-body);
	background: hsl(210deg 19% 97%);
	color: var(--text);
	line-height: 1.6;
	transition: background-color .4s ease, color .4s ease;
	min-height: 100vh;
}
body.lb-open { overflow: hidden; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; letter-spacing: -.01em; }
.hidden { display: none !important; }
img { pointer-events: none; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.gallery img, #lb-img { pointer-events: all; -webkit-touch-callout: all; -webkit-user-select: all; user-select: all; }

/* ========== NAVBAR ========== */
.nav {
	position: sticky; top: 0; z-index: 50;
	background: #0c4a6e;
	backdrop-filter: blur(12px);
	border-bottom: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
}
.nav-inner {
	max-width: 1200px; margin: 0 auto; padding: 12px 20px;
	display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.brand-flag {
	width: 91px; height: 46px; border-radius: 4px; overflow: hidden;
	background-image: url(/img/logo.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: absolute;
}
.brand-text { font-family: var(--font-head); font-size: 20px; font-weight: 700; color: hsl(192 51% 76%); margin-left: 105px; }

/* ========== HERO HEADER ========== */
.hero { padding: 7.75rem 1.5rem 2.5rem; text-align: center; background-position: center; background-size: cover; color: #fff;}
@media (width <= 300px) { .hero { background-image: url(/img/hero-home/hero-home-300.webp); } }
@media (width > 300px) { .hero { background-image: url(/img/hero-home/hero-home-500.webp); } }
@media (width > 500px) { .hero { background-image: url(/img/hero-home/hero-home-800.webp); } }
@media (width > 800px) { .hero { background-image: url(/img/hero-home/hero-home-1200.webp); } }
@media (width > 1200px) { .hero { background-image: url(/img/hero-home/hero-home-1600.webp); } }
@media (width > 1600px) { .hero { background-image: url(/img/hero-home/hero-home.webp); } }

.hero h1 { font-size: clamp(28px, 5vw, 48px); margin-bottom: 8px; }
.hero p { font-size: 1rem; max-width:580px; margin: 0 auto; background-color: #00000091;}

/* ========== STATS BAR ========== */
.stats-bar {
	background: var(--card);
	border-bottom: 1px solid var(--card-border);
	padding: 1.2rem 1.5rem;
}
.stats-inner { max-width: 700px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; text-align: center; }
.stat-icon { font-size: 1.4rem; margin-bottom: 0.2rem; line-height: 1.3;}
.stat-value { font-size: 1.5rem; font-weight: 800; color: var(--text); line-height: 1;}
.stat-label { font-size: 0.72rem; color: var(--text-muted); }

/* ========== MAP ========== */
.map-guide { padding: 30px 20px 0px; max-width: 1100px; margin: 0 auto; }
.section-title { font-size: 1.35rem; font-weight: 700; margin-bottom: 0.35rem; color: var(--text); }
.section-sub { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 1.2rem; }
.map-wrap {
	max-width: 1100px; margin: 0 auto; padding: 0px 20px 60px;
	display: grid; grid-template-columns: minmax(300px, 1fr) 320px; gap: 30px; align-items: start;
}
@media (max-width: 860px) { .map-wrap { grid-template-columns: 1fr; } }
.map-box {
	border-radius: 16px;
	padding: 16px;
}
.map-box svg { width: 100%; height: auto; display: block; }
@media (max-width: 640px) { 
    .map-box { padding: 40px 0; overflow: hidden; margin: 0 -16px; } 
    svg { transform: scale(1.1); }
}
.map-box svg path {
	fill: var(--land); stroke: var(--land-stroke); stroke-width: .6; stroke-linejoin: round;
	cursor: pointer;
	transition: fill .25s ease, filter .25s;
}
.map-box svg path:hover {
	fill: var(--land-hover);
	filter: drop-shadow(0 4px 10px color-mix(in srgb, var(--primary) 60%, transparent));
}
.map-box svg path.empty { fill: lightgray; cursor: default;}
.map-box svg path.empty:hover { fill: lightgray; filter: none; }
.map-box svg path.active { fill: var(--primary); }
.map-box svg text.dept-label {
	font-size: 11px; font-weight: 700; pointer-events: none;
	fill: var(--land-stroke);
	text-anchor: middle; dominant-baseline: middle;
	paint-order: stroke;
	user-select: none;
}
.map-box svg text.dept-label.small { font-size: 7px; }

.info-panel {
	background: var(--surface); border-radius: 12px; padding: 24px;
	box-shadow: var(--shadow);
	border: 1px solid #bae6fd;
	position: sticky; top: 90px;
}
.info-panel h3 { font-size: 22px; margin-bottom: 6px; color: var(--primary); }
.info-panel .cap { font-size: 13px; color: var(--text-dim); margin-bottom: 14px; }
.info-panel p { font-size: 14px; color: var(--text-dim); }
.info-panel .placeholder { text-align: center; padding: 30px 10px; }
.info-panel .placeholder span { font-size: 40px; display: block; margin-bottom: 10px; }

/* ========== WHY PERU ========== */
.why-peru { padding: 3rem 1.5rem; border-top: 1px solid var(--card-border); }
.why-grid { max-width: 900px; margin: 1.5rem auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 600px) { .why-grid { grid-template-columns: 1fr; } }
.why-card {
	background: var(--card);
	border: 1px solid var(--card-border);
	border-radius: 16px;
	padding: 1.75rem 1.25rem;
	text-align: center;
	box-shadow: var(--shadow);
}
.why-emoji { font-size: 2.5rem; margin-bottom: 0.75rem; }
.why-card h3 { font-weight: 700; margin-bottom: 0.5rem; color: var(--text); }
.why-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }

.btn {
	display: inline-block; margin-top: 16px;
	padding: 10px 20px; border-radius: var(--radius);
	background: var(--primary); color: #fff;
	border: none; cursor: pointer; font-family: inherit; font-weight: 600;
	transition: transform .15s, background .2s; text-decoration: none; font-size: 14px;
}
.btn:hover { background: var(--primary-2); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-ghost:hover { background: var(--primary); color: #fff; }
.back-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	background: none;
	border: none;
	color: rgb(34 44 76 / 83%);
	cursor: pointer;
	font-size: 0.85rem;
	font-weight: 500;
	margin-bottom: 1.2rem;
	padding: 0;
	font-family: inherit;
	transition: color 0.2s;
}

.container { max-width: 1200px; margin: 0 auto; padding: 30px 20px 80px; }

.breadcrumb {
    top: 0;
    position: absolute;
    margin: 1.5rem;
    background-color: #0000006b;
    padding: 0 5px;
    border-radius: 4px;
}
.breadcrumb button { background: none; border: none; color: rgba(255,255,255,0.8); font-size: 0.82rem; cursor: pointer; padding: 0; font-family: inherit; font-weight: 500; }
.breadcrumb button:hover { color: #fff; }
.breadcrumb span { color: rgba(255,255,255,0.6); font-size: 0.82rem; }

.page-title { font-size: clamp(28px, 4vw, 40px); margin-bottom: 6px; }
.page-sub { color: var(--text-dim); margin-bottom: 30px; }

.dept-tag { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.65; margin-bottom: 0.4rem; display: flex; align-items: center; gap: 0.35rem; }

.grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card {
	background: var(--surface); border-radius: var(--radius);
	overflow: hidden; box-shadow: var(--shadow); cursor: pointer;
	border: 1px solid #dadada;
	transition: transform .25s, box-shadow .25s;
	display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(0,0,0,.3); }
.card img { width: 100%; height: 200px; object-fit: cover; display: block; background: #e5e5e5; }
.card-body { padding: 16px 18px 20px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { font-size: 18px; margin-bottom: 6px; }
.card-body p { font-size: 13px; color: var(--text-dim); flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-tag { display: inline-block; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--primary); margin-bottom: 8px; font-weight: 600; }

/* ========== PLACE PAGE ========== */
.place-hero-wrap { position: relative; height: 300px; overflow: hidden; }
@media (min-width: 640px) { .place-hero-wrap { height: 400px; } }
.place-hero-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.place-hero-overlay {
	position: absolute; inset: 0;
	background: linear-gradient(to top, rgba(0,0,0,0.72), rgba(0,0,0,0.15) 55%);
}
.place-hero-content { position: absolute; bottom: 0; left: 0; right: 0; padding: 1.5rem; color: #fff;}
.where { color: rgba(255, 255, 255, 0.8); font-size: .9rem; }

/* INFO TAB */
.place-description { font-size: 0.95rem; line-height: 1.7; color: var(--text); margin-bottom: 1.5rem; text-align: justify; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
@media (max-width: 500px) { .info-grid { grid-template-columns: 1fr; } }
.info-item {
	display: flex; gap: 0.75rem; padding: 1rem;
	/*border: 1px solid var(--card-border);*/
	border-radius: 12px;
	background: var(--bg2);
}
.info-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 1px; }
.info-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 0.25rem; }
.info-value { font-size: 0.88rem; color: var(--text); line-height: 1.5; }
.info-value ul { margin-left: 18px; }

.section { margin-bottom: 36px; }
.section h2 { font-size: 22px; margin-bottom: 14px; color: var(--primary); }
.section h2.small { font-size: 1rem; }
.section p { color: var(--text-dim); }
p.padded { padding-left: 28px; text-align: justify; }
p.padded2 { padding-left: 50px; text-align: justify; }

.gallery { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
@media (max-width: 480px) { 
    .gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
.gallery img { width: 100%; height: 160px; object-fit: cover; border-radius: var(--radius); cursor: zoom-in; transition: transform .3s; }
.gallery img:hover { transform: scale(1.03); }

.video-wrap { text-align: center; }
.video-wrap iframe { border: 0; aspect-ratio: 16 / 9; max-height: 100vh; border-radius: var(--radius);} 

iframe.mapa { border: 1px solid #a1a1a1; width: 100%; height: 90vh; }

footer { text-align: center; padding: 30px 20px; color: var(--text-dim); font-size: 13px; border-top: 1px solid color-mix(in srgb, var(--text) 8%, transparent); }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.view { animation: fadeIn .35s ease; }

#page404 { display: grid; place-items: center; height: calc(100vh - 57px); }

/* ========== LIGHTBOX ========== */
.lightbox {
	position: fixed; inset: 0; z-index: 999;
	background: rgba(0,0,0,0.92);
	display: flex; align-items: center; justify-content: center;
}
.lightbox.hidden { display: none; }
#lb-wrapper { line-height: 0; }
#lb-img { max-width: 100vw; max-height: 100vh; object-fit: contain; border-radius: 8px; }
.lb-close {
	position: absolute; top: 1rem; right: 1.25rem;
	background: none; border: none; color: #fff;
	font-size: 2rem; cursor: pointer; line-height: 1;
	opacity: 0.8; transition: opacity 0.2s;
}
.lb-close:hover { opacity: 1; }
.lb-prev, .lb-next {
	position: absolute; top: 50%; transform: translateY(-50%);
	background: none; border: none; color: #fff;
	font-size: 4rem; cursor: pointer; line-height: 1;
	opacity: 0.8; transition: opacity 0.2s; user-select: none;
	padding: 0 0.5rem; width: 4rem; height: 4rem;
}
.lb-prev:hover, .lb-next:hover { opacity: 1; }
.lb-prev { left: 0.5rem; }
.lb-next { right: 0.5rem; }
.lb-counter {
	position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%);
	color: rgba(255,255,255,0.8); font-size: 0.85rem;
	background-color: #00000094; padding: 2px 7px; border-radius: 7px;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(128,128,128,0.4); border-radius: 6px; }