/* Trading Tools - Refactored Bundle Layout (Black and White Theme) */

:root {
    --nmca-magenta: #FF00CC;
    --section-bg-light: #f8f9fa;
    --section-bg-white: #ffffff;
    --text-dark: #111111;
    --text-gray: #4b5563;
    --border-color-light: #e5e7eb;
}

#tools-page {
    background-color: #050506;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
}

/* ── Hero Section (Dark) ── */
.tools-hero {
    background-color: #050505;
    padding: 120px 0 80px;
    text-align: center;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    padding-top: 160px; /* Accounts for fixed header */
}

.tools-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 50% 50%, rgba(255, 0, 204, 0.05) 0%, transparent 80%);
    pointer-events: none;
}

.tools-hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 20px;
}

.tools-hero p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 800px;
    margin: 0 auto 30px;
}

.hero-platform-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
}

/* ── General Helpers (Alternating Black & White Theme) ── */
.bg-light { background-color: var(--section-bg-light); color: var(--text-dark); }
.bg-white { background-color: var(--section-bg-white); color: var(--text-dark); }
.bg-black { background-color: #050506; color: #ffffff; }

.bg-black .about-section__text__title,
.bg-black .app-section-top__title,
.bg-black .availability__title {
    color: #ffffff;
}

.bg-black .app-section-top__desc,
.bg-black .about-section__text__desc p {
    color: rgba(255, 255, 255, 0.7);
}

.bg-white .about-section__text__title,
.bg-white .app-section-top__title,
.bg-white .availability__title {
    color: var(--text-dark);
}

.bg-white .app-section-top__desc,
.bg-white .about-section__text__desc p {
    color: var(--text-gray);
}

.hidden { display: none; }
@media (min-width: 768px) {
    .md-flex { display: flex !important; }
}

/* ── App Section Top (Bundle Intro) ── */
.app-section-top {
    padding: 80px 0 40px;
    text-align: center;
}

.app-section-top__inner {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.app-section-top__title {
    font-size: 2.5rem;
    font-weight: 700;
}

.app-section-top__desc {
    font-size: 1.1rem;
}

/* ── Badges ── */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge--xxl {
    padding: 8px 16px;
    font-size: 1rem;
}

/* Custom Colors for Badges using NMCA palette */
.badge--violet { background-color: rgba(138, 43, 226, 0.15); color: #8A2BE2; }
.badge--gray { background-color: rgba(107, 114, 128, 0.15); color: #8892b0; }
.badge--magenta { background-color: rgba(255, 0, 204, 0.15); color: var(--nmca-magenta); }

/* ── About Section (Side-by-Side) ── */
.about-section {
    padding: 80px 0;
}

.about-section__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
}

@media (min-width: 768px) {
    .about-section__container {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .about-section__container.row-reverse {
        flex-direction: row-reverse;
    }
    
    .about-section__text {
        width: 45%;
    }
    
    .about-section__image {
        width: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

.about-section__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
}

.about-section__text__title {
    font-size: 2rem;
    font-weight: 700;
}

.about-section__text__desc p {
    margin-bottom: 15px;
}

.about-section__image img {
    width: 100%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.bg-black .about-section__image img {
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

/* ── Availability (Platforms) ── */
.availability {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.availability__title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.availability ul.at {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 15px;
    align-items: center;
}

/* ── Challenge Table ── */
.tools-section {
    padding: 80px 0;
}

.challenge-card-wrapper {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    padding: 40px;
    margin-top: 20px;
}

.bg-black .challenge-card-wrapper {
    background: #121214;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255,255,255,0.05);
}

.challenge-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 700px; /* For mobile scroll */
}

.challenge-table th {
    padding: 20px;
    font-size: 0.9rem;
    background: #f1f3f5;
    text-align: center;
    font-weight: 700;
    color: var(--text-gray);
    border-top: 1px solid #e5e7eb;
}

.bg-black .challenge-table th {
    background: #1a1a1d;
    color: rgba(255,255,255,0.7);
    border-top: 1px solid rgba(255,255,255,0.05);
}

.challenge-table th.magenta-header {
    background: var(--nmca-magenta);
    color: #ffffff;
    border-top: none;
}

.challenge-table td {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #f1f1f1;
    font-size: 1rem;
    color: var(--text-dark);
}

.bg-black .challenge-table td {
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: #ffffff;
}

.challenge-table .label-cell {
    text-align: left;
    color: var(--text-gray);
    font-weight: 500;
    background: transparent;
}

.bg-black .challenge-table .label-cell {
    color: rgba(255,255,255,0.7);
}

.challenge-table .highlight-col {
    background: rgba(255, 0, 204, 0.02);
    border-left: 2px solid var(--nmca-magenta);
    border-right: 2px solid var(--nmca-magenta);
}

/* ── Explicit NMCA Primary Button Overrides for Light BG ── */
#tools-page .btn-primary {
    background: linear-gradient(to right, #FF00CC, #A020F0);
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#tools-page .btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    color: #fff;
}

/* ── Blur Fade Animation (matches index.php) ── */
@keyframes blurFade {
    0% {
        opacity: 0;
        filter: blur(6px);
        transform: translateY(12px);
    }
    100% {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0);
    }
}

.animate-slide-in {
    animation: blurFade 0.9s ease-out forwards;
    visibility: visible;
}

/* ── Mobile: Center Economic Calendar content ── */
@media (max-width: 767px) {
    #economic-calendar .about-section__text {
        align-items: center;
        text-align: center;
    }

    #economic-calendar .about-section__text__desc {
        text-align: center;
    }

    #economic-calendar .availability {
        justify-content: center;
    }
}

/* ── Responsive: Hero ── */
@media (max-width: 767px) {
    .tools-hero {
        padding: 120px 16px 60px;
    }

    .tools-hero h1 {
        font-size: 1.75rem;
        line-height: 1.2;
        margin-bottom: 14px;
    }

    .tools-hero p {
        font-size: 0.92rem;
        margin: 0 auto 20px;
        padding: 0 4px;
    }

    .hero-platform-icons {
        margin-top: 24px;
        gap: 12px;
    }

    /* Economic Calendar section on mobile */
    .about-section {
        padding: 50px 0;
    }

    .about-section__container {
        gap: 32px;
    }

    .about-section__text__title {
        font-size: 1.5rem;
    }

    /* Compare Bundles table scroll on mobile */
    .tools-section {
        padding: 50px 0;
    }

    .challenge-card-wrapper {
        padding: 0;
        border-radius: 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        display: block;
    }

    .challenge-table {
        min-width: 480px;
        width: 100%;
    }

    .challenge-table th,
    .challenge-table td {
        padding: 14px 12px;
        font-size: 0.82rem;
        white-space: nowrap;
    }
}
