/* Self-hosted Gabarito variable font */
@font-face {
    font-family: 'Gabarito';
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url('assets/fonts/gabarito-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Gabarito';
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url('assets/fonts/gabarito-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* CSS Variables */
:root {
    --accent-primary: #f7931a;
    --accent-light: #ffc46b;
    --accent-dark: #e07c00;
    --bg-dark: #0A0A0A;
    --bg-secondary: #141414;
    --bg-card: #1A1A1A;
    --text-primary: #FFFFFF;
    --text-secondary: #B8B8B8;
    --bg-primary: #141414;
    --border-color: #2A2A2A;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Gabarito', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.05;
    background: 
        radial-gradient(circle at 20% 50%, var(--accent-primary) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, #1E88E5 0%, transparent 50%);
    pointer-events: none;
}

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--accent-primary);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.8rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav {
    display: flex;
    gap: 3.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.05rem;
    cursor: pointer;
}

.nav-link:hover {
    color: var(--accent-primary);
}

.trade-btn {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-dark));
    color: #000000;
    border: none;
    padding: 0.75rem 1.8rem;
    border-radius: 8px;
    font-family: 'Gabarito', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 10px var(--accent-primary), 0 0 20px rgba(247, 147, 26, 0.4);
    animation: pulse-glow 2s ease-in-out infinite;
}

.trade-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent 0%,
        rgba(255, 255, 255, 0) 30%,
        rgba(255, 255, 255, 0.55) 50%,
        rgba(255, 255, 255, 0) 70%,
        transparent 100%
    );
    animation: shiny-sweep 3s ease-in-out infinite;
    pointer-events: none;
}

.trade-btn:hover {
    background: linear-gradient(135deg, var(--accent-light), var(--accent-primary));
    animation: none;
    box-shadow: 0 0 25px var(--accent-primary), 0 0 50px rgba(247, 147, 26, 0.7);
}

/* Smooth scroll offset for fixed header — avoids getBoundingClientRect() */
section[id] {
    scroll-margin-top: 100px;
}

/* Main Content */
.main-content {
    position: relative;
    z-index: 1;
    margin-top: 60px;
    display: flex;
    flex-direction: column;
}
.main-content > #chart    { order: 1; }
.main-content > #block3   { order: 2; }
.main-content > #brokers  { order: 3; }
.main-content > #analysis { order: 4; }
.main-content > #faq      { order: 5; }
.main-content > #block8   { order: 6; }

