/* ==========================================================
   SAGE ASTROLOGY CENTER PORTAL CAROUSEL
   Five approved visual portals
   ========================================================== */

.astrology-portal-stage {
    position: relative;
    isolation: isolate;
}

.astrology-portal-stage > .zodiac-shell {
    display: none !important;
}

.astrology-portal-carousel {
    --portal-fade-ms: 1400ms;
    --portal-accent: #d7ad55;

    position: absolute;
    inset: 0;
    z-index: 8;
    overflow: hidden;
    display: grid;
    grid-template-rows:
        minmax(0, 1fr)
        3.65rem;
    border-radius: inherit;
    background: #020205;
}

.astrology-portal-visual {
    position: relative;
    min-height: 0;
    overflow: hidden;
    display: block;
    background: #020205;
    text-decoration: none;
}

.astrology-portal-background,
.astrology-portal-image {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition:
        opacity var(--portal-fade-ms) ease-in-out;
}

.astrology-portal-background {
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    transform: scale(1.08);
    filter:
        blur(15px)
        saturate(0.85)
        brightness(0.47);
}

.astrology-portal-background.is-active,
.astrology-portal-image.is-active {
    opacity: 1;
}

.astrology-portal-image {
    z-index: 2;
    width: 100%;
    height: 100%;
    padding: 0.45rem;
    object-fit: contain;
    object-position: center;
    filter:
        saturate(1.03)
        contrast(1.02);
}

.astrology-portal-veil {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background:
        radial-gradient(
            ellipse at center,
            transparent 44%,
            rgba(2, 2, 7, 0.16) 72%,
            rgba(2, 2, 7, 0.5) 100%
        );
    box-shadow:
        inset 0 0 2rem rgba(0, 0, 0, 0.54);
}

.astrology-portal-arrow {
    position: absolute;
    z-index: 14;
    top: calc(50% - 1.82rem);
    width: 2.3rem;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    border: 1px solid color-mix(
        in srgb,
        var(--portal-accent) 68%,
        transparent
    );
    border-radius: 50%;
    background: rgba(2, 2, 7, 0.72);
    color: var(--portal-accent);
    font-family: Georgia, serif;
    font-size: 1.55rem;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition:
        transform 180ms ease,
        background 180ms ease,
        border-color 180ms ease;
}

.astrology-portal-arrow:hover,
.astrology-portal-arrow:focus-visible {
    transform:
        translateY(-50%)
        scale(1.07);
    border-color: var(--portal-accent);
    background: rgba(14, 9, 21, 0.9);
}

.astrology-portal-arrow--previous {
    left: 0.7rem;
}

.astrology-portal-arrow--next {
    right: 0.7rem;
}

.astrology-portal-toolbar {
    position: relative;
    z-index: 12;
    min-width: 0;
    padding: 0.45rem 0.75rem;
    display: grid;
    grid-template-columns:
        minmax(8rem, 1fr)
        auto
        minmax(8rem, 1fr);
    align-items: center;
    gap: 0.75rem;
    border-top: 1px solid rgba(169, 120, 44, 0.42);
    background:
        linear-gradient(
            180deg,
            rgba(5, 5, 10, 0.96),
            rgba(2, 2, 5, 0.99)
        );
}

.astrology-portal-identity {
    min-width: 0;
    display: grid;
}

