/* ════════════════════════════════════════════════════════════════
   DIQUES DE CÓRDOBA — main.css
   Design system completo
   ═══════════════════════════════════════════════════════════════ */

:root {
  --navy: #071929;
  --deep: #0d2b45;
  --blue: #1a5276;
  --mid: #2e86c1;
  --sky: #5dade2;
  --accent: #d4ac0d;
  --terra: #c0392b;
  --sand: #f0e6d3;
  --cream: #faf7f2;
  --white: #ffffff;
  --text: #1c2833;
  --muted: #5d6d7e;
  --border: rgba(0,0,0,.08);
  --font-mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'DM Sans', sans-serif; background: var(--cream); color: var(--text); overflow-x: hidden; }
img { max-width: 100%; }
a { color: inherit; }

/* ── NAV ───────────────────────────────────────────────────────── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 18px 40px; display: flex; align-items: center;
  justify-content: space-between; transition: all .4s ease;
}
#navbar.scrolled {
  background: rgba(7,25,41,.95); backdrop-filter: blur(12px);
  padding: 12px 40px; box-shadow: 0 2px 30px rgba(0,0,0,.4);
}
.nav-logo { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; font-weight: 600; color: var(--white); letter-spacing: .04em; text-decoration: none; }
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a { color: rgba(255,255,255,.8); text-decoration: none; font-size: .83rem; letter-spacing: .06em; text-transform: uppercase; transition: color .3s; }
.nav-links a:hover { color: var(--accent); }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 4px; }
.hamburger span { width: 24px; height: 2px; background: white; display: block; }
.nav-mobile { display: none; position: fixed; inset: 0; background: rgba(4,15,26,.97); z-index: 99; flex-direction: column; align-items: center; justify-content: center; gap: 28px; }
.nav-mobile.open { display: flex; }
.nav-mobile a { color: var(--white); text-decoration: none; font-family: 'Cormorant Garamond', serif; font-size: 1.8rem; font-weight: 300; }
.nav-mobile a:hover { color: var(--accent); }
.close-btn { position: absolute; top: 24px; right: 28px; color: white; font-size: 1.6rem; cursor: pointer; background: none; border: none; }

/* ── HERO ──────────────────────────────────────────────────────── */
#hero {
  height: 100vh; min-height: 680px; display: flex; align-items: center;
  justify-content: center; position: relative; overflow: hidden;
  background: linear-gradient(160deg, #071929 0%, #0d2b45 40%, #1a3a56 70%, #0d3052 100%);
}
.hero-water { position: absolute; inset: 0; background: radial-gradient(ellipse 120% 60% at 20% 80%, rgba(45,134,193,.18) 0%, transparent 60%), radial-gradient(ellipse 80% 80% at 80% 20%, rgba(13,48,82,.4) 0%, transparent 70%); }
.hero-content { text-align: center; position: relative; z-index: 2; padding: 0 20px; max-width: 900px; }
.hero-eyebrow { font-size: .78rem; letter-spacing: .25em; text-transform: uppercase; color: var(--accent); margin-bottom: 20px; animation: fadeUp .8s ease both; display: block; }
.hero-title { font-family: 'Cormorant Garamond', serif; font-size: clamp(3.2rem, 8vw, 7rem); font-weight: 300; line-height: 1.05; color: var(--white); margin-bottom: 24px; animation: fadeUp .9s .1s ease both; }
.hero-title em { font-style: italic; color: var(--sky); }
.hero-sub { font-size: 1.1rem; color: rgba(255,255,255,.65); max-width: 560px; margin: 0 auto 36px; line-height: 1.7; animation: fadeUp 1s .2s ease both; }
.hero-stats { display: flex; gap: 48px; justify-content: center; animation: fadeUp 1s .35s ease both; flex-wrap: wrap; margin-bottom: 36px; }
.stat { text-align: center; }
.stat-num { font-family: var(--font-mono); font-size: 2.6rem; font-weight: 700; color: var(--accent); display: block; line-height: 1; }
.stat-label { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.5); margin-top: 4px; }
.btn-hero { display: inline-block; padding: 14px 32px; background: var(--mid); color: white; text-decoration: none; border-radius: 4px; font-size: .9rem; letter-spacing: .04em; transition: background .3s; animation: fadeUp 1s .45s ease both; }
.btn-hero:hover { background: var(--blue); }
.hero-waves { position: absolute; bottom: 0; left: 0; right: 0; height: 200px; overflow: hidden; pointer-events: none; }
.wave { position: absolute; bottom: 0; left: -50%; width: 200%; height: 100%; border-radius: 50% 50% 0 0; }
.wave1 { background: rgba(255,255,255,.03); animation: wave1 8s ease-in-out infinite; }
.wave2 { background: rgba(255,255,255,.04); animation: wave2 10s ease-in-out infinite; bottom: -20px; }
.wave3 { background: var(--cream); bottom: -80px; }
@keyframes wave1 { 0%,100%{transform:translateX(0) scaleY(1)} 50%{transform:translateX(-5%) scaleY(1.1)} }
@keyframes wave2 { 0%,100%{transform:translateX(0) scaleY(1)} 50%{transform:translateX(5%) scaleY(.9)} }
@keyframes fadeUp { from{opacity:0;transform:translateY(30px)} to{opacity:1;transform:translateY(0)} }

