/* Landings y herramientas — integración con styles.css (CIVI) */

/* ========== Hero de páginas internas (mismo cielo que el home, texto claro) ========== */
/* styles.css da .hero { min-height: 100vh }; aquí lo anulamos para que no quede un “hueco” enorme arriba */
.hero.hero--subpage {
    min-height: auto !important;
    padding-bottom: 2.5rem;
    /* Mantiene aire bajo la nav fija sin forzar altura de viewport */
    padding-top: 5rem;
}

.hero.hero--subpage .hero-content {
    padding-top: 0.5rem;
    padding-bottom: 1.75rem;
}

/* Migas de pan sobre el gradiente cielo */
.civi-breadcrumb {
    margin-bottom: 1.25rem;
}

.civi-breadcrumb-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 0.5rem;
    font-size: 0.9rem;
}

.civi-breadcrumb-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.civi-breadcrumb-link {
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
    transition: border-color 0.2s ease, color 0.2s ease;
}

.civi-breadcrumb-link:hover {
    color: #fff;
    border-bottom-color: #fff;
}

.civi-breadcrumb-sep {
    color: rgba(255, 255, 255, 0.55);
    margin: 0 0.15rem;
    user-select: none;
}

.civi-breadcrumb-current {
    color: rgba(255, 255, 255, 0.98);
    font-weight: 700;
}

/* Títulos en hero: siempre legibles sobre el azul cielo (corrige landing-hero-title oscuro) */
.hero .landing-hero-title,
.hero.hero--subpage .hero-title {
    color: #ffffff !important;
    font-size: clamp(1.85rem, 4.5vw, 3rem);
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.12);
}

.hero .landing-hero-lead,
.civi-hero-lead {
    font-size: 1.1rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.96) !important;
    max-width: 38rem;
    margin: 0 auto 1.5rem;
    font-weight: 500;
}

