/* ==========================================================
   AVIO ERP — UI ENHANCEMENTS
   Curved Navigation, Language Switcher, Footer,
   Floating AI Assistant, Demo Explorer, Booking Form
   Light / Dark Theme Compatible
   ========================================================== */

/* ---------- Tamil / Sinhala typography ---------- */
html[lang="ta"] body,
html[lang="ta"] button,
html[lang="ta"] input,
html[lang="ta"] select,
html[lang="ta"] textarea {
    font-family: 'Noto Sans Tamil', 'Poppins', system-ui, sans-serif;
}

html[lang="si"] body,
html[lang="si"] button,
html[lang="si"] input,
html[lang="si"] select,
html[lang="si"] textarea {
    font-family: 'Noto Sans Sinhala', 'Poppins', system-ui, sans-serif;
}

html[lang="ta"] h1,
html[lang="ta"] h2,
html[lang="si"] h1,
html[lang="si"] h2 {
    line-height: 1.35;
    letter-spacing: 0;
}

html[lang="ta"] .nav-link,
html[lang="si"] .nav-link {
    font-size: .86rem;
    padding-inline: .7rem;
}

/* ---------- Shared layout safety ---------- */
.demo-hero-grid > *,
.book-grid > *,
.dx > *,
.dp-head > *,
.foot-cta > *,
.footer-grid > * {
    min-width: 0;
}

.demo-form *,
.ai-panel *,
.dp *,
.dx * {
    box-sizing: border-box;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--violet);
    outline-offset: 3px;
}

/* ---------- Announcement bar ---------- */
.announce {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 101;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--grad);
    color: #fff;
    font-size: .82rem;
    text-align: center;
}

.announce .container {
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.announce a,
.announce span {
    color: #fff;
    font-weight: 500;
}

.announce .ic {
    width: 14px;
    height: 14px;
    vertical-align: -.15em;
}

.announce ~ .curved-nav {
    top: 36px;
}

body:has(.announce) {
    padding-top: 36px;
}

/* ---------- Curved floating navigation ---------- */
.site-header.curved-nav {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 0;
    box-shadow: none;
    padding-top: 12px;
    pointer-events: none;
}

.site-header.curved-nav::after {
    display: none;
}

.site-header.curved-nav.scrolled {
    box-shadow: none;
}

.curved-nav .container.nav-wrap {
    pointer-events: auto;
    max-width: 1320px;
    width: calc(100% - 24px);
    height: 68px;
    padding: 0 .55rem 0 .5rem;
    gap: .6rem;
    position: relative;
    background: var(--header-bg);
    backdrop-filter: blur(22px) saturate(1.6);
    -webkit-backdrop-filter: blur(22px) saturate(1.6);
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow:
        0 14px 40px rgba(45,4,83,.13),
        inset 0 1px 0 rgba(255,255,255,.5);
    transition:
        height .35s var(--ease),
        box-shadow .35s,
        background .35s;
}

.curved-nav.scrolled .container.nav-wrap {
    height: 60px;
    box-shadow:
        0 18px 50px rgba(45,4,83,.22),
        inset 0 1px 0 rgba(255,255,255,.4);
}

.curved-nav .nav-wrap::before {
    content: "";
    position: absolute;
    left: 12%;
    right: 12%;
    bottom: -9px;
    height: 18px;
    border-radius: 0 0 50% 50% / 0 0 100% 100%;
    background: linear-gradient(180deg, var(--header-bg), transparent);
    border-bottom: 1px solid var(--border);
    opacity: .75;
    z-index: -1;
    filter: blur(.2px);
    pointer-events: none;
}

.curved-nav .brand {
    background: var(--grad);
    border-radius: 999px;
    padding: .32rem 1.05rem .32rem .38rem;
    gap: .55rem;
    box-shadow: 0 8px 22px rgba(147,6,224,.35);
    flex: none;
}

.curved-nav .brand-orb {
    width: 42px;
    height: 42px;
}

.curved-nav .brand-text,
.curved-nav .brand-text b,
.curved-nav .brand-text em {
    color: #fff !important;
    -webkit-text-fill-color: #fff;
    background: none;
}

.curved-nav .main-nav {
    flex: 1;
    justify-content: center;
    gap: .1rem;
    min-width: 0;
}

.curved-nav .nav-link {
    border-radius: 999px;
    padding: .55rem .85rem;
    white-space: nowrap;
}

.curved-nav .nav-link::after {
    left: 50%;
    right: auto;
    bottom: .22rem;
    width: 18px;
    margin-left: -9px;
    height: 3px;
    border-radius: 3px;
}

.curved-nav .nav-link:hover,
.curved-nav .has-mega:hover > .nav-link,
.curved-nav .has-mega.open > .nav-link {
    background: var(--mist);
    color: var(--violet);
}

.curved-nav .nav-link.active {
    color: var(--violet);
    background: var(--mist);
}

.curved-nav .mega {
    top: calc(100% + 22px);
    border-radius: 26px;
    box-shadow: var(--shadow-lg);
}

.curved-nav .nav-actions {
    gap: .4rem;
    flex: none;
}

.curved-nav .nav-actions .btn-sm {
    border-radius: 999px;
    padding-inline: 1.05rem;
}

.curved-nav .icon-btn {
    border-radius: 50%;
}

/* ---------- Language switcher ---------- */
.lang-switch {
    position: relative;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    height: 40px;
    padding: 0 .75rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--card-solid);
    color: var(--text);
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        border-color .25s,
        color .25s,
        background .25s;
}