/* SEO H1 on landing pages — in DOM for crawlers/screen readers, not rendered */
.page-h1 {
    font-size: 0;
    line-height: 0;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Block 2: Chart Section */
.chart-section {
    padding: 0.4rem 0 0;
    position: relative;
    z-index: 1;
    background: var(--bg-dark);
}

.section-header {
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.section-title {
    font-family: 'Gabarito', sans-serif;
    font-size: 2.3rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--accent-light), var(--accent-primary), var(--accent-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.chart-container {
    background: transparent;
    border-radius: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    height: 500px;
    overflow: hidden;
    position: relative;
    z-index: 0;
    contain: layout paint;
}

.chart-container iframe {
    max-height: 100% !important;
    max-width: 100% !important;
    position: relative;
    z-index: 0;
}

.chart-container::before {
    display: none;
}

.chart-wrapper {
    height: 100%;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.tradingview-widget-container {
    height: 100%;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.tradingview-widget-container iframe {
    max-height: 100% !important;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Block 3: Ticker Section */
.ticker-section {
    background: var(--bg-dark);
    border-top: none;
    border-bottom: none;
    padding: 0.5rem 0 1.5rem;
    position: relative;
}

.ticker-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
    text-align: center;
}

.ticker-container {
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    position: relative;
    background: transparent;
    margin-top: 2rem;
}

/* Hide top border line */
.ticker-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--bg-dark);
    z-index: 10;
}

/* Hide "Market summary by TradingView" footer and bottom line */
.ticker-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 32px;
    background: var(--bg-dark);
    z-index: 10;
}

/* Market summary widget */
.ticker-container tv-market-summary {
    width: 100%;
    display: block;
    margin-top: -38px;
}

/* Block 4: Analysis Section */
.analysis-section {
    padding: 0.5rem 0 1.5rem;
    background: var(--bg-dark);
}

.widgets-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.widget-wrapper {
    background: transparent;
    border-radius: 0;
    overflow: hidden;
}

.widget-title {
    font-family: 'Gabarito', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    text-align: center;
}

.widget-wrapper .tradingview-widget-container {
    height: auto;
    min-height: 300px;
}

.widget-wrapper:first-child .tradingview-widget-container {
    height: 300px;
}

/* Block 5: Brokers Section */
.brokers-section {
    padding: 0.5rem 0 0;
    background: var(--bg-dark);
    position: relative;
}

.broker-list {
    margin-top: 2rem;
    position: relative;
    z-index: 1;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    background: linear-gradient(to right, #fef2d9, #12121246);
    border-radius: 12px;
    padding: 0.2rem 1.5rem;
}

.broker-card {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    border-bottom: 1px solid #E0E0E0;
    position: relative;
    cursor: pointer;
}

.broker-card:last-child {
    border-bottom: none;
}

.broker-row {
    grid-column: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.broker-name {
    font-family: 'Gabarito', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1A1A1A;
    display: flex;
    flex: 1;
    align-items: center;
    gap: 0.75rem;
}
.broker-best-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-dark));
    color: #000;
    font-family: 'Gabarito', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(247,147,26,0.4);
    transform: translateY(-6px);
}

/* Main page only: neutralize broker-list background for featured layout */
.broker-list:has(.broker-card-featured) {
    background: transparent;
    padding: 0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    gap: 2.4rem;
}

/* Main page only: featured 3-column broker card */
.broker-card.broker-card-featured {
    border-bottom: none;
}
.broker-card-featured + .broker-card-featured {
    margin-top: 2rem;
}
.broker-card-featured {
    display: grid;
    grid-template-columns: 170px 1fr auto;
    gap: 2.5rem;
    align-items: center;
    background:
        radial-gradient(ellipse at 50% 50%, #f57f17 0%,  #7a3f0a 0%, #3a1c05 20%, #181007 60%, #010101 90%, #000000 100%) padding-box,
        linear-gradient(135deg, var(--accent-primary), var(--accent-dark), var(--accent-primary)) border-box;
    border-radius: 14px;
    padding: 1.6rem 2rem;
    border: 2px solid transparent;
    cursor: pointer;
    box-shadow:
        0 0 40px  rgba(255, 245, 157, 0.18),
        0 0 80px  rgba(255, 245, 157, 0.10),
        0 0 140px rgba(255, 245, 157, 0.05),
        0 0 220px rgba(255, 245, 157, 0.03);
}
.bcf-logo-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    width: 170px;
}
.bcf-logo-col .broker-logo {
    height: 40px;
    width: auto;
}
.bcf-badge {
    background: var(--accent-primary);
    color: #000;
    font-family: 'Gabarito', sans-serif;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    padding: 3px 10px;
    border-radius: 4px;
    white-space: nowrap;
}
.bcf-info-col {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding-left: 0.8rem;
}
.bcf-headline {
    font-size: 1.42rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.45;
    margin: 0 0 0.3rem;
    text-shadow: 0 0 18px rgba(255,255,255,0.35);
}
.bcf-highlight { color: var(--accent-primary); }
.bcf-subline { font-size: 0.78rem; color: rgba(255,255,255,0.9); margin: 0; }
.bcf-tags {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.92rem;
    color: rgba(255,255,255,0.9);
    flex-wrap: wrap;
}
.bcf-tags > span { white-space: nowrap; }
.bcf-tags > span.bcf-reg { white-space: normal; min-width: 0; }
.bcf-tag-sep { color: rgba(255,255,255,0.25); }
.bcf-ratings {
    display: flex;
    gap: 1.4rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.75);
    flex-wrap: wrap;
}
.bcf-stars { color: var(--accent-primary); }
.bcf-star-half {
    position: relative;
    display: inline-block;
    color: rgba(255,255,255,0.25);
}
.bcf-star-half::before {
    content: '★';
    position: absolute;
    left: 0;
    top: 0;
    clip-path: inset(0 50% 0 0);
    color: var(--accent-primary);
}
.bcf-cta-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.55rem;
    min-width: 160px;
}
.bcf-stat { text-align: right; }
.bcf-stat-num {
    display: block;
    font-family: 'Gabarito', sans-serif;
    font-size: 1.55rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
}
.bcf-stat-label {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.5);
}
.bcf-cta-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-dark));
    color: #000;
    font-family: 'Gabarito', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    padding: 0.75rem 1.8rem;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 0 10px var(--accent-primary), 0 0 20px rgba(247, 147, 26, 0.4);
    animation: pulse-glow 2s ease-in-out infinite;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.bcf-cta-btn:hover {
    background: linear-gradient(135deg, var(--accent-light), var(--accent-primary));
    animation: none;
    box-shadow: 0 0 25px var(--accent-primary), 0 0 50px rgba(247, 147, 26, 0.7);
    transform: scale(1.06);
}
.bcf-note {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.4);
}
@media (max-width: 768px) {
    .broker-card-featured {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    .bcf-cta-col { align-items: center; }
    .bcf-stat { text-align: center; }
    .bcf-headline { font-size: 1.2rem; }
    .bcf-tags { font-size: 0.78rem; gap: 0.4rem; }
    .bcf-ratings { gap: 0.7rem; font-size: 0.78rem; }
}


.broker-logo {
    height: 50px;
    width: 150px;
    object-fit: contain;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.broker-logo:hover {
    transform: scale(1.1);
}

.broker-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

a.broker-cta-btn, button.broker-cta-btn {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-dark));
    color: #000000;
    border: none;
    padding: 0.6rem 1.4rem;
    border-radius: 8px;
    font-family: 'Gabarito', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 0 10px var(--accent-primary), 0 0 20px rgba(247, 147, 26, 0.4);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 10px var(--accent-primary), 0 0 20px rgba(247, 147, 26, 0.4);
    }
    50% {
        box-shadow: 0 0 20px var(--accent-primary), 0 0 40px rgba(247, 147, 26, 0.6);
    }
}

