/* ============================================================
   OLGUITA.ES — Hoja de estilos principal
   Paleta monocromática · Cormorant Garamond + EB Garamond
   ============================================================ */
:root {
    --ink:       #1a1a1a;
    --ink-soft:  #3a3a3a;
    --ink-muted: #6a6a6a;
    --stone:     #8a8a8a;
    --silver:    #b8b8b8;
    --smoke:     #d8d8d8;
    --mist:      #ebebeb;
    --fog:       #f4f4f4;
    --off-white: #fafafa;
    --pure:      #ffffff;
    --font-d:    'Cormorant Garamond', Georgia, serif;
    --font-b:    'EB Garamond', Georgia, serif;
    --max:       1100px;
}
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; font-size:18px; }
img  { display:block; max-width:100%; }
a    { text-decoration:none; color:inherit; }
body { font-family:var(--font-b); background:var(--off-white); color:var(--ink); line-height:1.75; }

/* ── CONTAINER ── */
.container { max-width:var(--max); margin:0 auto; padding:0 3rem; }

/* ── TYPOGRAPHY UTILS ── */
.label {
    display:block; font-family:var(--font-d); font-weight:300;
    font-size:.78rem; letter-spacing:.38em; text-transform:uppercase;
    color:var(--stone); margin-bottom:.9rem;
}
.title {
    font-family:var(--font-d); font-weight:300;
    font-size:clamp(2rem,4vw,3rem); line-height:1.15;
    color:var(--ink); margin-bottom:1.2rem;
}
.rule { width:48px; height:1px; background:var(--ink); margin-bottom:2.5rem; }
.label-inv { color:var(--stone); }
.title-inv { color:var(--off-white); }
.rule-inv  { background:var(--silver); }

/* ── BUTTONS ── */
.btn { display:inline-block; font-family:var(--font-d); font-size:.85rem; letter-spacing:.22em; text-transform:uppercase; padding:.85rem 2.2rem; transition:background .3s, color .3s; }
.btn-dark  { background:var(--ink);   color:var(--off-white); }
.btn-dark:hover  { background:var(--ink-soft); }
.btn-outline { border:1px solid var(--ink); color:var(--ink); }
.btn-outline:hover { background:var(--ink); color:var(--off-white); }
.btn-light { background:var(--off-white); color:var(--ink); border:1px solid var(--smoke); }
.btn-light:hover { background:var(--fog); }

/* ── NAV ── */
#nav {
    position:fixed; top:0; left:0; right:0; z-index:999;
    background:rgba(26,26,26,.97); backdrop-filter:blur(8px);
    height:58px; display:flex; align-items:center;
    padding:0 3rem; justify-content:space-between;
}
.nav-logo { font-family:var(--font-d); font-weight:300; font-size:1.25rem; letter-spacing:.28em; color:var(--off-white); text-transform:uppercase; }
.nav-links { list-style:none; display:flex; gap:1.8rem; flex-wrap:wrap; }
.nav-links a { font-family:var(--font-d); font-size:.88rem; letter-spacing:.08em; color:var(--silver); transition:color .3s; }
.nav-links a:hover, .nav-links a.active { color:var(--off-white); }
.nav-toggle { display:none; flex-direction:column; gap:5px; background:none; cursor:pointer; padding:4px; border:none; }
.nav-toggle span { display:block; width:24px; height:1px; background:var(--silver); }

/* ── PAGE HEADER (páginas interiores) ── */
.page-header {
    background:var(--ink); padding:7rem 0 4rem;
    margin-top:58px; text-align:center;
}
.page-header .label { color:var(--stone); margin-bottom:.5rem; }
.page-header h1 { font-family:var(--font-d); font-weight:300; font-size:clamp(2.5rem,6vw,4.5rem); color:var(--off-white); line-height:1; }
.page-header p { font-family:var(--font-d); font-style:italic; font-size:1.2rem; color:var(--silver); margin-top:1rem; }

/* ── SECTION ── */
section { padding:5rem 0; }
section.bg-fog   { background:var(--fog); }
section.bg-pure  { background:var(--pure); }
section.bg-dark  { background:var(--ink); }
section.bg-white { background:var(--off-white); }