.lang-btn:hover,
.lang-switch.open .lang-btn {
    border-color: var(--violet);
    color: var(--violet);
    background: var(--mist);
}

.lang-btn .ic {
    width: 17px;
    height: 17px;
}

.lang-btn .chev {
    width: 13px;
    height: 13px;
    transition: transform .3s;
}

.lang-switch.open .chev {
    transform: rotate(180deg);
}

.lang-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 14px);
    min-width: 190px;
    padding: .45rem;
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all .3s var(--ease);
    z-index: 105;
}

.lang-switch.open .lang-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.lang-menu a {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .6rem .8rem;
    border-radius: 14px;
    color: var(--text);
}

.lang-menu a:hover,
.lang-menu a.on {
    background: var(--mist);
    color: var(--violet);
}

.lang-menu a small {
    margin-left: auto;
    color: var(--muted);
    font-size: .72rem;
}

.lang-menu a .ic {
    width: 16px;
    height: 16px;
    color: var(--violet);
}

.dr-lang {
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
    padding: .3rem .2rem;
}

.dr-lang a {
    flex: 1;
    text-align: center;
    padding: .55rem .7rem !important;
    border: 1px solid var(--border);
    border-radius: 999px !important;
}

.dr-lang a.on {
    background: var(--grad);
    color: #fff;
    border-color: transparent;
}

.drawer {
    top: 92px;
    border-radius: 0 0 30px 30px;
    margin: 0 12px;
    border: 1px solid var(--border);
}

.announce ~ .drawer {
    top: 128px;
}

@media (max-width: 1180px) {
    .curved-nav .nav-demo {
        display: none;
    }
}

@media (max-width: 980px) {
    .curved-nav .container.nav-wrap {
        height: 62px;
    }

    .curved-nav .nav-login,
    .curved-nav .main-nav {
        display: none;
    }

    .curved-nav .nav-actions {
        margin-left: auto;
    }

    .curved-nav .brand-text {
        display: inline;
    }
}

@media (max-width: 480px) {
    .lang-btn .lang-cur {
        display: none;
    }

    .lang-btn {
        padding: 0 .6rem;
    }

    .curved-nav .brand-text {
        font-size: .9rem;
    }

    .curved-nav .container.nav-wrap {
        width: calc(100% - 16px);
        padding-inline: .35rem;
    }
}

/* ---------- GoHighLevel-style footer ---------- */
.ghl-footer {
    padding-top: 0;
}

.ghl-footer .foot-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    margin: -3.2rem 0 3.4rem;
    padding: 2.6rem 3rem;
    border-radius: 34px;
    background: var(--grad);
    color: #fff;
    box-shadow: 0 30px 70px rgba(147,6,224,.35);
    position: relative;
    overflow: hidden;
}

.ghl-footer .foot-cta::before {
    content: "";
    position: absolute;
    right: -80px;
    top: -120px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.22), transparent 70%);
    pointer-events: none;
}

.foot-cta-copy {
    max-width: 640px;
    position: relative;
}

.foot-cta h2 {
    color: #fff;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    margin: .3rem 0 .5rem;
}

.foot-cta p {
    color: rgba(255,255,255,.85);
    margin: 0;
}

.foot-cta .eyebrow {
    color: #fff;
    opacity: .85;
}

