/* --- Container aligning the H1 and the Nav --- */
.top-nav-container {
    display: flex;
    align-items: center;
    gap: 24px;
    margin: 20px 0;
}

.top-nav-container h1 {
    margin: 0;
    font-size: 24px;
}

/* --- M3 Style Spaced Container --- */
.floating-nav {
    display: inline-flex;
    gap: 4px; /* Adds the spacing between each button */
    /* Container no longer needs background, border, or overflow:hidden */
}

/* --- Base Button Style (Unselected) --- */
.floating-nav .nav-btn {
    text-decoration: none;
    padding: 8px 24px;
    font-size: 16px;
    font-weight: 500;

    background-color: rgba(0, 23, 96, 0.12);
    color: #001760;
    border: none;
    border-radius: 4px;

    /* Springy M3 release animation for when you let go of the click */
    transition: transform 0.4s cubic-bezier(0.2, 0, 0, 1),
    border-radius 0.4s cubic-bezier(0.2, 0, 0, 1),
    background-color 0.3s ease;
}

/* Outer edges standard shape */
.floating-nav .nav-btn:first-child {
    border-radius: 20px 4px 4px 20px;
}

.floating-nav .nav-btn:last-child {
    border-radius: 4px 20px 20px 4px;
}

/* Hover effect */
.floating-nav .nav-btn:not(.active):hover {
    background-color: rgba(0, 23, 96, 0.2);
}

/* --- THE M3 SQUISH ANIMATION --- */
/* When you click and hold any button, it scales down and sharpens its corners */
.floating-nav .nav-btn:active {
    transform: scale(0.92);
    border-radius: 6px !important; /* Overrides the 20px pill to squish it */

    /* Very fast snap-down transition so it feels responsive */
    transition: all 0.1s ease-out;
}

/* --- PAGE LOAD ANIMATIONS (The "Fake" SPA Morph) --- */
@keyframes activateFirst {
    0% {
        background-color: rgba(0, 23, 96, 0.12);
        color: #001760;
        border-radius: 20px 4px 4px 20px;
        box-shadow: none;
    }
    100% {
        background-color: #001760;
        color: #ffffff;
        border-radius: 20px;
        box-shadow: 0 4px 8px rgba(0, 23, 96, 0.25);
    }
}

@keyframes activateCenter {
    0% {
        background-color: rgba(0, 23, 96, 0.12);
        color: #001760;
        border-radius: 4px;
        box-shadow: none;
    }
    100% {
        background-color: #001760;
        color: #ffffff;
        border-radius: 20px;
        box-shadow: 0 4px 8px rgba(0, 23, 96, 0.25);
    }
}

@keyframes activateLast {
    0% {
        background-color: rgba(0, 23, 96, 0.12);
        color: #001760;
        border-radius: 4px 20px 20px 4px;
        box-shadow: none;
    }
    100% {
        background-color: #001760;
        color: #ffffff;
        border-radius: 20px;
        box-shadow: 0 4px 8px rgba(0, 23, 96, 0.25);
    }
}

/* --- Active Button Style --- */
.floating-nav .nav-btn.active {
    /* REMOVED !important so the keyframes can actually work */
    background-color: #001760;
    color: #ffffff;
    border-radius: 20px;
}

/* Apply specific load animation based on button position */
/* Added a 0.1s delay and changed 'forwards' to 'both' */
.floating-nav .nav-btn.active:first-child {
    animation: activateFirst 0.5s cubic-bezier(0.2, 0, 0, 1) 0.1s both;
}

.floating-nav .nav-btn.active:not(:first-child):not(:last-child) {
    animation: activateCenter 0.5s cubic-bezier(0.2, 0, 0, 1) 0.1s both;
}

.floating-nav .nav-btn.active:last-child {
    animation: activateLast 0.5s cubic-bezier(0.2, 0, 0, 1) 0.1s both;
}

/* Keep cursor default on active */
.floating-nav .nav-btn.active:hover {
    cursor: default;
}

div.tl-trading img {
    width: 200px !important;
    height: 200px !important;
}