/* ── ORNAMENT ── */
.ornament { text-align:center; font-family:var(--font-d); font-size:1.6rem; color:var(--smoke); letter-spacing:.5em; margin-bottom:2rem; }

/* ── FRAME ── */
.frame { border:1px solid var(--smoke); padding:2.5rem; position:relative; }
.frame::before { content:''; position:absolute; top:8px; left:8px; width:16px; height:16px; border-top:1px solid var(--stone); border-left:1px solid var(--stone); }
.frame::after  { content:''; position:absolute; bottom:8px; right:8px; width:16px; height:16px; border-bottom:1px solid var(--stone); border-right:1px solid var(--stone); }

/* ── TIMELINE HORIZONTAL ── */
.timeline-wrap { overflow-x:auto; padding-bottom:1rem; margin-top:2rem; }
.timeline-track { display:flex; position:relative; min-width:600px; }
.timeline-track::before { content:''; position:absolute; top:9px; left:0; right:0; height:1px; background:var(--ink-muted); }
.tl-item { flex:1; min-width:110px; padding-top:26px; padding-right:.8rem; position:relative; }
.tl-item::before { content:''; position:absolute; top:5px; left:0; width:9px; height:9px; border-radius:50%; background:var(--silver); border:1px solid var(--stone); }
.tl-year  { font-family:var(--font-d); font-size:.75rem; letter-spacing:.15em; color:var(--stone); margin-bottom:.3rem; }
.tl-event { font-size:.83rem; color:var(--silver); line-height:1.5; }

/* ── GALERÍA LIGHTBOX ── */
.gallery-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:.75rem; }
.gallery-item { position:relative; overflow:hidden; cursor:pointer; background:var(--ink-soft); }
.gallery-item img { width:100%; height:220px; object-fit:cover; filter:grayscale(100%); transition:transform .4s, filter .4s; display:block; }
.gallery-item:hover img { transform:scale(1.04); filter:grayscale(60%); }
.gallery-caption { position:absolute; bottom:0; left:0; right:0; background:rgba(26,26,26,.85); color:var(--silver); font-family:var(--font-d); font-size:.75rem; font-style:italic; padding:.5rem .75rem; transform:translateY(100%); transition:transform .3s; }
.gallery-item:hover .gallery-caption { transform:translateY(0); }

/* LIGHTBOX */
#lightbox { display:none; position:fixed; inset:0; z-index:9999; background:rgba(0,0,0,.92); align-items:center; justify-content:center; flex-direction:column; }
#lightbox.open { display:flex; }
#lightbox img { max-width:90vw; max-height:80vh; object-fit:contain; filter:grayscale(100%); }
#lightbox-caption { color:var(--silver); font-family:var(--font-d); font-style:italic; margin-top:1rem; font-size:1rem; text-align:center; max-width:600px; }
#lightbox-close { position:absolute; top:1.5rem; right:2rem; color:var(--silver); font-size:2rem; cursor:pointer; background:none; border:none; line-height:1; }
.lb-nav { position:absolute; top:50%; transform:translateY(-50%); background:none; border:none; color:var(--silver); font-size:2.5rem; cursor:pointer; padding:.5rem 1rem; }
#lb-prev { left:.5rem; }
#lb-next { right:.5rem; }