.foot-cta-actions {
    display: flex;
    gap: .8rem;
    flex-wrap: wrap;
    position: relative;
}

.ghl-footer .footer-grid {
    grid-template-columns: minmax(260px, 1.5fr) repeat(4, minmax(0, 1fr));
}

.foot-contact-list {
    list-style: none;
    margin: .4rem 0 0;
    padding: 0;
    display: grid;
    gap: .55rem;
}

.foot-contact-list li {
    display: flex;
    gap: .6rem;
    align-items: flex-start;
    font-size: .88rem;
    color: #cdbfe0;
}

.foot-contact-list a {
    color: #E9B6FF;
    padding: 0;
}

.foot-contact-list .ic {
    width: 16px;
    height: 16px;
    color: #B24BFF;
    margin-top: .2rem;
    flex: none;
}

.ghl-footer .foot-bottom {
    align-items: center;
}

.foot-lang {
    display: inline-flex;
    gap: .3rem;
    padding: .25rem;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 999px;
}

.foot-lang a {
    padding: .25rem .8rem;
    border-radius: 999px;
    font-size: .8rem;
    color: #cdbfe0;
}

.foot-lang a:hover {
    color: #fff;
}

.foot-lang a.on {
    background: var(--grad-soft);
    color: #fff;
}

@media (max-width: 1100px) {
    .ghl-footer .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ghl-footer .foot-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .ghl-footer .foot-cta {
        padding: 1.8rem 1.4rem;
        border-radius: 26px;
        margin-top: -2.4rem;
    }

    .ghl-footer .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem 1.2rem;
    }

    .foot-cta-actions {
        width: 100%;
    }

    .foot-cta-actions .btn {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .ghl-footer .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Floating AI assistant ---------- */
.avio-ai {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 120;
    font-family: inherit;
}

.ai-fab {
    position: relative;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    border: 0;
    cursor: pointer;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--grad);
    box-shadow: var(--glow);
    transition: transform .35s var(--ease);
}

.ai-fab:hover {
    transform: translateY(-3px) scale(1.05);
}

.ai-fab .ic {
    width: 28px;
    height: 28px;
    grid-area: 1 / 1;
    transition: transform .35s var(--ease), opacity .25s;
}

.ai-fab .ai-ic-close {
    opacity: 0;
    transform: rotate(-90deg) scale(.5);
}

.avio-ai.is-open .ai-ic-open {
    opacity: 0;
    transform: rotate(90deg) scale(.5);
}

.avio-ai.is-open .ai-ic-close {
    opacity: 1;
    transform: none;
}

.ai-ping {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid var(--violet);
    animation: aiping 2.4s infinite;
    pointer-events: none;
}

