/* ==========================================================================
   Facturación Electrónica (servicios/facturacion.php)
   Se apoya en home.css (hero, mockup y tarjeta de cifras) y en los tokens
   de custom.css (--brand-*, --ink-*, --surface, --radius-*).
   ========================================================================== */

.fe-section {
    padding: 5rem 0;
}

.fe-section-alt {
    background: var(--surface-alt);
}

.fe-head {
    max-width: 44rem;
    margin: 0 auto 3rem;
    text-align: center;
}

.fe-head h2 {
    margin: .9rem 0 .7rem;
    font-size: clamp(1.8rem, 3.2vw, 2.5rem);
    letter-spacing: -.015em;
}

.fe-head p {
    margin: 0;
    font-size: 1.08rem;
    color: var(--ink-500);
}

/* Precio flotante del hero */
.fe-hero-price {
    position: absolute;
    left: 0;
    bottom: 0;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: 0 22px 44px rgba(2, 16, 48, .45);
    color: #0f172a;
    line-height: 1.2;
}

.fe-hero-price small {
    display: block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #64748b;
}

.fe-hero-price strong {
    display: block;
    margin: .15rem 0;
    font-family: var(--font-heading);
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--brand-primary);
}

.fe-hero-price strong span {
    font-size: .95rem;
    font-weight: 600;
    color: #64748b;
}

.fe-hero-price em {
    font-size: .78rem;
    font-style: normal;
    font-weight: 600;
    color: #16a34a;
}

/* -------------------------------------------------------------------------
   Conoce el sistema (galería con pestañas)
   ------------------------------------------------------------------------- */
.fe-gallery .carousel-indicators {
    position: static;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .5rem;
    margin: 0 0 1.6rem;
}

.fe-gallery .carousel-indicators [data-bs-target] {
    flex: 0 0 auto;
    width: auto;
    height: auto;
    margin: 0;
    padding: .5rem 1.1rem;
    border: 1px solid var(--ink-100);
    border-radius: var(--radius-pill);
    background: var(--surface);
    font-size: .88rem;
    font-weight: 600;
    text-indent: 0;
    color: var(--ink-700);
    opacity: 1;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.fe-gallery .carousel-indicators [data-bs-target]:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.fe-gallery .carousel-indicators .active {
    border-color: var(--brand-primary);
    background: var(--brand-primary);
    color: #fff;
}

.fe-frame {
    max-width: 960px;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid var(--ink-100);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-lg);
}

.fe-frame-bar {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .65rem .9rem;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
}

.fe-frame-bar span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #cbd5e1;
}

.fe-shot {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: #fff;
    cursor: zoom-in;
}

.fe-shot img {
    display: block;
    width: 100%;
    height: auto;
}

.fe-shot-zoom {
    position: absolute;
    right: 14px;
    bottom: 14px;
    padding: .4rem .85rem;
    border-radius: var(--radius-pill);
    background: rgba(15, 23, 42, .78);
    font-size: .78rem;
    font-weight: 600;
    color: #fff;
}

/* -------------------------------------------------------------------------
   Qué incluye
   ------------------------------------------------------------------------- */
.fe-include {
    height: 100%;
    padding: 2rem 1.8rem;
    border: 1px solid var(--ink-100);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.fe-include-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin-bottom: 1.1rem;
    border-radius: 14px;
    background: var(--brand-primary-light);
    font-size: 1.3rem;
    color: var(--brand-primary);
}

.fe-include.is-accent .fe-include-icon {
    background: var(--brand-accent-light);
    color: var(--brand-accent-dark);
}

.fe-include h3 {
    margin: 0 0 1rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.fe-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.fe-list li {
    display: flex;
    gap: .65rem;
    padding: .45rem 0;
    font-size: .95rem;
    color: var(--ink-700);
}

.fe-list i {
    margin-top: .25rem;
    font-size: .85rem;
    color: #16a34a;
}

/* -------------------------------------------------------------------------
   Formatos de impresión
   ------------------------------------------------------------------------- */
.fe-formats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.fe-format {
    display: block;
    width: 100%;
    padding: .6rem .6rem .9rem;
    border: 1px solid var(--ink-100);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    text-align: left;
    cursor: zoom-in;
    transition: transform .25s ease, box-shadow .25s ease;
}

.fe-format:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.fe-format img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 9px;
    background: #fff;
}

