/* ============================================================================
   cuando-ir-a-japon.css — Herramienta "¿Cuándo ir a Japón?".
   Lenguaje visual pfn (como calculadora-jr-pass). Reutiliza tokens de
   reservajapon.css; se carga DESPUÉS de él. Breakpoints: solo 600px y 900px.
   ============================================================================ */

.cig { padding-top: 20px; }

/* ── Cabecera de página ─────────────────────────────────────────────── */
.cig-header { margin-bottom: 1.6rem; }
.cig-header h1 {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 0.5rem;
}
.cig-header p {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 720px;
    margin: 0;
    line-height: 1.55;
}

.cig-noscript {
    background: var(--primary-soft);
    border-radius: var(--radius-sm);
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 1.2rem;
}

/* ── Wizard de 4 preguntas (concha global wizard-* + pace-card) ─────── */
/* Q1 tiene 5 opciones: rejilla fluida en vez de las 3 columnas fijas de pace-cards */
.cig-opts {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.cig-opts .pace-card-name,
.cig-opts .pace-card-desc { display: block; }
/* El global solo oculta los radio de pace-card; aquí también hay checkboxes */
.cig-opts .pace-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.cig-opts .pace-card:has(input:focus-visible) {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
.cig-btn-back {
    background: none;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    padding: 0.6rem 1.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}
.cig-btn-back:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
#cigWizardForm .wizard-nav { justify-content: space-between; }
#cigWizardForm .wizard-nav .primary-button { margin-left: auto; }

/* ── Cabecera de la página de resultado ─────────────────────────────── */
.cig-result-head { margin-bottom: 1.4rem; }
.cig-result-head h1 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 0.25rem;
}
.cig-back-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}
.cig-back-link:hover { text-decoration: underline; }

/* ── Veredicto ──────────────────────────────────────────────────────── */
.cig-verdict-head { margin-bottom: 1rem; }
.cig-verdict-head h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 0.25rem;
}
.cig-verdict-head p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}
.cig-verdict {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.1rem;
    margin-bottom: 2.5rem;
}
.cig-mcard {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-top: 3px solid var(--primary-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.15rem 1.3rem 1.3rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cig-mcard:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}
.cig-mcard-head { margin-bottom: 0.7rem; }
.cig-mcard-badge {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}
.cig-mcard-month {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
    display: inline-block;
}
.cig-mcard-temp {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
}
.cig-mcard-score {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-left: 0.5rem;
    white-space: nowrap;
}
.cig-mcard-why {
    list-style: none;
    margin: 0 0 0.9rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
}
.cig-mcard-why li {
    position: relative;
    padding-left: 0.95rem;
    font-size: 0.88rem;
    color: var(--text-main);
    line-height: 1.45;
}
.cig-mcard-why li::before {
    content: '·';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 800;
}
.cig-mcard-why .cig-why-pts {
    color: var(--text-muted);
    font-size: 0.78rem;
    white-space: nowrap;
}
.cig-mcard-events {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0 0 0.9rem;
    line-height: 1.5;
}
.cig-mcard-warn {
    font-size: 0.8rem;
    color: #b45309;
    background: #fff7ed;
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.65rem;
    margin: 0 0 0.9rem;
    line-height: 1.45;
}
.cig-mcard-cta.primary-button {
    text-align: center;
    margin-top: auto;
}

/* ── Cards de sección compartidas ───────────────────────────────────── */
.cig-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.35rem 1.5rem;
}
.cig-section { margin-bottom: 2.5rem; }
.cig-section-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 0.9rem;
}

