/* AlpharvestPro Homepage - Fully Responsive Version */

/* ========================================
   1. Base Mobile-First Styles
   ======================================== */
* {
    box-sizing: border-box;
}

.alpharvest-main-wrapper {
    background: #FFFFFF;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ========================================
   2. Masthead - Responsive
   ======================================== */
.alpharvest-masthead-section {
    padding: 20px 0;
    text-align: center;
    border-bottom: 3px double #121212;
    background: white;
}

.masthead {
    font-family: 'UnifrakturMaguntia', 'Old English Text MT', Georgia, serif;
    font-size: clamp(2rem, 8vw, 5rem); /* Responsive font size */
    font-weight: 400;
    color: #000000;
    margin-bottom: 10px;
    letter-spacing: 1px;
    text-shadow: 1px 1px 0px rgba(0,0,0,0.1);
    word-wrap: break-word;
}

.tagline {
    font-size: clamp(0.8rem, 2vw, 1rem);
    color: #666;
    font-style: italic;
    font-family: 'Georgia', serif;
    padding: 0 10px;
}

/* ========================================
   3. Navigation - Mobile Responsive
   ======================================== */
.alpharvest-nav-section {
    background: #FAFAFA;
    border-bottom: 1px solid #E2E2E2;
    position: sticky;
    top: 0;
    z-index: 100;
}

.alpharvest-nav-menu {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

.alpharvest-nav-menu li {
    border-right: 1px solid #E2E2E2;
    flex: 1 1 auto;
    min-width: 0;
}

.alpharvest-nav-menu li:last-child {
    border-right: none;
}

.alpharvest-nav-menu a {
    display: block;
    padding: 12px 10px;
    color: #121212;
    text-decoration: none;
    font-weight: 500;
    font-size: clamp(0.75rem, 2vw, 1rem);
    transition: all 0.3s ease;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========================================
   4. Breaking News - Responsive
   ======================================== */
.alpharvest-breaking-news {
    background: #BD0017;
    color: white;
    padding: 10px 0;
    overflow: hidden;
}

.news-label {
    font-weight: bold;
    margin-right: 10px;
    font-size: clamp(0.8rem, 2vw, 1rem);
}

.news-ticker {
    font-size: clamp(0.8rem, 2vw, 1rem);
    display: inline-block;
}

/* ========================================
   5. Content Sections - Mobile First
   ======================================== */
.alpharvest-main-content {
    padding: 20px 0;
    background: #FFFFFF;
}

.market-analysis-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.content-section {
    background: #F7F7F7;
    padding: 20px;
    border: 1px solid #E2E2E2;
}

.section-title {
    font-size: clamp(1.3rem, 4vw, 2rem);
    margin-bottom: 15px;
    color: #121212;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Georgia', serif;
    flex-wrap: wrap;
}

/* ========================================
   6. Report Cards - Responsive Grid
   ======================================== */
.report-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.report-card {
    background: white;
    padding: 15px;
    border: 1px solid #E2E2E2;
    transition: all 0.3s ease;
}

.report-card h3 {
    font-size: clamp(1rem, 3vw, 1.2rem);
    margin-bottom: 8px;
    color: #121212;
}

.report-stats {
    color: #666;
    font-size: clamp(0.85rem, 2vw, 0.95rem);
}

.report-stats strong {
    color: #326891;
    font-size: 1.2em;
}

/* ========================================
   7. Momentum Dashboard - Responsive
   ======================================== */
.momentum-section {
    background: linear-gradient(135deg, #1A1A1A 0%, #2C2C2C 100%);
    padding: 20px;
    border-radius: 4px;
    margin-top: 20px;
}

.momentum-title {
    color: #FFD700;
    font-size: clamp(1rem, 3vw, 1.4rem);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.momentum-metrics {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.metric-card {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 15px;
    text-align: center;
    border-radius: 4px;
}

.metric-card h4 {
    font-size: clamp(0.75rem, 2vw, 0.85rem);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #FFD700;
}

.metric-value {
    color: white;
    font-size: clamp(1.5rem, 5vw, 2rem);
    font-weight: bold;
    margin: 8px 0;
}

.metric-subtext {
    color: #ccc;
    font-size: clamp(0.7rem, 1.5vw, 0.8rem);
}

/* ========================================
   8. Metric Definition - Responsive
   ======================================== */
.metric-definition {
    background: #F0F8FF;
    padding: 15px;
    margin: 20px 0;
    border-left: 4px solid #326891;
}

.metric-definition h4 {
    color: #326891;
    margin-bottom: 12px;
    font-size: clamp(1rem, 3vw, 1.2rem);
}

.metric-definition ul {
    list-style: none;
    padding-left: 0;
}

.metric-definition li {
    margin: 10px 0;
    padding-left: 20px;
    position: relative;
    line-height: 1.5;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
}

/* ========================================
   9. TradingView Section - Responsive
   ======================================== */
.tradingview-section {
    margin-top: 30px;
    background: white;
    padding: 20px;
}

.section-description {
    color: #666;
    margin-bottom: 15px;
    font-style: italic;
    font-size: clamp(0.8rem, 2vw, 1rem);
}

.tradingview-widget-container {
    width: 100%;
    height: 400px;
    background: #f8f8f8;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    margin: 15px 0;
    overflow: hidden;
}

.heatmap-guide {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 15px;
}

.guide-item {
    text-align: center;
    padding: 12px;
    background: white;
    border: 1px solid #e0e0e0;
}

.guide-item h4 {
    color: #326891;
    margin-bottom: 5px;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.guide-item p {
    color: #666;
    font-size: clamp(0.75rem, 2vw, 0.9rem);
}

/* ========================================
   10. Language Switcher - Mobile
   ======================================== */
.language-switcher {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 99999;
    display: flex;
    gap: 8px;
    background: white;
    padding: 4px;
    border-radius: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.lang-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 20px;
    background: white;
    transition: all 0.3s ease;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   11. Flag Icons - Responsive
   ======================================== */
.flag-icon, .flag-img, .flag-emoji {
    width: clamp(20px, 4vw, 32px);
    height: auto;
    vertical-align: middle;
    margin-right: 5px;
}

/* ========================================
   12. TABLET STYLES (min-width: 576px)
   ======================================== */
@media (min-width: 576px) {
    .container {
        padding: 0 20px;
    }
    
    .alpharvest-masthead-section {
        padding: 30px 0;
    }
    
    .report-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .momentum-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .heatmap-guide {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tradingview-widget-container {
        height: 500px;
    }
}

/* ========================================
   13. DESKTOP STYLES (min-width: 768px)
   ======================================== */
@media (min-width: 768px) {
    .market-analysis-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .momentum-metrics {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .heatmap-guide {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .tradingview-widget-container {
        height: 600px;
    }
    
    .language-switcher {
        top: 20px;
        right: 20px;
        padding: 5px;
        gap: 10px;
    }
    
    .lang-btn {
        width: 45px;
        height: 45px;
        font-size: 24px;
    }
    
    .content-section {
        padding: 30px;
    }
    
    .alpharvest-nav-menu a {
        padding: 15px 20px;
    }
}

/* ========================================
   14. LARGE DESKTOP (min-width: 992px)
   ======================================== */
@media (min-width: 992px) {
    .report-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* ========================================
   15. Hide/Show Language Content
   ======================================== */
.en-content {
    display: none;
}

.ja-content {
    display: inline-block;
}

body.show-english .en-content {
    display: inline-block;
}

body.show-english .ja-content {
    display: none;
}

/* ========================================
   16. Mobile Menu Toggle (if needed)
   ======================================== */
@media (max-width: 575px) {
    .alpharvest-nav-menu {
        flex-direction: column;
    }
    
    .alpharvest-nav-menu li {
        border-right: none;
        border-bottom: 1px solid #E2E2E2;
        width: 100%;
    }
    
    .alpharvest-nav-menu li:last-child {
        border-bottom: none;
    }
    
    /* Adjust news ticker for mobile */
    .news-ticker {
        animation: none;
        display: block;
        padding: 0 10px;
    }
    
    /* Stack flag and text on mobile */
    .section-title {
        justify-content: center;
        text-align: center;
    }
}

/* ========================================
   17. Prevent Horizontal Scroll
   ======================================== */
html, body {
    overflow-x: hidden;
    width: 100%;
}

/* ========================================
   18. Touch-Friendly Buttons
   ======================================== */
@media (hover: none) and (pointer: coarse) {
    .lang-btn,
    .alpharvest-nav-menu a,
    .report-card {
        -webkit-tap-highlight-color: rgba(50, 104, 145, 0.2);
    }
    
    .report-card:active {
        transform: scale(0.98);
    }
}
/* Report Link Buttons */
.view-reports-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 16px;
    background: #326891;
    color: white !important;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.view-reports-btn:hover {
    background: #254a6d;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-primary {
    display: inline-block;
    padding: 10px 20px;
    background: #326891;
    color: white !important;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #254a6d;
    transform: translateY(-2px);
}

/* Mobile responsive for new elements */
@media (max-width: 768px) {
    .view-reports-btn {
        display: block;
        text-align: center;
        margin-top: 10px;
    }
    
    .btn-primary {
        display: block;
        width: 100%;
        text-align: center;
    }
}