.fe-format span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: .8rem .4rem 0;
    font-weight: 700;
    color: var(--ink-900);
}

.fe-format span i {
    font-size: .85rem;
    color: var(--ink-500);
}

/* -------------------------------------------------------------------------
   Video
   ------------------------------------------------------------------------- */
.fe-video {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    color: rgba(255, 255, 255, .84);
    background: linear-gradient(135deg, #021a3f 0%, #033a87 55%, var(--brand-primary) 100%);
}

.fe-video::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at 12% 85%, rgba(242, 101, 34, .28), transparent 40%);
    pointer-events: none;
}

.fe-video h2 {
    margin: .9rem 0 .8rem;
    font-size: clamp(1.8rem, 3.2vw, 2.5rem);
    letter-spacing: -.015em;
    color: #fff;
}

.fe-video .fe-list li {
    color: rgba(255, 255, 255, .86);
}

.fe-video .fe-list i {
    color: #5eead4;
}

.fe-video-frame {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 16px;
    box-shadow: 0 34px 70px rgba(2, 16, 48, .55);
}

/* -------------------------------------------------------------------------
   Planes
   ------------------------------------------------------------------------- */
.fe-toggle {
    display: inline-flex;
    margin-top: 1.5rem;
    padding: .3rem;
    border: 1px solid var(--ink-100);
    border-radius: var(--radius-pill);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.fe-toggle label {
    margin: 0;
    padding: .5rem 1.3rem;
    border-radius: var(--radius-pill);
    font-size: .92rem;
    font-weight: 600;
    color: var(--ink-700);
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease;
}

.fe-toggle label small {
    margin-left: .35rem;
    padding: .12rem .5rem;
    border-radius: var(--radius-pill);
    background: #dcfce7;
    font-weight: 700;
    color: #15803d;
}

.fe-toggle input:checked + label {
    background: var(--brand-primary);
    color: #fff;
}

.fe-toggle input:focus-visible + label {
    outline: 2px solid var(--brand-accent);
    outline-offset: 2px;
}

.fe-plans {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    align-items: stretch;
}

.fe-plan {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem 1.6rem;
    border: 1px solid var(--ink-100);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: transform .25s ease, box-shadow .25s ease;
}

.fe-plan:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.fe-plan.is-popular {
    border: 2px solid var(--brand-primary);
    box-shadow: var(--shadow-lg);
}

.fe-plan-badge {
    position: absolute;
    top: -13px;
    left: 50%;
    padding: .25rem .9rem;
    border-radius: var(--radius-pill);
    background: var(--brand-accent);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
    color: #fff;
    transform: translateX(-50%);
}

.fe-plan-name {
    margin: 0;
    font-size: .85rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--brand-primary);
}

.fe-plan-for {
    min-height: 2.6em;
    margin: .35rem 0 1.1rem;
    font-size: .86rem;
    line-height: 1.3;
    color: var(--ink-500);
}

.fe-plan-price {
    font-family: var(--font-heading);
    font-size: 2.3rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.02em;
    color: var(--ink-900);
}

.fe-plan-price small {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink-500);
}

.fe-plan-period {
    display: block;
    margin: .4rem 0 1.3rem;
    padding-bottom: 1.3rem;
    border-bottom: 1px solid var(--ink-100);
    font-size: .82rem;
    color: var(--ink-500);
}

.fe-plan .fe-list {
    flex: 1;
    margin-bottom: 1.5rem;
}

.fe-plan .fe-list li {
    padding: .32rem 0;
    font-size: .9rem;
}

.fe-plan .fe-list li.is-off {
    color: var(--ink-300);
    text-decoration: line-through;
}

.fe-plan .fe-list li.is-off i {
    color: var(--ink-300);
}

.fe-plan .fe-list strong {
    color: var(--ink-900);
}

.fe-plans-note {
    margin: 2rem 0 0;
    text-align: center;
    font-size: .9rem;
    color: var(--ink-500);
}

