/* ====================================================================
   AbonaYa — Estilos compartidos para páginas SEO públicas
   Mismo sistema de diseño que la landing (colores, tipografía, botones).
   ==================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563EB;
    --primary-dark: #1E40AF;
    --secondary: #1F2937;
    --light-gray: #F9FAFB;
    --gray: #6B7280;
    --white: #FFFFFF;
    --success: #10B981;
    --border: #E5E7EB;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--secondary);
    overflow-x: hidden;
}

/* ---------- Navbar ---------- */
.navbar {
    background: var(--white);
    padding: 20px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.logo img {
    width: auto;
    height: 45px;
    max-width: 180px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.nav-links {
    display: flex;
    gap: 24px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--secondary);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-buttons {
    display: flex;
    gap: 15px;
}

/* ---------- Botones ---------- */
.btn {
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-large {
    padding: 16px 36px;
    font-size: 1.1rem;
}

.btn-whatsapp {
    background: #25D366;
    color: var(--white);
}

.btn-whatsapp:hover {
    background: #1EBE5D;
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
}

/* ---------- Hero de página ---------- */
.page-hero {
    background: linear-gradient(135deg, #EEF2FF 0%, #DBEAFE 100%);
    padding: 70px 20px 80px;
}

.page-hero-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.breadcrumb {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 18px;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.page-hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1.15;
    margin-bottom: 18px;
}

.page-hero p {
    font-size: 1.2rem;
    color: var(--gray);
    margin-bottom: 30px;
    line-height: 1.7;
}

.page-hero .hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.page-hero .hero-micro {
    margin-top: 18px;
    font-size: 0.95rem;
    color: var(--gray);
}

.page-hero .hero-micro i {
    color: var(--success);
    margin-right: 4px;
}

/* ---------- Contenido ---------- */
.page-section {
    padding: 70px 20px;
    background: var(--white);
}

.page-section.alt {
    background: var(--light-gray);
}

.page-container {
    max-width: 900px;
    margin: 0 auto;
}

.page-container h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 14px;
    line-height: 1.25;
}

.page-container h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--secondary);
    margin: 28px 0 10px;
}

.page-container p {
    color: var(--gray);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 14px;
}

.page-container ul {
    margin: 0 0 16px 24px;
}

.page-container li {
    color: var(--gray);
    font-size: 1.02rem;
    line-height: 1.8;
    margin-bottom: 8px;
}

.page-container li strong {
    color: var(--secondary);
}

/* ---------- Grid de checks ---------- */
.check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.check-item {
    background: var(--light-gray);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 18px;
    font-size: 0.98rem;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.check-item i {
    color: var(--success);
    flex: none;
}

/* ---------- Ejemplo numérico ---------- */
.example-box {
    background: var(--light-gray);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 10px;
    padding: 24px 28px;
    margin: 24px 0;
}

.example-box h3 {
    margin-top: 0;
    font-size: 1.15rem;
}

.example-box table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 0.95rem;
}

.example-box td, .example-box th {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.example-box th {
    color: var(--secondary);
    font-weight: 700;
}

.example-box td {
    color: var(--gray);
    font-variant-numeric: tabular-nums;
}

.example-box .note {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--gray);
}

/* ---------- Preview de recibo ---------- */
.receipt-preview {
    background: var(--white);
    color: var(--secondary);
    border-radius: 16px;
    padding: 28px;
    max-width: 420px;
    margin: 24px auto;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    border: 1px solid var(--border);
    font-family: 'Courier New', Courier, monospace;
}

.receipt-head {
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px dashed var(--border);
    padding-bottom: 14px;
    margin-bottom: 14px;
}

.receipt-logo {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.receipt-head h4 {
    font-size: 1.05rem;
    font-weight: 700;
}

.receipt-head span {
    font-size: 0.8rem;
    color: var(--gray);
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    padding: 6px 0;
}

.receipt-row .label { color: var(--gray); }
.receipt-row .value { font-weight: 700; }
.receipt-row .total { font-size: 1.15rem; color: var(--primary); }

.receipt-total-line {
    border-top: 1px dashed var(--border);
    margin-top: 10px;
    padding-top: 10px;
}

.receipt-wa {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    background: #E7F9EF;
    border: 1px solid #A5F3C5;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.9rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.receipt-wa i {
    color: #25D366;
    font-size: 1.3rem;
}

/* ---------- Guiones de cobro ---------- */
.script-box {
    background: var(--light-gray);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px;
    margin: 16px 0;
}

.script-box h3 {
    margin-top: 0;
    font-size: 1.05rem;
}

.script-box .msg {
    background: #E7F9EF;
    border-radius: 10px;
    padding: 14px 18px;
    margin-top: 10px;
    font-size: 0.98rem;
    color: var(--secondary);
    line-height: 1.7;
}

/* ---------- Calculadora ---------- */
.calc-form {
    background: var(--white);
    border: 2px solid var(--primary);
    border-radius: 16px;
    padding: 32px;
    margin: 24px 0;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.08);
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

.calc-field label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 6px;
}

.calc-field input,
.calc-field select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--secondary);
    background: var(--white);
}

