/* ==========================================================================
   SITHOSAJUDI · Programa Social Funerario
   Mobile-first
   ========================================================================== */

:root {
    --color-blue: #2243A8;
    --color-blue-dark: #1A3586;
    --color-orange: #F0A530;
    --color-orange-dark: #D98F1A;
    --color-text: #1C2333;
    --color-text-muted: #4A5368;
    --color-bg: #FFFFFF;
    --color-bg-alt: #F6F7FB;
    --color-border: #E6E9F2;
    --color-footer: #10224F;

    --font-heading: "League Spartan", "Segoe UI", Arial, sans-serif;
    --font-body: "Source Sans 3", "Segoe UI", Arial, sans-serif;

    --container: 1200px;
    --gutter: 24px;
    --section-y: 88px;
    --radius: 16px;
    --radius-pill: 999px;
    --shadow: 0 8px 24px rgba(16, 34, 79, 0.08);
    --header-h: 80px;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 .5em;
    color: var(--color-text);
}
h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

a { color: var(--color-blue); }
a:hover { color: var(--color-blue-dark); }

:focus-visible { outline: 3px solid var(--color-orange); outline-offset: 2px; }

.icon { flex-shrink: 0; }

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    padding: 10px 16px;
    background: var(--color-blue);
    color: #fff;
    border-radius: 8px;
    z-index: 200;
}
.skip-link:focus { top: 16px; color: #fff; }

.container {
    width: 100%;
    max-width: calc(var(--container) + var(--gutter) * 2);
    margin: 0 auto;
    padding: 0 var(--gutter);
}
.container-narrow { max-width: calc(800px + var(--gutter) * 2); }

/* ---------- Botones ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 24px;
    border: 2px solid transparent;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--color-blue); color: #fff; }
.btn-primary:hover { background: var(--color-blue-dark); color: #fff; }

.btn-accent { background: var(--color-orange); color: var(--color-text); }
.btn-accent:hover { background: var(--color-orange-dark); color: var(--color-text); }

.btn-white { background: #fff; color: var(--color-blue); }
.btn-white:hover { background: var(--color-bg-alt); color: var(--color-blue-dark); }

.btn-outline-light { border-color: #fff; color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--color-blue); }

.btn-outline { border-color: var(--color-blue); color: var(--color-blue); }
.btn-outline:hover { background: var(--color-blue); color: #fff; }

.btn-secondary { background: transparent; border-color: var(--color-blue); color: var(--color-blue); }
.btn-secondary:hover { background: var(--color-bg-alt); color: var(--color-blue); }

.btn-block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-row--center { justify-content: center; }

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    text-decoration: none;
}
.link-arrow .icon { transition: transform .2s; }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ---------- Franja de staging ---------- */
.staging-bar {
    padding: 6px var(--gutter);
    background: var(--color-orange);
    color: var(--color-text);
    font-size: .875rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .97);
    border-bottom: 1px solid var(--color-border);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-h);
    gap: 16px;
}
.brand img { height: 52px; width: auto; }

.nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #fff;
    color: var(--color-text);
    cursor: pointer;
}
.nav-toggle-open { display: inline-flex; }
.nav-toggle-close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-close { display: inline-flex; }

.site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 8px var(--gutter) 24px;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow);
}
.site-nav.is-open { display: block; }
.site-nav ul { list-style: none; margin: 0 0 16px; padding: 0; }
.site-nav li a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
    font-weight: 600;
    font-size: 1.125rem;
    text-decoration: none;
}
.site-nav li a:hover,
.site-nav li a.is-active { color: var(--color-blue); }
.nav-actions { display: grid; gap: 12px; }
.nav-actions .btn { width: 100%; }

/* No-JS: el menú queda visible */
.no-js .nav-toggle { display: none; }
.no-js .site-nav { display: block; position: static; box-shadow: none; border: 0; padding: 0 0 16px; }