@keyframes aiping {
    0% {
        transform: scale(1);
        opacity: .7;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

.avio-ai.is-open .ai-ping {
    display: none;
}

.ai-tip {
    position: absolute;
    right: 74px;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    background: var(--card-solid);
    color: var(--text);
    border: 1px solid var(--border);
    padding: .45rem .9rem;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 500;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
}

.ai-fab:hover .ai-tip {
    opacity: 1;
}

.avio-ai.is-open .ai-tip {
    display: none;
}

.ai-panel {
    position: absolute;
    right: 0;
    bottom: 78px;
    width: 392px;
    max-width: calc(100vw - 28px);
    height: min(600px, calc(100vh - 130px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: 28px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px) scale(.96);
    transform-origin: bottom right;
    transition: all .4s var(--ease);
}

.ai-panel.open {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.ai-panel header {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1rem 1.1rem;
    background: var(--grad);
    color: #fff;
}

.ai-panel header b {
    display: block;
    font-size: .98rem;
}

.ai-panel header small {
    display: flex;
    align-items: center;
    gap: .35rem;
    opacity: .9;
    font-size: .75rem;
}

.ai-panel header .close-x {
    margin-left: auto;
    color: #fff;
    background: rgba(255,255,255,.16);
    border-color: transparent;
}

.ai-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.2);
}

.ai-avatar .ic {
    width: 22px;
    height: 22px;
}

.ai-note {
    padding: .5rem 1.1rem;
    font-size: .74rem;
    color: var(--muted);
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
}

.ai-log {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .65rem;
    scroll-behavior: smooth;
}

.ai-msg {
    max-width: 88%;
    padding: .7rem .95rem;
    border-radius: 18px;
    font-size: .9rem;
    line-height: 1.55;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.ai-msg.bot {
    align-self: flex-start;
    background: var(--mist);
    color: var(--text);
    border-bottom-left-radius: 6px;
}

.ai-msg.me {
    align-self: flex-end;
    background: var(--grad);
    color: #fff;
    border-bottom-right-radius: 6px;
}

.ai-links {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: .6rem;
    white-space: normal;
}

.ai-links a {
    padding: .32rem .75rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    background: var(--card-solid);
    color: var(--violet);
    border: 1px solid var(--border);
}

.ai-links a:hover {
    background: var(--violet);
    color: #fff;
}

.ai-msg.typing {
    display: flex;
    gap: 4px;
    padding: .9rem 1rem;
}

.ai-msg.typing i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--violet);
    opacity: .4;
    animation: aityp 1s infinite;
}

.ai-msg.typing i:nth-child(2) {
    animation-delay: .15s;
}

.ai-msg.typing i:nth-child(3) {
    animation-delay: .3s;
}

@keyframes aityp {
    50% {
        opacity: 1;
        transform: translateY(-3px);
    }
}

.ai-quick {
    display: flex;
    gap: .4rem;
    padding: .2rem 1rem .6rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.ai-quick::-webkit-scrollbar {
    display: none;
}

.ai-quick button {
    flex: none;
    padding: .4rem .8rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--card-solid);
    color: var(--text);
    font-size: .78rem;
    cursor: pointer;
    font-family: inherit;
}

.ai-quick button:hover {
    border-color: var(--violet);
    color: var(--violet);
}

.ai-form {
    display: flex;
    gap: .5rem;
    padding: .75rem 1rem 1rem;
    border-top: 1px solid var(--border);
}

.ai-form input {
    flex: 1;
    min-width: 0;
    padding: .7rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-2);
    color: var(--text);
    font: inherit;
    font-size: .9rem;
}

.ai-form input:focus {
    outline: 2px solid var(--violet);
    outline-offset: 0;
}

.ai-form .btn {
    flex: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    padding: 0;
    display: grid;
    place-items: center;
}

@media (max-width: 520px) {
    .avio-ai {
        right: 14px;
        bottom: 14px;
    }

    .ai-panel {
        position: fixed;
        right: 8px;
        left: 8px;
        bottom: 88px;
        width: auto;
        max-width: none;
        height: calc(100vh - 110px);
        max-height: 650px;
        border-radius: 24px;
    }

    .ai-tip {
        display: none;
    }
}

/* ---------- Demo page ---------- */
.demo-hero-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 3rem;
    align-items: center;
}

.demo-stats {
    display: flex;
    gap: 1.6rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.demo-stats b {
    display: block;
    font-size: 1.7rem;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.demo-stats span {
    font-size: .82rem;
    color: var(--muted);
}

.demo-hero-visual .device {
    max-width: 640px;
    margin-left: auto;
}

.dx {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 1.6rem;
    align-items: start;
}

.dx-side {
    position: sticky;
    top: 100px;
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: 26px;
    padding: 1rem;
    box-shadow: var(--shadow);
    max-height: calc(100vh - 130px);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.dx-search {
    margin-bottom: .7rem;
}

.dx-cats {
    display: flex;
    gap: .35rem;
    flex-wrap: wrap;
    margin-bottom: .7rem;
}

.dx-cats .chip {
    font-size: .74rem;
    padding: .3rem .65rem;
    cursor: pointer;
}

.dx-list {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    padding-right: .2rem;
    scrollbar-width: thin;
}

.dx-group h4 {
    font-size: .7rem;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--violet);
    margin: .9rem .4rem .3rem;
}

.dx-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem .6rem;
    border-radius: 14px;
    color: var(--text);
    font-size: .88rem;
    transition: background .2s, color .2s;
}

.dx-item:hover {
    background: var(--mist);
    color: var(--violet);
}

.dx-item.on {
    background: var(--grad);
    color: #fff;
    box-shadow: 0 8px 22px rgba(147,6,224,.3);
}

.dx-item .mi {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--mist);
    color: var(--violet);
    flex: none;
}

.dx-item.on .mi {
    background: rgba(255,255,255,.2);
    color: #fff;
}

.dx-item .mi .ic {
    width: 16px;
    height: 16px;
}

.dx-name {
    flex: 1;
    min-width: 0;
}

.dx-badges {
    display: flex;
    gap: .25rem;
    opacity: .7;
}