a.broker-cta-btn:hover, button.broker-cta-btn:hover {
    background: linear-gradient(135deg, var(--accent-light), var(--accent-primary));
    animation: none;
    box-shadow: 0 0 25px var(--accent-primary), 0 0 50px rgba(247, 147, 26, 0.7);
}

.broker-info-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #CCCCCC;
    background: transparent;
    color: #999999;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, color 0.2s;
}

.broker-info-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.broker-info-btn.active {
    border-color: var(--accent-light);
    color: var(--accent-light);
}

.broker-details {
    grid-column: 1;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.broker-details.open {
    max-height: 500px;
    padding-bottom: 1rem;
}

.broker-details p {
    font-size: 0.9rem;
    color: #000000;
    line-height: 1.8;
    padding-left: 0.25rem;
}

.broker-platform-logo {
    height: 80px;
    width: auto;
    transition: transform 0.3s ease, opacity 0.3s ease;
    cursor: pointer;
}

.broker-platform-logo:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.broker-badge {
    height: 80px;
    width: auto;
    transition: transform 0.3s ease, opacity 0.3s ease;
    cursor: pointer;
}

.broker-badge:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

/* ── Broker reviews right column ── */
.broker-reviews-col {
    grid-column: 2;
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.6rem 0 0.6rem 1.1rem;
    border-left: 1px solid rgba(0,0,0,0.08);
    align-self: stretch;
}
.broker-reviews-col-label {
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 0.2rem;
    white-space: nowrap;
}
.broker-rating-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    border-radius: 7px;
    padding: 0.4rem 0.6rem;
    transition: background 0.2s;
}
.broker-rating-item:hover {
    background: rgba(0,0,0,0.05);
}
.broker-rating-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    flex-shrink: 0;
}
.broker-rating-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.broker-rating-name {
    font-size: 0.85rem;
    color: #000;
    white-space: nowrap;
}
.broker-rating-score-row {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.broker-rating-stars {
    font-size: 1.1rem;
    color: var(--accent-primary);
    letter-spacing: 0.01em;
}
.broker-rating-score {
    font-size: 1rem;
    font-weight: 700;
    color: #000;
}
@media (max-width: 600px) {
    .broker-card {
        grid-template-columns: 1fr;
    }
    .broker-reviews-col {
        grid-column: 1;
        grid-row: auto;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        border-left: none;
        border-top: 1px solid rgba(0,0,0,0.08);
        padding: 0.6rem 0 0.25rem;
    }
    .broker-reviews-col-label {
        width: 100%;
    }
}

.broker-badges-row {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    margin-top: 1rem;
    padding-bottom: 1rem;
}

.broker-badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
}