.hero .landing-hero-lead a,
.civi-hero-lead a {
    color: #fff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.hero .landing-hero-lead a:hover,
.civi-hero-lead a:hover {
    text-decoration-thickness: 2px;
}

.hero-slogan {
    font-size: 1.2rem;
    font-weight: 600;
    color: rgba(17, 24, 39, 0.88);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.card-cta-link {
    display: inline-block;
    margin-top: 0.75rem;
    font-weight: 600;
    color: #059669;
    text-decoration: none;
    border-bottom: 1px solid rgba(5, 150, 105, 0.35);
}

.card-cta-link:hover {
    border-bottom-color: #059669;
}

.landing-hero-title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

.landing-hero-lead {
    font-size: 1.15rem;
    color: rgba(17, 24, 39, 0.85);
    max-width: 38rem;
    margin-bottom: 1.5rem;
}

.landing-steps {
    padding: 4rem 0;
    background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);
    position: relative;
}

.landing-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.landing-step-card {
    background: #fff;
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.landing-step-num {
    display: inline-flex;
    width: 2.25rem;
    height: 2.25rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #10b981;
    color: #fff;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.landing-links-section {
    padding: 3rem 0 4rem;
    background: #f9fafb;
}

.landing-links-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.landing-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
}

.landing-links-list a {
    color: #059669;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(5, 150, 105, 0.35);
}

.landing-links-list a:hover {
    border-bottom-color: #059669;
}

.landing-faq {
    padding-top: 3rem;
}

/* ========== Bloque de formulario / herramienta (misma familia que cards-section del home) ========== */
.civi-tool-section,
.calc-section {
    padding: 3rem 0 5rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 25%, #f3f4f6 50%, #f9fafb 75%, #ffffff 100%);
    box-shadow: inset 0 8px 32px rgba(255, 255, 255, 0.9), inset 0 -8px 32px rgba(0, 0, 0, 0.04);
}

.civi-tool-section::before,
.calc-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 15% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 88% 30%, rgba(16, 185, 129, 0.1) 0%, transparent 42%),
        radial-gradient(ellipse at 50% 80%, rgba(59, 130, 246, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.civi-tool-section .container,
.calc-section .container {
    position: relative;
    z-index: 1;
}

.civi-tool-card,
.calc-card {
    max-width: 560px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 24px;
    padding: 2rem 2rem 2.25rem;
    box-shadow:
        -10px -10px 30px rgba(255, 255, 255, 0.95),
        10px 10px 30px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.civi-tool-card--wide {
    max-width: 680px;
}

.civi-tool-card h2,
.calc-card h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.5rem;
}

.civi-tool-card label,
.calc-card label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #111827;
    font-size: 0.95rem;
}

.civi-tool-card select,
.civi-tool-card input[type="date"],
.civi-tool-card input[type="text"],
.civi-tool-card input[type="number"],
.calc-card select,
.calc-card input[type="date"],
.calc-card input[type="text"],
.calc-card input[type="number"] {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    border: 1px solid #d1d5db;
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 1.15rem;
    background: #fafafa;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.civi-tool-card select:focus,
.civi-tool-card input:focus,
.calc-card select:focus,
.calc-card input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    background: #fff;
}

.civi-tool-card .btn-primary,
.calc-card .btn-primary {
    width: 100%;
    margin-top: 0.25rem;
}

.civi-tool-hint {
    font-size: 0.85rem;
    color: #6b7280;
    margin: -0.65rem 0 1rem;
    line-height: 1.45;
}

.crc-checklist-heading {
    font-size: 1.2rem;
    margin: 1.25rem 0 0.5rem;
    color: #111827;
}

.crc-checklist-sub {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0 0 0.5rem;
}

select.crc-tramite-select {
    width: 100%;
    margin-bottom: 0;
}

.calc-result {
    margin-top: 1rem;
    padding: 1.1rem 1.25rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #a7f3d0;
    color: #065f46;
    font-weight: 600;
    min-height: 3rem;
    line-height: 1.45;
}

.calc-disclaimer {
    margin-top: 1.5rem;
    font-size: 0.88rem;
    line-height: 1.65;
    color: #6b7280;
}

.calc-disclaimer a {
    color: #059669;
    font-weight: 600;
}

.logo-link:focus {
    outline: 2px solid #10b981;
    outline-offset: 4px;
}

/* Índice herramientas — tarjetas alineadas al home */
.tools-index-intro {
    text-align: center;
    max-width: 36rem;
    margin: 0 auto 1rem;
    color: #4b5563;
    font-size: 1.05rem;
    line-height: 1.55;
}

.tools-index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tools-index-card {
    border-radius: 24px;
    padding: 1.75rem 1.5rem;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
    min-height: 160px;
    box-shadow:
        -8px -8px 20px rgba(255, 255, 255, 0.9),
        8px 8px 24px rgba(0, 0, 0, 0.12),
        inset -2px -2px 8px rgba(255, 255, 255, 0.5);
}

.tools-index-card:hover {
    transform: translateY(-6px);
    box-shadow:
        -12px -12px 28px rgba(255, 255, 255, 0.95),
        10px 10px 32px rgba(0, 0, 0, 0.15);
}

.tools-index-card--purple {
    background: linear-gradient(145deg, #7c3aed 0%, #6d28d9 100%);
    color: #fff;
}

.tools-index-card--blue {
    background: linear-gradient(145deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
}

.tools-index-card--green {
    background: linear-gradient(145deg, #059669 0%, #047857 100%);
    color: #fff;
}

.tools-index-card--teal {
    background: linear-gradient(145deg, #0d9488 0%, #0f766e 100%);
    color: #fff;
}

.tools-index-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    line-height: 1.25;
}

.tools-index-card p {
    font-size: 0.92rem;
    line-height: 1.45;
    margin: 0;
    opacity: 0.95;
}

.tools-index-card .tools-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.65rem;
    opacity: 0.95;
}

.tools-index-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 2.5rem;
}

/* Checklist CRC */
.crc-checklist-items {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
}

.crc-checklist-items li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.98rem;
    color: #374151;
}

.crc-checklist-items input[type="checkbox"] {
    width: 1.15rem;
    height: 1.15rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
    accent-color: #10b981;
}

.crc-checklist-items label {
    margin: 0;
    font-weight: 500;
}

/* Home: sección herramientas */
.civi-home-tools {
    padding: 5rem 0;
    background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 50%, #f9fafb 100%);
    position: relative;
}

.civi-home-tools-title {
    text-align: center;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 800;
    color: #111827;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.civi-home-tools-sub {
    text-align: center;
    color: #6b7280;
    font-size: 1.05rem;
    max-width: 32rem;
    margin: 0 auto 2rem;
}

.civi-home-tools-cta {
    text-align: center;
    margin-top: 2rem;
}