.astrology-portal-identity small {
    color: rgba(215, 173, 85, 0.72);
    font-size: 0.48rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.astrology-portal-identity strong {
    overflow: hidden;
    margin-top: 0.08rem;
    color: var(--portal-accent);
    font-family: Georgia, serif;
    font-size: 0.76rem;
    font-weight: 500;
    letter-spacing: 0.07em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.astrology-portal-enter {
    min-height: 2.35rem;
    padding: 0.45rem 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--portal-accent);
    border-radius: 1.5rem;
    background:
        linear-gradient(
            135deg,
            color-mix(
                in srgb,
                var(--portal-accent) 28%,
                rgba(10, 6, 16, 0.95)
            ),
            rgba(8, 5, 15, 0.94)
        );
    color: var(--portal-accent);
    font-family: Georgia, serif;
    font-size: 0.67rem;
    letter-spacing: 0.09em;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        background 180ms ease;
}

.astrology-portal-enter:hover,
.astrology-portal-enter:focus-visible {
    transform: translateY(-1px);
    box-shadow:
        0 0 1rem color-mix(
            in srgb,
            var(--portal-accent) 34%,
            transparent
        );
}

.astrology-portal-navigation {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
}

.astrology-portal-counter {
    color: rgba(220, 212, 199, 0.7);
    font-size: 0.58rem;
    white-space: nowrap;
}

.astrology-portal-dots {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.astrology-portal-dot {
    width: 0.48rem;
    aspect-ratio: 1;
    padding: 0;
    border: 1px solid rgba(215, 173, 85, 0.58);
    border-radius: 50%;
    background: rgba(4, 4, 9, 0.9);
    cursor: pointer;
}

.astrology-portal-dot.is-active {
    border-color: var(--portal-accent);
    background: var(--portal-accent);
    box-shadow:
        0 0 0.55rem color-mix(
            in srgb,
            var(--portal-accent) 62%,
            transparent
        );
}

.astrology-portal-carousel[data-error="true"]::after {
    content:
        "The astrology portal carousel could not be loaded.";
    position: absolute;
    z-index: 30;
    inset: 50% auto auto 50%;
    width: min(80%, 25rem);
    padding: 0.8rem 1rem;
    transform: translate(-50%, -50%);
    border: 1px solid #d7ad55;
    border-radius: 0.55rem;
    background: rgba(3, 3, 7, 0.96);
    color: #f1dfae;
    font-family: Georgia, serif;
    text-align: center;
}

@media (max-height: 850px) and (min-width: 1181px) {
    .astrology-portal-carousel {
        grid-template-rows:
            minmax(0, 1fr)
            3.3rem;
    }

    .astrology-portal-toolbar {
        padding-block: 0.35rem;
    }

    .astrology-portal-enter {
        min-height: 2.05rem;
        padding-block: 0.34rem;
    }

    .astrology-portal-arrow {
        top: calc(50% - 1.65rem);
    }
}

@media (max-width: 760px) {
    .astrology-portal-carousel {
        grid-template-rows:
            minmax(0, 1fr)
            auto;
    }

    .astrology-portal-toolbar {
        grid-template-columns:
            minmax(0, 1fr)
            auto;
        gap: 0.5rem;
    }

    .astrology-portal-enter {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
    }

    .astrology-portal-navigation {
        justify-content: flex-end;
    }

    .astrology-portal-image {
        padding: 0.25rem;
    }

    .astrology-portal-arrow {
        width: 2rem;
        font-size: 1.3rem;
    }

    .astrology-portal-arrow--previous {
        left: 0.4rem;
    }

    .astrology-portal-arrow--next {
        right: 0.4rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .astrology-portal-background,
    .astrology-portal-image,
    .astrology-portal-arrow,
    .astrology-portal-enter {
        transition: none !important;
    }
}

/* SAGE_CENTER_PORTAL_VISIBILITY_FIX_20260728 START */

/*
   The original decorative background layers duplicated every
   portal image and could remain above the real image layers.
   The center now uses the two actual IMG layers exclusively.
*/

.astrology-portal-visual {
    position: relative !important;
    isolation: isolate !important;
    background: #020205 !important;
}

.astrology-portal-background {
    display: none !important;
}

.astrology-portal-image {
    position: absolute !important;
    inset: 0 !important;
    z-index: 5 !important;

    display: block !important;

    width: 100% !important;
    height: 100% !important;
    max-width: none !important;

    object-fit: cover !important;
    object-position: center !important;

    opacity: 0 !important;
    visibility: hidden !important;

    pointer-events: none !important;

    transform: scale(1.015);

    filter:
        brightness(0.98)
        saturate(1.04)
        contrast(1.02);

    transition:
        opacity var(--portal-fade-ms, 900ms) ease-in-out,
        visibility 0s linear var(--portal-fade-ms, 900ms),
        transform var(--portal-fade-ms, 900ms) ease-in-out !important;

    will-change:
        opacity,
        transform;
}

.astrology-portal-image.is-active {
    opacity: 1 !important;
    visibility: visible !important;

    transform: scale(1);

    transition-delay:
        0s,
        0s,
        0s !important;
}

.astrology-portal-image.is-outgoing {
    opacity: 0 !important;
    visibility: hidden !important;
}

.astrology-portal-visual::before,
.astrology-portal-visual::after {
    z-index: 7 !important;
    pointer-events: none !important;
}

.astrology-portal-arrow {
    z-index: 20 !important;
}

@media (prefers-reduced-motion: reduce) {
    .astrology-portal-image {
        transition: none !important;
        transform: none !important;
    }
}

/* SAGE_CENTER_PORTAL_VISIBILITY_FIX_20260728 END */
