/*
Theme Name: AlpharvestPro Extra Child
Theme URI: https://your-domain.com
Description: Custom child theme for AlpharvestPro momentum trading platform built on Extra
Author: Your Name
Author URI: https://your-domain.com
Template: extra
Version: 1.0.0
Text Domain: extra-alpharvest
License: GPL v2 or later
*/

/* ==========================================================================
   Custom Styles for AlpharvestPro
   ========================================================================== */

/* ==========================================================================
   1. Google Fonts Import
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=UnifrakturMaguntia&display=swap');

/* ==========================================================================
   2. CSS Variables for Easy Customization
   ========================================================================== */
:root {
    --alpharvest-primary: #326891;
    --alpharvest-gold: #FFD700;
    --alpharvest-dark: #1a1a1a;
    --alpharvest-gradient: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 100%);
    --alpharvest-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* ==========================================================================
   3. Language System - Bilingual Content Display
   ========================================================================== */
.ja-content { 
    display: inline-block; 
}

.en-content { 
    display: none; 
}

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

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

/* ==========================================================================
   4. Language Switcher Component
   ========================================================================== */
.language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    gap: 10px;
    background: white;
    padding: 5px;
    border-radius: 25px;
    box-shadow: var(--alpharvest-shadow);
    transition: box-shadow 0.3s ease;
}

.language-switcher:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

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

.lang-btn:hover {
    transform: scale(1.1);
    border-color: var(--alpharvest-primary);
}

.lang-btn.active {
    border-color: var(--alpharvest-primary);
    box-shadow: 0 0 10px rgba(50,104,145,0.3);
    transform: scale(1.05);
}

/* ==========================================================================
   5. Boston Globe Style Masthead
   ========================================================================== */
.masthead {
    font-family: 'UnifrakturMaguntia', 'Old English Text MT', serif;
    font-size: clamp(3em, 8vw, 6em);
    font-weight: 400;
    color: #000000;
    text-align: center;
    letter-spacing: 1px;
    text-shadow: 1px 1px 0px rgba(0,0,0,0.1);
    margin: 20px 0;
    line-height: 1.2;
    -webkit-user-select: none;
    user-select: none;
}

.tagline {
    font-size: 1.1em;
    color: #666;
    font-style: italic;
    font-family: 'Georgia', serif;
    text-align: center;
    margin-top: -10px;
    margin-bottom: 30px;
}

/* ==========================================================================
   6. Market Dashboard Components
   ========================================================================== */
.alpharvest-dashboard {
    background: var(--alpharvest-gradient);
    padding: 30px;
    border-radius: 8px;
    color: white;
    margin: 20px 0;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.alpharvest-dashboard h3 {
    color: var(--alpharvest-gold);
    font-size: 1.6em;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.metric-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,215,0,0.2);
    padding: 20px;
    border-radius: 6px;
    text-align: center;
    transition: all 0.3s ease;
}

.metric-card:hover {
    background: rgba(255,255,255,0.08);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255,215,0,0.1);
    border-color: var(--alpharvest-gold);
}

.metric-label {
    color: var(--alpharvest-gold);
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.metric-value {
    font-size: 2.5em;
    font-weight: bold;
    color: white;
    line-height: 1;
}

.metric-subtext {
    color: rgba(255,255,255,0.6);
    font-size: 0.85em;
    margin-top: 8px;
}

/* ==========================================================================
   7. Flag Icons
   ========================================================================== */
.flag-icon {
    width: 40px;
    height: 26px;
    display: inline-block;
    vertical-align: middle;
    border: 1px solid #ddd;
    margin-right: 8px;
}

.flag-usa {
    background: linear-gradient(
        to bottom,
        #B22234 7.69%,
        white 7.69%,
        white 15.38%,
        #B22234 15.38%
    );
    position: relative;
}

.flag-usa::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 53.85%;
    background: #3C3B6E;
}

.flag-japan {
    background: white;
    position: relative;
}

.flag-japan::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: #BC002D;
    border-radius: 50%;
}

/* ==========================================================================
   8. Report Cards
   ========================================================================== */
.report-card {
    background: white;
    padding: 20px;
    border: 1px solid #E2E2E2;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.report-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

.report-card h3 {
    font-size: 1.2em;
    margin-bottom: 10px;
    color: #121212;
}

.report-card p {
    color: #666;
    font-size: 0.9em;
}

/* ==========================================================================
   9. Content Sections
   ========================================================================== */
.content-section {
    margin-bottom: 40px;
    padding: 30px;
    background: #F7F7F7;
    border: 1px solid #E2E2E2;
}

.section-title {
    font-size: 2em;
    margin-bottom: 20px;
    color: #121212;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Georgia', serif;
}

/* ==========================================================================
   10. Override Extra Theme Defaults
   ========================================================================== */
/* Remove Extra's default section padding for custom sections */
.et_pb_section.alpharvest-section {
    padding: 0 !important;
}

/* Ensure proper font inheritance */
body.alpharvest-theme {
    font-family: 'Georgia', 'Times New Roman', serif;
}

/* Override Extra's header if needed */
#main-header.alpharvest-header {
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* ==========================================================================
   11. Responsive Design
   ========================================================================== */
@media (max-width: 768px) {
    .masthead {
        font-size: clamp(2.5em, 10vw, 4em);
    }
    
    .language-switcher {
        top: 10px;
        right: 10px;
        transform: scale(0.9);
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 1.5em;
    }
    
    .metric-value {
        font-size: 2em;
    }
}

@media (max-width: 480px) {
    .language-switcher {
        bottom: 20px;
        top: auto;
        right: 50%;
        transform: translateX(50%);
    }
    
    .alpharvest-dashboard {
        padding: 20px 15px;
    }
}

/* ==========================================================================
   12. Utility Classes
   ========================================================================== */
.alpharvest-hidden {
    display: none !important;
}

.alpharvest-center {
    text-align: center;
}

.alpharvest-highlight {
    background: var(--alpharvest-gold);
    color: var(--alpharvest-dark);
    padding: 2px 6px;
    border-radius: 3px;
}

/* ==========================================================================
   13. Loading States
   ========================================================================== */
.alpharvest-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.alpharvest-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--alpharvest-primary);
    border-radius: 50%;
    animation: alpharvest-spin 1s linear infinite;
}

@keyframes alpharvest-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ==========================================================================
   14. Print Styles
   ========================================================================== */
@media print {
    .language-switcher,
    .no-print {
        display: none !important;
    }
    
    .alpharvest-dashboard {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
    
    .metric-card {
        border: 1px solid black !important;
    }
}

/* ==========================================================================
   End of AlpharvestPro Custom Styles
   ========================================================================== */