/* ── Rejilla anual ──────────────────────────────────────────────────── */
.cig-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.55rem;
}
.cig-cell {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.4rem;
    text-align: center;
    transition: background 0.25s ease;
}
.cig-cell-month {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
}
.cig-cell-temp {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}
.cig-cell-score {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 0.2rem;
}
/* Intensidad por puntuación (el JS asigna cig-s0..cig-s4) */
.cig-cell.cig-s1 { background: color-mix(in srgb, var(--primary-color) 14%, #fff); }
.cig-cell.cig-s2 { background: color-mix(in srgb, var(--primary-color) 30%, #fff); }
.cig-cell.cig-s3 { background: color-mix(in srgb, var(--primary-color) 48%, #fff); }
.cig-cell.cig-s4 { background: color-mix(in srgb, var(--primary-color) 68%, #fff); }
.cig-cell.cig-s4 .cig-cell-month { color: #fff; }
.cig-cell.cig-s4 .cig-cell-temp,
.cig-cell.cig-s4 .cig-cell-score { color: rgba(255, 255, 255, 0.85); }
.cig-cell.cig-winner { outline: 2px solid var(--primary-color); outline-offset: 1px; }
.cig-grid-hint {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0.8rem 0 0;
}
.cig-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.8rem;
}
.cig-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.cig-swatch {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    border: 1px solid var(--border-subtle);
}
.cig-swatch-low  { background: color-mix(in srgb, var(--primary-color) 14%, #fff); }
.cig-swatch-mid  { background: color-mix(in srgb, var(--primary-color) 40%, #fff); }
.cig-swatch-high { background: color-mix(in srgb, var(--primary-color) 68%, #fff); }

/* ── Tabla mes a mes ────────────────────────────────────────────────── */
.cig-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cig-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.cig-table th {
    background: var(--primary-soft);
    font-weight: 700;
    padding: 0.55rem 0.8rem;
    text-align: left;
    border-bottom: 2px solid var(--primary-color);
    white-space: nowrap;
    color: var(--text-main);
}
.cig-table td {
    padding: 0.55rem 0.8rem;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: top;
    color: var(--text-main);
}
.cig-table tr:last-child td { border-bottom: none; }
.cig-table tr:hover td { background: #faf7f9; }
.cig-tbl-flight {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
}
.cig-tbl-warn {
    display: block;
    font-size: 0.78rem;
    color: #b45309;
    margin-top: 0.25rem;
}

/* ── Cómo funciona ──────────────────────────────────────────────────── */
.cig-card p { line-height: 1.6; }
.cig-card ul { line-height: 1.6; padding-left: 1.2rem; }
.cig-card ul li { margin-bottom: 0.35rem; }

/* ── Guías relacionadas ─────────────────────────────────────────────── */
.cig-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.9rem;
}
.cig-link-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.05rem 1.2rem;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cig-link-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}
.cig-link-card-title {
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.3rem;
}
.cig-link-card-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    flex: 1;
    margin-bottom: 0.55rem;
}
.cig-link-card-cta {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* ── FAQ ────────────────────────────────────────────────────────────── */
.cig-faq details { border-bottom: 1px solid var(--border-subtle); }
.cig-faq details:first-of-type { border-top: 1px solid var(--border-subtle); margin-top: 0.5rem; }
.cig-faq summary {
    cursor: pointer;
    padding: 0.85rem 0.2rem;
    font-weight: 600;
    color: var(--text-main);
    list-style: none;
    position: relative;
    padding-right: 1.6rem;
}
.cig-faq summary::-webkit-details-marker { display: none; }
.cig-faq summary::after {
    content: '+';
    position: absolute;
    right: 0.4rem;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 700;
    color: var(--primary-color);
}
.cig-faq details[open] summary::after { content: '−'; }
.cig-faq-answer {
    padding: 0 0.2rem 0.95rem;
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-main);
}

/* ── Tablet (≤900px) ────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .cig-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ── Móvil (≤600px) ─────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .cig-opts { grid-template-columns: 1fr 1fr; }
    .cig-verdict { grid-template-columns: 1fr; }
    .cig-grid { grid-template-columns: repeat(3, 1fr); gap: 0.45rem; }
    .cig-card { padding: 1.1rem 1.05rem; }
    .cig-table { font-size: 0.78rem; }
    .cig-table th, .cig-table td { padding: 0.4rem 0.5rem; }
}
