/* COSMOS marketing templates — shared motion, marquee, reveal, mobile nav helpers */

[data-cosmos-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-cosmos-reveal].is-inview {
    opacity: 1;
    transform: none;
}

.cosmos-marquee-root {
    overflow: hidden;
    width: 100%;
    position: relative;
}

.cosmos-marquee-slide {
    display: flex;
    width: max-content;
    animation: cosmos-marquee-x var(--cosmos-marquee-duration, 42s) linear infinite;
    will-change: transform;
}

.cosmos-marquee-slide.cosmos-marquee-paused {
    animation-play-state: paused;
}

.cosmos-marquee-slide:hover {
    animation-play-state: paused;
}

@keyframes cosmos-marquee-x {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

/* Random ambient / hover image-box FX (class + cosmos-rand-fx--N assigned in JS) */
.cosmos-rand-fx {
    position: relative;
    overflow: hidden;
    border-radius: inherit;
    transition: box-shadow 0.35s ease, transform 0.35s ease;
}

@keyframes cosmos-rand-shadow {
    0%,
    100% {
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    }
    50% {
        box-shadow: 0 22px 52px rgba(75, 107, 251, 0.22);
    }
}

@keyframes cosmos-rand-scale {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes cosmos-rand-bright {
    0%,
    100% {
        filter: brightness(1) saturate(1);
    }
    50% {
        filter: brightness(1.09) saturate(1.06);
    }
}

@keyframes cosmos-rand-pop {
    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 8px 22px rgba(0, 0, 0, 0.07);
    }
    50% {
        transform: scale(1.04);
        box-shadow: 0 20px 44px rgba(99, 102, 241, 0.2);
    }
}

@keyframes cosmos-rand-lift {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

@keyframes cosmos-rand-ring {
    0%,
    100% {
        box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08), 0 0 0 0 rgba(75, 107, 251, 0);
    }
    50% {
        box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12), 0 0 0 5px rgba(75, 107, 251, 0.14);
    }
}

@keyframes cosmos-rand-sheen {
    0%,
    100% {
        opacity: 0.35;
        transform: translateX(-18%) skewX(-12deg);
    }
    50% {
        opacity: 0.65;
        transform: translateX(18%) skewX(-12deg);
    }
}

.cosmos-rand-fx.cosmos-rand-fx--0 {
    animation: cosmos-rand-shadow 4.4s ease-in-out infinite;
}

.cosmos-rand-fx.cosmos-rand-fx--1 {
    animation: cosmos-rand-scale 5.2s ease-in-out infinite;
}

.cosmos-rand-fx.cosmos-rand-fx--2 {
    animation: cosmos-rand-bright 3.8s ease-in-out infinite;
}

.cosmos-rand-fx.cosmos-rand-fx--3 {
    animation: cosmos-rand-pop 4.8s ease-in-out infinite;
}

.cosmos-rand-fx.cosmos-rand-fx--4 {
    animation: cosmos-rand-lift 5.6s ease-in-out infinite;
}

.cosmos-rand-fx.cosmos-rand-fx--5 {
    animation: cosmos-rand-ring 4.2s ease-in-out infinite;
}

.cosmos-rand-fx.cosmos-rand-fx--5::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(118deg, rgba(99, 102, 241, 0.22), transparent 52%, rgba(75, 107, 251, 0.12));
    animation: cosmos-rand-sheen 6s ease-in-out infinite;
    mix-blend-mode: multiply;
}

.cosmos-rand-fx.cosmos-rand-fx--5 > * {
    position: relative;
    z-index: 2;
}

.cosmos-rand-fx.cosmos-rand-fx--static {
    animation: none !important;
}

@media (hover: hover) and (pointer: fine) {
    body.cosmos-rand-fx-site .cosmos-rand-fx:hover {
        animation-play-state: paused;
    }
}

/* Nav link chip / highlight — shared across marketing templates */
body.cosmos-nav-fx-site .navbar .nav-link:not(.dropdown-toggle) {
    border-radius: 10px;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
    transition:
        background-color 0.22s ease,
        color 0.22s ease,
        box-shadow 0.22s ease;
}

body.cosmos-nav-fx-site .navbar .nav-link:not(.dropdown-toggle):hover,
body.cosmos-nav-fx-site .navbar .nav-link:not(.dropdown-toggle):focus-visible {
    background-color: rgba(75, 107, 251, 0.12);
    box-shadow: 0 0 0 1px rgba(75, 107, 251, 0.08);
}

body.cosmos-nav-fx-site .topnav .links a {
    border-radius: 8px;
    padding: 0.35rem 0.55rem;
    margin: 0 0.1rem;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
}