.dx-badges .ic {
    width: 13px;
    height: 13px;
}

.dx-none {
    padding: 1rem;
    color: var(--muted);
    font-size: .9rem;
}

.dx-main {
    min-width: 0;
    transition: opacity .25s;
}

.dx-main.loading {
    opacity: .45;
    pointer-events: none;
}

.dp {
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 1.6rem;
    box-shadow: var(--shadow);
}

.dp-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.dp-head .mi {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: var(--grad);
    color: #fff;
    flex: none;
}

.dp-head .mi .ic {
    width: 26px;
    height: 26px;
}

.dp-title {
    flex: 1;
    min-width: 180px;
}

.dp-title small {
    color: var(--violet);
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: .7rem;
}

.dp-title h3 {
    margin: .1rem 0 0;
    font-size: 1.5rem;
}

.dp-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.dp-actions .btn {
    border-radius: 999px;
}

.dp-actions .btn.added {
    background: var(--mist);
    color: var(--violet);
    box-shadow: none;
}

.dp-sum {
    color: var(--muted);
    margin: 1rem 0 1.2rem;
    line-height: 1.7;
}

.dp-stage {
    aspect-ratio: 16 / 9;
    background: #0f0420;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    position: relative;
    display: grid;
}

.dp-stage img,
.dp-stage video,
.dp-stage iframe {
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: contain;
    background: #0f0420;
}

.dp-zoom {
    all: unset;
    cursor: zoom-in;
    display: block;
    width: 100%;
    height: 100%;
}

.dp-zoom img {
    object-fit: contain;
}

.dp-empty {
    position: relative;
    width: 100%;
    height: 100%;
}

.dp-empty .shot {
    position: absolute;
    inset: 0;
}

.dp-empty img {
    object-fit: cover;
    filter: saturate(.9) brightness(.55);
}

.dp-empty-note {
    position: absolute;
    inset: auto 0 0 0;
    padding: 1.2rem 1.4rem;
    color: #fff;
    display: grid;
    gap: .15rem;
    background: linear-gradient(0deg, rgba(15,4,32,.92), transparent);
}

.dp-empty-note .ic {
    width: 22px;
    height: 22px;
}

.dp-empty-note span {
    font-size: .85rem;
    opacity: .85;
    max-width: 560px;
}

.dp-thumbs {
    display: flex;
    gap: .6rem;
    margin-top: .8rem;
    overflow-x: auto;
    padding-bottom: .3rem;
    scrollbar-width: thin;
}

.dp-thumb {
    flex: none;
    width: 112px;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    padding: 0;
    background: var(--mist);
    cursor: pointer;
    position: relative;
    opacity: .75;
    transition: all .25s;
}

.dp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dp-thumb.on,
.dp-thumb:hover {
    opacity: 1;
    border-color: var(--violet);
}

.dp-vthumb {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    background: var(--grad);
    color: #fff;
    position: relative;
}

.dp-vthumb img {
    position: absolute;
    inset: 0;
    opacity: .5;
}

.dp-vthumb .ic {
    position: relative;
    width: 26px;
    height: 26px;
}

.dp-cap {
    font-size: .82rem;
    color: var(--muted);
    margin: .6rem .2rem 0;
}

.dp-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.4rem;
    margin-top: 1.5rem;
}

.dp-cols h4 {
    margin: 0 0 .6rem;
}

.dp-cols .ticks {
    margin: 0;
}

.dp-foot {
    margin-top: 1.5rem;
    display: flex;
    gap: .7rem;
    flex-wrap: wrap;
}

.steps.three {
    grid-template-columns: repeat(3, 1fr);
}

.book-grid {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 3rem;
    align-items: start;
}

.book-card {
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 1.8rem;
    box-shadow: var(--shadow-lg);
}

@media (max-width: 1080px) {
    .dx {
        grid-template-columns: 1fr;
    }

    .dx-side {
        position: static;
        max-height: none;
    }

    .dx-list {
        max-height: 260px;
    }

    .demo-hero-grid,
    .book-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .demo-hero-visual .device {
        margin: 0 auto;
    }
}

@media (max-width: 640px) {
    .dp {
        padding: 1.1rem;
        border-radius: 22px;
    }

    .steps.three {
        grid-template-columns: 1fr;
    }

    .book-card {
        padding: 1.2rem;
        border-radius: 24px;
    }

    .dp-actions {
        width: 100%;
    }

    .dp-actions .btn {
        flex: 1;
        text-align: center;
    }

    .dp-foot .btn {
        width: 100%;
    }
}

