/* Modern Homepage Design - MarketsHost 2025 */

/* Color Variables */
:root {
    --primary-blue: #1a365d;
    --secondary-gray: #2d3748;
    --gold-accent: #f6ad55;
    --success-green: #48bb78;
    --danger-red: #f56565;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --text-primary: #1a202c;
    --text-secondary: #718096;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.1);
}

/* Market Ticker Styles */
.market-ticker {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-gray) 100%);
    color: white;
    padding: 10px 0;
    overflow: hidden;
    position: relative;
    border-bottom: 3px solid var(--gold-accent);
}

.ticker-content {
    display: flex;
    animation: scroll-left 30s linear infinite;
    white-space: nowrap;
}

.ticker-item {
    padding: 0 30px;
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
}

.ticker-label {
    margin-right: 8px;
    opacity: 0.9;
}

.ticker-value {
    font-weight: 700;
    margin-right: 8px;
}

.ticker-change {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.ticker-change.positive {
    background: var(--success-green);
    color: white;
}

.ticker-change.negative {
    background: var(--danger-red);
    color: white;
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Gold Price Widget */
.gold-price-widget {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.gold-price-widget::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(246,173,85,0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.3; }
}

.gold-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.gold-widget-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
}

.gold-icon {
    font-size: 24px;
    margin-right: 8px;
}

.gold-current-price {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.gold-price-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.gold-price-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-blue);
}

.gold-price-change {
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
}

.gold-price-change.up {
    background: var(--success-green);
    color: white;
}

.gold-price-change.down {
    background: var(--danger-red);
    color: white;
}

.gold-price-types {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.gold-type-item {
    text-align: center;
    padding: 8px;
    background: rgba(255,255,255,0.5);
    border-radius: 6px;
}

.gold-type-label {
    font-size: 12px;
    color: var(--text-secondary);
    display: block;
}

.gold-type-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-blue);
}

.gold-city-selector {
    margin-top: 15px;
    position: relative;
    z-index: 1;
}

.city-tabs {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.city-tab {
    padding: 6px 12px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
}

.city-tab:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
}

.city-tab.active {
    background: var(--primary-blue);
    color: white;
}

.gold-view-more {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: 15px;
    background: var(--primary-blue);
    color: white;
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.gold-view-more:hover {
    background: var(--secondary-gray);
    transform: translateY(-2px);
}

/* Bento Grid Layout */
.homepage-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.bento-grid {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

/* Hero Section */
.hero-section {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.featured-article {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.featured-article:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.featured-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.featured-content {
    padding: 20px;
}

.featured-category {
    color: var(--gold-accent);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.featured-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 10px 0;
    line-height: 1.3;
}

.featured-meta {
    display: flex;
    gap: 15px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Secondary Stories Grid */
.secondary-stories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.story-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.story-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.story-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.story-content {
    padding: 15px;
}

.story-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.story-time {
    color: var(--text-secondary);
    font-size: 12px;
}

/* Category Sections */
.category-sections {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 30px;
}

.category-block {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gold-accent);
}

.category-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-blue);
}

.category-more {
    color: var(--gold-accent);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.category-more:hover {
    color: var(--primary-blue);
}

.category-articles {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.category-article-item {
    display: flex;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s ease;
}

.category-article-item:hover {
    background: var(--bg-light);
    margin: 0 -10px;
    padding: 10px;
}

.category-article-item:last-child {
    border-bottom: none;
}

.category-article-image {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.category-article-content {
    flex: 1;
}

.category-article-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
    line-height: 1.3;
}

.category-article-time {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Enhanced Navigation */
.modern-nav {
    background: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-link.gold-highlight {
    color: var(--gold-accent);
}

.nav-link.gold-highlight::after {
    content: '🏆';
    position: absolute;
    top: -10px;
    right: -15px;
    font-size: 12px;
}

.nav-search {
    display: flex;
    align-items: center;
    background: var(--bg-light);
    border-radius: 8px;
    padding: 8px 15px;
}

.nav-search input {
    border: none;
    background: none;
    outline: none;
    width: 200px;
    font-size: 14px;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-section {
        grid-template-columns: 1fr;
    }
    
    .secondary-stories {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .category-sections {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .market-ticker {
        font-size: 12px;
    }
    
    .ticker-item {
        padding: 0 15px;
    }
    
    .hero-section {
        grid-template-columns: 1fr;
    }
    
    .featured-image {
        height: 200px;
    }
    
    .featured-title {
        font-size: 20px;
    }
    
    .secondary-stories {
        grid-template-columns: 1fr;
    }
    
    .gold-price-widget {
        padding: 15px;
        margin-top: 20px;
    }
    
    .gold-price-value {
        font-size: 24px;
    }
    
    .gold-price-types {
        grid-template-columns: 1fr;
    }
    
    .city-tabs {
        justify-content: center;
    }
    
    .nav-menu {
        display: none !important;
    }
    
    .mobile-menu-btn {
        display: block !important;
    }
    
    .nav-container {
        justify-content: space-between;
    }
    
    .nav-search {
        display: none;
    }
    
    .homepage-container {
        padding: 10px;
    }
    
    .category-article-item {
        flex-direction: column;
    }
    
    .category-article-image {
        width: 100%;
        height: 150px;
    }
}

/* Loading Animation */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--gold-accent);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Smooth Transitions */
* {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Hover Effects */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.02);
}