/* ── FOOTER ── */
footer { background:var(--ink); padding:3rem; text-align:center; border-top:1px solid #2a2a2a; }
.footer-logo    { font-family:var(--font-d); font-weight:300; font-size:2rem; letter-spacing:.22em; color:var(--off-white); margin-bottom:.4rem; }
.footer-tagline { font-family:var(--font-d); font-style:italic; color:var(--stone); margin-bottom:1.5rem; }
.footer-nav     { display:flex; justify-content:center; gap:2rem; flex-wrap:wrap; margin-bottom:1.5rem; }
.footer-nav a   { font-family:var(--font-d); font-size:.82rem; letter-spacing:.1em; color:var(--stone); transition:color .3s; }
.footer-nav a:hover { color:var(--silver); }
.footer-copy    { font-size:.75rem; letter-spacing:.08em; color:var(--ink-muted); }

/* ── RESPONSIVE ── */
@media (max-width:960px) {
    .container { padding:0 1.5rem; }
    #nav { padding:0 1.5rem; }
    .nav-links { display:none; position:absolute; top:58px; left:0; right:0; background:rgba(26,26,26,.98); flex-direction:column; gap:0; padding:.5rem 0; }
    .nav-links.open { display:flex; }
    .nav-links a { display:block; padding:.7rem 2rem; font-size:1rem; }
    .nav-toggle { display:flex; }
    .gallery-grid { grid-template-columns:repeat(2,1fr); }
    .gallery-item img { height:180px; }
}
@media (max-width:600px) {
    .gallery-grid { grid-template-columns:1fr 1fr; }
    .gallery-item img { height:140px; }
}

/* ── PLACE CARDS (estilo versión antigua) ── */
.place-card {
    background: var(--pure);
    padding: 2.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s;
    border: 1px solid var(--mist);
    position: relative;
}
.place-card::before {
    content: '';
    position: absolute;
    top: 12px; right: 12px;
    width: 36px; height: 36px;
    border-top: 1.5px solid var(--smoke);
    border-right: 1.5px solid var(--smoke);
}
.place-card::after {
    content: '';
    position: absolute;
    bottom: 12px; left: 12px;
    width: 36px; height: 36px;
    border-bottom: 1.5px solid var(--smoke);
    border-left: 1.5px solid var(--smoke);
}
.place-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}
.place-card h3 {
    font-family: var(--font-d);
    font-size: 1.7rem;
    font-weight: 400;
    color: var(--ink);
    margin-bottom: 0.4rem;
}
.place-card .period {
    font-family: var(--font-d);
    font-style: italic;
    color: var(--stone);
    margin-bottom: 1.2rem;
    font-size: .95rem;
}
.place-card p { color: var(--ink-soft); margin-bottom: 1rem; line-height: 1.75; }
.place-card .map-container {
    width: 100%; height: 240px;
    margin-top: 1.5rem;
    border: 1px solid var(--mist);
    overflow: hidden;
}
.place-card .map-link {
    display: inline-block;
    margin-top: .75rem;
    font-family: var(--font-d);
    font-size: .78rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--stone);
    text-decoration: underline;
    transition: color .3s;
}
.place-card .map-link:hover { color: var(--ink); }
.places-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* ── CONTEXT ARTICLES (historia) ── */
.context-article {
    max-width: 860px;
    margin: 0 auto 4rem;
    background: var(--pure);
    border: 1px solid var(--mist);
    padding: 3rem;
    position: relative;
}
.context-article::before {
    content: '';
    position: absolute;
    top: 10px; right: 10px;
    width: 28px; height: 28px;
    border-top: 1px solid var(--smoke);
    border-right: 1px solid var(--smoke);
}
.context-article::after {
    content: '';
    position: absolute;
    bottom: 10px; left: 10px;
    width: 28px; height: 28px;
    border-bottom: 1px solid var(--smoke);
    border-left: 1px solid var(--smoke);
}
.context-article h3 {
    font-family: var(--font-d);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--ink);
    margin-bottom: 1.5rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--mist);
}
.context-article h4 {
    font-family: var(--font-d);
    font-size: .78rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin: 1.5rem 0 .6rem;
}
.context-article p {
    color: var(--ink-muted);
    font-size: .97rem;
    line-height: 1.85;
    margin-bottom: .8rem;
}
.context-year {
    font-family: var(--font-d);
    font-size: 3rem;
    font-weight: 300;
    color: var(--mist);
    float: right;
    line-height: 1;
    margin: 0 0 .5rem 1.5rem;
}

/* ── TIMELINE scroll hint ── */
.timeline-hint {
    font-family: var(--font-d);
    font-size: .75rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--stone);
    margin-bottom: .75rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.timeline-hint::after {
    content: '← →';
    font-size: .9rem;
    letter-spacing: .05em;
}

@media(max-width:960px){
    .places-grid { grid-template-columns: 1fr; }
}