/* ---------- Booking form ---------- */
.demo-form .df-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem 1rem;
    margin-bottom: .8rem;
}

.demo-form label {
    display: grid;
    gap: .3rem;
    font-size: .82rem;
    font-weight: 500;
    color: var(--text);
}

.demo-form input,
.demo-form select,
.demo-form textarea {
    width: 100%;
    min-width: 0;
    padding: .65rem .9rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--bg-2);
    color: var(--text);
    font: inherit;
    font-size: .92rem;
}

.demo-form input:focus,
.demo-form select:focus,
.demo-form textarea:focus {
    outline: 2px solid var(--violet);
    border-color: transparent;
}

.demo-form textarea {
    min-height: 110px;
    resize: vertical;
}

.demo-form .hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.df-error {
    background: rgba(220,38,38,.1);
    color: #dc2626;
    padding: .6rem .9rem;
    border-radius: 12px;
    font-size: .85rem;
    margin: .6rem 0;
}

.df-done {
    text-align: center;
    padding: 1.5rem .5rem;
}

.df-done .ic {
    width: 46px;
    height: 46px;
    color: var(--violet);
}

.df-done h4 {
    margin: .5rem 0;
    font-size: 1.3rem;
}

.mod-picker {
    margin: .2rem 0 .9rem;
}

.mp-label {
    display: block;
    font-size: .82rem;
    font-weight: 500;
    margin-bottom: .4rem;
}

.mp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: .5rem;
}

.mp-chips:empty {
    display: none;
}

.mp-chip {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .28rem .35rem .28rem .8rem;
    border-radius: 999px;
    background: var(--mist);
    color: var(--violet);
    font-size: .8rem;
    font-weight: 600;
}

.mp-chip button {
    border: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--violet);
    color: #fff;
    cursor: pointer;
    line-height: 1;
}

.mp-search {
    position: relative;
}

.mp-search > .ic {
    position: absolute;
    left: .85rem;
    top: .8rem;
    width: 16px;
    height: 16px;
    color: var(--muted);
}

.mp-search input {
    padding-left: 2.4rem;
}

.mp-results {
    position: absolute;
    z-index: 110;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    max-height: 240px;
    overflow-y: auto;
    padding: .3rem;
}

.mp-results button {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    text-align: left;
    border: 0;
    background: none;
    color: var(--text);
    padding: .5rem .7rem;
    border-radius: 10px;
    cursor: pointer;
    font: inherit;
    font-size: .88rem;
}

.mp-results button:hover {
    background: var(--mist);
    color: var(--violet);
}

.mp-results small {
    color: var(--muted);
}

.modal.modal-wide {
    width: min(720px, calc(100vw - 24px));
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

@media (max-width: 560px) {
    .demo-form .df-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Module page media ---------- */
.mod-shot {
    margin: 0;
}

.mod-shot .device-shot {
    display: block;
    width: 100%;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    position: relative;
    padding: 0;
    background: #0f0420;
    cursor: zoom-in;
}

.mod-shot img {
    width: 100%;
    height: auto;
    display: block;
}

.media-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.ms-item {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #0f0420;
    padding: 0;
    aspect-ratio: 16 / 10;
    box-shadow: var(--shadow);
    cursor: zoom-in;
}

.ms-item img,
.ms-item video,
.ms-item iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
    display: block;
}

.ms-video {
    cursor: default;
}

.ms-video video,
.ms-video iframe {
    object-fit: contain;
}

.media-lb {
    display: none;
}

.media-lb.open {
    display: grid;
}

.media-lb img {
    max-width: 94vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 14px;
}

.cms-body {
    max-width: 860px;
    margin: 0 auto;
    line-height: 1.8;
}

.cms-body img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
}

/* ==========================================================
   DARK THEME REFINEMENT
   ========================================================== */

[data-theme="dark"] {
    --violet: #C084FC;
    --plum: #D8A2FF;
    --mist: rgba(168,85,247,.16);
    --bg: #0B0714;
    --bg-2: #110a20;
    --card-solid: #160e29;
    --text: #F3EBFB;
    --muted: #B4A9CA;
    --border: rgba(192,132,252,.24);
    --shadow: 0 10px 30px rgba(0,0,0,.45);
    --glow:
        0 0 0 1px rgba(192,132,252,.35),
        0 8px 28px rgba(147,6,224,.5),
        0 0 40px rgba(147,6,224,.28);

    color-scheme: dark;

    --grad: linear-gradient(
        135deg,
        #9306E0 0%,
        #6A0AA8 55%,
        #35075f 100%
    );

    --grad-soft: linear-gradient(
        135deg,
        #B24BFF,
        #9306E0
    );
}

