/* ========================================
   PriceONN Homepage V2 - Dashboard-Style Widget Layout
   All classes prefixed with hp2- to avoid conflicts
   Relies on CSS variables from main.css
   ======================================== */

/* ========================================
   Widget System
   ======================================== */
.hp2-container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 20px;
}

.hp2-widget {
    background: var(--bg-card, #0f1420);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.hp2-widget:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.hp2-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
    flex-wrap: wrap;
    gap: 8px;
}

.hp2-widget-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary, #fff);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.hp2-widget-title svg {
    width: 16px;
    height: 16px;
    color: var(--accent-teal, #00d4aa);
}

.hp2-widget-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-teal, #00d4aa);
    transition: opacity 0.2s ease;
}

.hp2-widget-link:hover {
    opacity: 0.8;
}

.hp2-widget-body {
    padding: 0;
}

/* Grid layout rows */
.hp2-row {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
}

.hp2-row-2col {
    grid-template-columns: 1fr 360px;
}

.hp2-row-news {
    grid-template-columns: 1fr 360px;
    align-items: stretch;
}

/* ========================================
   Widget: Hero + Ticker
   ======================================== */
.hp2-hero-widget {
    margin-bottom: 16px;
    margin-top: 34px;
}

.hp2-hero {
    display: flex;
    align-items: center;
    padding: 18px 28px 16px;
    position: relative;
    overflow: hidden;
    background: #0a0e1a;
}

/* Mesh Gradient Wave — Layer 1: teal blob drifts left→right */
.hp2-hero::before {
    content: '';
    position: absolute;
    width: 55%;
    height: 450%;
    top: -175%;
    left: -15%;
    background: radial-gradient(ellipse at center, rgba(0, 212, 170, 0.30) 0%, transparent 65%);
    animation: hp2-mesh-drift-1 14s ease-in-out infinite alternate;
    filter: blur(30px);
    will-change: transform;
    pointer-events: none;
    z-index: 0;
}

/* Mesh Gradient Wave — Layer 2: blue+purple blob drifts right→left */
.hp2-hero::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 450%;
    top: -175%;
    right: -10%;
    background:
        radial-gradient(ellipse at 50% 50%, rgba(59, 130, 246, 0.25) 0%, transparent 60%),
        radial-gradient(ellipse at 25% 50%, rgba(139, 92, 246, 0.15) 0%, transparent 55%);
    animation: hp2-mesh-drift-2 18s ease-in-out infinite alternate;
    filter: blur(30px);
    will-change: transform;
    pointer-events: none;
    z-index: 0;
}

@keyframes hp2-mesh-drift-1 {
    0% { transform: translateX(0) scale(1); }
    50% { transform: translateX(65%) scale(1.1); }
    100% { transform: translateX(130%) scale(1); }
}

@keyframes hp2-mesh-drift-2 {
    0% { transform: translateX(0) scale(1); }
    50% { transform: translateX(-55%) scale(1.1); }
    100% { transform: translateX(-110%) scale(1); }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .hp2-hero::before,
    .hp2-hero::after {
        animation: none;
    }
}