/* ── SECTIONS ──────────────────────────────────────────────────── */
.section-light { padding: 100px 40px; background: var(--cream); }
.section-dark  { padding: 100px 40px; background: var(--deep); }
.section-navy  { padding: 100px 40px; background: var(--navy); }
.container { max-width: 1100px; margin: 0 auto; }
.section-label { font-size: .72rem; letter-spacing: .25em; text-transform: uppercase; color: var(--mid); margin-bottom: 12px; display: block; }
.section-title { font-family: 'Cormorant Garamond', serif; font-size: clamp(2.2rem, 4.5vw, 3.8rem); font-weight: 400; line-height: 1.15; color: var(--navy); margin-bottom: 20px; }
.section-title em { font-style: italic; color: var(--mid); }
.section-intro { font-size: 1.05rem; color: var(--muted); max-width: 680px; line-height: 1.75; }
.reveal { opacity: 0; transform: translateY(40px); transition: all .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── TIPOS GRID ────────────────────────────────────────────────── */
.tipos-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-top: 56px; }
.tipo-card { background: var(--white); border: 1px solid var(--border); border-top: 3px solid var(--mid); padding: 24px 20px; border-radius: 4px; transition: transform .3s, box-shadow .3s; }
.tipo-card:hover { transform: translateY(-5px); box-shadow: 0 16px 40px rgba(0,0,0,.1); }
.tipo-icon { font-size: 1.8rem; display: block; margin-bottom: 12px; }
.tipo-card h3 { font-size: .95rem; font-weight: 500; color: var(--navy); margin-bottom: 8px; }
.tipo-card p { font-size: .83rem; color: var(--muted); line-height: 1.6; }

/* ── DIQUES GRID HOME ──────────────────────────────────────────── */
.diques-grid-home { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-top: 48px; }
.dique-card-home { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); border-radius: 6px; overflow: hidden; text-decoration: none; transition: transform .3s, background .3s; }
.dique-card-home:hover { transform: translateY(-6px); background: rgba(255,255,255,.09); }
.dique-card-bar { height: 4px; }
.dique-card-body { padding: 22px; }
.badge { font-size: .68rem; padding: 2px 8px; background: rgba(212,172,13,.12); color: var(--accent); border: 1px solid rgba(212,172,13,.3); border-radius: 20px; display: inline-block; margin-bottom: 10px; }
.dique-card-home h3 { font-family: 'Cormorant Garamond', serif; font-size: 1.4rem; color: var(--white); margin-bottom: 4px; }
.dique-card-sub { font-size: .8rem; color: var(--sky); margin-bottom: 8px; }
.dique-card-stat { font-family: var(--font-mono); font-size: 1.1rem; font-weight: 700; color: var(--accent); margin-bottom: 10px; }
.dique-card-desc { font-size: .83rem; color: rgba(255,255,255,.5); line-height: 1.65; }
.btn-outline { display: inline-block; padding: 13px 28px; border: 1px solid rgba(255,255,255,.3); color: var(--white); text-decoration: none; border-radius: 4px; transition: all .3s; }
.btn-outline:hover { border-color: var(--sky); color: var(--sky); }
.btn-outline-light { display: inline-block; padding: 11px 24px; border: 1px solid rgba(255,255,255,.2); color: rgba(255,255,255,.7); text-decoration: none; border-radius: 4px; transition: all .3s; }
.btn-outline-light:hover { border-color: var(--accent); color: var(--accent); }