.calc-field input:focus,
.calc-field select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.calc-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.calc-error {
    color: #C93D4A;
    font-size: 0.9rem;
    margin-top: 10px;
    display: none;
}

.calc-results {
    margin: 28px 0;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--white);
}

.calc-results table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    min-width: 620px;
}

.calc-results th {
    background: var(--light-gray);
    text-align: left;
    padding: 10px 14px;
    font-size: 0.85rem;
    color: var(--secondary);
    border-bottom: 1px solid var(--border);
}

.calc-results td {
    padding: 9px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--gray);
    font-variant-numeric: tabular-nums;
}

.calc-results tr:last-child td {
    border-bottom: none;
}

.calc-results .total-row td {
    font-weight: 700;
    color: var(--secondary);
    background: var(--light-gray);
}

.calc-totals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.calc-total-box {
    background: var(--light-gray);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 20px;
    text-align: center;
}

.calc-total-box .num {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}

.calc-total-box .lbl {
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 4px;
}

/* ---------- Blog ---------- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.blog-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--secondary);
}

.blog-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.1);
    transform: translateY(-3px);
}

.blog-card .cat {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 10px;
}

.blog-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.4;
}

.blog-card p {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0 0 16px;
    flex: 1;
}

.blog-card .leer {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary);
}

.article-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 8px;
}

.article-meta i {
    color: var(--primary);
    margin-right: 4px;
}

/* ---------- CTA banda ---------- */
.cta-band {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 80px 20px;
    text-align: center;
}

.cta-band h2 {
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--white);
}

.cta-band p {
    color: var(--white); /* explícito: gana a .page-container p cuando la banda va dentro de un artículo */
    font-size: 1.15rem;
    opacity: 0.92;
    margin-bottom: 32px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

.cta-band .btn {
    margin: 0 8px;
}

.cta-band .btn-white {
    background: var(--white);
    color: var(--primary);
}

.cta-band .btn-white:hover {
    background: var(--light-gray);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.cta-band .cta-micro {
    color: var(--white);
    margin-top: 20px;
    font-size: 0.9rem;
    opacity: 0.85;
}

/* ---------- FAQ ---------- */
.faq-item {
    background: var(--white);
    padding: 28px 32px;
    border-radius: 12px;
    margin-bottom: 16px;
    border-left: 4px solid var(--primary);
    border: 1px solid var(--border);
    border-left-width: 4px;
}

.faq-item h3 {
    color: var(--secondary);
    font-size: 1.2rem;
    margin: 0 0 10px;
    font-weight: 700;
}

.faq-item p {
    color: var(--gray);
    line-height: 1.8;
    margin: 0;
}

/* ---------- Enlaces relacionados ---------- */
.related {
    padding: 40px 20px 70px;
    background: var(--white);
}

.related-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.related h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.related-links {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.related-links a {
    background: var(--light-gray);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 10px 22px;
    text-decoration: none;
    color: var(--secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.related-links a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ---------- Footer ---------- */
.footer {
    background: var(--secondary);
    color: var(--white);
    padding: 60px 20px 30px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-about h3 {
    color: var(--primary);
    margin-bottom: 16px;
    font-size: 1.3rem;
}

.footer-about p {
    line-height: 1.8;
    color: rgba(255,255,255,0.8);
}

.footer-links h4 {
    color: var(--white);
    margin-bottom: 16px;
    font-weight: 600;
}

.footer-links a {
    display: block;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    text-align: center;
    color: rgba(255,255,255,0.7);
}

.footer-bottom a {
    color: var(--primary);
    text-decoration: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 968px) {
    .nav-container {
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .page-hero h1 {
        font-size: 2.2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 640px) {
    .page-hero h1 {
        font-size: 1.8rem;
    }

    .page-hero p {
        font-size: 1.05rem;
    }

    .btn {
        padding: 14px 24px;
        width: 100%;
    }

    .nav-buttons {
        gap: 10px;
    }

    .nav-buttons .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .cta-band h2 {
        font-size: 1.8rem;
    }
}