.hp2-hero-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.hp2-hero-left {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.hp2-hero-right {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

/* Hero Slider */
.hp2-hero-slider {
    display: grid;
    align-items: center;
    min-height: 100px;
}

.hp2-hero-slide {
    grid-area: 1 / 1;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    pointer-events: none;
}

.hp2-hero-slide.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.hp2-hero-slide h1,
.hp2-hero-slide h2,
.hp2-hero-slide .hp2-hero-h1 {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, #fff, #00d4aa, #3b82f6, #fff);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: hp2-title-gradient 8s ease infinite;
}

@keyframes hp2-title-gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hp2-hero-slide .hp2-hero-subtitle {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-teal, #00d4aa);
    margin-bottom: 8px;
    text-shadow: 0 0 30px rgba(0, 212, 170, 0.3);
}

.hp2-hero-desc {
    font-size: 0.82rem;
    color: var(--text-secondary, #8b95a5);
    line-height: 1.55;
    margin-bottom: 0;
    max-width: 520px;
}

/* Hero Dots */
.hp2-hero-dots {
    display: flex;
    gap: 6px;
    margin: 10px 0 0;
}

.hp2-hero-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    position: relative;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.hp2-hero-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.hp2-hero-dot.active {
    width: 36px;
}

.hp2-hero-dot.active::after {
    width: 22px;
    border-radius: 4px;
    background: var(--accent-teal, #00d4aa);
}

.hp2-hero-dot:hover::after {
    background: rgba(255, 255, 255, 0.4);
}

.hp2-hero-dot.active:hover::after {
    background: var(--accent-teal, #00d4aa);
}

.hp2-hero-cta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hp2-hero-cta .btn-primary,
.hp2-hero-cta .btn-outline {
    white-space: nowrap;
    padding: 10px 24px;
    font-size: 0.9rem;
}

/* Responsive: stack on smaller screens */
@media (max-width: 768px) {
    .hp2-hero-inner {
        flex-direction: column;
        text-align: center;
    }
    .hp2-hero-left {
        text-align: center;
    }
    .hp2-hero-dots {
        justify-content: center;
    }
    .hp2-hero-right {
        align-items: center;
    }
    .hp2-hero-desc {
        margin-left: auto;
        margin-right: auto;
    }
}

.hp2-hero-cta .btn-primary,
.hp2-hero-cta .btn-outline {
    padding: 10px 28px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
}

/* ========================================
   Section: Live Ticker Bar
   ======================================== */
.hp2-ticker {
    background: var(--bg-card, #0f1420);
    border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    overflow: hidden;
    position: relative;
    height: 44px;
}

.hp2-ticker-label {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    padding: 0 14px;
    background: linear-gradient(90deg, var(--bg-card, #0f1420) 80%, transparent);
    z-index: 2;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--accent-teal, #00d4aa);
    gap: 6px;
}

.hp2-ticker-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-teal, #00d4aa);
    border-radius: 50%;
    animation: hp2-pulse 2s infinite;
    box-shadow: 0 0 8px var(--accent-teal, #00d4aa);
}

@keyframes hp2-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.hp2-ticker-track {
    display: flex;
    align-items: center;
    height: 100%;
    animation: hp2-scroll 40s linear infinite;
    padding-left: 72px;
    width: max-content;
}

.hp2-ticker-track:hover {
    animation-play-state: paused;
}

@keyframes hp2-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.hp2-ticker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px;
    white-space: nowrap;
    border-right: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
    height: 100%;
    cursor: pointer;
    transition: background 0.2s ease;
}

.hp2-ticker-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.hp2-ticker-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary, #fff);
}

.hp2-ticker-price {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary, #fff);
}

.hp2-ticker-change {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
}

.hp2-ticker-change.positive {
    color: var(--accent-green, #22c55e);
    background: rgba(34, 197, 94, 0.1);
}

.hp2-ticker-change.negative {
    color: var(--accent-red, #ef4444);
    background: rgba(239, 68, 68, 0.1);
}

/* ========================================
   Widget: Chart
   ======================================== */
.hp2-chart-widget {
    display: flex;
    flex-direction: column;
}

.hp2-chart-widget .hp2-widget-body {
    flex: 1;
    min-height: 480px;
    position: relative;
}

.hp2-chart-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.hp2-chart-symbols {
    display: flex;
    gap: 2px;
    padding: 0 12px;
}

.hp2-chart-sym-btn {
    padding: 8px 12px;
    min-height: 36px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary, #8b95a5);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.hp2-chart-sym-btn:hover {
    color: var(--text-primary, #fff);
}

.hp2-chart-sym-btn.active {
    color: var(--accent-teal, #00d4aa);
    border-bottom-color: var(--accent-teal, #00d4aa);
}

/* ========================================
   Widget: Market Prices (compact list)
   ======================================== */
.hp2-prices-widget .hp2-widget-body {
    max-height: 470px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.hp2-markets-tabs {
    display: flex;
    gap: 2px;
    padding: 0 12px;
    overflow-x: auto;
    scrollbar-width: none;
}

.hp2-markets-tabs::-webkit-scrollbar { display: none; }

.hp2-markets-tab {
    padding: 8px 14px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary, #8b95a5);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.hp2-markets-tab:hover {
    color: var(--text-primary, #fff);
}

.hp2-markets-tab.active {
    color: var(--accent-teal, #00d4aa);
    border-bottom-color: var(--accent-teal, #00d4aa);
}

.hp2-price-row {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.04));
    cursor: pointer;
    transition: background 0.15s ease;
    gap: 10px;
}

.hp2-price-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.hp2-price-row:last-child {
    border-bottom: none;
}

.hp2-price-row.hp2-hidden { display: none; }

.hp2-symbol-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(0, 212, 170, 0.1);
    color: var(--accent-teal, #00d4aa);
    flex-shrink: 0;
}

.hp2-price-info {
    flex: 1;
    min-width: 0;
}

.hp2-symbol-name {
    font-weight: 600;
    color: var(--text-primary, #fff);
    font-size: 13px;
    display: block;
    line-height: 1.2;
}

.hp2-symbol-fullname {
    font-size: 11px;
    color: var(--text-muted, #7b8698);
    display: block;
}

.hp2-price-values {
    text-align: right;
    flex-shrink: 0;
}

.hp2-price {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary, #fff);
    display: block;
    line-height: 1.2;
}

.hp2-change-pct {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    margin-top: 2px;
}

.hp2-change-pct.positive {
    color: var(--accent-green, #22c55e);
    background: rgba(34, 197, 94, 0.1);
}

.hp2-change-pct.negative {
    color: var(--accent-red, #ef4444);
    background: rgba(239, 68, 68, 0.1);
}

.hp2-closed-badge {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-muted, #7b8698);
    background: rgba(255, 255, 255, 0.05);
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 4px;
}

.hp2-view-all {
    display: block;
    text-align: center;
    padding: 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-teal, #00d4aa);
    border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
    transition: background 0.2s ease;
}

.hp2-view-all:hover {
    background: rgba(0, 212, 170, 0.05);
}

/* Price flash animation */
@keyframes hp2-flash-green {
    0% { background: rgba(34, 197, 94, 0.15); }
    100% { background: transparent; }
}

@keyframes hp2-flash-red {
    0% { background: rgba(239, 68, 68, 0.15); }
    100% { background: transparent; }
}

/* Rotating border spin for card hover effect */
@keyframes hp2-card-border-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hp2-flash-up { animation: hp2-flash-green 0.6s ease-out; }
.hp2-flash-down { animation: hp2-flash-red 0.6s ease-out; }

/* ========================================
   Widget: News (featured + grid, random card rotation)
   ======================================== */
.hp2-news-body {
    padding: 0 !important;
}

.hp2-news-view {
    padding: 12px;
}

/* Featured card (first item) */
.hp2-news-featured-card {
    display: block;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
    background: var(--bg-darker, #060810);
    z-index: 0;
}

.hp2-news-featured-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        transparent 0%,
        transparent 15%,
        #00d4aa 25%,
        #00ffcc 30%,
        #00d4aa 35%,
        transparent 45%,
        transparent 100%
    );
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: hp2-card-border-spin 3s linear infinite;
}

.hp2-news-featured-card:hover::before {
    opacity: 0.7;
}

.hp2-news-featured-card::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: var(--bg-darker, #060810);
    border-radius: 8px;
    z-index: 0;
}

.hp2-news-featured-card > * {
    position: relative;
    z-index: 1;
}

.hp2-news-featured-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.hp2-news-featured-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.9) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    color: #fff;
}

.hp2-news-featured-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.hp2-news-featured-overlay .hp2-news-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.hp2-news-featured-overlay .hp2-news-badge.forex { background: rgba(59, 130, 246, 0.4); color: #93bbfd; }
.hp2-news-featured-overlay .hp2-news-badge.crypto { background: rgba(139, 92, 246, 0.4); color: #c4b5fd; }
.hp2-news-featured-overlay .hp2-news-badge.commodities { background: rgba(245, 158, 11, 0.4); color: #fcd34d; }
.hp2-news-featured-overlay .hp2-news-badge.metals { background: rgba(0, 212, 170, 0.4); color: #5eead4; }
.hp2-news-featured-overlay .hp2-news-badge.indices { background: rgba(236, 72, 153, 0.4); color: #f9a8d4; }
.hp2-news-featured-overlay .hp2-news-badge.energy { background: rgba(239, 68, 68, 0.4); color: #fca5a5; }
.hp2-news-featured-overlay .hp2-news-badge.economy { background: rgba(14, 165, 233, 0.4); color: #7dd3fc; }
.hp2-news-featured-overlay .hp2-news-badge.general { background: rgba(255, 255, 255, 0.2); color: #e2e8f0; }

.hp2-news-featured-overlay .hp2-news-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.hp2-news-featured-overlay h3 {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.hp2-news-featured-overlay p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

/* Grid cards (6 items, 3x2) */
.hp2-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.hp2-news-grid-card {
    background: var(--bg-darker, #060810);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    position: relative;
    z-index: 0;
}

.hp2-news-grid-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        transparent 0%,
        transparent 15%,
        #00d4aa 25%,
        #00ffcc 30%,
        #00d4aa 35%,
        transparent 45%,
        transparent 100%
    );
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: hp2-card-border-spin 3s linear infinite;
}

.hp2-news-grid-card:hover::before {
    opacity: 0.7;
}

.hp2-news-grid-card::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: var(--bg-darker, #060810);
    border-radius: 6px;
    z-index: 0;
}

.hp2-news-grid-card > * {
    position: relative;
    z-index: 1;
}

.hp2-news-grid-img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    display: block;
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.08) 0%, rgba(59, 130, 246, 0.08) 100%);
}

.hp2-news-grid-body {
    padding: 8px 10px 10px;
    flex: 1;
}

.hp2-news-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
}

.hp2-news-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.hp2-news-badge.forex { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.hp2-news-badge.crypto { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }
.hp2-news-badge.commodities { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.hp2-news-badge.metals { background: rgba(0, 212, 170, 0.15); color: #00d4aa; }
.hp2-news-badge.indices { background: rgba(236, 72, 153, 0.15); color: #f472b6; }
.hp2-news-badge.general { background: rgba(255, 255, 255, 0.08); color: var(--text-secondary, #8b95a5); }

.hp2-news-time {
    font-size: 10px;
    color: var(--text-muted, #7b8698);
    margin-left: auto;
}

.hp2-news-grid-card h4 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary, #fff);
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hp2-news-grid-card:hover h4 { color: var(--accent-teal, #00d4aa); }

/* News card swap animation */
.hp2-news-featured-card,
.hp2-news-grid-card {
    transition: opacity 0.4s ease, transform 0.2s ease;
}

.hp2-news-card-fade-out {
    opacity: 0 !important;
    transform: translateY(4px) !important;
}

/* ========================================
   Widget: Latest Articles
   ======================================== */
.hp2-articles-widget {
    margin-bottom: 0;
}

.hp2-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 12px;
}

.hp2-article-card {
    background: var(--bg-darker, #060810);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    position: relative;
    z-index: 0;
}

.hp2-article-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        transparent 0%,
        transparent 15%,
        #00d4aa 25%,
        #00ffcc 30%,
        #00d4aa 35%,
        transparent 45%,
        transparent 100%
    );
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: hp2-card-border-spin 3s linear infinite;
}

.hp2-article-card:hover::before {
    opacity: 0.7;
}

.hp2-article-card::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: var(--bg-darker, #060810);
    border-radius: 8px;
    z-index: 0;
}

.hp2-article-card > * {
    position: relative;
    z-index: 1;
}

.hp2-article-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.hp2-article-img-placeholder {
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.08) 0%, rgba(59, 130, 246, 0.08) 100%);
}

.hp2-article-body {
    padding: 12px 14px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hp2-article-body h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary, #fff);
    line-height: 1.4;
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hp2-article-card:hover h4 {
    color: var(--accent-teal, #00d4aa);
}

.hp2-article-excerpt {
    font-size: 11px;
    color: var(--text-secondary, #8b95a5);
    line-height: 1.45;
    margin: 0 0 auto;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding-bottom: 10px;
}

.hp2-article-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.hp2-article-author-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.hp2-article-author-initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-primary, #00d4aa);
    color: #000;
    font-size: 10px;
    font-weight: 700;
}

.hp2-article-author-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary, #fff);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

.hp2-article-meta {
    font-size: 10px;
    color: var(--text-muted, #7b8698);
    margin-left: auto;
    white-space: nowrap;
}

/* ========================================
   Widget: Community Sidebar
   ======================================== */
.hp2-community-widget {
    display: flex;
    flex-direction: column;
}

.hp2-community-widget .hp2-widget-body {
    padding: 8px 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hp2-post-card {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.04));
    transition: background 0.15s ease, opacity 0.4s ease, transform 0.4s ease;
    opacity: 1;
    transform: translateY(0);
}

.hp2-post-card-fade-out {
    opacity: 0 !important;
    transform: translateY(4px) !important;
}

.hp2-post-card:hover {
    background: rgba(255, 255, 255, 0.02);
}

.hp2-post-card:last-child {
    border-bottom: none;
}

.hp2-post-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-darker, #060810);
}

.hp2-post-body {
    flex: 1;
    min-width: 0;
}

.hp2-post-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.hp2-post-user {
    font-weight: 600;
    font-size: 12px;
    color: var(--text-primary, #fff);
}

.hp2-post-symbol {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 3px;
    background: rgba(0, 212, 170, 0.1);
    color: var(--accent-teal, #00d4aa);
}

.hp2-post-time {
    font-size: 11px;
    color: var(--text-muted, #7b8698);
    margin-left: auto;
}

.hp2-post-text {
    font-size: 12px;
    color: var(--text-secondary, #8b95a5);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hp2-post-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--text-muted, #7b8698);
    margin-top: 4px;
}

.hp2-post-meta span {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* ========================================
   Widget: Columnists / Authors
   ======================================== */
.hp2-authors-widget {
    margin-bottom: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hp2-authors-list {
    display: flex;
    gap: 0;
    flex-direction: column;
    flex: 1;
}

.hp2-author-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.hp2-author-card:last-child {
    border-bottom: none;
}

.hp2-author-card:hover {
    background: rgba(0, 212, 170, 0.04);
}

.hp2-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.08);
}

.hp2-author-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 170, 0.1);
    color: var(--accent-teal, #00d4aa);
    font-weight: 700;
    font-size: 16px;
}

.hp2-author-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hp2-author-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary, #fff);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hp2-author-expertise {
    font-size: 0.75rem;
    color: var(--text-secondary, #8b95a5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hp2-author-stars {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 1px;
    color: #f5a623;
}
.hp2-author-stars svg {
    width: 13px;
    height: 13px;
}

/* ========================================
   Section: Features (horizontal strip)
   ======================================== */
.hp2-features {
    padding: 0;
    margin-bottom: 16px;
}

.hp2-features-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.hp2-feature-mini {
    background: var(--bg-card, #0f1420);
    border: none;
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
    position: relative;
    z-index: 0;
    overflow: hidden;
}

.hp2-feature-mini::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        transparent 0%,
        transparent 15%,
        #00d4aa 25%,
        #00ffcc 30%,
        #00d4aa 35%,
        transparent 45%,
        transparent 100%
    );
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: hp2-card-border-spin 3s linear infinite;
}

.hp2-feature-mini:hover::before {
    opacity: 0.7;
}

.hp2-feature-mini::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: var(--bg-card, #0f1420);
    border-radius: 10px;
    z-index: 0;
}

.hp2-feature-mini > * {
    position: relative;
    z-index: 1;
}

.hp2-feature-icon {
    width: 42px;
    height: 42px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(0, 212, 170, 0.1);
    color: var(--accent-teal, #00d4aa);
}

.hp2-feature-icon svg {
    width: 20px;
    height: 20px;
}

.hp2-feature-mini h3 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary, #fff);
    margin-bottom: 4px;
}

.hp2-feature-mini p {
    font-size: 11px;
    color: var(--text-secondary, #8b95a5);
    line-height: 1.4;
}

/* ========================================
   Section: Reviews
   ======================================== */
.hp2-reviews {
    margin-bottom: 16px;
}

.hp2-reviews-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.hp2-review-card {
    background: var(--bg-card, #0f1420);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    border-radius: 12px;
    padding: 20px;
}

.hp2-review-stars {
    color: #f59e0b;
    font-size: 13px;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.hp2-review-text {
    font-size: 13px;
    color: var(--text-secondary, #8b95a5);
    line-height: 1.5;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hp2-review-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hp2-review-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-darker, #060810);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-teal, #00d4aa);
}

.hp2-review-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary, #fff);
}

.hp2-review-country {
    font-size: 11px;
    color: var(--text-muted, #7b8698);
}

.hp2-review-verified {
    font-size: 10px;
    color: var(--accent-teal, #00d4aa);
    margin-left: 4px;
}

/* ========================================
   Section: CTA
   ======================================== */
/* ========================================
   Section: Bottom Hero + Market Tracker
   ======================================== */
.hp2-bottom-hero {
    position: relative;
    overflow: hidden;
    border: none;
}

.hp2-bottom-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.08) 0%, rgba(59, 130, 246, 0.06) 25%, rgba(0, 212, 170, 0.04) 50%, rgba(59, 130, 246, 0.08) 75%, rgba(0, 212, 170, 0.06) 100%);
    background-size: 300% 300%;
    animation: hp2-bg-shift 12s ease infinite;
}

.hp2-bottom-hero-inner {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 32px 24px 24px;
}

.hp2-bottom-hero-note {
    font-size: 12px;
    color: var(--text-muted, #7b8698);
    margin-top: 12px;
}

/* Terminal Widget */
.hp2-terminal {
    max-width: 640px;
    margin: 0 auto 24px;
    border-radius: 10px;
    overflow: hidden;
    background: #080c14;
    border: 1px solid rgba(0, 212, 170, 0.15);
    text-align: left;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 60px rgba(0, 212, 170, 0.04);
}

.hp2-terminal-header {
    background: #111827;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hp2-terminal-dots {
    display: flex;
    gap: 6px;
}

.hp2-terminal-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.hp2-dot-red { background: #ff5f56; }
.hp2-dot-yellow { background: #ffbd2e; }
.hp2-dot-green { background: #27c93f; }

.hp2-terminal-title {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

.hp2-terminal-body {
    padding: 16px 18px;
    min-height: 240px;
    max-height: 280px;
    overflow: hidden;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 12.5px;
    line-height: 1.7;
    color: #c8d0dc;
}

.hp2-terminal-line {
    white-space: pre;
    opacity: 0;
    animation: hp2-line-appear 0.15s ease forwards;
}

.hp2-term-cmd { color: #00d4aa; font-weight: 600; }
.hp2-term-dim { color: #4a5568; }
.hp2-term-title { color: #ffffff; font-weight: 700; }
.hp2-term-warn { color: #f59e0b; }
.hp2-term-green { color: #22c55e; }
.hp2-term-red { color: #ef4444; }
.hp2-term-buy { color: #22c55e; font-weight: 700; font-size: 13px; }
.hp2-term-sell { color: #ef4444; font-weight: 700; font-size: 13px; }
.hp2-term-neutral { color: #f59e0b; font-weight: 700; font-size: 13px; }
.hp2-term-progress { color: #00d4aa; }

.hp2-terminal-cursor {
    display: inline-block;
    color: #00d4aa;
    animation: hp2-blink 1s step-end infinite;
    font-weight: 400;
}

@keyframes hp2-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes hp2-line-appear {
    from { opacity: 0; transform: translateX(-4px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Market Session Tracker Marquee */
.hp2-market-tracker {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    height: 40px;
    background: rgba(0, 0, 0, 0.25);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.hp2-market-tracker-label {
    background: linear-gradient(135deg, #00d4aa, #3b82f6);
    color: white;
    padding: 0 14px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    flex-shrink: 0;
    white-space: nowrap;
}

.hp2-market-tracker-content {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.hp2-market-tracker-track {
    display: inline-flex;
    align-items: center;
    animation: hp2-market-scroll 60s linear infinite;
    white-space: nowrap;
    height: 40px;
}

.hp2-market-tracker-track:hover {
    animation-play-state: paused;
}

@keyframes hp2-market-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.hp2-market-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px;
    height: 40px;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.hp2-market-card:hover {
    background: rgba(255, 255, 255, 0.03);
}

.hp2-market-flag {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    object-fit: cover;
    flex-shrink: 0;
}

.hp2-market-info {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.hp2-market-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary, #fff);
    line-height: 1.3;
}

.hp2-market-index {
    font-size: 9px;
    color: var(--text-muted, #7b8698);
    line-height: 1.3;
}

.hp2-market-status {
    display: flex;
    align-items: center;
    gap: 5px;
}

.hp2-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.hp2-status-dot.open {
    background: var(--accent-green, #22c55e);
    box-shadow: 0 0 6px var(--accent-green, #22c55e);
    animation: hp2-pulse-green 2s ease-in-out infinite;
}

.hp2-status-dot.closed {
    background: var(--text-muted, #7b8698);
}

@keyframes hp2-pulse-green {
    0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--accent-green, #22c55e); }
    50% { opacity: 0.5; box-shadow: 0 0 12px var(--accent-green, #22c55e); }
}

.hp2-status-text {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.hp2-status-text.open { color: var(--accent-green, #22c55e); }
.hp2-status-text.closed { color: var(--text-muted, #7b8698); }

.hp2-market-countdown {
    font-size: 10px;
    color: var(--text-secondary, #8b95a5);
    font-family: 'SF Mono', 'Fira Code', monospace;
    opacity: 0.7;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
    .hp2-row-2col { grid-template-columns: 1fr 320px; }
    .hp2-row-news { grid-template-columns: 1fr 320px; }
    .hp2-hero h1 { font-size: 2rem; }
}

@media (max-width: 768px) {
    .hp2-hero {
        padding: 32px 16px 20px;
    }
    .hp2-hero-widget {
        margin-top: 70px;
    }
    .hp2-hero h1 { font-size: 1.6rem; }
    .hp2-hero-subtitle { font-size: 0.9rem; }

    .hp2-container { padding: 0 12px; }
    .hp2-row { gap: 12px; margin-bottom: 12px; }
    .hp2-row-2col { grid-template-columns: 1fr; }
    .hp2-row-news { grid-template-columns: 1fr; }

    .hp2-ticker { height: 40px; }
    .hp2-ticker-track { animation-duration: 30s; }

    .hp2-chart-widget .hp2-widget-body { min-height: 320px; }
    .hp2-row-news { grid-template-columns: 1fr; }

    .hp2-symbol-fullname { display: none; }

    .hp2-news-grid { grid-template-columns: repeat(2, 1fr); }
    .hp2-news-grid-img { height: 80px; }

    .hp2-articles-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .hp2-article-img { height: 110px; }

    .hp2-features-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .hp2-reviews-row { grid-template-columns: 1fr; }

    .hp2-bottom-hero-inner { padding: 28px 16px 24px; }
    .hp2-bottom-hero-inner h2 { font-size: 1.2rem; }
    .hp2-market-tracker-label { padding: 0 10px; font-size: 9px; }
    .hp2-market-card { padding: 0 14px; gap: 6px; }
}

@media (max-width: 480px) {
    .hp2-hero h1 { font-size: 1.3rem; }
    .hp2-features-row { grid-template-columns: 1fr; }
    .hp2-hero-cta { flex-direction: column; align-items: center; }
    .hp2-articles-grid { grid-template-columns: 1fr; }
}