/* ── TIMELINE ──────────────────────────────────────────────────── */
.timeline { 
  margin-top: 60px; position: relative; display: flex; overflow-x: auto; 
  padding-bottom: 40px; scroll-snap-type: x mandatory; gap: 40px;
  -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--mid) transparent;
}
.timeline::-webkit-scrollbar { height: 6px; }
.timeline::-webkit-scrollbar-thumb { background: var(--mid); border-radius: 3px; }
.timeline::before { content: none; } /* removed vertical line for desktop */

.timeline-item { 
  flex: 0 0 350px; scroll-snap-align: start; display: flex; flex-direction: column; 
  align-items: flex-start; gap: 16px; position: relative;
}
.timeline-item::before { /* horizontal line */
  content: ''; position: absolute; top: 18px; left: 0; right: -40px; 
  height: 2px; background: rgba(0,0,0,.08); z-index: 1;
}
.timeline-item:last-child::before { right: 0; }
.timeline-dot { 
  width: 16px; height: 16px; border-radius: 50%; background: var(--mid); 
  border: 4px solid var(--cream); z-index: 2; margin: 11px 0 0 0; flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(46,134,193,.15);
}
.timeline-content { 
  background: var(--white); border: 1px solid var(--border); border-radius: 6px; 
  padding: 26px; box-shadow: 0 2px 12px rgba(0,0,0,.05); transition: all 0.4s ease; 
  width: 100%; border-top: 3px solid var(--mid);
}
.tl-year { font-family: var(--font-mono); font-size: 1.4rem; color: var(--navy); font-weight: 700; line-height: 1; margin-bottom: 12px; }
.timeline-content h3 { color: var(--mid); font-size: 1.05rem; margin-bottom: 10px; font-weight: 500; }
.timeline-content p { color: var(--muted); font-size: .88rem; line-height: 1.7; }
.timeline-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--mid); border: 3px solid var(--cream); box-shadow: 0 0 0 4px rgba(46,134,193,.15); margin-top: 20px; }

/* ── TECH GRID ─────────────────────────────────────────────────── */
.tech-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; margin-top: 52px; }
.tech-card { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 6px; padding: 28px 22px; transition: background .3s; }
.tech-card:hover { background: rgba(255,255,255,.08); }
.tech-icon { font-size: 1.8rem; margin-bottom: 14px; display: block; }
.tech-card h3 { font-family: 'Cormorant Garamond', serif; font-size: 1.25rem; color: var(--sky); margin-bottom: 12px; }
.tech-card ul { color: rgba(255,255,255,.55); font-size: .85rem; line-height: 1.7; padding-left: 16px; }
.tech-card p { color: rgba(255,255,255,.55); font-size: .85rem; line-height: 1.7; }

/* ── TURISMO ───────────────────────────────────────────────────── */
.turismo-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-top: 52px; }
.turismo-card { background: var(--white); border: 1px solid var(--border); border-radius: 6px; padding: 28px 24px; transition: transform .3s, box-shadow .3s; }
.turismo-card:hover { transform: translateY(-5px); box-shadow: 0 16px 40px rgba(0,0,0,.1); }
.turismo-emoji { font-size: 2rem; display: block; margin-bottom: 14px; }
.turismo-card h3 { font-size: 1rem; font-weight: 500; color: var(--navy); margin-bottom: 8px; }
.turismo-card p { font-size: .85rem; color: var(--muted); line-height: 1.7; }