.broker-disclaimer {
    margin-top: 2rem;
    padding: 1rem 1.5rem;
    background: rgba(247, 147, 26, 0.05);
    border-left: 3px solid var(--accent-primary);
    border-radius: 4px;
}

.broker-disclaimer p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Block 7: FAQ Section */
.faq-section {
    padding: 0.5rem 0 2rem;
    background: var(--bg-dark);
}

.faq-container {
    max-width: 900px;
    margin: 2rem auto 0;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s;
}

.faq-item:hover {
    border-color: var(--accent-primary);
}

.faq-question {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: 'Gabarito', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    user-select: none;
}

.faq-question:hover {
    color: var(--accent-primary);
}

.faq-question h3.faq-question-heading {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
    font-family: inherit;
    color: inherit;
    line-height: inherit;
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--accent-primary);
    transition: transform 0.3s;
    min-width: 24px;
    text-align: center;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.faq-item.active .faq-answer {
    max-height: 2000px;
    padding: 0 2rem 1.5rem;
}

.faq-answer p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.faq-answer h4 {
    color: var(--accent-primary);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.6rem;
    letter-spacing: 0.02em;
}

.faq-answer ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0.5rem;
}

.faq-answer ul li {
    color: var(--text-secondary);
    font-size: 0.93rem;
    line-height: 1.8;
    padding-left: 1.2rem;
    position: relative;
}

.faq-answer ul li::before {
    content: '–';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
}

.faq-answer strong {
    font-weight: 500;
    color: var(--text-primary);
}

/* Block 8: Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 2px solid var(--accent-primary);
    padding: 1rem 0 1rem;
}

.footer-content {
    display: flex;
    align-items: flex-start;
    gap: 3rem;
    margin-bottom: 3rem;
}

.region-dropdown {
    position: relative;
}

.region-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.4rem 0.7rem;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.region-dropdown-btn:hover {
    border-color: var(--accent-primary);
}

.region-dropdown-btn img {
    border-radius: 3px;
}

.region-dropdown-btn svg {
    margin-left: 0.2rem;
    transition: transform 0.2s;
}

.region-dropdown.open .region-dropdown-btn svg {
    transform: rotate(180deg);
}

.region-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: #000;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    z-index: 10;
    grid-template-columns: 1fr 1fr;
}

.region-dropdown.open .region-dropdown-menu {
    display: grid;
}

.region-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.7rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.region-option:hover {
    background: #1a1a1a;
    color: var(--text-primary);
}

.region-option.active {
    color: var(--accent-primary);
}

.region-option img {
    border-radius: 3px;
}

/* Region dropdown — search filter enhancement (region-search.v2.js) */
.region-dropdown-menu {
    /* Sticky search box + ~2 rows of countries; the rest scrolls. */
    max-height: 150px;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-behavior: smooth;
    overscroll-behavior: contain;
}
/* Elegant accent scrollbar — Chromium / Edge / Safari */
.region-dropdown-menu::-webkit-scrollbar {
    width: 9px;
}
.region-dropdown-menu::-webkit-scrollbar-track {
    background: transparent;
    margin: 6px 0;
}
.region-dropdown-menu::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-dark));
    border-radius: 999px;
    /* inset the thumb so it reads as a slim pill floating in the track */
    border: 2px solid transparent;
    background-clip: padding-box;
}
.region-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--accent-light), var(--accent-primary));
    background-clip: padding-box;
}
/* Firefox only (Chromium reports false for -moz-appearance, so it keeps the
   richer ::-webkit thumb above). */
