/* ==========================================================================
   Sistema de diseño — Guía Migrante USA
   Motivo: control de pasaporte / sellos de ruta migratoria
   ========================================================================== */

:root {
    --ink: #16233F;
    --ink-light: #4B5570;
    --paper: #EFEAE0;
    --paper-raised: #FFFDF8;
    --stamp-gold: #E1A83D;
    --stamp-gold-dark: #B9832035;
    --stamp-red: #B23A2E;
    --route-green: #3F6D4E;
    --line: #DCD5C4;

    --font-display: "IBM Plex Serif", Georgia, serif;
    --font-body: "IBM Plex Sans", system-ui, sans-serif;
    --font-mono: "IBM Plex Mono", "SF Mono", monospace;

    --radius: 10px;
    --container: 1120px;
}

* { box-sizing: border-box; }

body {
    font-family: var(--font-body);
    background: var(--paper);
    color: var(--ink);
    margin: 0;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; margin: 0 0 0.6em; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); }
p { margin: 0 0 1em; }
a { color: inherit; }

/* -------------------- Header -------------------- */

.site-header {
    background: var(--ink);
    padding: 1.1rem 0;
}
.site-logo {
    color: var(--paper-raised);
    text-decoration: none;
    font-family: var(--font-mono);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.95rem;
}
.site-logo img { max-height: 36px; display: block; }

/* -------------------- Eyebrow / etiquetas tipo sello -------------------- */

.eyebrow, .category-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1.5px solid var(--ink);
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
    text-decoration: none;
    color: var(--ink);
    transform: rotate(-1deg);
}

/* -------------------- Hero: control de pasaporte -------------------- */

.passport-hero {
    background: var(--ink);
    color: var(--paper-raised);
    padding: 3.5rem 0 4rem;
    margin-bottom: 3rem;
}
.passport-hero h1 { color: #fff; max-width: 20ch; }
.passport-hero .lede { color: #C9CEDC; max-width: 48ch; font-size: 1.05rem; }

.route {
    margin-top: 3rem;
    position: relative;
}
.route-line {
    position: absolute;
    top: 22px;
    left: 5%;
    right: 5%;
    height: 0;
    border-top: 2px dashed #4B5570;
    z-index: 0;
}
.route-stops {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 1;
    gap: 1rem;
}
.route-stop {
    flex: 1;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 260px;
}
.route-stamp {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2.5px solid var(--stamp-gold);
    color: var(--stamp-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-weight: 700;
    background: var(--ink);
    margin-bottom: 0.9rem;
    transition: transform 0.2s ease;
}
.route-stop:hover .route-stamp { transform: scale(1.08) rotate(-4deg); }
.route-stop-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--stamp-gold);
    margin-bottom: 0.3rem;
}
.route-stop-name { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
    .route-stop:hover .route-stamp { transform: none; }
}

@media (max-width: 640px) {
    .route-stops { flex-direction: column; gap: 1.5rem; }
    .route-line { display: none; }
}

/* -------------------- Grid de contenidos -------------------- */

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1.75rem;
    margin: 1.5rem 0;
}
.content-card {
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.content-card img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-bottom: 1px solid var(--line);
}
.content-card > *:not(img) { padding-left: 1.1rem; padding-right: 1.1rem; }
.content-card .category-tag { margin-top: 1rem; align-self: flex-start; }
.content-card h2, .content-card h3 { font-size: 1.15rem; margin: 0.6rem 0 0.4rem; }
.content-card a { text-decoration: none; }
.content-card p { color: var(--ink-light); font-size: 0.92rem; padding-bottom: 1.1rem; }

/* -------------------- Artículo -------------------- */

article.content-type-article,
article.content-type-landing,
article.content-type-page {
    max-width: 760px;
    margin: 0 auto;
}
.featured-image { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius); margin: 1.2rem 0; }
.content-body { font-size: 1.05rem; }
.content-body h2 { margin-top: 2em; }
.content-body img { max-width: 100%; border-radius: var(--radius); }

.rating { font-family: var(--font-mono); color: var(--stamp-gold); margin: 0.5rem 0; }

.affiliate-links { margin: 2rem 0; padding: 1.25rem; background: var(--paper-raised); border: 1px dashed var(--line); border-radius: var(--radius); }
.affiliate-button {
    display: inline-block;
    background: var(--stamp-gold);
    color: var(--ink);
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    margin: 0.25rem 0.5rem 0.25rem 0;
}

.faqs { margin: 2.5rem 0; }
.faqs details { border-bottom: 1px solid var(--line); padding: 0.9rem 0; }
.faqs summary { cursor: pointer; font-weight: 600; font-family: var(--font-display); }
.faqs p { margin-top: 0.6rem; color: var(--ink-light); }

.related { margin: 3rem 0; }

/* -------------------- Comentarios -------------------- */

.comments { margin: 3rem 0; border-top: 2px solid var(--ink); padding-top: 1.5rem; }
.comments .comment { border-bottom: 1px solid var(--line); padding: 1rem 0; }
.comments time { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-light); }

#comment-form { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; margin-top: 1.5rem; }
#comment-form label { display: block; margin-bottom: 1rem; font-size: 0.9rem; font-weight: 600; }
#comment-form input, #comment-form select, #comment-form textarea {
    width: 100%;
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    margin-top: 0.4rem;
}
#comment-form button {
    background: var(--ink);
    color: #fff;
    border: none;
    padding: 0.7rem 1.6rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.03em;
}
#comment-form button:hover { background: #23325a; }
#comment-form button:focus-visible, .affiliate-button:focus-visible, a:focus-visible {
    outline: 2.5px solid var(--stamp-gold);
    outline-offset: 2px;
}
.alert-success { background: #E7F0E9; color: var(--route-green); padding: 0.6rem 0.9rem; border-radius: 6px; margin-bottom: 1rem; font-size: 0.9rem; }
.alert-error { background: #F6E3E0; color: var(--stamp-red); padding: 0.6rem 0.9rem; border-radius: 6px; margin-bottom: 1rem; font-size: 0.9rem; }

/* -------------------- Paginación / 404 -------------------- */

.pagination { display: flex; gap: 1.5rem; justify-content: center; margin: 3rem 0; align-items: center; font-family: var(--font-mono); font-size: 0.9rem; }
.pagination a { text-decoration: none; color: var(--ink); font-weight: 600; }

.not-found { text-align: center; padding: 5rem 0; }
.not-found h1 { font-size: 4rem; color: var(--stamp-gold); }

.content-body blockquote {
    border-left: 3px solid var(--stamp-gold);
    margin: 1.5rem 0;
    padding: 0.5rem 0 0.5rem 1.25rem;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.1rem;
    color: var(--ink-light);
}

.byline {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.byline img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 2px solid var(--stamp-gold); }
.byline-name { font-family: var(--font-mono); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; }
.byline-bio { color: var(--ink-light); font-size: 0.88rem; margin: 0.2rem 0 0; }

/* -------------------- Footer -------------------- */

.site-footer {
    background: var(--ink);
    color: #C9CEDC;
    margin-top: 4rem;
    padding: 2.5rem 0;
    text-align: center;
    font-size: 0.9rem;
}
.site-footer a { color: var(--stamp-gold); text-decoration: none; }