/* ── BLOG CARDS ────────────────────────────────────────────────── */
.blog-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-top: 48px; }
.blog-card { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); border-radius: 6px; padding: 24px; text-decoration: none; transition: background .3s; }
.blog-card:hover { background: rgba(255,255,255,.09); }
.blog-cat { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); display: block; margin-bottom: 10px; }
.blog-card h3 { font-size: 1rem; color: var(--white); font-weight: 500; line-height: 1.4; margin-bottom: 10px; }
.blog-card p { font-size: .84rem; color: rgba(255,255,255,.5); line-height: 1.65; margin-bottom: 12px; }
.blog-date { font-size: .75rem; color: rgba(255,255,255,.3); }

/* ── DIQUE PAGE ────────────────────────────────────────────────── */
.dique-page { background: #f6f7f9; }
.dique-hero {
  padding: 140px 40px 70px; position: relative;
  background: linear-gradient(160deg, var(--navy) 0%, var(--deep) 60%, color-mix(in srgb, var(--acento, #2e86c1) 30%, var(--navy)) 100%);
}
.dique-hero-content { max-width: 760px; position: relative; z-index: 2; }
.breadcrumb { font-size: .78rem; color: rgba(255,255,255,.4); margin-bottom: 16px; }
.breadcrumb a { color: rgba(255,255,255,.5); text-decoration: none; }
.breadcrumb a:hover { color: var(--sky); }
.dique-badge { font-size: .72rem; padding: 3px 10px; background: rgba(212,172,13,.12); color: var(--accent); border: 1px solid rgba(212,172,13,.3); border-radius: 20px; display: inline-block; margin-bottom: 14px; }
.dique-hero h1 { font-family: 'Cormorant Garamond', serif; font-size: clamp(2.4rem, 5vw, 4rem); color: var(--white); font-weight: 300; line-height: 1.1; margin-bottom: 10px; }
.dique-hero-sub { font-size: 1.15rem; color: var(--sky); margin-bottom: 20px; }
.dique-hero-meta { display: flex; gap: 20px; flex-wrap: wrap; }
.dique-hero-meta span { font-size: .82rem; color: rgba(255,255,255,.6); }
.estado-proyecto { background: rgba(212,172,13,.1); color: var(--accent); padding: 2px 10px; border-radius: 20px; font-size: .75rem !important; }
.dique-layout { display: grid; grid-template-columns: 1fr 280px; gap: 48px; padding: 56px 40px; }
.dique-stats-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }
.stat-box { background: var(--white); border: 1px solid var(--border); border-radius: 4px; padding: 16px 20px; text-align: center; min-width: 110px; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.stat-box-val { display: block; font-size: 1.1rem; color: var(--navy); font-weight: 700; }
.stat-box-label { font-size: .7rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-top: 2px; display: block; }
.dique-num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.dique-section { margin-bottom: 36px; }
.dique-section h2 { font-family: 'Cormorant Garamond', serif; font-size: 1.7rem; color: var(--navy); margin-bottom: 14px; font-weight: 400; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.dique-section p { font-size: .95rem; color: var(--muted); line-height: 1.8; }
.tech-box { background: transparent; border-radius: 0; padding: 0; }
.tech-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; list-style: none; padding: 0; margin: 0; }
.tech-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: box-shadow .25s, border-color .25s;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.tech-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  border-color: rgba(46,134,193,.3);
}
.tech-card-icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(46,134,193,.08);
  border-radius: 10px;
  font-size: 1.2rem;
}
.tech-card-icon svg { width: 20px; height: 20px; color: var(--blue); }
.tech-card-icon svg * { vector-effect: non-scaling-stroke; }
.tech-card-body { flex: 1; min-width: 0; }
.tech-card-label {
  font-size: .72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 2px;
  display: block;
}
.tech-card-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  display: block;
  line-height: 1.3;
}
.tech-card-unit {
  font-family: 'DM Sans', sans-serif;
  font-size: .8rem;
  font-weight: 400;
  color: var(--muted);
  margin-left: 3px;
}

/* ── Prose section (Historia, Descripción) ─────────────────────── */
.dique-prose {
  font-size: .95rem;
  color: #444;
  line-height: 1.85;
  max-width: 72ch;
}
.dique-prose p { margin-bottom: 1em; }

/* ── Historia (narrativa larga, serif premium) ─────────────────── */
.dique-story {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 26px 26px;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
}
.dique-story .dique-prose {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.12rem;
  color: var(--text);
  line-height: 1.95;
  max-width: 75ch;
}
.dique-story .dique-prose p { margin-bottom: 1.1em; }

/* ── Leaflet map in dique detail ──────────────────────────────── */
.dique-leaflet-map {
  width: 100%;
  height: 380px;
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow: hidden;
  z-index: 1;
}
.dique-map-coords {
  font-size: .8rem;
  color: var(--muted);
  margin-top: 8px;
}
.dique-map-coords a { color: var(--blue); text-decoration: none; }
.dique-map-coords a:hover { text-decoration: underline; }

/* ── Usos & Tags ─────────────────────────────────────────────── */
.usos-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.uso-tag { padding: 6px 14px; background: rgba(46,134,193,.08); border: 1px solid rgba(46,134,193,.2); color: var(--blue); border-radius: 20px; font-size: .82rem; }

/* ── Nav prev/next ────────────────────────────────────────────── */
.mapa-container { margin-top: 12px; }
.dique-prevnext { display: flex; justify-content: space-between; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }
.prevnext-btn { color: var(--mid); text-decoration: none; font-size: .88rem; transition: color .3s; }
.prevnext-btn:hover { color: var(--blue); }

/* ── Sidebar ─────────────────────────────────────────────────── */
.dique-sidebar { }
.sidebar-box { background: var(--white); border: 1px solid var(--border); border-radius: 6px; padding: 22px; margin-bottom: 20px; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.sidebar-box h3 { font-size: .88rem; font-weight: 500; color: var(--navy); margin-bottom: 14px; text-transform: uppercase; letter-spacing: .06em; }
.sidebar-diques-list { list-style: none; }
.sidebar-diques-list li a { display: block; padding: 8px 10px; font-size: .83rem; color: var(--muted); text-decoration: none; border-left: 3px solid transparent; margin-bottom: 2px; transition: all .2s; }
.sidebar-diques-list li a:hover { color: var(--navy); background: rgba(46,134,193,.05); }
.sidebar-diques-list li.active a { color: var(--navy); font-weight: 500; background: rgba(46,134,193,.06); }
.sidebar-ficha dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: .82rem; }
.sidebar-ficha dt { color: var(--muted); font-weight: 400; }
.sidebar-ficha dd { color: var(--navy); font-weight: 500; font-size: .82rem; }

/* ── DIQUES LIST PAGE ──────────────────────────────────────────── */
.diques-list-page { padding: 120px 40px 80px; }
.diques-full-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; margin-top: 48px; }
.dique-full-card { background: var(--white); border-radius: 6px; overflow: hidden; box-shadow: 0 2px 16px rgba(0,0,0,.06); text-decoration: none; transition: transform .3s, box-shadow .3s; }
.dique-full-card:hover { transform: translateY(-6px); box-shadow: 0 20px 48px rgba(0,0,0,.14); }