body.cosmos-nav-fx-site .topnav .links a:hover,
body.cosmos-nav-fx-site .topnav .links a:focus-visible {
    background-color: rgba(75, 107, 251, 0.1);
    box-shadow: 0 0 0 1px rgba(75, 107, 251, 0.06);
}

body.cosmos-nav-fx-site .nav-inner .nav-links a {
    border-radius: 8px;
    padding: 0.4rem 0.65rem;
    margin: 0 0.15rem;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
}

body.cosmos-nav-fx-site .nav-inner .nav-links a:hover,
body.cosmos-nav-fx-site .nav-inner .nav-links a:focus-visible {
    background-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}

body.cosmos-nav-fx-site .cosmos-bsnav-collapse .links a:hover,
body.cosmos-nav-fx-site .cosmos-bsnav-collapse .links a:focus-visible {
    background-color: rgba(75, 107, 251, 0.08);
}

body.cosmos-nav-fx-site .t7-mainnav a {
    border-radius: 8px;
    padding: 0.35rem 0.55rem;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
}

body.cosmos-nav-fx-site .t7-mainnav a:hover,
body.cosmos-nav-fx-site .t7-mainnav a:focus-visible {
    background-color: rgba(75, 107, 251, 0.1);
    box-shadow: 0 0 0 1px rgba(75, 107, 251, 0.08);
}

body.cosmos-nav-fx-site .t7-mobile-nav a {
    border-radius: 8px;
    padding: 0.4rem 0.5rem;
    transition: background-color 0.2s ease;
}

body.cosmos-nav-fx-site .t7-mobile-nav a:hover,
body.cosmos-nav-fx-site .t7-mobile-nav a:focus-visible {
    background-color: rgba(75, 107, 251, 0.08);
}

body.cosmos-nav-fx-site .t7-foot-links a {
    border-radius: 8px;
    padding: 0.25rem 0.5rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

body.cosmos-nav-fx-site .t7-foot-links a:hover,
body.cosmos-nav-fx-site .t7-foot-links a:focus-visible {
    background-color: rgba(75, 107, 251, 0.08);
}

/* Template 1 — mobile nav */
.t1-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 40px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    color: #1e293b;
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .nav-inner.t1-cosmos-nav {
        flex-wrap: wrap;
        row-gap: 10px;
    }

    .t1-menu-btn {
        display: inline-flex;
        margin-left: auto;
    }

    .nav-inner.t1-cosmos-nav:not(.is-open) .nav-links,
    .nav-inner.t1-cosmos-nav:not(.is-open) .nav-actions {
        display: none !important;
    }

    .nav-inner.t1-cosmos-nav.is-open .nav-links,
    .nav-inner.t1-cosmos-nav.is-open .nav-actions {
        display: flex !important;
        flex-direction: column;
        width: 100%;
        flex-basis: 100%;
        align-items: stretch;
        gap: 10px;
        padding-top: 8px;
        border-top: 1px solid #e2e8f0;
    }

    .nav-inner.t1-cosmos-nav.is-open .nav-actions {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

/* Template 1 — horizontal podcast marquee strip */
.t1-pod-flex {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 16px;
    align-items: stretch;
}

.t1-pod-flex .pod-card {
    flex: 0 0 auto;
    min-width: min(280px, 85vw);
    width: min(280px, 85vw);
}

/* Template 2 & 3 — mobile drawer under nav (cloned links/actions in panel) */
.cosmos-bsnav-toggler {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 40px;
    border: 1px solid var(--line, #e7e9f1);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    flex-shrink: 0;
    margin-left: auto;
}

@media (max-width: 991.98px) {
    .topnav .inner.cosmos-bsnav-wrap > .links,
    .topnav .inner.cosmos-bsnav-wrap > .actions {
        display: none !important;
    }

    .topnav .inner.cosmos-bsnav-wrap .cosmos-bsnav-toggler {
        display: inline-flex !important;
    }

    .cosmos-bsnav-collapse {
        display: none;
        width: 100%;
        flex-basis: 100%;
        flex-direction: column;
        gap: 12px;
        padding: 12px 0 8px;
        border-top: 1px solid var(--line, #e7e9f1);
    }

    .cosmos-bsnav-collapse.is-show {
        display: flex !important;
    }

    .cosmos-bsnav-collapse .links {
        display: flex !important;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .cosmos-bsnav-collapse .actions {
        display: flex !important;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
    }
}

@media (min-width: 992px) {
    .cosmos-bsnav-collapse {
        display: none !important;
    }

    .cosmos-bsnav-toggler {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cosmos-marquee-slide {
        animation: none !important;
    }

    [data-cosmos-reveal] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    body.cosmos-rand-fx-site .cosmos-rand-fx,
    body.cosmos-rand-fx-site .cosmos-rand-fx::before {
        animation: none !important;
    }
}