/* Outline buttons */
[data-theme="dark"] .btn-outline {
    border-color: var(--violet);
    color: var(--violet);
}

[data-theme="dark"] .btn-outline:hover {
    background: var(--grad);
    border-color: transparent;
    color: #fff;
}

/* AI links */
[data-theme="dark"] .ai-links a:hover {
    background: var(--grad);
    border-color: transparent;
    color: #fff;
}

[data-theme="dark"] .lang-btn:hover {
    color: #fff;
}

/* White buttons on gradient banners */
[data-theme="dark"] .btn-white {
    background: #fff;
    color: #5E0090;
}

/* Text and link contrast */
[data-theme="dark"] .eyebrow,
[data-theme="dark"] .more,
[data-theme="dark"] .link-btn,
[data-theme="dark"] .nav-link.active,
[data-theme="dark"] .caret {
    color: var(--violet);
}

[data-theme="dark"] .grad-text {
    background-image: linear-gradient(
        135deg,
        #D8A2FF 0%,
        #B24BFF 50%,
        #9306E0 100%
    );
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4 {
    color: var(--text);
}

/* Dark form fields */
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background-color: var(--bg-2);
    color: var(--text);
    border-color: var(--border);
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: #8d82a6;
}

[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
    border-color: var(--violet);
    box-shadow: 0 0 0 4px rgba(192,132,252,.18);
}

[data-theme="dark"] option {
    background: #150d26;
    color: var(--text);
}

/* Curved navigation dark glass */
[data-theme="dark"] .curved-nav .container.nav-wrap {
    box-shadow:
        0 14px 40px rgba(0,0,0,.55),
        inset 0 1px 0 rgba(255,255,255,.07);
}

[data-theme="dark"] .curved-nav.scrolled .container.nav-wrap {
    box-shadow:
        0 18px 50px rgba(0,0,0,.65),
        inset 0 1px 0 rgba(255,255,255,.06);
}

/* Orbit and footer logo */
[data-theme="dark"] .orbit-core {
    box-shadow:
        0 0 0 1px var(--border),
        0 0 60px rgba(147,6,224,.45);
}

[data-theme="dark"] .foot-logo {
    box-shadow: 0 10px 30px rgba(0,0,0,.45);
}

/* Cookie banner and chat panel */
[data-theme="dark"] .cookie-banner a,
[data-theme="dark"] .chip {
    color: var(--violet);
}

[data-theme="dark"] .ai-msg.bot {
    background: rgba(192,132,252,.14);
    color: var(--text);
}

/* Pricing save badge */
[data-theme="dark"] em.save {
    background: rgba(34,197,94,.16);
    color: #86efac;
}

/* Light / dark screenshot pairs */
.showcase picture.shot-dark,
.mini-shot picture.shot-dark,
.dp-empty picture.shot-dark {
    display: none;
}

.showcase picture.shot-light,
.mini-shot picture.shot-light,
.dp-empty picture.shot-light {
    display: block;
}

[data-theme="dark"] .showcase picture.shot-light,
[data-theme="dark"] .mini-shot picture.shot-light,
[data-theme="dark"] .dp-empty picture.shot-light {
    display: none;
}

[data-theme="dark"] .showcase picture.shot-dark,
[data-theme="dark"] .mini-shot picture.shot-dark,
[data-theme="dark"] .dp-empty picture.shot-dark {
    display: block;
}

