body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
}

.bg-gradient-primary {
    background: radial-gradient(circle at top left, #1e90ff 0, #001b33 50%, #000814 100%);
    color: #f8f9fa;
}

/* Light / dark theme roots */
body.theme-light {
    background: linear-gradient(135deg, #ffffff 0, #f1f5f9 40%, #e2e8f0 100%);
    color: #000000;
}

body.theme-dark {
    background: radial-gradient(circle at top left, #1e90ff 0, #001b33 50%, #000814 100%);
    color: #f8f9fa;
}

.fe-header {
    position: sticky;
    top: 0;
    z-index: 1050;
    height: 70px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
}

/* Light theme header */
body.theme-light .fe-header {
    background: linear-gradient(90deg, #ffffff, #e2e8f0);
    color: #000;
}

body.theme-light .fe-title,
body.theme-light .fe-subtitle {
    color: #000;
}

.fe-title {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.fe-subtitle {
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.fe-logo-wrapper {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fe-logo {
    max-width: 80%;
}

.fe-layout {
    min-height: calc(100vh - 70px);
}

/* Sidebar */
.fe-sidebar {
    position: fixed;
    top: 70px;
    left: 0;
    bottom: 0;
    width: 270px;
    background: rgba(3, 10, 23, 0.98);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    transform: translateX(-100%);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 1040;
}

.fe-sidebar.open {
    transform: translateX(0);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
}

/* Light theme sidebar */
body.theme-light .fe-sidebar {
    background: #ffffff;
    border-right-color: rgba(15, 23, 42, 0.08);
}

body.theme-light .btn-sidebar {
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.08);
}

body.theme-light .btn-sidebar:hover {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.45);
}

body.theme-light .btn-sidebar.active {
    background: linear-gradient(135deg, #0d6efd, #1e40af);
}

/* Ensure good contrast for sidebar text in dark mode */
body.theme-dark .btn-sidebar {
    color: #e5f0ff;
}

body.theme-dark .btn-sidebar .fe-chevron {
    color: #e5f0ff;
}

.fe-sidebar-inner {
    height: 100%;
    padding: 1rem 1rem 1.5rem;
    overflow-y: auto;
}

/* Sidebar section label */
/* Sidebar section label */
.fe-sidebar-inner h6 {
    color: rgba(148, 163, 184, 0.9);
}

/* Override Bootstrap text-muted in dark mode */
body.theme-dark .fe-sidebar-inner h6.text-muted {
    color: rgba(148, 163, 184, 0.9) !important;
}

body.theme-light .fe-sidebar-inner h6.text-muted {
    color: #475569 !important;
}

.btn-sidebar {
    border-radius: 999px;
    background: transparent;
    color: #e9ecef;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.55rem 0.9rem;
    font-size: 0.86rem;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn-sidebar .fe-icon-circle {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00e1ff, #00ff88);
    box-shadow: 0 0 10px rgba(0, 224, 255, 0.6);
}

.btn-sidebar .fe-chevron {
    font-size: 1.1rem;
    opacity: 0.6;
}

.btn-sidebar:hover {
    background: rgba(13, 110, 253, 0.18);
    border-color: rgba(13, 110, 253, 0.6);
    transform: translateX(2px);
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.35);
}

.btn-sidebar.active {
    background: linear-gradient(135deg, #0d6efd, #20c997);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.55);
}

.btn-sidebar.active .fe-chevron {
    opacity: 1;
}

/* Main area */
.fe-main {
    margin-left: 0;
    transition: margin-left 0.3s ease;
    width: 100%;
}

@media (min-width: 992px) {
    .fe-sidebar {
        transform: translateX(0);
    }

    .fe-main {
        margin-left: 270px;
    }
}

.fe-gallery-card {
    border-radius: 1.25rem;
    background: radial-gradient(circle at top left, rgba(13, 110, 253, 0.12), rgba(3, 10, 23, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Light theme main cards */
body.theme-light .fe-gallery-card {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.08);
}

body.theme-light .fe-gallery-card .card-header {
    background: #f8fafc;
    color: #0f172a;
}

body.theme-light .fe-gallery-body {
    background: radial-gradient(circle at center, #ffffff, #e2e8f0);
}

.fe-gallery-card .card-header {
    border-bottom-color: rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.35);
    color: #f8f9fa;
}

.fe-gallery-body {
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.85));
}

.fe-slideshow {
    position: relative;
    width: 100%;
    height: 100%;
}

.fe-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.fe-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    border-radius: 1rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.6);
    transform-origin: center center;
}

.fe-slide.active {
    opacity: 1;
    z-index: 2;
}

/* Base animation for previous slide fading out */
.fe-slide.is-prev {
    opacity: 0;
    z-index: 1;
}

/* Ken Burns (slow zoom/pan) always running on active slide image */
.fe-slide.active img {
    animation: fe-kenburns 5s ease-out forwards;
}

@keyframes fe-kenburns {
    0% {
        transform: scale(1.05) translate3d(-8px, -6px, 0);
    }
    100% {
        transform: scale(1.18) translate3d(8px, 6px, 0);
    }
}

/* Transition variants for active slide container */
.fe-slide.active.fe-anim-fade {
    animation: fe-slide-fade-in 1s ease-out forwards;
}

@keyframes fe-slide-fade-in {
    from { opacity: 0; transform: scale(1.02); }
    to   { opacity: 1; transform: scale(1); }
}

.fe-slide.active.fe-anim-slide-left {
    animation: fe-slide-left-in 1s ease-out forwards;
}

@keyframes fe-slide-left-in {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}

.fe-slide.active.fe-anim-slide-right {
    animation: fe-slide-right-in 1s ease-out forwards;
}

@keyframes fe-slide-right-in {
    from { opacity: 0; transform: translateX(-40px); }
    to   { opacity: 1; transform: translateX(0); }
}

.fe-slide.active.fe-anim-zoom {
    animation: fe-slide-zoom-in 1s ease-out forwards;
}

@keyframes fe-slide-zoom-in {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
}

.fe-slide.active.fe-anim-parallax {
    animation: fe-slide-parallax-in 1s ease-out forwards;
}

@keyframes fe-slide-parallax-in {
    from { opacity: 0; transform: translate3d(0, 20px, 0); }
    to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* Vertical slide from bottom to top */
.fe-slide.active.fe-anim-slide-up {
    animation: fe-slide-up-in 1s ease-out forwards;
}

@keyframes fe-slide-up-in {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Vertical slide from top to bottom */
.fe-slide.active.fe-anim-slide-down {
    animation: fe-slide-down-in 1s ease-out forwards;
}

@keyframes fe-slide-down-in {
    from { opacity: 0; transform: translateY(-40px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Diagonal from bottom-left to center */
.fe-slide.active.fe-anim-diag-bl {
    animation: fe-slide-diag-bl-in 1s ease-out forwards;
}

@keyframes fe-slide-diag-bl-in {
    from { opacity: 0; transform: translate3d(-40px, 40px, 0); }
    to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* Diagonal from top-right to center */
.fe-slide.active.fe-anim-diag-tr {
    animation: fe-slide-diag-tr-in 1s ease-out forwards;
}

@keyframes fe-slide-diag-tr-in {
    from { opacity: 0; transform: translate3d(40px, -40px, 0); }
    to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* Wipe / reveal effects using clip-path */
.fe-slide.active.fe-anim-wipe-right {
    animation: fe-wipe-right-in 1s ease-out forwards;
    clip-path: inset(0 100% 0 0);
}

@keyframes fe-wipe-right-in {
    from { opacity: 1; clip-path: inset(0 100% 0 0); }
    to   { opacity: 1; clip-path: inset(0 0 0 0); }
}

.fe-slide.active.fe-anim-wipe-down {
    animation: fe-wipe-down-in 1s ease-out forwards;
    clip-path: inset(0 0 100% 0);
}

@keyframes fe-wipe-down-in {
    from { opacity: 1; clip-path: inset(0 0 100% 0); }
    to   { opacity: 1; clip-path: inset(0 0 0 0); }
}

/* Split from center (horizontal) */
.fe-slide.active.fe-anim-split-h {
    animation: fe-split-h-in 1s ease-out forwards;
    transform-origin: center;
}

@keyframes fe-split-h-in {
    from { opacity: 0; transform: scaleY(0.1); }
    to   { opacity: 1; transform: scaleY(1); }
}

/* Split from center (vertical) */
.fe-slide.active.fe-anim-split-v {
    animation: fe-split-v-in 1s ease-out forwards;
    transform-origin: center;
}

@keyframes fe-split-v-in {
    from { opacity: 0; transform: scaleX(0.1); }
    to   { opacity: 1; transform: scaleX(1); }
}

/* Random bars style (stepped vertical reveal) */
.fe-slide.active.fe-anim-bars {
    animation: fe-bars-in 1s steps(5, end) forwards;
    clip-path: inset(0 0 100% 0);
}

@keyframes fe-bars-in {
    from { opacity: 1; clip-path: inset(0 0 100% 0); }
    to   { opacity: 1; clip-path: inset(0 0 0 0); }
}

/* Diamond reveal (from center outward) */
.fe-slide.active.fe-anim-diamond {
    animation: fe-diamond-in 1s ease-out forwards;
    clip-path: polygon(50% 50%, 50% 50%, 50% 50%, 50% 50%);
}

@keyframes fe-diamond-in {
    from {
        opacity: 1;
        clip-path: polygon(50% 50%, 50% 50%, 50% 50%, 50% 50%);
    }
    to {
        opacity: 1;
        clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    }
}

/* Plus (+) reveal: vertical then horizontal bar */
.fe-slide.active.fe-anim-plus {
    animation: fe-plus-in 1s ease-out forwards;
    clip-path: polygon(45% 0, 55% 0, 55% 100%, 45% 100%);
}

@keyframes fe-plus-in {
    0% {
        opacity: 1;
        clip-path: polygon(45% 0, 55% 0, 55% 100%, 45% 100%); /* vertical bar */
    }
    50% {
        opacity: 1;
        clip-path: polygon(0 45%, 100% 45%, 100% 55%, 0 55%); /* horizontal bar */
    }
    100% {
        opacity: 1;
        clip-path: inset(0 0 0 0);
    }
}

/* Circle reveal from center */
.fe-slide.active.fe-anim-circle {
    animation: fe-circle-in 1s ease-out forwards;
    clip-path: circle(0% at 50% 50%);
}

@keyframes fe-circle-in {
    from { opacity: 1; clip-path: circle(0% at 50% 50%); }
    to   { opacity: 1; clip-path: circle(150% at 50% 50%); }
}

/* "Out" effect: zoom and fade out then back to normal */
.fe-slide.active.fe-anim-out {
    animation: fe-out-in 1s ease-out forwards;
}

@keyframes fe-out-in {
    0%   { opacity: 0; transform: scale(0.9); }
    50%  { opacity: 1; transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

.fe-slide-caption {
    position: absolute;
    left: 1.25rem;
    right: 1.25rem;
    bottom: 1.25rem;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    backdrop-filter: blur(10px);
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.8), rgba(13, 110, 253, 0.85));
    color: #f8f9fa;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.fe-slide-caption span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fe-slide-counter {
    font-size: 0.75rem;
    opacity: 0.85;
}

.fe-loader {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.95));
    color: #f8f9fa;
    gap: 0.75rem;
}

.fe-loader.d-none {
    display: none !important;
}

.fe-empty-state {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.fe-empty-state.d-none {
    display: none !important;
}

/* Custom introduction layout */
.fe-intro-custom {
    height: 100%;
}

.fe-intro-logo-wrap {
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
    height: 100%;
}

.fe-intro-custom .col-12.col-md-4 {
    display: flex;
    align-items: stretch;
}

.fe-intro-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 1rem;
}

.fe-intro-heading {
    font-weight: 600;
}

.fe-intro-addresses li {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

body.theme-dark .fe-intro-heading,
body.theme-dark .fe-intro-addresses li {
    color: #e5e7eb;
}

body.theme-light .fe-intro-heading,
body.theme-light .fe-intro-addresses li {
    color: #111827;
}

/* Mobile optimizations for intro layout */
@media (max-width: 767.98px) {
    .fe-intro-custom .col-12.col-md-4 {
        justify-content: center;
        margin-bottom: 1rem;
    }

    .fe-intro-logo-wrap {
        justify-content: center;
        height: auto;
        min-height: 120px;
        max-height: 180px;
    }

    .fe-intro-logo {
        max-height: 150px;
        width: auto;
        height: auto;
    }

    .fe-intro-custom .col-12.col-md-8 {
        padding-top: 0;
    }

    .fe-intro-heading {
        font-size: 1rem;
        margin-bottom: 0.75rem !important;
    }

    .fe-intro-addresses {
        margin-bottom: 0 !important;
        padding-left: 0;
    }

    .fe-intro-addresses li {
        margin-bottom: 0.4rem;
        font-size: 0.8rem;
        line-height: 1.3;
    }

    .fe-intro-custom .row {
        align-items: flex-start !important;
        height: auto;
        max-height: calc(100vh - 200px);
        overflow-y: auto;
    }
}

/* Improve contrast for helper / error text in gallery */
.fe-gallery-body,
.fe-empty-state,
.fe-loader {
    color: #f8f9fa;
}

.fe-empty-state p,
.fe-loader span,
.fe-gallery-card .card-header small {
    color: rgba(248, 249, 250, 0.85);
}

/* Cards */
.card {
    border-radius: 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.78);
    color: #f8f9fa;
}

.card-header {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

/* Generic light theme cards */
body.theme-light .card {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.08);
    color: #000000;
}

body.theme-light .card .text-muted {
    color: #475569 !important;
}

body.theme-light .fe-gallery-card .fe-slide-caption {
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.9), rgba(37, 99, 235, 0.9));
    color: #f9fafb;
}

/* Ensure all card text is readable on dark background */
.card,
.card p,
.card li,
.card small,
.card span,
.card-header,
.card-body {
    color: #f8f9fa !important;
}

/* Right-side panel helper text (make muted text lighter) */
.card-body .text-muted {
    color: rgba(248, 249, 250, 0.75) !important;
}

/* Override for light theme text color */
body.theme-light .card,
body.theme-light .card p,
body.theme-light .card li,
body.theme-light .card small,
body.theme-light .card span,
body.theme-light .card-header,
body.theme-light .card-body {
    color: #000000 !important;
}

body.theme-light .card-body .text-muted {
    color: #475569 !important;
}

/* Scrollbar styling for sidebar */
.fe-sidebar-inner::-webkit-scrollbar {
    width: 6px;
}

.fe-sidebar-inner::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
}

.fe-sidebar-inner::-webkit-scrollbar-track {
    background: transparent;
}

/* Small utilities */
.btn-outline-light {
    border-radius: 999px;
}

/* Improve toggle visibility in light mode header */
body.theme-light .fe-header .btn-outline-light {
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.15);
    background-color: #ffffff;
}

body.theme-light .fe-header .btn-outline-light:hover {
    background-color: #e2e8f0;
    border-color: rgba(15, 23, 42, 0.4);
}

@media (max-width: 575.98px) {
    .fe-header {
        height: 64px;
    }

    .fe-title {
        font-size: 0.9rem;
    }

    .fe-subtitle {
        display: none;
    }
}

/* Improve gallery visibility on smaller screens */
@media (max-width: 767.98px) {
    .fe-gallery-body {
        min-height: 320px;
    }
}

