/* ═══════════════════════════════════════════════════
   FXDetails Homepage v6.0.0
   ForexFactory-Inspired: Hero, Chart, Homepage Grid
   ═══════════════════════════════════════════════════ */

/* ── Hero Section ── */
.fxd-hero-section {
    max-width: var(--fx-max-width);
    margin: var(--fx-sp-3) auto 0;
    padding: 0 var(--fx-sp-4);
}

.fxd-hero-inner {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: var(--fx-gap);
    min-height: 280px;
}

.fxd-hero-card,
.fxd-hero-side-card {
    display: block;
    position: relative;
    border-radius: var(--fx-radius);
    overflow: hidden;
    text-decoration: none;
    color: #0f172a;
    border: 1px solid var(--fx-border);
}

.fxd-hero-card {
    height: 100%;
}

.fxd-hero-card:hover,
.fxd-hero-side-card:hover {
    text-decoration: none;
    color: #0f172a;
    border-color: var(--fx-border-accent);
}

.fxd-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fxd-hero-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e2e8f0 0%, #f1f5f9 50%, #e2e8f0 100%);
}

.fxd-hero-icon {
    opacity: 0.12;
    color: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fxd-hero-icon svg {
    width: 48px;
    height: 48px;
    stroke: currentColor;
}

.fxd-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.7) 60%, transparent 100%);
}

.fxd-hero-cat {
    display: inline-block;
    padding: 3px 8px;
    background: #3d6b1a;   /* darker green — white text ≥4.5:1 (was --fx-accent, 2.3:1) */
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 2px;
    margin-bottom: 8px;
}

.fxd-hero-title {
    font-size: var(--fx-font-xl);
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 6px;
    color: #0f172a;
    font-family: var(--fx-font);
}

.fxd-hero-excerpt {
    font-size: var(--fx-font-sm);
    color: rgba(0, 0, 0, 0.7);
    margin: 0 0 6px;
    line-height: 1.4;
}

.fxd-hero-date {
    font-size: var(--fx-font-xs);
    color: rgba(0, 0, 0, 0.5);
}

.fxd-hero-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--fx-gap);
}

.fxd-hero-side-card {
    flex: 1;
    min-height: 132px;
}

.fxd-hero-side-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fxd-hero-side-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.6) 70%, transparent 100%);
}

.fxd-hero-side-title {
    font-size: var(--fx-font-sm);
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
    color: #0f172a;
    font-family: var(--fx-font);
}

/* ── Chart Section ── */
.fxd-chart-section,
.fxd-econ-section {
    margin: var(--fx-sp-3) auto 0;
    max-width: var(--fx-max-width);
    padding: 0 var(--fx-sp-4);
}

.fxd-chart-panel {
    border-radius: var(--fx-radius);
    overflow: hidden;
    background: var(--fx-bg-panel);
    border: 1px solid var(--fx-border);
}

/* ── Sidebar widgets on homepage ── */
.fxd-sidebar-widget {
    border-radius: var(--fx-radius);
    overflow: hidden;
    margin-bottom: var(--fx-gap);
    background: var(--fx-bg-panel);
    border: 1px solid var(--fx-border);
}

.fxd-sidebar-widget .fx-panel-header {
    font-size: var(--fx-font-xs);
    padding: 8px 12px;
}

.fxd-sidebar-widget .tradingview-widget-container {
    border: none;
}

.fxd-sidebar-widget>h3 {
    display: none;
}

/* ── Quick Tools Strip ── */
.fxd-quick-tools {
    max-width: var(--fx-max-width);
    margin: var(--fx-sp-3) auto 0;
    padding: 0 var(--fx-sp-4);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--fx-gap);
}

.fxd-quick-tool-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--fx-bg-panel);
    border: 1px solid var(--fx-border);
    border-radius: var(--fx-radius);
    text-decoration: none;
    color: var(--fx-text);
    transition: border-color var(--fx-transition), background var(--fx-transition);
}

.fxd-quick-tool-card:hover {
    border-color: var(--fx-accent);
    background: var(--fx-bg-hover);
    text-decoration: none;
    color: var(--fx-text);
}

.fxd-qt-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--fx-accent-light);
    border-radius: var(--fx-radius);
    color: var(--fx-accent);
}

.fxd-quick-tool-card:hover .fxd-qt-icon {
    background: var(--fx-accent);
    color: #fff;
}

.fxd-qt-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.fxd-qt-text strong {
    font-size: var(--fx-font-sm);
    font-weight: 700;
    color: var(--fx-text-heading);
    line-height: 1.3;
}

.fxd-qt-text span {
    font-size: var(--fx-font-xs);
    color: var(--fx-text-muted);
    line-height: 1.3;
}

.fxd-qt-arrow {
    flex-shrink: 0;
    color: var(--fx-text-muted);
    opacity: 0;
    transition: opacity var(--fx-transition);
}

.fxd-quick-tool-card:hover .fxd-qt-arrow {
    opacity: 1;
    color: var(--fx-accent);
}

/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */

@media (max-width: 768px) {

    .fxd-hero-section,
    .fxd-chart-section,
    .fxd-econ-section,
    .fxd-quick-tools {
        padding: 0 var(--fx-sp-2);
    }

    .fxd-quick-tools {
        grid-template-columns: 1fr;
    }

    .fxd-hero-inner {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .fxd-hero-card {
        min-height: 200px;
    }

    .fxd-hero-sidebar {
        flex-direction: row;
    }

    .fxd-hero-side-card {
        min-height: 120px;
    }

    .fxd-hero-title {
        font-size: var(--fx-font-lg);
    }
}

@media (max-width: 600px) {
    .fxd-hero-card {
        min-height: 170px;
    }

    .fxd-hero-sidebar {
        flex-direction: column;
    }

    .fxd-hero-side-card {
        min-height: 100px;
    }

    .fxd-hero-title {
        font-size: var(--fx-font-md);
    }

    .fxd-hero-overlay {
        padding: 14px;
    }
}