/* -------------------------------------------------------------------------
   Preguntas frecuentes
   ------------------------------------------------------------------------- */
.fe-faq {
    max-width: 52rem;
    margin: 0 auto;
}

.fe-faq-item {
    border: 1px solid var(--ink-100);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.fe-faq-item + .fe-faq-item {
    margin-top: .8rem;
}

.fe-faq-q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    padding: 1.15rem 1.4rem;
    border: 0;
    background: transparent;
    font-family: var(--font-heading);
    font-size: 1.02rem;
    font-weight: 700;
    text-align: left;
    color: var(--ink-900);
}

.fe-faq-q i {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--brand-primary-light);
    font-size: .8rem;
    color: var(--brand-primary);
    transition: transform .25s ease, background-color .25s ease, color .25s ease;
}

.fe-faq-q:not(.collapsed) i {
    background: var(--brand-primary);
    color: #fff;
    transform: rotate(45deg);
}

.fe-faq-a {
    padding: 0 1.4rem 1.25rem;
    line-height: 1.65;
    color: var(--ink-700);
}

.fe-faq-a p {
    margin: 0;
}

/* -------------------------------------------------------------------------
   Llamado final
   ------------------------------------------------------------------------- */
.fe-cta {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 3.2rem 2.5rem;
    border-radius: 24px;
    background: linear-gradient(135deg, #021a3f 0%, #033a87 55%, var(--brand-primary) 100%);
    color: rgba(255, 255, 255, .85);
    box-shadow: var(--shadow-lg);
}

.fe-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at 90% 15%, rgba(242, 101, 34, .35), transparent 42%);
}

.fe-cta h2 {
    margin: 0 0 .5rem;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: #fff;
}

.fe-cta p {
    margin: 0;
    font-size: 1.05rem;
}

/* Visor de imágenes */
.fe-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100001;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(2, 10, 28, .9);
}

.fe-lightbox.is-open {
    display: flex;
}

.fe-lightbox p {
    margin: 0 0 .8rem;
    padding: 0 3rem;
    font-weight: 600;
    text-align: center;
    color: #fff;
}

.fe-lightbox img {
    max-width: 94vw;
    max-height: 82vh;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
}

.fe-lightbox button {
    position: absolute;
    top: 14px;
    right: 20px;
    border: 0;
    background: none;
    font-size: 2.2rem;
    line-height: 1;
    color: #fff;
}

/* -------------------------------------------------------------------------
   Tema oscuro
   ------------------------------------------------------------------------- */
[data-theme="dark"] .fe-include,
[data-theme="dark"] .fe-format,
[data-theme="dark"] .fe-plan:not(.is-popular),
[data-theme="dark"] .fe-faq-item,
[data-theme="dark"] .fe-toggle,
[data-theme="dark"] .fe-frame,
[data-theme="dark"] .fe-gallery .carousel-indicators [data-bs-target]:not(.active) {
    border-color: rgba(255, 255, 255, .1);
}

[data-theme="dark"] .fe-plan-period {
    border-color: rgba(255, 255, 255, .1);
}

[data-theme="dark"] .fe-plan-name {
    color: #8ab4ff;
}

[data-theme="dark"] .fe-plan .fe-list li.is-off,
[data-theme="dark"] .fe-plan .fe-list li.is-off i {
    color: rgba(255, 255, 255, .28);
}

/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */
@media (max-width: 1199.98px) {
    .fe-plans {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 2rem;
    }
}

@media (max-width: 767.98px) {
    .fe-section {
        padding: 3.5rem 0;
    }

    .fe-formats {
        grid-template-columns: repeat(2, 1fr);
        gap: .8rem;
    }

    .fe-hero-price {
        padding: .75rem 1rem;
    }

    .fe-hero-price strong {
        font-size: 1.5rem;
    }

    .fe-cta {
        padding: 2.4rem 1.5rem;
        text-align: center;
    }
}

@media (max-width: 575.98px) {
    .fe-plans {
        grid-template-columns: 1fr;
    }

    .fe-gallery .carousel-indicators {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: .4rem;
    }
}
