/* ============================================================
   AyniSys — LANDING PAGE
   Compatible con styles.css global (claro + oscuro)
   ============================================================ */

/* ============================================================
   1. VARIABLES LOCALES DE LA LANDING
   ------------------------------------------------------------
   - --landing-navy* : identidad de marca de la landing (hero/CTA/buttons)
   - Se adaptan en dark mode para garantizar contraste
   ============================================================ */
:root {
    --landing-navy:        #1e3a5f;
    --landing-navy-dark:   #0f2b48;
    --landing-navy-deep:   #152c42;
    --landing-navy-soft:   rgba(30, 58, 95, 0.08);
    --landing-navy-ring:   rgba(30, 58, 95, 0.20);

    --landing-hero-from:   #1e3a5f;
    --landing-hero-to:     #152c42;

    --landing-body-bg:     #f4f7fc;
}

html[data-theme="dark"] {
    --landing-navy:        #4d6bfe;
    --landing-navy-dark:   #3d5bfe;
    --landing-navy-deep:   #2c46c2;
    --landing-navy-soft:   rgba(77, 107, 254, 0.14);
    --landing-navy-ring:   rgba(77, 107, 254, 0.30);

    --landing-hero-from:   #0a1628;
    --landing-hero-to:     #050b14;

    --landing-body-bg:     var(--ayni-bg-body);
}

/* Fondo del body solo en la landing */
body:has(.hero-section) {
    background-color: var(--landing-body-bg) !important;
}

/* ============================================================
   2. HERO
   ============================================================ */
.hero-section {
    position: relative;
    overflow: hidden;
    padding: 2.5rem 0 3rem;
    margin: 0;
    border-radius: 0;
    color: #fff;
    background: linear-gradient(
        135deg,
        var(--landing-hero-from) 0%,
        var(--landing-hero-to) 100%
    ) !important;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(700px 320px at 15% 0%,    rgba(255, 255, 255, 0.10), transparent 60%),
        radial-gradient(600px 400px at 100% 100%, rgba(52, 152, 219, 0.18), transparent 60%);
    pointer-events: none;
    z-index: 1;
}

.hero-section > .container {
    position: relative;
    z-index: 2;
}

.hero-section .display-4 {
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.20);
}

.hero-section .lead {
    color: rgba(255, 255, 255, 0.90);
    max-width: 620px;
}

.hero-section .text-warning   { color: #ffd166; font-weight: 700; }
.hero-section .text-white-50  { color: rgba(255, 255, 255, 0.55); }

/* Botones del hero */
.hero-section .btn-light {
    background: #ffffff;
    color: var(--landing-navy);
    border: 2px solid #ffffff;
    font-weight: 700;
}
.hero-section .btn-light:hover {
    background: #f0f4fa;
    color: var(--landing-navy-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.hero-section .btn-outline-light {
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.75);
    background: transparent;
    font-weight: 700;
}
.hero-section .btn-outline-light:hover {
    background: #ffffff;
    color: var(--landing-navy);
    border-color: #ffffff;
    transform: translateY(-2px);
}

/* Patrón decorativo */
.bubble-pattern {
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.15) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
}

/* Imagen + formas flotantes */
.image-container {
    position: relative;
    padding: 15px;
    background: rgba(255, 255, 255, 0.10);
    border-radius: 1.25rem;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.floating-image {
    position: relative;
    z-index: 2;
    transition: transform 0.5s ease;
    border-radius: 1rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
.floating-image:hover {
    transform: translateY(-6px) scale(1.01);
}

.shadow-overlay {
    border-radius: 1rem;
    box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.20);
    pointer-events: none;
    z-index: 3;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    z-index: 1;
    pointer-events: none;
}
.shape-1 {
    width: 130px; height: 130px;
    top: -35px; left: -35px;
    animation: landing-float 6s ease-in-out infinite;
}
.shape-2 {
    width: 90px; height: 90px;
    bottom: -25px; right: -25px;
    animation: landing-float 8s ease-in-out infinite reverse;
}

@keyframes landing-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-16px); }
}

/* ============================================================
   3. COLORES CORPORATIVOS / CTA
   ------------------------------------------------------------
   .bg-primary en el global es "soft"; aquí lo forzamos a sólido
   para los CTA de la landing (usa navy gradient con identidad).
   ============================================================ */
section.bg-primary,
section.bg-primary.text-white,
.modal-header.bg-primary,
.bg-primary.text-white {
    background: linear-gradient(
        135deg,
        var(--landing-navy) 0%,
        var(--landing-navy-deep) 100%
    ) !important;
    color: #ffffff !important;
}

.bg-dark-subtle {
    background: var(--ayni-bg-surface-2) !important;
}
.border-primary {
    border-color: var(--landing-navy) !important;
}