@supports (-moz-appearance: none) {
    .region-dropdown-menu {
        scrollbar-width: thin;
        scrollbar-color: var(--accent-primary) transparent;
    }
}
.region-search-wrap {
    grid-column: 1 / -1;
    position: sticky;
    top: 0;
    padding: 0.5rem;
    background: #000;
    border-bottom: 1px solid var(--border-color);
    z-index: 1;
}
.region-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.45rem 0.6rem;
    background: #111;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
}
.region-search-input::placeholder {
    color: var(--text-secondary);
}
.region-search-input:focus {
    border-color: var(--accent-primary);
}
.region-option.region-option--hidden {
    display: none !important;
}
.region-search-empty {
    grid-column: 1 / -1;
    padding: 0.7rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Region dropdown — mobile: single column, fits viewport, taller panel */
@media (max-width: 768px) {
    .region-dropdown-menu {
        grid-template-columns: 1fr;      /* single column so it fits the screen */
        max-height: 220px;               /* compact panel, rest scrolls */
        width: max-content;
        max-width: calc(100vw - 2rem);   /* never overflow the viewport */
    }
    .region-search-wrap,
    .region-search-empty {
        grid-column: auto;               /* single column: no 2-col span needed */
    }
}

.footer-section h3 {
    font-family: 'Gabarito', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.footer-email a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-email a:hover {
    color: var(--accent-primary);
}

.footer-link a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.footer-link a:hover {
    color: var(--accent-primary);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-disclaimer {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.footer-disclaimer strong {
    color: var(--accent-primary);
    font-weight: 700;
}

.footer-copyright {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 1rem;
}

/* Popup Modal */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.popup-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.popup-content {
    background: var(--bg-card);
    border: 2px solid var(--accent-primary);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    position: relative;
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 28px;
    cursor: pointer;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-close:hover {
    color: var(--accent-primary);
}

.popup-title {
    font-family: 'Gabarito', sans-serif;
    font-size: 32px;
    font-weight: 900;
    color: var(--accent-primary);
    margin-bottom: 15px;
    text-align: center;
}

.popup-text {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 30px;
    font-size: 16px;
}

.popup-brokers {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.popup-broker-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-dark));
    color: var(--bg-dark);
    border: none;
    padding: 15px 25px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
}

.popup-broker-btn:hover {
    background: linear-gradient(135deg, var(--accent-light), var(--accent-primary));
}

.popup-broker-shiny {
    position: relative;
    overflow: hidden;
}

.popup-broker-shiny::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent 0%,
        rgba(255, 255, 255, 0) 30%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0) 70%,
        transparent 100%
    );
    animation: shiny-sweep 3s ease-in-out infinite;
}

@keyframes shiny-sweep {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

.popup-broker-logo {
    height: 30px;
    width: auto;
}

/* Capital.com logo in black on the accent button */
.popup-broker-btn[href*="capital.com"] .popup-broker-logo {
    filter: brightness(0);
}

/* Consent Banner */
.consent-banner {
    position: fixed;
    z-index: 10000;
    font-family: 'Gabarito', sans-serif;
}

/* Consent Banner - Simple */
.consent-banner-simple {
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(26, 26, 26, 0.95);
    border-top: 1px solid var(--accent-primary);
    backdrop-filter: blur(10px);
}

.consent-banner-simple .consent-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.consent-text-simple {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.consent-link {
    color: var(--accent-primary);
    text-decoration: underline;
}

.consent-link:hover {
    color: var(--accent-light);
}

.consent-buttons-simple {
    display: flex;
    gap: 0.75rem;
}

.consent-btn-accept-simple,
.consent-btn-deny-simple {
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-family: 'Gabarito', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.consent-btn-accept-simple {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-dark));
    color: #000;
}

.consent-btn-accept-simple:hover {
    background: linear-gradient(135deg, var(--accent-light), var(--accent-primary));
}

.consent-btn-deny-simple {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--text-secondary);
}

.consent-btn-deny-simple:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .nav {
        gap: 1.5rem;
    }

    .widgets-grid {
        gap: 1.5rem;
    }

    .footer-content {
        flex-wrap: wrap;
        gap: 2rem;
    }
}

/* Disable expensive effects on mobile for performance */
@media (max-width: 768px) {
    /* Remove GPU-intensive backdrop blur */
    .header {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(10, 10, 10, 0.98);
    }

    /* Stop continuous animations — biggest TBT contributor on mobile */
    .trade-btn,
    a.broker-cta-btn, button.broker-cta-btn,
    .bcf-cta-btn {
        animation: none;
        box-shadow: 0 0 10px var(--accent-primary), 0 0 20px rgba(247, 147, 26, 0.4);
    }

    .popup-broker-shiny::after {
        animation: none;
        display: none;
    }
}

/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .trade-btn,
    a.broker-cta-btn, button.broker-cta-btn,
    .bcf-cta-btn,
    .popup-broker-shiny::after {
        animation: none;
    }
}

