/* Main Styling for JB Traders Theme */

:root {
    --color-primary: #F9452C;
    --color-primary-hover: #e0351b;
    --color-text: #1e293b;
    --color-text-light: #64748b;
    --color-bg-white: #ffffff;
    --header-height: 90px;
    --font-family: 'Inter', sans-serif;
    --transition-speed: 0.3s;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    color: var(--color-text);
    background-color: #f8fafc;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Site Header */
@keyframes headerEntrance {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes headerItemEntrance {
    0% {
        opacity: 0;
        transform: translateY(-12px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.site-header {
    width: 100%;
    background: transparent;
    border-bottom: 1px solid transparent;
    position: fixed;
    top: 0;
    z-index: 1000;
    animation: headerEntrance 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: background var(--transition-speed) ease, border-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease, backdrop-filter var(--transition-speed) ease;
}

.site-header .header-logo {
    animation: headerItemEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.site-header .nav-menu li:nth-child(1) { animation: headerItemEntrance 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.18s both; }
.site-header .nav-menu li:nth-child(2) { animation: headerItemEntrance 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.26s both; }
.site-header .nav-menu li:nth-child(3) { animation: headerItemEntrance 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.34s both; }
.site-header .nav-menu li:nth-child(4) { animation: headerItemEntrance 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.42s both; }
.site-header .nav-menu li:nth-child(5) { animation: headerItemEntrance 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.50s both; }
.site-header .nav-menu li:nth-child(6) { animation: headerItemEntrance 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.58s both; }

.site-header .header-cta {
    animation: headerItemEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
}

.site-header .menu-toggle {
    animation: headerItemEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.site-header.is-scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.header-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 20px 45px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-height);
}

/* Logo */
.header-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.header-logo img {
    height: 52px;
    width: auto;
    display: block;
    transition: transform var(--transition-speed) ease;
}

.header-logo a:hover img {
    transform: scale(1.02);
}

/* Desktop Navigation */
.header-nav {
    display: flex;
    align-items: center;
    margin-left: 90px;
    margin-right: auto;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 40px;
}

.nav-menu li {
    position: relative;
}

.nav-menu li a {
    display: inline-block;
    padding: 8px 0;
    color: var(--color-text);
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 400;
    text-decoration: none;
    position: relative;
    transition: color var(--transition-speed) ease;
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: width var(--transition-speed) ease;
}

.nav-menu li a:hover {
    color: var(--color-primary);
}

.nav-menu li a:hover::after {
    width: 100%;
}

/* Active State Styles */
.nav-menu li.current-menu-item a,
.nav-menu li.current_page_item a,
.nav-menu li.current-menu-ancestor a {
    color: var(--color-primary);
}

.nav-menu li.current-menu-item a::after,
.nav-menu li.current_page_item a::after,
.nav-menu li.current-menu-ancestor a::after {
    width: 100%;
}

/* CTA Button Styles */
.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--color-primary);
    color: #ffffff;
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 400;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    transition: background-color var(--transition-speed) ease, transform 0.2s ease, box-shadow var(--transition-speed) ease;
    box-shadow: 0 4px 14px rgba(249, 69, 44, 0.2);
}

.btn-cta:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(249, 69, 44, 0.3);
}

.btn-cta:active {
    transform: translateY(0);
}

.btn-cta .cta-arrow {
    transition: transform var(--transition-speed) ease;
}

.btn-cta:hover .cta-arrow {
    transform: translateX(4px);
}

/* Mobile Menu Toggle (Hamburger) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 1100;
    border-radius: 4px;
    transition: background-color var(--transition-speed) ease;
}

.menu-toggle:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.hamburger-box {
    display: inline-block;
    width: 24px;
    height: 18px;
    position: relative;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    width: 24px;
    height: 2px;
    background-color: var(--color-text);
    position: absolute;
    border-radius: 2px;
    transition: transform 0.2s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.2s cubic-bezier(0.165, 0.84, 0.44, 1), background-color var(--transition-speed) ease;
}

.hamburger-inner {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger-inner::before {
    content: '';
    top: -7px;
}

.hamburger-inner::after {
    content: '';
    bottom: -7px;
}

/* Hamburger Open Animation */
.menu-toggle.is-active .hamburger-inner {
    transform: rotate(45deg);
}

.menu-toggle.is-active .hamburger-inner::before {
    top: 0;
    opacity: 0;
}

.menu-toggle.is-active .hamburger-inner::after {
    bottom: 0;
    transform: rotate(-90deg);
}

/* Mobile Navigation Drawer & Overlay */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1040;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.drawer-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 320px;
    max-width: 85%;
    background-color: var(--color-bg-white);
    z-index: 1050;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    padding: 100px 30px 40px;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-drawer.is-open {
    transform: translateX(0);
}

.mobile-drawer-nav {
    margin-bottom: 40px;
}

.mobile-drawer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.mobile-drawer-nav ul li a {
    font-family: var(--font-family);
    font-size: 18px;
    font-weight: 400;
    color: var(--color-text);
    text-decoration: none;
    display: block;
    padding: 6px 0;
    position: relative;
    transition: color var(--transition-speed) ease;
}

.mobile-drawer-nav ul li a:hover,
.mobile-drawer-nav ul li.current-menu-item a,
.mobile-drawer-nav ul li.current_page_item a {
    color: var(--color-primary);
}

.mobile-drawer-cta {
    margin-top: auto;
}

.mobile-drawer-cta .btn-cta {
    width: 100%;
    justify-content: center;
}

body.no-scroll {
    overflow: hidden;
}

/* Responsive Styles */
@media (max-width: 991px) {

    .header-nav,
    .header-cta {
        display: none;
    }

    .menu-toggle {
        display: block;
    }
}

/* ==========================================================================
   Footer Styling
   ========================================================================== */

.site-footer {
    background-color: #0B132A; /* Deep Navy Background */
    color: #ffffff;
    padding: 80px 0 40px 0;
    box-sizing: border-box;
}

.footer-container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 45px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 60px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.footer-logo img {
    max-height: 48px;
    width: auto;
    display: block;
}

.footer-description {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    line-height: 24px;
    margin: 0;
    max-width: 340px;
}

.footer-socials {
    display: flex;
    gap: 14px;
}

.social-link {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

.social-link:hover {
    border-color: #F9452C;
    color: #ffffff;
    background-color: #F9452C;
}

.footer-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    text-transform: capitalize;
    letter-spacing: 0.02em;
}

.footer-links-list,
.footer-contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-links-list a,
.footer-contact-list a {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links-list a:hover,
.footer-contact-list a:hover {
    color: #F9452C;
}

.footer-locations {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    line-height: 22px;
}

.footer-bottom {
    padding-top: 40px;
    text-align: center;
}

.copyright-text {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
}

/* Responsive Overrides */
@media (max-width: 991px) {
    .footer-container {
        padding: 0 24px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 45px;
        padding-bottom: 40px;
    }
    .footer-bottom {
        padding-top: 30px;
    }
}

/* Mobile Drawer Close Button */
.drawer-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-speed) ease, transform 0.2s ease;
    z-index: 1100;
}

.drawer-close:hover {
    color: var(--color-primary);
    transform: scale(1.05);
}

.drawer-close svg {
    display: block;
}

/* ==========================================================================
   Scroll Reveal / Fade Animations for Text & UI Elements
   ========================================================================== */

.scroll-reveal,
.scroll-reveal-text,
[data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition-property: opacity, transform;
    transition-duration: var(--reveal-duration, 0.85s);
    transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--reveal-delay, 0s);
    will-change: opacity, transform;
}