.text-primary { color: var(--landing-navy) !important; }
.hero-section .text-primary { color: #7cc6ff !important; }

/* Botones primarios de la landing */
.btn-primary {
    background-color: var(--landing-navy) !important;
    border-color: var(--landing-navy) !important;
    color: #fff !important;
    font-weight: 600;
}
.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--landing-navy-dark) !important;
    border-color: var(--landing-navy-dark) !important;
    color: #fff !important;
    box-shadow: 0 8px 20px var(--landing-navy-ring) !important;
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--landing-navy) !important;
    border-color: var(--landing-navy) !important;
    background: transparent !important;
    font-weight: 600;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--landing-navy) !important;
    border-color: var(--landing-navy) !important;
    color: #fff !important;
    transform: translateY(-1px);
}

/* ============================================================
   4. TARJETAS DE MÓDULOS
   ============================================================ */
.module-card {
    background: var(--ayni-bg-surface);
    border-radius: 18px;
    border: 1px solid var(--ayni-border);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    box-shadow: var(--ayni-shadow-sm);
    overflow: hidden;
    color: var(--ayni-text);
}
.module-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 1.25rem 2.5rem var(--landing-navy-ring);
    border-color: var(--landing-navy);
}
.module-card h4 {
    color: var(--landing-navy);
    font-weight: 700;
}

/* ============================================================
   5. ICON BOX
   ============================================================ */
.icon-box {
    width: 78px;
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--landing-navy-soft);
    color: var(--landing-navy);
    transition: transform .3s ease, background .3s ease, color .3s ease;
}
.module-card:hover .icon-box {
    background: var(--landing-navy);
    color: #fff;
    transform: scale(1.08) rotate(-4deg);
}

.icon-box-small {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--landing-navy-soft);
    color: var(--landing-navy);
    flex-shrink: 0;
    font-size: 1rem;
}

/* ============================================================
   6. NÚMEROS DE PASO
   ============================================================ */
.step-number {
    width: 54px;
    height: 54px;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        135deg,
        var(--landing-navy) 0%,
        var(--landing-navy-dark) 100%
    );
    color: #fff;
    border-radius: 50%;
    box-shadow: 0 8px 20px var(--landing-navy-ring);
}

/* ============================================================
   7. EFECTOS HOVER
   ============================================================ */
.shadow-sm-hover {
    transition: box-shadow .3s ease, transform .3s ease;
}
.shadow-sm-hover:hover {
    box-shadow: 0 .75rem 1.75rem rgba(15, 23, 42, .12) !important;
    transform: translateY(-3px);
}
html[data-theme="dark"] .shadow-sm-hover:hover {
    box-shadow: 0 .75rem 1.75rem rgba(0, 0, 0, .55) !important;
}

.hover-effect {
    transition: transform .25s ease, box-shadow .25s ease;
}
.hover-effect:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .18) !important;
}
html[data-theme="dark"] .hover-effect:hover {
    box-shadow: 0 10px 24px rgba(0, 0, 0, .55) !important;
}

.transition-all { transition: all .25s ease; }

.hover-zoom { transition: transform .5s ease; }
.card:hover .hover-zoom { transform: scale(1.05); }

/* ============================================================
   8. FAQ / ACCORDION
   ============================================================ */
.accordion-item {
    background: var(--ayni-bg-surface);
    border: 1px solid var(--ayni-border) !important;
    border-radius: 12px !important;
    overflow: hidden;
    margin-bottom: .75rem;
}
.accordion-button {
    background: var(--ayni-bg-surface);
    color: var(--landing-navy);
    font-weight: 600;
    padding: 1rem 1.25rem;
    box-shadow: none !important;
    border: none !important;
}
.accordion-button:not(.collapsed) {
    background: var(--ayni-bg-surface-2);
    color: var(--landing-navy);
    box-shadow: inset 0 -1px 0 var(--ayni-border) !important;
}
.accordion-button:focus {
    box-shadow: 0 0 0 3px var(--landing-navy-soft) !important;
}
.accordion-body {
    color: var(--ayni-text-muted);
    background: var(--ayni-bg-surface);
    line-height: 1.65;
    padding: 1rem 1.25rem 1.25rem;
}
html[data-theme="dark"] .accordion-button::after {
    filter: invert(1);
}

/* ============================================================
   9. TESTIMONIOS
   ============================================================ */
.star-rating {
    display: inline-flex;
    gap: 3px;
    font-size: .95rem;
}
.star-rating i { color: #f5b301; }

/* ============================================================
   10. MODAL DEMO / CONTACTO
   ============================================================ */
#demoModal .modal-content {
    border: none !important;
    border-radius: 1rem !important;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35) !important;
    background: var(--ayni-bg-surface) !important;
    color: var(--ayni-text);
}

