/* =============================================================
   CG La Imprenta Digital — Plantilla moderna (landing)
   Basada en el estilo del template "primeDental", adaptada a la
   marca VERDE de CG (logo: #009048 / #007848 / #48C060).
   Soporta modo claro/oscuro (data-theme en <html>).
   Scoped a .cg-modern. Complementa a Bootstrap 5.
   ============================================================= */

:root {
    /* marca (constantes en ambos temas) */
    --primary:   #009048;
    --greenDeep: #007848;
    --greenMid:  #2bbf6a;

    /* tokens de superficie/tipografia — TEMA CLARO */
    --light:     #eef9f1;
    --bg:        #f0f7f3;
    --surface:   #ffffff;
    --surface-2: #eef9f1;
    --text:      #2d3a33;
    --heading:   #16271e;
    --muted:     #6a7a71;
    --border:    #e9f1ec;
    --shadow:    0 14px 35px rgba(0, 60, 33, .08);
    --shadow-lg: 0 26px 50px rgba(0, 60, 33, .14);
    --hero-end:  #f0f7f3;
    --hero-bg:   #009048;   /* color solido del hero/navbar (claro) */
    --band-bg:   #009048;   /* bandas verdes (stats, CTA, plan destacado) */
    --on-band:   #ffffff;   /* texto sobre las bandas */
}

/* TEMA OSCURO — explicito y por preferencia del sistema */
:root[data-theme="dark"] {
    --light:     #16241d;
    --bg:        #0e1512;
    --surface:   #16211b;
    --surface-2: #121c17;
    --text:      #d6e2db;
    --heading:   #f1f7f4;
    --muted:     #94a89d;
    --border:    #233029;
    --shadow:    0 14px 35px rgba(0, 0, 0, .40);
    --shadow-lg: 0 26px 50px rgba(0, 0, 0, .55);
    --hero-end:  #0e1512;
    --hero-bg:   #0e4e2f;   /* hero/navbar en oscuro: verde profundo */
    --band-bg:   #0c4025;   /* bandas en oscuro */
    --on-band:   #eaf5ee;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --light:     #16241d;
        --bg:        #0e1512;
        --surface:   #16211b;
        --surface-2: #121c17;
        --text:      #d6e2db;
        --heading:   #f1f7f4;
        --muted:     #94a89d;
        --border:    #233029;
        --shadow:    0 14px 35px rgba(0, 0, 0, .40);
        --shadow-lg: 0 26px 50px rgba(0, 0, 0, .55);
        --hero-end:  #0e1512;
        --hero-bg:   #0e4e2f;
        --band-bg:   #0c4025;
        --on-band:   #eaf5ee;
    }
}

.cg-modern {
    background: var(--bg);
    font-family: "Poppins", "Segoe UI", system-ui, Arial, sans-serif;
    color: var(--text);
    overflow-x: hidden;
    transition: background .3s ease, color .3s ease;
}
.cg-modern h1, .cg-modern h2, .cg-modern h3,
.cg-modern h4, .cg-modern h5, .cg-modern h6 { color: var(--heading); }
.cg-modern .text-muted { color: var(--muted) !important; }
.cg-modern .text-primary-cg { color: var(--primary) !important; }

.cg-modern .btn { background: var(--light); color: var(--greenDeep); border: none; border-radius: 8px; padding: 10px 20px; font-weight: 500; transition: box-shadow .2s ease, background-color .2s ease, border-color .2s ease, color .2s ease, filter .2s ease; }
.cg-modern .btn:hover { color: var(--greenDeep); box-shadow: 0 8px 22px rgba(0,120,72,.22); filter: brightness(1.03); }
.cg-modern .btn:active { filter: brightness(.97); }