@media (max-width: 768px) {
    .consent-banner-simple .consent-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        text-align: left;
        padding: 0.5rem 0.75rem;
        gap: 0.75rem;
    }

    .consent-text-simple {
        font-size: 0.65rem;
        flex: 1;
        min-width: 0;
    }

    .consent-buttons-simple {
        gap: 0.5rem;
        flex-shrink: 0;
    }

    .consent-btn-accept-simple,
    .consent-btn-deny-simple {
        padding: 0.3rem 0.9rem;
        font-size: 0.71rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .nav {
        flex-wrap: nowrap;
        justify-content: space-between;
        width: 72%;
        gap: 0;
    }

    .nav-link {
        font-size: 1rem;
        white-space: nowrap;
    }

    .main-content {
        margin-top: 55px;
    }

    .chart-section {
        padding: 0.3rem 0 0;
    }

    .chart-container {
        height: 400px;
        padding: 0;
    }

    .header-content {
        padding: 0.8rem 0;
    }

    .trade-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .widgets-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .widgets-grid .widget-wrapper:first-child { order: 2; }
    .widgets-grid .widget-wrapper:last-child  { order: 1; }

    /* Broker responsive */
    .container {
        padding: 0 1rem;
    }

    .broker-list {
        padding: 0.2rem 1rem;
    }

    .broker-logo {
        height: 42px;
        width: auto;
    }

    .broker-name {
        font-size: 1rem;
    }

    a.broker-cta-btn, button.broker-cta-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .broker-info-btn {
        width: 26px;
        height: 26px;
        font-size: 0.75rem;
    }

    .broker-badges-row {
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: flex-start;
    }

    .broker-badge,
    .broker-platform-logo {
        height: 60px;
    }
    
    /* FAQ responsive */
    .faq-question {
        padding: 1.2rem 1.5rem;
        font-size: 1rem;
    }
    
    .faq-item.active .faq-answer {
        padding: 0 1.5rem 1.2rem;
    }
    
    /* Footer responsive */
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .footer {
        padding: 2rem 0 1rem;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.5rem;
    }

    .nav {
        justify-content: space-between;
        width: 72%;
        gap: 0;
    }

    .nav-link {
        font-size: 0.95rem;
        white-space: nowrap;
    }

    .trade-btn {
        font-size: 0.78rem;
        padding: 0.4rem 0.85rem;
    }

    /* Russian CTA text ("Открыть счёт") is longer than other locales — give the
       nav more room and keep the button from shrinking so it isn't clipped. */
    /* Non-English CTA labels are longer than English ("Comenzar a Operar",
       "Começar a Operar", "Начать торговать"). Group the nav items with a fixed
       gap and center them (instead of stretching edge-to-edge with
       space-between) and keep the button from shrinking, so the full label fits
       on narrow phones without clipping or leaving huge gaps on wider ones. */
    html[lang^="es"] .nav,
    html[lang^="pt"] .nav,
    html[lang^="ru"] .nav {
        width: 100%;
        justify-content: center;
        gap: 0.75rem;
    }

    html[lang^="es"] .trade-btn,
    html[lang^="pt"] .trade-btn,
    html[lang^="ru"] .trade-btn {
        flex-shrink: 0;
    }

    /* Russian labels are the longest — tighten sizing a touch so they fit 320px. */
    html[lang^="ru"] .nav-link {
        font-size: 0.85rem;
    }

    html[lang^="ru"] .trade-btn {
        font-size: 0.7rem;
        padding: 0.4rem 0.7rem;
    }

    .header-content {
        padding: 0.6rem 0;
    }

    /* Broker mobile */
    .container {
        padding: 0 0.75rem;
    }

    .broker-list {
        padding: 0.2rem 0.75rem;
    }

    .broker-logo {
        height: 36px;
        width: auto;
    }

    .broker-name {
        font-size: 0.95rem;
    }

    a.broker-cta-btn, button.broker-cta-btn {
        font-size: 0.8rem;
        padding: 0.45rem 0.8rem;
    }

    .broker-info-btn {
        width: 22px;
        height: 22px;
        font-size: 0.7rem;
    }

    .broker-badges-row {
        gap: 0.75rem;
    }

    .broker-badge,
    .broker-platform-logo {
        height: 50px;
    }
    
    /* FAQ mobile */
    .faq-question {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    .faq-icon {
        font-size: 1.3rem;
    }
    
    .faq-answer p {
        font-size: 0.85rem;
    }
    
    .faq-item.active .faq-answer {
        padding: 0 1rem 1rem;
    }
}

/* ===== ANALYTICS SECTION (landing page block4) ===== */
.analytics-list { margin: 1.5rem 0 1rem; }
.analytics-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    gap: 1rem;
}
.analytics-item:last-child { border-bottom: none; }
.analytics-item-featured {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1rem 0;
}
.analytics-item-title {
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.4;
    flex: 1;
}
.analytics-item-featured .analytics-item-title {
    font-size: 1.05rem;
    font-weight: 700;
}
.analytics-item-title:hover { text-decoration: underline; }
.analytics-item-date {
    color: rgba(255,255,255,0.5);
    font-size: 0.8rem;
    white-space: nowrap;
}
.analytics-item-summary {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    border-left: 2px solid var(--accent-primary);
    padding-left: 0.75rem;
    margin-top: 0.25rem;
    position: relative;
    max-height: 11em;
    overflow: hidden;
}
.analytics-item-summary::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4em;
    background: linear-gradient(to bottom, transparent, var(--bg-dark));
    pointer-events: none;
}
.analytics-item-meta {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.35);
    margin-top: -0.2rem;
}
.analytics-takeaways-title {
    display: block;
    color: var(--accent-primary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.2rem;
}
.analytics-takeaways-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.analytics-takeaways-list li {
    padding-left: 1rem;
    position: relative;
}
.analytics-takeaways-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-size: 0.8rem;
}
.analytics-footer { margin: 1rem 0 0; }
.analytics-view-all {
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.9rem;
}
.analytics-view-all:hover { text-decoration: underline; }