#demoModal .modal-header {
    background: linear-gradient(
        135deg,
        var(--landing-navy) 0%,
        var(--landing-navy-deep) 100%
    ) !important;
    color: #fff !important;
    border-bottom: none !important;
    padding: 1.1rem 1.5rem !important;
}

#demoModal .modal-title {
    color: #fff !important;
    font-weight: 700 !important;
    font-size: 1rem;
}

#demoModal .btn-close,
#demoModal .btn-close-white {
    filter: brightness(0) invert(1) !important;
    opacity: .85 !important;
}
#demoModal .btn-close:hover { opacity: 1 !important; }

#demoModal .contact-item { color: var(--ayni-text); }
#demoModal .contact-item strong {
    color: var(--landing-navy) !important;
    font-weight: 700;
}
#demoModal .contact-item a {
    color: var(--landing-navy) !important;
    font-weight: 500;
    transition: color .2s ease;
}
#demoModal .contact-item a:hover {
    color: var(--landing-navy-dark) !important;
    text-decoration: underline !important;
}

#demoModal .modal-footer {
    background: var(--ayni-bg-surface-2) !important;
    border-top: 1px solid var(--ayni-border) !important;
    padding: 1rem !important;
}

/* ============================================================
   11. FAB DE CONTACTO
   ============================================================ */
.contact-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1050;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}
.contact-fab > * { pointer-events: auto; }

.contact-fab .fab-main {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(
        135deg,
        var(--landing-navy) 0%,
        var(--landing-navy-dark) 100%
    );
    color: #fff;
    font-size: 1.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px var(--landing-navy-ring);
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease;
}
.contact-fab .fab-main:hover {
    transform: scale(1.06);
    box-shadow: 0 12px 32px var(--landing-navy-ring);
}

.contact-fab .fab-main .fa-times { display: none; }
.contact-fab.is-open .fab-main .fa-comments,
.contact-fab.open   .fab-main .fa-comments { display: none; }
.contact-fab.is-open .fab-main .fa-times,
.contact-fab.open   .fab-main .fa-times    { display: inline-block; }

.contact-fab .fab-option {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--ayni-bg-surface);
    color: var(--landing-navy);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
    transform: scale(0);
    opacity: 0;
    transition: transform .25s ease, opacity .25s ease, background .2s ease, color .2s ease;
    text-decoration: none;
    font-size: 1.05rem;
}

.contact-fab.is-open .fab-option,
.contact-fab.open   .fab-option {
    transform: scale(1);
    opacity: 1;
}

.contact-fab .fab-option:hover {
    transform: scale(1.1);
    color: #fff;
}
.contact-fab .fab-option.facebook:hover { background: #1877f2; }
.contact-fab .fab-option.tiktok:hover   { background: #000; }
.contact-fab .fab-option.youtube:hover  { background: #ff0000; }
.contact-fab .fab-option.email:hover    { background: #ea4335; }
.contact-fab .fab-option.whatsapp:hover { background: #25d366; }
.contact-fab .fab-option.phone:hover    { background: #16a085; }
.contact-fab .fab-option.chat:hover     { background: var(--landing-navy); }

html[data-theme="dark"] .contact-fab .fab-option {
    background: var(--ayni-bg-surface-2);
    color: var(--ayni-text);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
}

/* ============================================================
   12. CTA FINAL (botón claro sobre navy)
   ============================================================ */
.bg-primary.text-white .btn-light {
    background: #fff;
    color: var(--landing-navy);
    font-weight: 700;
    border: 2px solid #fff;
}
.bg-primary.text-white .btn-light:hover {
    background: #f0f4fa;
    color: var(--landing-navy-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

/* ============================================================
   13. RESPONSIVE
   ============================================================ */
@media (max-width: 991.98px) {
    .hero-section {
        padding: 3.5rem 0 3rem;
        text-align: center;
    }
    .hero-section .lead {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-section .d-flex { justify-content: center; }
    .image-container { margin-top: 1rem; }
}
@media (max-width: 767.98px) {
    .hero-section .display-4 { font-size: 2.4rem; }
    .icon-box    { width: 68px; height: 68px; font-size: 1.25rem; }
    .step-number { width: 46px; height: 46px; font-size: 1.25rem; }
    .contact-fab { bottom: 16px; right: 16px; }
}
@media (max-width: 479.98px) {
    .hero-section { padding: 2.5rem 0 2rem; }
    .hero-section .display-4 { font-size: 2rem; }
    .hero-section .lead      { font-size: 1rem; }
    .module-card { border-radius: 14px; }
    .icon-box    { width: 58px; height: 58px; font-size: 1.1rem; }
}