/* Brand logo tile */
[data-theme="dark"] .brand-orb::after {
    background: linear-gradient(145deg, #ffffff, #EBDCF8);
}

/* Loading screen logo */
[data-theme="dark"] .pl-mark img {
    background: linear-gradient(145deg, #ffffff, #EBDCF8);
    border-radius: 24px;
    padding: 14px;
    box-sizing: content-box;
    box-shadow: 0 0 50px rgba(147,6,224,.5);
}

/* ---------- Reduced motion accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
    .ai-ping,
    .ai-msg.typing i {
        animation: none !important;
    }

    .curved-nav .container.nav-wrap,
    .ai-fab,
    .ai-panel,
    .lang-menu,
    .dp-thumb {
        transition: none !important;
    }

    .ai-log {
        scroll-behavior: auto;
    }
}

/* ==========================================================
   MEGA MENU ICON FIX (v7)
   - Replaces v4 / v5 / v6. Keep this block LAST in the file.
   - Purple variables are swapped for the teal accent inside
     the mega menu.
   - Hover / focus / current-page icon box = soft tint + ring,
     and the icon is ALWAYS a contrasting colour, so it can
     never blend into the box (light AND dark theme).
   ========================================================== */

.mega {
    --violet: var(--avio-accent-1, #20D3A5);
    --plum: var(--avio-accent-2, #35BDF0);
    --grad: linear-gradient(135deg, var(--avio-accent-1, #20D3A5), var(--avio-accent-2, #35BDF0));
    --grad-soft: var(--grad);
    --mist: rgba(32, 211, 165, .14);
}

/* remove decorative overlays on the icon box */
.mega a .mi::before,
.mega a .mi::after {
    display: none !important;
}

.mega a .mi {
    transition: background .25s, box-shadow .25s, color .25s, transform .35s var(--ease);
}

/* ---------- DARK THEME (and default) ----------
   Teal tint box + bright teal icon */
html body .mega a:is(:hover, :focus-visible, .active, .on, .current, .is-active, .is-current, .selected, [aria-current]) .mi,
html body .mega a:is(:hover, :focus-visible, .active, .on, .current, .is-active, .is-current, .selected, [aria-current]) > span:first-child {
    background: rgba(32, 211, 165, .24) !important;
    background-color: rgba(32, 211, 165, .24) !important;
    background-image: none !important;
    box-shadow:
        0 0 0 1.5px #20D3A5,
        0 0 16px rgba(32, 211, 165, .45) !important;
    transform: rotate(-6deg) scale(1.08);
}

html body .mega a:is(:hover, :focus-visible, .active, .on, .current, .is-active, .is-current, .selected, [aria-current]) .mi svg,
html body .mega a:is(:hover, :focus-visible, .active, .on, .current, .is-active, .is-current, .selected, [aria-current]) .mi svg *,
html body .mega a:is(:hover, :focus-visible, .active, .on, .current, .is-active, .is-current, .selected, [aria-current]) .mi .ic {
    color: #20D3A5 !important;
    stroke: #20D3A5 !important;
    opacity: 1 !important;
    visibility: visible !important;
    --ic-stroke: 2.1;
}

html body .mega a:is(:hover, :focus-visible) .mi svg {
    filter: drop-shadow(0 0 4px rgba(32, 211, 165, .7));
}

/* ---------- LIGHT THEME ----------
   Pale mint box + DARK teal icon (high contrast) */
html:not([data-theme="dark"]) body .mega a:is(:hover, :focus-visible, .active, .on, .current, .is-active, .is-current, .selected, [aria-current]) .mi,
html:not([data-theme="dark"]) body .mega a:is(:hover, :focus-visible, .active, .on, .current, .is-active, .is-current, .selected, [aria-current]) > span:first-child {
    background: #D6F7EE !important;
    background-color: #D6F7EE !important;
    background-image: none !important;
    box-shadow: 0 0 0 1.5px #0FA882 !important;
}

html:not([data-theme="dark"]) body .mega a:is(:hover, :focus-visible, .active, .on, .current, .is-active, .is-current, .selected, [aria-current]) .mi svg,
html:not([data-theme="dark"]) body .mega a:is(:hover, :focus-visible, .active, .on, .current, .is-active, .is-current, .selected, [aria-current]) .mi svg *,
html:not([data-theme="dark"]) body .mega a:is(:hover, :focus-visible, .active, .on, .current, .is-active, .is-current, .selected, [aria-current]) .mi .ic {
    color: #0B7A5C !important;
    stroke: #0B7A5C !important;
    opacity: 1 !important;
    visibility: visible !important;
    filter: none !important;
}

html:not([data-theme="dark"]) body .mega a:is(:hover, :focus-visible) .mi svg {
    filter: none !important;
}
/* ---------- Language flags ---------- */
.lang-flag {
    width: 20px;
    height: 15px;
    object-fit: contain;
    flex: none;
    display: inline-block;
    vertical-align: -2px;
    margin-inline-end: .45rem;
}

.lang-menu a .lang-flag {
    margin-inline-end: 0;
}