/* ===== ANALYTICS INDEX PAGE ===== */
.analytics-index-page { padding: 3rem 0; min-height: 60vh; }
.analytics-index-page h1 { margin-bottom: 2rem; }
.analytics-index-list { list-style: none; padding: 0; }
.analytics-index-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.analytics-index-item a { color: var(--accent-primary); text-decoration: none; }
.analytics-index-item a:hover { text-decoration: underline; }

/* ===== ARTICLE PAGE ===== */
.article-page { padding: 3rem 0; }
.article-breadcrumb { font-size: 0.85rem; color: rgba(255,255,255,0.5); margin-bottom: 1rem; }
.article-breadcrumb a { color: rgba(255,255,255,0.5); text-decoration: none; }
.article-breadcrumb a:hover { color: var(--accent-primary); }
.article-title { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: 0.5rem; }
.article-meta { font-size: 0.85rem; color: rgba(255,255,255,0.5); display: block; margin-bottom: 2rem; }
.article-body { max-width: 780px; line-height: 1.8; font-size: 1rem; margin: 0 auto; }
@media (min-width: 769px) {
  .article-body p { text-align: justify; hyphens: auto; }
}
.article-body h2 { margin-top: 2rem; margin-bottom: 0.75rem; color: var(--accent-primary); }
.article-body h3 { margin-top: 1.5rem; margin-bottom: 0.5rem; }
.article-body ul, .article-body ol { padding-left: 1.5rem; margin: 0.75rem 0; }
.article-body li { margin-bottom: 0.4rem; }
.article-body strong { color: var(--accent-primary); }
.article-body a { color: var(--accent-primary); }
.article-body table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.9rem; }
.article-body th, .article-body td { padding: 0.6rem 0.8rem; border: 1px solid rgba(255,255,255,0.12); text-align: left; }
.article-body th { background: rgba(255,255,255,0.05); color: var(--accent-primary); }
.article-body tr:nth-child(even) { background: rgba(255,255,255,0.02); }
.article-body img { max-width: 100%; height: auto; display: block; margin: 1.5rem auto; border-radius: 10px; border: 1px solid rgba(255,255,255,0.12); box-shadow: 0 4px 24px rgba(0,0,0,0.4); }

/* ===== ARTICLE GIFS ===== */
.article-gifs { margin: 2rem auto; text-align: center; }
.article-gif { display: inline-block; max-width: 480px; width: 100%; }
.article-gif-img { width: 100%; height: auto; border-radius: 10px; border: 1px solid rgba(255,255,255,0.12); display: block; margin: 0 auto; box-shadow: 0 4px 24px rgba(0,0,0,0.4); }

.article-brokers { padding: 3rem 0; border-top: 1px solid rgba(255,255,255,0.1); }
.article-brokers h2 { margin-bottom: 1.5rem; }
.article-page ~ .brokers-section { background: transparent; }

/* ===== COUNTRY CONTEXT (unique locale section) ===== */
.country-context { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.08); }
.country-context h2 { margin-top: 0; }