/* ── BLOG PAGES ────────────────────────────────────────────────── */
.blog-list-page { padding: 120px 40px 80px; }
.blog-header { margin-bottom: 40px; }
.blog-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 36px; }
.filter-btn { padding: 7px 16px; border-radius: 20px; border: 1px solid var(--border); color: var(--muted); font-size: .82rem; text-decoration: none; transition: all .2s; }
.filter-btn:hover, .filter-btn.active { background: var(--mid); color: white; border-color: var(--mid); }
.blog-grid-list { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.blog-card-list { background: var(--white); border-radius: 6px; padding: 26px; text-decoration: none; box-shadow: 0 2px 12px rgba(0,0,0,.06); transition: transform .3s, box-shadow .3s; display: block; }
.blog-card-list:hover { transform: translateY(-5px); box-shadow: 0 16px 40px rgba(0,0,0,.12); }
.blog-card-list h2 { font-size: 1.1rem; color: var(--navy); font-weight: 500; margin: 10px 0 10px; line-height: 1.4; }
.blog-card-list p { font-size: .86rem; color: var(--muted); line-height: 1.65; margin-bottom: 14px; }
.blog-card-meta { display: flex; justify-content: space-between; font-size: .76rem; color: var(--muted); }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 48px; }
.page-btn { padding: 8px 14px; border: 1px solid var(--border); border-radius: 4px; text-decoration: none; color: var(--muted); font-size: .85rem; transition: all .2s; }
.page-btn:hover, .page-btn.active { background: var(--mid); color: white; border-color: var(--mid); }
/* Blog post */
.blog-post-page { padding: 120px 0 80px; }
.blog-post-layout { display: grid; grid-template-columns: 1fr 260px; gap: 48px; padding: 0 40px; max-width: 1100px; margin: 0 auto; }
.post-cat { font-size: .72rem; text-transform: uppercase; letter-spacing: .15em; color: var(--mid); }
.post-main h1 { font-family: 'Cormorant Garamond', serif; font-size: clamp(2rem, 3.5vw, 2.8rem); color: var(--navy); font-weight: 400; line-height: 1.2; margin: 14px 0 16px; }
.post-bajada { font-size: 1.1rem; color: var(--muted); line-height: 1.7; margin-bottom: 20px; }
.post-byline { font-size: .82rem; color: var(--muted); padding-bottom: 24px; border-bottom: 1px solid var(--border); margin-bottom: 28px; }
.post-byline a { color: var(--mid); text-decoration: none; }
.post-content { font-size: .97rem; color: var(--text); line-height: 1.85; }
.post-content h2 { font-family: 'Cormorant Garamond', serif; font-size: 1.6rem; color: var(--navy); margin: 28px 0 12px; font-weight: 400; }
.post-content p { margin-bottom: 16px; color: var(--muted); }
.post-content ul, .post-content ol { padding-left: 20px; margin-bottom: 16px; color: var(--muted); }
.post-content li { margin-bottom: 6px; }
.back-link { display: inline-block; margin-top: 32px; color: var(--mid); text-decoration: none; font-size: .88rem; }
.blog-sidebar .sidebar-post-link { display: block; padding: 12px 0; border-bottom: 1px solid var(--border); text-decoration: none; font-size: .83rem; color: var(--text); line-height: 1.5; transition: color .2s; }
.blog-sidebar .sidebar-post-link:hover { color: var(--mid); }
.spl-cat { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--mid); display: block; margin-bottom: 2px; }