/* ---------- Hero ---------- */
.hero {
    background: var(--color-blue);
    color: #fff;
    padding: 64px 0 var(--section-y);
}
.hero h1 { color: #fff; }
.hero-grid { display: grid; gap: 48px; align-items: center; }
.eyebrow {
    margin: 0 0 16px;
    color: var(--color-orange);
    font-weight: 700;
    font-size: .95rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.hero-lead { font-size: 1.2rem; max-width: 40em; }
.hero .hero-lead { color: rgba(255, 255, 255, .9); margin-bottom: 32px; }

.stats-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.stat-card {
    background: #fff;
    color: var(--color-text);
    border-radius: var(--radius);
    padding: 24px 20px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .15);
}
.stat-value {
    display: block;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1.1;
    color: var(--color-blue);
}
.stat-label { display: block; margin-top: 4px; color: var(--color-text-muted); font-weight: 600; line-height: 1.3; }

/* ---------- Page hero (páginas internas) ---------- */
.page-hero {
    background: var(--color-blue);
    color: #fff;
    padding: 56px 0;
}
.page-hero h1 { color: #fff; }
.page-hero .hero-lead { color: rgba(255, 255, 255, .9); margin: 0; }

/* ---------- Secciones ---------- */
.section { padding: var(--section-y) 0; }
.section-alt { background: var(--color-bg-alt); }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head p { color: var(--color-text-muted); font-size: 1.125rem; }
.section-head--row {
    max-width: none;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 24px;
}
.section-head--row h2 { margin: 0; }

.grid { display: grid; gap: 24px; grid-template-columns: 1fr; }

/* ---------- Tarjetas ---------- */
.card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 28px 24px;
}
.card p { color: var(--color-text-muted); }
.card > :last-child { margin-bottom: 0; }

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 20px;
    border-radius: 14px;
    background: rgba(34, 67, 168, .08);
    color: var(--color-blue);
}

/* Planes */
.plan-card { display: flex; flex-direction: column; }
.plan-card h3 { font-size: 1.6rem; margin-bottom: 4px; }
.plan-card .check-list { flex: 1; margin-bottom: 24px; }
.plan-card--featured { border: 2px solid var(--color-orange); box-shadow: var(--shadow); }

.plan-coverage {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 20px;
    color: var(--color-blue) !important;
    font-weight: 700;
}

.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li {
    display: flex;
    gap: 10px;
    padding: 6px 0;
    line-height: 1.4;
}
.check-list .icon { margin-top: 1px; color: var(--color-orange-dark); }

.plan-detail { scroll-margin-top: calc(var(--header-h) + 16px); }
.plan-detail-head { padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--color-border); }
.plan-detail-head h2 { font-size: 1.8rem; margin-bottom: 8px; }
.plan-detail-head .plan-coverage { margin: 0; }
.plan-detail .check-list li + li { border-top: 1px solid var(--color-bg-alt); }

.note { margin: 32px 0 0; color: var(--color-text-muted); font-size: .95rem; }

/* Nosotros */
.about-grid { display: grid; gap: 24px; align-items: center; }
.about-year {
    margin: 0;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: clamp(5rem, 18vw, 11rem);
    line-height: .9;
    color: var(--color-blue);
    letter-spacing: -.03em;
}
.about-grid p:not(.about-year) { color: var(--color-text-muted); font-size: 1.125rem; }

/* Noticias */
.news-card { display: flex; flex-direction: column; }
.news-card h3 a { color: var(--color-text); text-decoration: none; }
.news-card h3 a:hover { color: var(--color-blue); }
.news-card p { flex: 1; }
.news-date {
    display: block;
    margin-bottom: 8px;
    color: var(--color-orange-dark);
    font-weight: 700;
    font-size: .9rem;
}
.empty { color: var(--color-text-muted); }

.prose { font-size: 1.125rem; }
.prose h2 { margin-top: 1.4em; }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
.prose blockquote {
    margin: 0 0 1em;
    padding: 8px 0 8px 20px;
    border-left: 4px solid var(--color-orange);
    color: var(--color-text-muted);
}