img.large-img {
    margin-top: 20px;
    margin-bottom: 0;
    border-radius: 24px;
    width: 750px !important;
    height: auto !important;
}

/* Section header and divider to match services / why_us / affiliates pages */
.section-header {
    text-align: center;
    margin-bottom: 0;
}

.section-header h2 {
    font-size: 28px !important; /* ~32px */
    color: var(--primary-color);
    margin: 0 0 12px;
    line-height: 1.2;
}

.section-divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #1a3fa4);
    border-radius: 2px;
    margin: 0 auto 16px;
}

/* Make description paragraphs in this article match other pages */
article.tl-trading p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #475569;
}

article.tl-trading {
    padding-top: 20px;
    padding-bottom: 20px;
}

p {
    word-break: keep-all;
}

div ul {
    padding-left: 20px;
}

div ul li {
    list-style: none !important;
}

@media (max-width: 1024px) {
    div.tl-trading {
        flex-direction: column;
    }

    img.large-img {
        width: calc(100% - 40px) !important;
    }

    div.tl-trading img {
        align-self: center;
    }

    h1 {
        margin-left: 0 !important;
        text-wrap: nowrap;
    }
}

@media (max-width: 1082px) {
    br#desktop_only {
        display: none;
    }

    span.desktop_only {
        display: none;
    }
}

/* Container positioned fixed at bottom right */
.floating-phone-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    flex-direction: row-reverse; /* Keeps button on right, expands text to the left */
    z-index: 9999;
    font-family: inherit;
}

/* The small phone circle button */
.phone-circle-btn {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background-color: #007bff; /* Change to match your brand color */
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, background-color 0.2s ease;
    z-index: 2;
}

.phone-circle-btn:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

/* The expanding text rectangle */
.phone-details {
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #e2e8f0;
    border-right: none;
    border-radius: 30px 0 0 30px;
    height: 55px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0;

    /* Overlap slightly with the button to look cohesive */
    margin-right: -30px;
    padding-right: 45px;
    padding-left: 25px;

    /* Animation initial states */
    white-space: nowrap;
    overflow: hidden;
    max-width: 0;
    opacity: 0;
    pointer-events: none;
    transition: max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
    z-index: 1;
}

.phone-details a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

.phone-details a:hover {
    text-decoration: underline;
}

/* Revealed / Active State */
.floating-phone-widget.active .phone-details {
    max-width: 450px; /* Allows it to dynamically grow to fit the text */
    opacity: 1;
    pointer-events: auto;
}

@media (min-width: 767px) {
    br.phone-only {
        display: none;
    }
}

@media (max-width: 767px) {
    span.phone-only {
        display: none;
    }
}

@media (min-width: 1024px) {
    br.no_desktop {
        display: none;
    }
}

p.contact-center {
    text-align: center;
    transform: translateX(-15px);
}

@media (max-width: 775px) {
    p.contact-center {
        transform: translateX(0);
    }
}

img.nav-contact {
    width: 20px !important;
    height: 20px !important;
    transform: translateY(3px);
}

li {
    color: #475569;
}

p {
    /*font-family: "Prompt", Tahoma, sans-serif !important;*/
    color: #475569;
}

footer p {
    color: white;
}

@media (max-width: 1024px) {
    p.contact-center {
        transform: translate(5px, 0) !important;
    }
}

@media (min-width: 767px) {
    br.phone-only {
        display: none;
    }
}

@media (max-width: 767px) {
    span.phone-only {
        display: none;
    }
}

@media (min-width: 1024px) {
    br.no_desktop {
        display: none;
    }
}

p.contact-center {
    text-align: center;
    transform: translateX(-15px);
}

@media (max-width: 775px) {
    p.contact-center {
        transform: translateX(0);
    }
}

img.nav-contact {
    width: 20px !important;
    height: 20px !important;
    transform: translateY(3px);
}

li {
    color: #475569;
}

p {
    /*font-family: "Prompt", Tahoma, sans-serif !important;*/
    color: #475569;
}

footer p {
    color: white;
}