/*
 * FlowUI Frontend CSS
 * Navbar, mega menu, section layouts, footer.
 */

/* -- Navbar ---------------------------------------------------------------- */
.flowui-navbar {
    min-height: var(--flowui-topbar-height);
    background-color: var(--bs-body-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: var(--flowui-transition);
}

/* At-top transparent mode */
.flowui-navbar.navbar-top-transparent:not(.navbar-scrolled) {
    background-color: transparent !important;
    box-shadow: none !important;
}

/* On-scroll solid (default) — base .flowui-navbar styles already apply */

/* On-scroll transparent */
.flowui-navbar.navbar-scroll-transparent.navbar-scrolled {
    background-color: transparent !important;
    box-shadow: none !important;
}

.flowui-navbar .navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.flowui-navbar .navbar-brand img {
    height: 36px;
    width: auto;
}

/* -- Brand text spans ------------------------------------------------------ */
.brand-text {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.navbar-brand .brand-prefix {
    color: var(--bs-body-color);
}

.navbar-brand .brand-suffix {
    color: var(--bs-primary);
}

/* Expand — only rendered in animated mode */
.brand-expand {
    overflow: hidden;
    white-space: nowrap;
    color: var(--bs-secondary-color);
    max-width: 0;
    opacity: 0;
    transition: max-width 0.45s ease, opacity 0.35s ease;
}

.brand-expanded .brand-expand {
    max-width: 20ch;
    opacity: 1;
}

.navbar-brand .brand-badge {
    font-size: 9px;
    background: transparent;
    color: var(--bs-primary);
    border: 1px solid var(--bs-primary);
}

/* -- Footer brand ---------------------------------------------------------- */
.footer-brand {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.footer-brand img {
    height: 28px;
    width: auto;
}

.footer-brand .brand-prefix {
    color: var(--bs-body-color);
}

.footer-brand .brand-suffix {
    color: var(--bs-primary);
}


/* -- Scroll progress bar --------------------------------------------------- */
#scrollProgressBar {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: var(--bs-primary);
    opacity: 0.65;
    z-index: 9999;
    transition: width 0.08s linear;
    pointer-events: none;
}

/* -- Multi-level dropdowns ------------------------------------------------- */
.flowui-navbar .dropdown-menu {
    border-radius: var(--bs-border-radius-lg);
    border: 1px solid var(--bs-border-color);
    box-shadow: var(--flowui-shadow);
    min-width: 200px;
}

/* Nested dropdown trigger arrow */
.dropdown-item.dropdown-toggle::after {
    float: right;
    margin-top: 0.4em;
    border-top:   0.35em solid transparent;
    border-bottom: 0.35em solid transparent;
    border-left:  0.35em solid;
    border-right: none;
    vertical-align: middle;
}

/* Desktop: position nested menus to the right */
@media (min-width: 992px) {
    .dropend > .dropdown-menu {
        top: 0;
        left: 100%;
        margin-top: -4px;
        margin-left: 2px;
    }

    .dropstart > .dropdown-menu {
        top: 0;
        right: 100%;
        left: auto;
        margin-top: -4px;
        margin-right: 2px;
    }
}

/* Mobile: remove fly-out, stack vertically */
@media (max-width: 991.98px) {
    .dropend > .dropdown-menu,
    .dropstart > .dropdown-menu {
        position: static !important;
        float: none;
        box-shadow: none;
        border: none;
        padding-left: 1rem;
        margin: 0;
    }

    .dropdown-item.dropdown-toggle::after {
        display: none;
    }
}

/* -- Mega menu ------------------------------------------------------------- */
.nav-item.dropdown-mega {
    position: static;
}

.nav-item.dropdown-mega > .dropdown-menu {
    width: 92%;
    left: 4%;
    right: 4%;
    border-radius: var(--bs-border-radius-lg);
    box-shadow: var(--flowui-shadow-lg);
    padding: 0;
}

.mega-menu-panel {
    padding: 1.5rem;
}

.mega-menu-col h6 {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--bs-secondary-color);
    margin-bottom: 0.75rem;
}

.mega-menu-col .list-unstyled a {
    display: block;
    padding: 0.3rem 0;
    color: var(--bs-body-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--flowui-transition-fast);
}

.mega-menu-col .list-unstyled a:hover {
    color: var(--bs-primary);
    padding-left: 4px;
}

@media (max-width: 991.98px) {
    .nav-item.dropdown-mega > .dropdown-menu {
        width: 100%;
        left: 0;
        right: 0;
    }

    .mega-menu-panel {
        padding: 0.75rem 0;
    }
}

/* -- Theme switcher -------------------------------------------------------- */
.flowui-theme-switcher .dropdown-toggle {
    background: none;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--bs-body-color);
    transition: var(--flowui-transition-fast);
}

.flowui-theme-switcher .dropdown-toggle::after {
    display: none;
}

.flowui-theme-switcher .dropdown-toggle:hover {
    color: var(--bs-primary);
}

.flowui-theme-switcher .dropdown-menu {
    min-width: 220px;
    padding: 0.75rem;
}

/* .theme-mode-btns, .theme-swatches, .theme-swatch — see flowui.css */

/* -- Hero section ---------------------------------------------------------- */
.flowui-hero {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* -- Features section ------------------------------------------------------ */
.feature-card {
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: 0.75rem;
    transition: var(--flowui-transition);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--flowui-shadow);
}

.feature-card .feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--bs-primary);
    display: block;
}

/* -- Carousel section ----------------------------------------------------- */

/* Round white dots — override Bootstrap's default rectangular bars */
.section-carousel .carousel-indicators {
    gap: 8px;
    margin-bottom: 1.75rem;
}

.section-carousel .carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border-top: 0;
    border-bottom: 0;
    padding: 0;
    background-color: rgba(255, 255, 255, 0.5);
    opacity: 1;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.section-carousel .carousel-indicators button.active,
.section-carousel .carousel-indicators button:hover {
    background-color: #fff;
    transform: scale(1.25);
}


/* -- Gallery section ------------------------------------------------------- */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--bs-border-radius-lg);
}

.gallery-item img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.06);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    color: #fff;
    padding: 1rem 0.75rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
}

/* -- Content area tables (mobile scroll) ----------------------------------- */
.page-content table,
.post-content table,
.html-content table {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* -- Footer ---------------------------------------------------------------- */
.flowui-footer {
    border-top: 1px solid var(--bs-border-color);
}

.flowui-footer a {
    color: var(--bs-secondary-color);
    text-decoration: none;
    transition: var(--flowui-transition-fast);
}

.flowui-footer a:hover {
    color: var(--bs-primary);
}