/* ── MAPA INTERACTIVO (CENTRO DE MANDO) ────────────────────────── */
.map-wrapper {
  position: relative; width: 100%; height: 500px; 
  border-radius: 8px; overflow: hidden; margin-top: 40px;
  border: 1px solid rgba(255,255,255,.1); box-shadow: 0 10px 40px rgba(0,0,0,.2);
}
#map-home { width: 100%; height: 100%; background: #0b1a2a; z-index: 1; }
.map-overlay {
  position: absolute; inset: 0; background: rgba(7,25,41,.6); z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  backdrop-filter: blur(2px); transition: opacity 0.3s ease; cursor: pointer;
}
.map-overlay.hidden { opacity: 0; pointer-events: none; }
.btn-mapa {
  padding: 12px 24px; background: var(--mid); color: #fff; border: none;
  border-radius: 4px; font-weight: 500; font-size: 0.95rem; cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.3); pointer-events: auto;
}
.map-overlay-text { color: #fff; font-size: 0.85rem; margin-top: 10px; opacity: 0.8; }
/* Estilos Custom Leaflet Modal */
.leaflet-popup-content-wrapper { background: var(--deep); color: #fff; border: 1px solid rgba(255,255,255,.1); border-radius: 6px; }
.leaflet-popup-tip { background: var(--deep); }
.leaflet-popup-content h3 { margin: 0 0 8px 0; font-family: 'Cormorant Garamond', serif; font-size: 1.15rem; color: var(--sky); }
.leaflet-popup-content a { color: var(--accent); text-decoration: none; font-size: 0.85rem; font-weight: 500; display: inline-block; margin-top: 8px; }
.leaflet-popup-close-button { color: #fff !important; }

/* ── FLICKR GALLERY ────────────────────────────────────────────── */
.flickr-gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-top: 40px;
}
.flickr-item {
  position: relative; overflow: hidden; border-radius: 6px; height: 260px;
  background: var(--navy); border: 1px solid var(--border); transition: transform 0.3s ease;
}
.flickr-item:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(0,0,0,.15); }
.flickr-item img {
  width: 100%; height: 100%; object-fit: cover; opacity: 0.9; transition: opacity 0.3s ease, transform 0.5s ease;
}
.flickr-item:hover img { opacity: 1; transform: scale(1.03); }
.flickr-caption {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 24px 16px 16px;
  background: linear-gradient(to top, rgba(0,0,0,.8) 0%, transparent 100%);
  color: #fff; font-size: 0.78rem; font-family: var(--font-mono); letter-spacing: 0.02em;
  transform: translateY(0); transition: transform 0.3s ease; text-shadow: 0 1px 2px rgba(0,0,0,.8);
}
.flickr-caption span { display: block; font-family: 'DM Sans', sans-serif; font-size: 0.7rem; color: rgba(255,255,255,.6); margin-top: 2px; }

/* ── FOOTER ────────────────────────────────────────────────────── */
footer { background: #040f1a; color: rgba(255,255,255,.5); padding: 70px 40px 40px; }
.footer-inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 40px; }
.footer-logo { font-family: 'Cormorant Garamond', serif; font-size: 1.8rem; color: var(--white); margin-bottom: 12px; }
.footer-logo span { color: var(--accent); }
.footer-brand p { font-size: .83rem; line-height: 1.7; max-width: 280px; }
.footer-nav h4 { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: rgba(255,255,255,.3); margin-bottom: 14px; font-weight: 400; }
.footer-nav ul { list-style: none; }
.footer-nav li { margin-bottom: 8px; }
.footer-nav a { color: rgba(255,255,255,.5); text-decoration: none; font-size: .83rem; transition: color .2s; }
.footer-nav a:hover { color: var(--sky); }
.footer-bottom { max-width: 1100px; margin: 0 auto; border-top: 1px solid rgba(255,255,255,.06); padding-top: 24px; font-size: .78rem; }
.footer-sources { opacity: .5; margin-top: 6px; font-size: .73rem; line-height: 1.6; }

/* ── RESPONSIVE ────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .tipos-grid { grid-template-columns: repeat(4,1fr); }
  .tech-grid { grid-template-columns: repeat(2,1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  #navbar { padding: 16px 24px; }
  #navbar.scrolled { padding: 12px 24px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .section-light, .section-dark, .section-navy { padding: 70px 24px; }
  .tipos-grid { grid-template-columns: repeat(2,1fr); }
  .diques-grid-home, .turismo-grid, .blog-grid { grid-template-columns: 1fr 1fr; }
  
  /* Timeline responsive: Smooth conversion from Horizontal to Vertical via CSS */
  .timeline {
    flex-direction: column; overflow: visible; padding-bottom: 0; gap: 0;
    margin-left: 12px; border-left: 2px solid var(--border); transition: all 0.4s ease;
  }
  .timeline-item {
    flex: auto; padding-left: 32px; padding-bottom: 40px; align-items: flex-start;
    transition: all 0.4s ease;
  }
  .timeline-item::before { content: none; } /* remove horizontal lines */
  .timeline-dot {
    position: absolute; left: -10px; margin-top: 16px; /* align dot to vertical line */
    background: var(--white); border: 3px solid var(--mid); transition: all 0.4s ease;
  }
  
  .dique-layout { grid-template-columns: 1fr; }
  .dique-hero { padding: 120px 24px 50px; }
  .dique-layout { padding: 40px 24px; }
  .blog-post-layout { grid-template-columns: 1fr; padding: 0 24px; }
  .blog-sidebar { display: none; }
  .tech-grid { grid-template-columns: repeat(2,1fr); }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 600px) {
  .tipos-grid, .diques-grid-home, .turismo-grid, .blog-grid, .blog-grid-list, .tech-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; gap: 20px; align-items: center; }
  .diques-list-page, .blog-list-page { padding: 100px 24px 60px; }
}