.scroll-reveal.is-revealed,
.scroll-reveal-text.is-revealed,
[data-reveal].is-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Variation: Fade only (no vertical shift) */
.scroll-reveal-fade {
    opacity: 0;
    transform: none;
    transition-property: opacity;
    transition-duration: var(--reveal-duration, 0.9s);
    transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--reveal-delay, 0s);
    will-change: opacity;
}

.scroll-reveal-fade.is-revealed {
    opacity: 1;
    transform: none;
}

/* Variation: Subtle scale + fade */
.scroll-reveal-scale {
    opacity: 0;
    transform: scale(0.96) translateY(20px);
    transition-property: opacity, transform;
    transition-duration: var(--reveal-duration, 0.85s);
    transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--reveal-delay, 0s);
    will-change: opacity, transform;
}

.scroll-reveal-scale.is-revealed {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Variation: Slide from left/right */
.scroll-reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition-property: opacity, transform;
    transition-duration: var(--reveal-duration, 0.85s);
    transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--reveal-delay, 0s);
    will-change: opacity, transform;
}

.scroll-reveal-left.is-revealed {
    opacity: 1;
    transform: translateX(0);
}

.scroll-reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition-property: opacity, transform;
    transition-duration: var(--reveal-duration, 0.85s);
    transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--reveal-delay, 0s);
    will-change: opacity, transform;
}

.scroll-reveal-right.is-revealed {
    opacity: 1;
    transform: translateX(0);
}

/* Respect Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
    .site-header,
    .site-header .header-logo,
    .site-header .nav-menu li,
    .site-header .header-cta,
    .site-header .menu-toggle,
    .scroll-reveal,
    .scroll-reveal-text,
    .scroll-reveal-fade,
    .scroll-reveal-scale,
    .scroll-reveal-left,
    .scroll-reveal-right,
    [data-reveal] {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