/* ---------- Intro de planes ---------- */
.container-reading { max-width: calc(760px + var(--gutter) * 2); }
.intro { background: #fff; text-align: center; }
.intro p { font-size: 1.1875rem; color: var(--color-text-muted); }
.intro h2 { margin-top: 48px; margin-bottom: 24px; }
.icon-list {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    display: grid;
    gap: 16px;
    text-align: left;
    font-size: 1.125rem;
}
.icon-list li { display: flex; gap: 14px; align-items: flex-start; line-height: 1.5; }
.icon-list .icon { margin-top: 3px; color: var(--color-orange-dark); }
.icon-list strong { color: var(--color-text); }
.intro .intro-closing {
    margin: 48px 0 0;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(1.5rem, 3.4vw, 2.25rem);
    line-height: 1.25;
    color: var(--color-blue);
}

/* ---------- Cita destacada ---------- */
.quote-section { background: #fff; padding: var(--section-y) 0; }
.quote { margin: 0; text-align: center; }
.quote p {
    margin: 0;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(1.6rem, 3.6vw, 2.5rem);
    line-height: 1.25;
    color: var(--color-blue);
}
.quote p::before { content: "\201C"; }
.quote p::after { content: "\201D"; }

/* ---------- Franja CTA ---------- */
.cta-band { background: var(--color-orange); padding: 64px 0; }
.cta-inner { display: grid; gap: 24px; align-items: center; }
.cta-band h2 { margin-bottom: 8px; }
.cta-band p { margin: 0; color: var(--color-text); font-size: 1.125rem; }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; gap: 40px; }
.contact-list { list-style: none; margin: 0 0 32px; padding: 0; display: grid; gap: 24px; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; }
.contact-list .feature-icon { margin: 0; width: 48px; height: 48px; }
.contact-list h2 { font-size: 1.15rem; margin: 0 0 2px; }
.contact-list p { margin: 0; color: var(--color-text-muted); }
.contact-list a { font-weight: 600; word-break: break-word; }
.map-wrap {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--color-border);
    min-height: 360px;
}
.map-wrap iframe { display: block; width: 100%; height: 100%; min-height: 360px; border: 0; }

/* ---------- 404 ---------- */
.error-page { text-align: center; }
.error-page p:not(.about-year) { color: var(--color-text-muted); font-size: 1.125rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-footer); color: rgba(255, 255, 255, .8); padding-top: 64px; }
.site-footer a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 32px; padding-bottom: 48px; }
.footer-name { font-family: var(--font-heading); font-weight: 800; font-size: 1.6rem; color: #fff; margin: 0; }
.footer-tagline { color: var(--color-orange); font-weight: 600; margin: 0; }
.footer-title {
    font-family: var(--font-body);
    font-size: .85rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 12px;
}
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-item { display: flex; gap: 10px; align-items: flex-start; margin: 0; word-break: break-word; }
.footer-item .icon { margin-top: 3px; color: var(--color-orange); }
.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    padding-top: 24px;
    padding-bottom: 24px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    font-size: .9rem;
}
.footer-bottom p { margin: 0; }
.site-footer .footer-portal { color: rgba(255, 255, 255, .5); font-size: .85rem; }
.site-footer .footer-portal:hover { color: rgba(255, 255, 255, .85); }

/* ==========================================================================
   Breakpoints
   ========================================================================== */
@media (min-width: 640px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
    :root { --header-h: 96px; }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .hero { padding-top: var(--section-y); }
    .hero-grid { grid-template-columns: 1.25fr 1fr; gap: 64px; }
    .page-hero { padding: 72px 0; }
    .about-grid { grid-template-columns: auto 1fr; gap: 64px; }
    .cta-inner { grid-template-columns: 1fr auto; }
    .contact-grid { grid-template-columns: 1fr 1.2fr; gap: 48px; }
    .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; }
}

@media (min-width: 1024px) {
    .brand img { height: 64px; }
    .nav-toggle { display: none; }
    .site-nav,
    .no-js .site-nav {
        display: flex;
        align-items: center;
        gap: 32px;
        position: static;
        padding: 0;
        border: 0;
        box-shadow: none;
        background: none;
    }
    .site-nav ul { display: flex; gap: 28px; margin: 0; }
    .site-nav li a {
        padding: 8px 0;
        border-bottom: 2px solid transparent;
        font-size: 1.0625rem;
    }
    .site-nav li a.is-active { border-bottom-color: var(--color-orange); }
    .nav-actions { display: flex; align-items: center; gap: 12px; }
    .nav-actions .btn { width: auto; white-space: nowrap; }
}

@media (min-width: 1100px) {
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}