/* ---------- navbar ---------- */
.cg-modern .main-nav { transition: .3s ease; background: transparent; }
.cg-modern .main-nav.scrolled { background: var(--hero-bg); box-shadow: 0 8px 25px rgba(0, 0, 0, .12); }
.cg-modern .main-nav { padding-top: .4rem !important; padding-bottom: .4rem !important; }
.cg-modern .main-nav .navbar-brand { margin: 0; }
.cg-modern .main-nav .navbar-brand img { height: 92px; width: auto; filter: brightness(0) invert(1); transition: height .3s ease; }
.cg-modern .main-nav.scrolled .navbar-brand img { height: 70px; }
.cg-modern .main-nav .nav-link { color: #fff !important; font-weight: 500; padding: .4rem .9rem; opacity: .92; }
.cg-modern .main-nav .nav-link:hover,
.cg-modern .main-nav .nav-link.active { opacity: 1; }
.cg-modern .main-nav .navbar-toggler { border: none; color: #fff !important; }
.cg-modern .main-nav .navbar-toggler:focus { box-shadow: none; }
.cg-modern .nav-cta { background: #fff !important; color: var(--greenDeep) !important; border-radius: 25px !important; font-weight: 600; padding: 10px 24px; }
.cg-modern .nav-cta:hover { background: #eafff2 !important; box-shadow: 0 8px 20px rgba(0,0,0,.12); }

/* boton "Documentacion API" (pill translucida, resalta sobre el verde) */
.cg-modern .nav-doc {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem; white-space: nowrap;
    color: #fff !important; font-weight: 600; font-size: .9rem; border-radius: 25px !important; padding: 9px 16px;
    border: 1.5px solid rgba(255,255,255,.75); background: var(--hero-bg); transition: .3s;
}
.cg-modern .nav-doc i { font-size: 1.05rem; }
.cg-modern .nav-doc:hover { background: #fff; color: var(--greenDeep) !important; border-color: #fff; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.15); }
.cg-modern .main-nav .nav-cta { white-space: nowrap; }
.cg-modern .main-nav > .container > .nav { flex-wrap: nowrap; flex-shrink: 0; }
.cg-modern .main-nav .nav-link { white-space: nowrap; }
/* el navbar va justo de ancho: se reduce el aire entre enlaces y, por debajo de 1200px,
   el boton de la documentacion dice solo "API" */
@media (min-width: 1400px) { .cg-modern .main-nav .nav-link { padding: .4rem .7rem; } }
@media (max-width: 1399.98px) {
    .cg-modern .main-nav .nav-link { padding: .4rem .45rem; font-size: .9rem; }
    .cg-modern .main-nav .nav-doc { padding: 8px 12px; font-size: .85rem; }
    .cg-modern .main-nav .nav-cta { padding: 9px 16px; font-size: .88rem; }
    .cg-modern .main-nav .navbar-brand img { height: 66px; }
}
@media (max-width: 1199.98px) {
    .cg-modern .main-nav .nav-link { padding: .4rem .35rem; font-size: .86rem; }
    .cg-modern .main-nav .navbar-brand img { height: 60px; }
}

/* toggle de tema */
.cg-modern .cg-theme-toggle {
    width: 42px; height: 42px; border-radius: 50%; cursor: pointer;
    border: 1px solid rgba(255,255,255,.45); background: var(--hero-bg); color: #fff;
    display: grid; place-items: center; font-size: 1.05rem; transition: .3s;
}
.cg-modern .cg-theme-toggle:hover { background: rgba(255,255,255,.3); transform: translateY(-2px); }

/* ---------- hero ---------- */
.cg-modern .hero-modern {
    padding: 150px 0 90px;
    background: var(--hero-bg); /* color solido; oscurece en modo oscuro */
    border-radius: 0 0 40px 40px; color: #fff; position: relative;
}
.cg-modern .hero-title { font-weight: 800; font-size: clamp(30px, 4.4vw, 44px); line-height: 1.15; color: #fff; }
.cg-modern .hero-desc { margin-top: 12px; max-width: 460px; opacity: .95; color: #fff; }
.cg-modern .hero-btn-primary { background: #fff; color: var(--primary); border-radius: 25px; font-weight: 600; padding: 11px 26px; }
.cg-modern .hero-btn-primary:hover { background: #eafff2; color: var(--greenDeep); }
.cg-modern .hero-btn-outline { border: 2px solid #fff; color: #fff; border-radius: 25px; font-weight: 600; padding: 10px 24px; background: transparent; }
.cg-modern .hero-btn-outline:hover { background: #fff; color: var(--greenDeep); }
.cg-modern .hero-btn-wide {
    min-width: 250px;
    padding: 12px 38px;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 8px 22px rgba(0, 40, 22, 0.22);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .3s ease;
}
.cg-modern .hero-btn-wide:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 40, 22, 0.3);
}
.cg-modern .hero-rating { background: rgba(0,120,72,.72); border: 1px solid rgba(255,255,255,.4); border-radius: 16px; padding: 10px 18px; width: max-content; margin-top: 18px; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); box-shadow: 0 10px 24px rgba(0,60,33,.18); }
.cg-modern .hero-action-group {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    width: -webkit-fit-content;
    width: -moz-fit-content;
    width: fit-content;
    max-width: 100%;
}
.cg-modern .hero-action-group .hero-rating {
    margin-top: 14px;
}
.cg-modern .rating-value { font-weight: 800; font-size: 20px; }
.cg-modern .rating-text { opacity: .92; margin-left: 6px; }

/* mock de factura realista: SIEMPRE claro (representa un documento en papel fiscal) */
.cg-modern .hero-card { background: #fff; color: #2d3a33; border-radius: 22px; box-shadow: 0 30px 60px rgba(0, 40, 22, .35); padding: 22px; max-width: 420px; margin-left: auto; }
.cg-modern .hero-card h1,.cg-modern .hero-card h2,.cg-modern .hero-card h3,.cg-modern .hero-card h4,.cg-modern .hero-card h5 { color: #16271e; }

.cg-modern .hero-pdf-sheet {
    background: #ffffff;
    padding: 8px;
    border-radius: 16px;
    box-shadow: 0 25px 65px rgba(0, 30, 15, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.5);
    max-width: 440px;
    width: 100%;
    margin-left: auto;
    transition: transform .3s ease, box-shadow .3s ease;
    position: relative;
    display: block;
}
.cg-modern .hero-pdf-sheet:hover {
    transform: translateY(-4px);
    box-shadow: 0 35px 80px rgba(0, 30, 15, 0.52);
}
.cg-modern .hero-pdf-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    border: 1px solid #e2ece5;
}
.cg-modern .hero-zoom-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    color: #007848;
    border: 1px solid rgba(0, 120, 72, 0.25);
    border-radius: 20px;
    padding: 6px 13px;
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 14px rgba(0, 40, 20, 0.25);
    cursor: pointer;
    transition: all .25s ease;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.cg-modern .hero-zoom-btn:hover {
    background: #007848;
    color: #ffffff;
    border-color: #007848;
    transform: scale(1.06);
    box-shadow: 0 6px 18px rgba(0, 40, 20, 0.35);
}
@media (max-width: 991px) {
    .cg-modern .hero-pdf-sheet {
        margin: 30px auto 0 auto;
        max-width: 380px;
    }
}


.cg-modern .hero-invoice {
    background: #ffffff;
    color: #1a2720;
    border-radius: 20px;
    box-shadow: 0 25px 65px rgba(0, 35, 18, 0.32), 0 0 0 1px rgba(255, 255, 255, 0.6);
    padding: 18px 20px 14px 20px;
    max-width: 485px;
    margin-left: auto;
    position: relative;
    overflow: hidden;
    font-family: inherit;
}
.cg-modern .hero-invoice::before {
    content: "DOCUMENTO DE PRUEBA";
    position: absolute;
    top: 52%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-25deg);
    font-size: 1.85rem;
    font-weight: 900;
    color: rgba(0, 120, 72, 0.055);
    white-space: nowrap;
    pointer-events: none;
    letter-spacing: 4px;
    z-index: 1;
}
.cg-modern .hero-invoice-inner {
    position: relative;
    z-index: 2;
}
.cg-modern .inv-head-emisor {
    font-size: 0.7rem;
    line-height: 1.25;
    color: #3b4d42;
}
.cg-modern .inv-head-emisor strong {
    font-size: 0.78rem;
    color: #0b1c12;
}
.cg-modern .inv-meta-box {
    text-align: right;
    font-size: 0.69rem;
    line-height: 1.25;
    color: #3b4d42;
}
.cg-modern .inv-meta-box .inv-num {
    font-size: 0.78rem;
    font-weight: 800;
    color: #0b1c12;
}
.cg-modern .inv-meta-box .inv-ctrl {
    font-size: 0.78rem;
    font-weight: 800;
    color: #007848;
}
.cg-modern .inv-client-box {
    background: #f7fbf8;
    border: 1px solid #e5efe8;
    border-radius: 9px;
    padding: 6px 9px;
    margin: 8px 0;
    font-size: 0.69rem;
    line-height: 1.28;
    color: #35473c;
}
.cg-modern .inv-client-box strong {
    color: #0b1c12;
}
.cg-modern .inv-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.69rem;
    border-radius: 7px;
    overflow: hidden;
    border: 1px solid #e1ece4;
    margin-bottom: 7px;
}
.cg-modern .inv-table th {
    background: #007848;
    color: #ffffff;
    font-weight: 700;
    padding: 4px 7px;
    font-size: 0.67rem;
    letter-spacing: 0.2px;
}
.cg-modern .inv-table td {
    padding: 5px 7px;
    background: #ffffff;
    border-top: 1px solid #edf4ef;
    color: #24352b;
}
.cg-modern .inv-totals-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 0.68rem;
    background: #fbfdfc;
    border: 1px solid #e6f0e9;
    border-radius: 9px;
    padding: 6px 9px;
    margin-bottom: 7px;
}
.cg-modern .inv-total-row {
    display: flex;
    justify-content: space-between;
    padding: 1px 0;
    color: #3b4d42;
}
.cg-modern .inv-total-row strong {
    color: #102318;
}
.cg-modern .inv-pay-banner {
    background: linear-gradient(135deg, #007848 0%, #005c36 100%);
    color: #ffffff;
    border-radius: 8px;
    padding: 6px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.74rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 120, 72, 0.2);
}
.cg-modern .inv-legal-foot {
    font-size: 0.55rem;
    line-height: 1.25;
    color: #63776b;
    text-align: center;
    margin-top: 6px;
    border-top: 1px dashed #d8e5dc;
    padding-top: 5px;
}
.cg-modern .inv-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #007848;
    font-weight: 700;
    font-size: 0.72rem;
    margin-top: 4px;
}

/* ---------- appointment / contacto rapido ---------- */
.cg-modern .appointment-bar { background: var(--surface); border-radius: 18px; padding: 22px 24px; margin-top: -55px; box-shadow: var(--shadow); position: relative; z-index: 5; border: 1px solid var(--border); }
.cg-modern .appointment-bar .form-label { font-size: .85rem; color: var(--muted); }
.cg-modern .form-field, .cg-modern textarea.form-control { border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.cg-modern .form-field { height: 46px; }
.cg-modern .form-field::placeholder, .cg-modern textarea.form-control::placeholder { color: var(--muted); opacity: .8; }
.cg-modern .form-field:focus, .cg-modern textarea.form-control:focus { border-color: var(--greenMid); box-shadow: 0 0 0 .2rem rgba(43,191,106,.15); background: var(--surface); color: var(--text); }
.cg-modern .make-btn { background: #009048; color: #fff; font-weight: 600; border-radius: 25px; height: 46px; }
.cg-modern .make-btn:hover { color: #fff; box-shadow: 0 12px 24px rgba(0,144,72,.3); filter: brightness(1.04); }

/* ---------- section headings ---------- */
.cg-modern .sec-tag { color: var(--greenMid); font-weight: 600; letter-spacing: .5px; text-transform: uppercase; font-size: .85rem; }
.cg-modern .sec-title { font-weight: 800; font-size: clamp(1.6rem, 3.3vw, 2.3rem); }

/* ---------- features ---------- */
.cg-modern .feature-item { text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 32px 22px; height: 100%; box-shadow: var(--shadow); transition: transform .35s ease, box-shadow .35s ease; }
.cg-modern .feature-item:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.cg-modern .feature-icon { font-size: 30px; color: #fff; width: 68px; height: 68px; border-radius: 18px; display: grid; place-items: center; margin: 0 auto 16px; background: #009048; box-shadow: 0 12px 24px rgba(0,144,72,.25); }
.cg-modern .feature-item h5 { font-weight: 700; margin-bottom: .5rem; }
.cg-modern .feature-item p { color: var(--muted); margin: 0; }

/* imagen/animacion de bloques "Funcionalidad" (contenida, no gigante) */
.cg-modern .cg-func-media { max-width: 340px; width: 100%; height: auto; border-radius: 18px; box-shadow: var(--shadow); }

/* tarjetas de servicio/funcionalidad (estilo service.html del template) */
.cg-modern .cg-service-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 30px; text-align: left; box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease; height: 100%; display: flex; flex-direction: column; }
.cg-modern .cg-service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.cg-modern .cg-service-ico { width: 92px; height: 92px; object-fit: contain; margin-bottom: 14px; }
/* chip de fondo para las ilustraciones SVG (responde al tema claro/oscuro) */
.cg-modern img.cg-service-ico { background: #E9F8EF; border-radius: 18px; padding: 12px; box-sizing: border-box; }
:root[data-theme="dark"] .cg-modern img.cg-service-ico { background: rgba(72,192,96,.14); }
.cg-modern lottie-player.cg-service-ico { width: 92px; height: 92px; display: block; }
.cg-modern lottie-player.cg-func-media { width: 100%; max-width: 340px; display: block; margin: 0 auto; }
.cg-modern .cg-service-card h5 { font-weight: 700; margin: 6px 0; color: var(--heading); }
.cg-modern .cg-service-card p { color: var(--muted); font-size: .92rem; margin-bottom: 1rem; flex-grow: 1; }
.cg-modern .cg-service-link { color: var(--primary); font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: .35rem; transition: gap .25s ease, color .25s ease; margin-top: auto; }
.cg-modern .cg-service-link:hover { color: var(--greenDeep); gap: .6rem; }

/* ---------- integraciones ---------- */
.cg-modern .integra-logo { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px; text-align: center; height: 100%; transition: transform .35s ease, box-shadow .35s ease; }
.cg-modern .integra-logo:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.cg-modern .integra-logo img { width: 100%; max-height: 80px; object-fit: contain; }
/* en modo oscuro, chip claro para que los logos a color sigan legibles */
:root[data-theme="dark"] .cg-modern .integra-logo img { background: #fff; border-radius: 10px; padding: 8px; }
.cg-modern .integra-logo h6 { margin: .7rem 0 0; font-size: .92rem; color: var(--heading); }
.cg-modern .integra-logo small { color: var(--muted); }

/* ---------- blog ---------- */
.cg-modern .blog-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 14px; gap: 14px; height: 100%; box-shadow: var(--shadow); transition: transform .35s ease, box-shadow .35s ease; }
.cg-modern .blog-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.cg-modern .blog-img { width: 150px; height: 150px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.cg-modern .blog-content h5 { font-weight: 700; font-size: 1.05rem; }
.cg-modern .blog-content h5 a { color: var(--heading); }
.cg-modern .blog-content p { color: var(--muted); margin: 6px 0; font-size: .92rem; }
.cg-modern .read-link { color: var(--greenMid); font-weight: 600; }
.cg-modern .read-link:hover { color: var(--primary); text-decoration: underline; }

/* ---------- stats / confianza ---------- */
.cg-modern .stats-box { background: var(--band-bg); padding: 36px; border-radius: 22px; color: var(--on-band); box-shadow: var(--shadow-lg); }
.cg-modern .stats-icon { font-size: 34px; color: #fff; margin-bottom: 10px; opacity: .95; }
.cg-modern .stats-box h3 { font-size: 26px; font-weight: 800; color: #fff; margin: 0; }
.cg-modern .stats-label { color: rgba(255,255,255,.9); font-size: 14px; margin: 0; }

/* ---------- pricing ---------- */
.cg-modern .price-switch { display: inline-flex; background: rgba(255,255,255,.2); border-radius: 999px; padding: 6px; gap: 4px; }
.cg-modern .price-switch button { border: none; background: transparent; font-weight: 600; color: #fff; padding: .6rem 1.5rem; border-radius: 999px; cursor: pointer; transition: .3s; }
.cg-modern .price-switch button.active { background: #fff; color: var(--greenDeep); }
.cg-modern .price-switch-light { background: var(--surface-2); border: 1px solid var(--border); }
.cg-modern .price-switch-light button { color: var(--heading); }
.cg-modern .price-switch-light button.active { background: #009048; color: #fff; box-shadow: 0 4px 12px rgba(0, 144, 72, 0.25); }
.cg-modern .price-card { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 34px 28px; height: 100%; position: relative; overflow: hidden; box-shadow: var(--shadow); transition: transform .35s ease, box-shadow .35s ease; }
.cg-modern .price-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.cg-modern .price-card.featured { background: var(--band-bg); color: var(--on-band); border-color: transparent; }
.cg-modern .price-card.featured h3, .cg-modern .price-card.featured .price-amount, .cg-modern .price-card.featured .price-name { color: #fff; }
.cg-modern .price-card.featured .price-list li { color: rgba(255,255,255,.95); }
.cg-modern .price-card.featured .price-list i { color: #fff; }
.cg-modern .price-badge { position: absolute; top: 18px; right: 18px; background: rgba(255,255,255,.22); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: 1px; padding: .3rem .9rem; border-radius: 999px; }
.cg-modern .price-name { font-weight: 800; font-size: 1.35rem; color: var(--heading); }
.cg-modern .price-amount { font-size: 2.8rem; font-weight: 800; color: var(--heading); line-height: 1; }
.cg-modern .price-amount small { font-size: 1rem; font-weight: 500; opacity: .7; }
.cg-modern .price-list { list-style: none; padding: 0; margin: 1.6rem 0; }
.cg-modern .price-list li { padding: .5rem 0; display: flex; gap: .6rem; align-items: flex-start; color: var(--text); }
.cg-modern .price-list i { color: var(--primary); margin-top: .2rem; }
.cg-modern .buy-btn { background: #009048; color: #fff; border-radius: 25px; font-weight: 600; width: 100%; padding: 12px; }
.cg-modern .buy-btn:hover { color: #fff; box-shadow: 0 12px 24px rgba(0,144,72,.3); filter: brightness(1.04); }
.cg-modern .price-card.featured .buy-btn { background: #fff; color: var(--greenDeep); }

/* ---------- faq ---------- */
.cg-modern .faq-tag { color: var(--greenMid); font-weight: 600; letter-spacing: .5px; text-transform: uppercase; font-size: .85rem; }
.cg-modern .accordion { --bs-accordion-bg: var(--surface); }
.cg-modern .accordion-button { font-weight: 600; background: var(--surface-2); color: var(--heading); }
.cg-modern .accordion-button:not(.collapsed) { color: var(--greenDeep); background: var(--light); box-shadow: none; }
.cg-modern .accordion-button:focus { box-shadow: none; }
.cg-modern .accordion-body { background: var(--surface); color: var(--muted); }
.cg-modern .accordion-item { border-radius: 14px !important; overflow: hidden; margin-bottom: 12px; border: 1px solid var(--border); background: var(--surface); }
:root[data-theme="dark"] .cg-modern .accordion-button::after { filter: invert(1) hue-rotate(80deg); }

/* ---------- cta ---------- */
.cg-modern .cta-box { background: var(--band-bg); padding: 36px 40px; border-radius: 22px; color: var(--on-band); display: flex; justify-content: space-between; align-items: center; gap: 18px; box-shadow: var(--shadow-lg); }
.cg-modern .cta-box h3, .cg-modern .cta-box p { color: #fff; }
.cg-modern .cta-btn { background: #fff; color: var(--greenDeep); font-weight: 700; padding: 12px 28px; border-radius: 25px; }
.cg-modern .cta-btn:hover { background: #eafff2; color: var(--greenDeep); box-shadow: 0 10px 24px rgba(0,0,0,.18); }
@media (max-width: 768px) { .cg-modern .cta-box { flex-direction: column; text-align: center; } }

/* ---------- footer ---------- */
.cg-modern .footer-section { background: var(--surface); border-top: 1px solid var(--border); padding: 56px 0 28px; margin-top: 40px; }
.cg-modern .footer-section h6 { color: var(--heading); font-weight: 700; margin-bottom: 1rem; }
.cg-modern .footer-section .foot-logo { height: 100px; width: auto; max-width: 100%; margin-bottom: 14px; }
.cg-modern .footer-links, .cg-modern .footer-contact { list-style: none; padding: 0; margin: 0; }
.cg-modern .footer-links li { margin-bottom: 8px; }
.cg-modern .footer-links a { color: var(--muted); font-size: .92rem; text-decoration: none; transition: color .25s ease; }
.cg-modern .footer-links a:hover { color: var(--primary); text-decoration: none; }
.cg-modern .footer-contact li { margin-bottom: 10px; font-size: .92rem; color: var(--text); display: flex; gap: .6rem; align-items: flex-start; }
.cg-modern .footer-contact i { color: var(--primary); margin-top: .15rem; }
.cg-modern .newsletter-box { gap: 10px; }
.cg-modern .newsletter-box input { flex: 1 1 auto; height: 60px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: 1.05rem; padding: 0 1.15rem; }
.cg-modern .newsletter-box input::placeholder { color: var(--muted); opacity: .85; }
.cg-modern .newsletter-box input:focus { border-color: var(--greenMid); box-shadow: 0 0 0 .2rem rgba(43,191,106,.15); background: var(--surface); color: var(--text); }
.cg-modern .newsletter-box button { height: 60px; border-radius: 14px; background: #009048; color: #fff; border: 1px solid #009048; font-weight: 600; font-size: 1.05rem; padding: 0 1.6rem; white-space: nowrap; display: inline-flex; align-items: center; gap: .5rem; }
.cg-modern .newsletter-box button:hover { background: #007848; border-color: #007848; color: #fff; box-shadow: 0 10px 22px rgba(0,120,72,.3); }
.cg-modern .social-icons a { font-size: 18px; color: var(--greenMid); width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); transition: .3s; text-decoration: none; }
.cg-modern .social-icons a:hover { color: #fff; background: var(--primary); transform: translateY(-3px); }
.cg-modern hr { border-color: var(--border); opacity: .6; }
/* links del sitio sin subrayado por defecto, color de marca al pasar */
.cg-modern a { text-decoration: none; }
.cg-modern .read-link:hover { text-decoration: none; color: var(--primary); }

/* ---------- whatsapp flotante ---------- */
.cg-modern .cg-wa-float {
    position: fixed; right: 22px; bottom: 22px; z-index: 1040; width: 58px; height: 58px;
    display: grid; place-items: center; background: none; box-shadow: none; text-decoration: none;
    color: var(--wa-ico, #009048);          /* verde de marca en claro; más vivo en oscuro */
}
.cg-modern .cg-wa-float i {
    font-size: 46px; line-height: 1;
    /* halo del color de la superficie: se lee igual sobre el hero verde y sobre fondos claros u oscuros */
    filter: drop-shadow(0 0 1.5px var(--surface)) drop-shadow(0 0 4px var(--surface)) drop-shadow(0 4px 8px rgba(0, 0, 0, .22));
    animation: cg-pulse 2.6s ease-in-out infinite; transition: transform .25s ease;
}
.cg-modern .cg-wa-float:hover i { transform: scale(1.12); }
:root[data-theme="dark"] .cg-modern .cg-wa-float { --wa-ico: #2bbf6a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cg-modern .cg-wa-float { --wa-ico: #2bbf6a; } }
@keyframes cg-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .cg-modern .cg-wa-float i { animation: none; } }

/* ---------- banner de cookies ---------- */
.cg-modern .cg-cookie {
    position: fixed; left: 22px; bottom: 22px; z-index: 1050; max-width: 380px;
    display: flex; align-items: center; gap: 14px; padding: 16px 18px;
    background: var(--surface); color: var(--text); border: 1px solid var(--border);
    border-radius: 16px; box-shadow: var(--shadow-lg);
    transform: translateY(160%); opacity: 0; transition: transform .5s cubic-bezier(.22,1,.36,1), opacity .5s ease;
}
.cg-modern .cg-cookie.show { transform: none; opacity: 1; }
.cg-modern .cg-cookie-ico { font-size: 1.7rem; color: var(--greenMid); flex-shrink: 0; }
.cg-modern .cg-cookie-txt { font-size: .84rem; color: var(--muted); line-height: 1.5; }
.cg-modern .cg-cookie-btn { background: #009048; color: #fff; border-radius: 999px; padding: .5rem 1.2rem; font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.cg-modern .cg-cookie-btn:hover { color: #fff; box-shadow: 0 10px 22px rgba(0,120,72,.3); filter: brightness(1.04); }

/* ---------- auth (login / seniat_login) ---------- */
.cg-modern.cg-auth-body { background: var(--bg); min-height: 100vh; }
.cg-auth { min-height: 100vh; display: flex; }
.cg-auth-brand {
    flex: 1 1 46%; background: var(--hero-bg); color: #fff; position: relative;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    padding: 48px; text-align: center; overflow: hidden;
}
.cg-auth-brand::after { content: ""; position: absolute; width: 360px; height: 360px; border-radius: 50%; background: rgba(255,255,255,.08); top: -120px; right: -120px; }
.cg-auth-brand::before { content: ""; position: absolute; width: 280px; height: 280px; border-radius: 50%; background: rgba(255,255,255,.07); bottom: -110px; left: -90px; }
.cg-auth-brand .cg-auth-logo { height: 120px; width: auto; max-width: 80%; filter: brightness(0) invert(1); margin-bottom: 24px; position: relative; z-index: 2; }
.cg-auth-card a:hover img { opacity: .9; }
.cg-auth-brand h2 { color: #fff; font-weight: 800; position: relative; z-index: 2; font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.cg-auth-brand p { color: rgba(255,255,255,.92); max-width: 420px; position: relative; z-index: 2; }
.cg-auth-brand .cg-auth-points { list-style: none; padding: 0; margin: 22px 0 0; text-align: left; position: relative; z-index: 2; }
.cg-auth-brand .cg-auth-points li { display: flex; align-items: center; gap: .6rem; margin-bottom: .7rem; }
.cg-auth-brand .cg-auth-points i { color: #fff; }

.cg-auth-form { flex: 1 1 54%; display: flex; align-items: center; justify-content: center; padding: 40px 20px; position: relative; }
.cg-auth-card { width: 100%; max-width: 420px; }
.cg-auth-card .cg-auth-mobile-logo { height: 76px; margin: 0 auto 18px; display: none; }
.cg-auth-card h3 { font-weight: 800; color: var(--heading); margin-bottom: 4px; }
.cg-auth-card .cg-auth-sub { color: var(--muted); margin-bottom: 26px; }
.cg-auth-card .form-control { height: 52px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 0 1rem; }
.cg-auth-card textarea.form-control { height: auto; }
.cg-auth-card .form-control:focus { border-color: var(--greenMid); box-shadow: 0 0 0 .2rem rgba(43,191,106,.15); background: var(--surface); color: var(--text); }
.cg-auth-card .form-control::placeholder { color: var(--muted); opacity: .85; }
.cg-auth-card .form-group { margin-bottom: 16px; position: relative; }
.cg-auth-card .signin_btn { width: 100%; height: 52px; border-radius: 12px; background: var(--band-bg); color: #fff; border: none; font-weight: 700; font-size: 1rem; transition: box-shadow .2s ease, filter .2s ease; }
.cg-auth-card .signin_btn:hover { color: #fff; box-shadow: 0 10px 24px rgba(0,120,72,.3); filter: brightness(1.05); }
.cg-auth-card .signin_btn:disabled { opacity: .8; }
.cg-auth-card .forgot_pass { color: var(--greenDeep); font-weight: 600; font-size: .9rem; float: right; margin-top: 8px; }
.cg-auth-card .toggle-password { position: absolute; top: 16px; right: 14px; cursor: pointer; color: var(--muted); }
.cg-auth-card .create, .cg-auth-card .back_seniat, .cg-auth-card .back_login { display: inline-block; margin-top: 14px; color: var(--muted); font-weight: 600; }
.cg-auth-card .create:hover, .cg-auth-card .back_seniat:hover { color: var(--primary); }
.cg-auth-card .login-box-msg { font-weight: 700; color: var(--heading); font-size: 1.3rem; margin-bottom: 18px; }
.spinner-btn-sm { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: cg-spin .6s linear infinite; vertical-align: -3px; }
@keyframes cg-spin { to { transform: rotate(360deg); } }
.cg-auth-theme { position: absolute; top: 20px; right: 20px; z-index: 5; }
.cg-auth-theme .cg-theme-toggle { border-color: var(--border); background: var(--surface); color: var(--greenDeep); }
@media (max-width: 860px) {
    .cg-auth-brand { display: none; }
    .cg-auth-card .cg-auth-mobile-logo { display: block; }
}

/* variante register: dos columnas 50/50 como el login; marca fija al hacer scroll */
.cg-auth-register { align-items: stretch; }
.cg-auth-register .cg-auth-brand { flex: 0 0 40%; max-width: 40%; position: sticky; top: 0; align-self: flex-start; height: 100vh; }
.cg-auth-register .cg-auth-form { flex: 0 0 60%; max-width: 60%; display: block; align-items: initial; justify-content: initial; padding: 36px 40px 60px; position: relative; }
.cg-auth-register .register-shell { background: transparent !important; margin: 0 !important; padding: 0 !important; }
.cg-auth-register .register-shell .container { max-width: 760px; padding: 0; }
.cg-auth-register .cg-reg-hide { display: none !important; } /* logo/titulo interno redundante (ya esta el panel de marca) */
@media (max-width: 860px) {
    .cg-auth-register .cg-auth-brand { display: none; }
    .cg-auth-register .cg-auth-form { flex: 0 0 100%; max-width: 100%; padding: 70px 14px 40px; }
}

/* ---------- responsive ---------- */
@media (max-width: 991px) {
    .cg-modern .hero-modern { padding: 130px 0 70px; text-align: center; }
    .cg-modern .hero-desc, .cg-modern .hero-rating, .cg-modern .hero-card { margin-left: auto; margin-right: auto; }
    .cg-modern .hero-card { margin-top: 2.5rem; }
    .cg-modern .appointment-bar { margin-top: 24px; }
    .cg-modern .blog-card { flex-direction: column; }
    .cg-modern .blog-img { width: 100%; height: 190px; }
}
@media (max-width: 575px) {
    .cg-modern .cg-cookie { left: 14px; right: 14px; max-width: none; bottom: 90px; }
    .cg-modern .cg-cookie-txt { font-size: .8rem; }
}

/* ---------- formularios de contacto con reCAPTCHA (cg-contact-form.js) ---------- */
/* El sello flotante se oculta (chocaba con el botón de WhatsApp); el aviso legal va junto a cada formulario */
.grecaptcha-badge { visibility: hidden !important; }
.cg-modern .cg-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cg-modern .cg-captcha-legal { margin: 8px 0 0; font-size: .72rem; line-height: 1.35; color: var(--muted); }
.cg-modern .cg-captcha-legal a { color: inherit; text-decoration: underline; }
.cg-modern .js-contact-form .is-sending { opacity: .7; pointer-events: none; }
/* Botón alineado con los campos aunque estos muestren un error debajo */
@media (min-width: 768px) {
    .cg-modern .appointment-submit::before { content: ""; display: block; height: calc(.85rem * 1.5 + .5rem); }
}
.cg-modern .newsletter-box { position: relative; }
.cg-modern .newsletter-box .invalid-feedback { position: absolute; left: 0; top: 100%; margin-top: 4px; }

/* Menu movil (offcanvas): mismo fondo que el hero (claro/oscuro) y enlaces en blanco */
.cg-modern #cgMobile { background: var(--hero-bg); color: #fff; }
.cg-modern #cgMobile .nav-link { color: #fff !important; font-weight: 500; opacity: .92; }
.cg-modern #cgMobile .nav-link:hover,
.cg-modern #cgMobile .nav-link:focus,
.cg-modern #cgMobile .nav-link.active { color: #fff !important; opacity: 1; }
