/* =========================================
   1. VARIABLES & GLOBAL RESET
   ========================================= */
:root {
    --primary-blue: #003366;
    --primary-dark: #002244;
    --accent-cyan: #00AFCA;
    --energy-gold: #FEC50C;
    --text-dark: #1a2b3c;
    --text-grey: #5d6d7e;
    --text-light: #ecf0f1;
    --bg-light: #f4f7f6;
    --bg-white: #ffffff;
    --bg-dark: #0f172a;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    
    /* Responsive spacing variables */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-xxl: 4rem;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', 'Helvetica Neue', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
    width: 100%;
}

/* =========================================
   2. HEADER & NAVIGATION (DESKTOP DEFAULT)
   ========================================= */
.site-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative; /* Change to 'fixed' and top:0 if you want it sticky */
    z-index: 9999; /* Increased to ensure it sits above everything */
    width: 100%;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    min-height: 70px; /* Force height so header is never invisible */
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 1002;
    color: var(--primary-blue);
}

.header-logo-img {
    height: 45px;
    width: auto;
    margin-right: 12px;
    display: block;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: row;
    gap: 5px;
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1;
    white-space: nowrap;
}

/* Desktop Navigation */
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
    align-items: center;
}

.main-nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--accent-cyan);
}

/* Desktop Dropdown Logic */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 10;
    border-radius: 0 0 4px 4px;
    border-top: 4px solid var(--accent-cyan);
    padding: 10px 0;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: var(--text-dark);
    padding: 10px 20px;
    display: block;
    white-space: nowrap;
    font-size: 0.9rem;
}

.dropdown-content a:hover {
    background-color: var(--bg-light);
    color: var(--primary-blue);
}

/* Desktop Language Switcher */
.lang-switch {
    border-left: 1px solid var(--border-color);
    padding-left: 20px;
}

.lang-switch a {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-grey);
    margin: 0 5px;
}

.lang-switch a:hover, 
.lang-switch a.active {
    color: var(--primary-blue);
}

/* Hamburger Menu (Hidden on Desktop) */
.menu-toggle {
    display: none; /* Only shows on mobile */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1005; /* Must be higher than nav drawer */
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--primary-blue); /* Ensure contrast against white header */
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Mobile Navigation Drawer Base (Hidden via transform) */
.main-nav {
    /* Desktop default settings are implicitly above. 
       Mobile overrides happen in @media block below. */
}

/* Mobile Dropdown Functionality Base */
.dropdown > a {
    position: relative;
    padding-right: 25px;
}

/* Mobile Language Switcher Base */
.mobile-lang-switch {
    display: none;
}

/* --- MOBILE DROPDOWN FIXES --- */
@media (max-width: 767px) {
    /* 1. Make the Link fill the whole box */
    .dropdown > a.drop-trigger {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        height: 100%;
        padding: 15px 10px; /* Bigger touch target */
        cursor: pointer;
        position: relative;
        z-index: 10; /* Ensure it sits on top */
    }

    /* 2. Style the Arrow manually */
    .dropdown .arrow {
        display: inline-block;
        width: 0; 
        height: 0; 
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-top: 5px solid white; /* White arrow */
        margin-left: 10px;
        transition: transform 0.2s ease;
        pointer-events: none; /* CRITICAL: Allows click to pass through to the link */
    }

    /* Rotate arrow when open */
    .dropdown.dropdown-open .arrow {
        transform: rotate(180deg);
    }
    
    /* Remove the old CSS pseudo-element arrow to prevent duplicates */
    .dropdown > a::after {
        display: none !important;
    }
}

/* Close Button for Mobile Nav */
.nav-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1005;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    display: none;
}

/* Body lock when nav is open */
body.nav-open {
    overflow: hidden;
}

/* Backdrop overlay */
.nav-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1003;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.nav-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* =========================================
   3. HERO SECTION (VIDEO & GLASSMORPHISM)
   ========================================= */
/* Hero Video Wrapper */
.hero-video-wrapper {
    position: relative;
    width: 100%;
    height: 100vh; /* Fills full viewport height */
    min-height: 600px;
    overflow: hidden;
    display: flex;
    align-items: center; /* Vertically centers content */
    color: #ffffff;
}

/* The Background Video */
.video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures video fills area without stretching */
    z-index: 0;
}

/* The Color Overlay (Gold/Dark Theme) */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Dark overlay with Gold tint to make text readable */
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.4), 
        rgba(139, 101, 8, 0.7)
    ); 
    z-index: 1;
}

/* The Content Layer */
.hero-content-layer {
    position: relative;
    z-index: 2; /* Sits above video and overlay */
    width: 100%;
}

/* Styling your text block (based on previous context) */
.hero-text-block {
    max-width: 800px;
    margin-bottom: 50px;
}

.hero-text-block h1 {
    color: var(--light-text); /* White text for contrast */
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero-text-block p {
    font-size: 1.25rem;
    color: #e0e0e0;
    margin-bottom: 30px;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--primary-color);
    padding: 8px 16px;
    border-radius: 50px;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-weight: 600;
}

.dot {
    height: 10px;
    width: 10px;
    background-color: #00e676; /* Green for "Nominal" */
    border-radius: 50%;
    display: inline-block;
    margin-right: 10px;
    box-shadow: 0 0 10px #00e676;
}

/* HUD Styling */
.hero-hud {
    display: flex;
    gap: 40px;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 30px;
}

.hud-item {
    display: flex;
    flex-direction: column;
}

.hud-val {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color); /* Gold */
    line-height: 1;
}

.hud-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-text-block h1 { font-size: 2.5rem; }
    .hero-hud { flex-wrap: wrap; gap: 20px; }
    .hud-item { width: 45%; }
}

/* =========================================
   4. TICKER & ANIMATIONS
   ========================================= */
.ticker-section {
    background: var(--bg-dark);
    padding: 12px 0;
    overflow: hidden;
    border-bottom: 1px solid #334155;
}

.ticker-section .container {
    display: flex;
    align-items: center;
    overflow: hidden;
}

.ticker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.ticker-label {
    font-weight: 700;
    color: var(--energy-gold);
    margin-right: 30px;
    text-transform: uppercase;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 10;
    background: var(--bg-dark);
    padding-right: 10px;
    flex-shrink: 0;
}

.ticker-filters {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background: white;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.filter-btn.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.ticker-wrap {
    display: flex;
    gap: 40px;
    animation: ticker 30s linear infinite;
    min-width: max-content;
}

.ticker-item {
    display: flex;
    gap: 10px;
    align-items: center;
    white-space: nowrap;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: white;
    flex-shrink: 0;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.ticker-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.ticker-item .symbol {
    color: #94a3b8;
    font-weight: bold;
}

.ticker-item .change.up {
    color: #4ade80;
}

.ticker-item .change.down {
    color: #f87171;
}

.source-badge {
    font-size: 0.75rem;
    color: #64748b;
    margin-left: 0.5rem;
    background: rgba(255,255,255,0.1);
    padding: 2px 6px;
    border-radius: 3px;
}

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

/* Fade Up Animation */
.animate-fade-up {
    animation: fadeUp 1s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   5. CONTENT SECTIONS & GRIDS
   ========================================= */
.section-pad {
    padding: var(--space-xxl) 0;
}

.bg-white { background-color: var(--bg-white); }
.bg-light { background-color: var(--bg-light); }
.bg-dark {
    background-color: var(--bg-dark);
    color: white;
}

.section-header {
    margin-bottom: var(--space-xxl);
}

.section-header.center {
    text-align: center;
}

.section-header h2 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    color: var(--primary-blue);
    margin-bottom: 10px;
    line-height: 1.3;
}

.divider {
    width: 80px;
    height: 4px;
    background: var(--accent-cyan);
    border-radius: 2px;
    margin: var(--space-md) 0;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.center {
    text-align: center;
}

/* Grids */
.product-grid,
.live-feed-grid,
.news-grid,
.awards-grid,
.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: var(--space-xl);
}

/* Split Layouts */
.row-split {
    display: flex;
    align-items: center;
    gap: var(--space-xxl);
}

.text-col,
.image-col {
    flex: 1;
}

.sub-heading {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-cyan);
    margin-bottom: var(--space-sm);
    font-weight: 600;
}

.lead-text {
    font-size: 1.125rem;
    color: var(--text-grey);
    margin-bottom: var(--space-lg);
}

.check-list {
    list-style: none;
    margin: var(--space-lg) 0;
}

.check-list li {
    padding: var(--space-xs) 0;
    color: var(--text-dark);
}

.check-list li::before {
    content: "✓";
    color: var(--accent-cyan);
    font-weight: bold;
    margin-right: var(--space-sm);
}

.image-stack {
    position: relative;
    padding-bottom: 40px;
}

.stack-main {
    width: 90%;
    position: relative;
    z-index: 1;
    border-radius: 8px;
    overflow: hidden;
}

.stack-secondary {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50%;
    z-index: 2;
    border: 4px solid white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.rounded {
    border-radius: 8px;
}

.img-shadow {
    box-shadow: var(--shadow-lg);
}

/* Product Cards */
.product-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: var(--space-xl);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--border-color);
    transition: 0.3s;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.product-card:hover::before {
    background: var(--accent-cyan);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
    display: block;
}

.product-card h3 {
    color: var(--primary-blue);
    margin: 0 0 10px;
    font-size: clamp(1.2rem, 2vw, 1.4rem);
}

.product-card p {
    color: var(--text-grey);
    font-size: 0.95rem;
    margin-bottom: var(--space-md);
}

.spec-preview {
    background: #f8fafc;
    padding: 10px;
    border-radius: 4px;
    margin: 15px 0;
    font-size: 0.85rem;
    color: #475569;
}

.spec-preview li {
    margin-bottom: 4px;
    border-bottom: 1px solid #e2e8f0;
    padding: 4px 0;
    display: flex;
    justify-content: space-between;
}

.spec-preview li:last-child {
    border-bottom: none;
}

.link-arrow {
    color: var(--accent-cyan);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s ease;
}

.link-arrow:hover {
    gap: 10px;
}

/* Live Feed (Dark) */
.feed-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.feed-card:hover {
    transform: translateY(-4px);
}

.feed-header {
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0f172a;
    border-bottom: 1px solid #334155;
    font-family: monospace;
    font-size: 0.85rem;
    color: #94a3b8;
}

.feed-view {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.feed-view img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: sepia(20%) contrast(1.1);
    transition: transform 5s linear;
}

.feed-card:hover .feed-view img {
    transform: scale(1.1);
}

.feed-overlay {
    position: absolute;
    bottom: 10px;
    left: 10px;
    font-family: monospace;
    font-size: 0.8rem;
    color: #00ff00;
    text-shadow: 0 1px 2px black;
}

.feed-overlay span {
    display: block;
}

.rec-dot {
    width: 10px;
    height: 10px;
    background-color: red;
    border-radius: 50%;
    animation: blink 2s infinite;
}

.status-ok {
    color: #00ff00;
    font-weight: bold;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

/* Operations Map */
.operations-map {
    position: relative;
    margin: var(--space-xl) 0;
}

.map-visual {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.map-marker {
    position: absolute;
    transform: translate(-50%, -100%);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.map-marker:hover {
    transform: translate(-50%, -100%) scale(1.2);
}

.marker-astana { top: 30%; left: 55%; }
.marker-pavlodar { top: 40%; left: 65%; }
.marker-atyrau { top: 45%; left: 45%; }

.marker-pin {
    width: 20px;
    height: 20px;
    background: var(--accent-cyan);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 0 10px rgba(0, 175, 202, 0.5);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: rotate(-45deg) translateY(0); }
    50% { transform: rotate(-45deg) translateY(-10px); }
}

.marker-label {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    transition: 0.3s;
    backdrop-filter: blur(10px);
}

.map-marker:hover .marker-label {
    opacity: 1;
}

.operations-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-xl);
}

.op-stat {
    text-align: center;
    padding: var(--space-lg);
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.op-stat:hover {
    transform: translateY(-4px);
}

.op-number {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--primary-blue);
    display: block;
}

.op-label {
    color: var(--text-grey);
    font-size: 0.9rem;
}

/* Logistics Stats */
.logistics-stats {
    display: grid;
    gap: var(--space-md);
    margin: var(--space-lg) 0;
}

.l-stat {
    padding: var(--space-md);
    background: var(--bg-light);
    border-radius: 6px;
    border-left: 4px solid var(--accent-cyan);
}

.l-stat strong {
    display: block;
    color: var(--primary-blue);
    margin-bottom: 4px;
}

.l-stat span {
    color: var(--text-grey);
    font-size: 0.9rem;
}

/* Sustainability */
.stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin: var(--space-lg) 0;
}

.mini-stat {
    text-align: center;
    padding: var(--space-md);
    background: rgba(39, 174, 96, 0.1);
    border-radius: 6px;
}

.mini-stat strong {
    display: block;
    font-size: 1.5rem;
    color: #27ae60;
    margin-bottom: 4px;
}

.mini-stat span {
    font-size: 0.8rem;
    color: var(--text-grey);
}

.sustainability-visual {
    position: relative;
}

.sustainability-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(39, 174, 96, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

/* Awards Grid */
.awards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
}

.award-item {
    text-align: center;
    padding: var(--space-xl);
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.award-item:hover {
    transform: translateY(-4px);
    background: rgba(255,255,255,0.08);
}

.award-icon {
    font-size: clamp(2.5rem, 5vw, 3rem);
    margin-bottom: var(--space-md);
}

.award-item h3 {
    color: white;
    margin-bottom: var(--space-sm);
}

.award-item p {
    color: #94a3b8;
    margin: 0;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
}

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

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.news-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-date {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-blue);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.news-content {
    padding: var(--space-md);
}

.news-content h3 {
    margin-bottom: var(--space-sm);
    color: var(--primary-blue);
}

.news-content p {
    color: var(--text-grey);
    margin-bottom: var(--space-md);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--accent-cyan);
    color: white;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 600;
    margin: 5px;
    border: none;
    cursor: pointer;
    text-align: center;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    padding: 10px 28px;
    border-radius: 4px;
    font-weight: 600;
    margin: 5px;
    cursor: pointer;
    text-align: center;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

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

.cta-section {
    background: var(--primary-blue);
    color: white;
    padding: var(--space-xxl) 0;
    text-align: center;
}

.cta-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--space-lg);
}

/* =========================================
   MARKET DASHBOARD & WIDGET FIXES (UPDATED)
   ========================================= */

/* Main Dashboard Grid */
.analysis-dashboard {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 2rem;
    height: 600px; /* Essential: Gives the dashboard a fixed height so widgets know their size */
}

/* Right Column (Tech Analysis + News) */
.dash-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%; /* Fills the parent height */
}

/* Wrappers for specific widgets */
.tech-analysis-wrapper,
.news-feed-wrapper {
    flex: 1; /* Split available space evenly */
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    position: relative; /* Essential for TradingView internal positioning */
}

/* The Container for the Widget */
.tradingview-widget-container {
    width: 100% !important;
    height: 100% !important;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

/* The Widget iframe itself (handled by TV script, but just in case) */
.tradingview-widget-container__widget {
    width: 100% !important;
    height: 100% !important;
}

/* Dashboard Responsive Behavior */
@media (max-width: 991px) {
    .analysis-dashboard {
        display: flex !important;
        flex-direction: column;
        height: auto !important; /* Allow growing on mobile */
    }

    /* Main Chart Column on Mobile */
    .analysis-dashboard > .dash-col:first-child {
        height: 500px !important; /* Force height for the main chart on mobile */
        width: 100% !important;
    }

    /* Secondary Column (Tech + News) on Mobile */
    .analysis-dashboard > .dash-col:last-child {
        height: auto !important;
        width: 100% !important;
    }

    /* Give specific heights to the smaller widgets on mobile */
    .tech-analysis-wrapper,
    .news-feed-wrapper {
        height: 450px; 
        margin-bottom: 20px;
    }
}


/* =========================================
   6. FOOTER
   ========================================= */
.site-footer {
    background-color: var(--primary-blue);
    color: white;
    padding: var(--space-xxl) 0 var(--space-lg);
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-col h3 {
    color: var(--accent-cyan);
    font-size: 1.1rem;
    margin-bottom: var(--space-md);
    text-transform: uppercase;
}

.footer-col p {
    color: #94a3b8;
    font-size: 0.9rem;
}

.footer-col a {
    display: block;
    color: #cbd5e1;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.footer-col a:hover {
    color: var(--accent-cyan);
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: var(--space-lg);
    color: #64748b;
}

/* =========================================
   7. RESPONSIVENESS (MOBILE / TABLET)
   ========================================= */

/* Mobile Styles (max-width: 767px) */
@media (max-width: 767px) {
    :root {
        --space-xs: 0.25rem;
        --space-sm: 0.75rem;
        --space-md: 1rem;
        --space-lg: 1.5rem;
        --space-xl: 2rem;
        --space-xxl: 3rem;
    }
    
    .container {
        padding: 0 var(--space-sm);
    }
    
    /* Header Mobile */
    .site-header .container {
        height: 60px;
        padding: 0 var(--space-sm);
    }
    
    .logo {
        font-size: 1.25rem;
    }
    
    .header-logo-img {
        height: 35px;
    }
    
    .lang-switch {
        display: none;
    }
    
    .menu-toggle {
        display: flex; /* Make hamburger visible */
    }
    
    /* Mobile Navigation Drawer */
    .main-nav {
        display: block; /* Ensure it's not hidden by display:none */
        position: fixed;
        top: 0;
        right: 0;
        width: 85%;
        max-width: 400px;
        height: 100vh;
        background: var(--primary-dark);
        z-index: 1004;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        padding-top: 80px;
        overflow-y: auto;
    }
    
    /* This class is added by JS to open the menu */
    .main-nav.nav-open {
        transform: translateX(0);
    }
    
    .main-nav ul {
        flex-direction: column;
        padding: 0 var(--space-md);
        gap: 0;
    }
    
    .main-nav li {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .main-nav a {
        color: white;
        padding: 15px 0;
        font-size: 1.1rem;
        display: block;
        width: 100%;
    }
    
    /* Mobile Dropdown Functionality */
    .dropdown > a {
        position: relative;
        padding-right: 25px;
    }
    
    .dropdown > a::after {
        content: "▸";
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        transition: transform 0.3s ease;
    }
    
    .dropdown.dropdown-open > a::after {
        transform: translateY(-50%) rotate(90deg);
    }
    
    /* Mobile Dropdown Content */
    .dropdown-content {
        display: none;
        position: static;
        background: rgba(255,255,255,0.05);
        border: none;
        box-shadow: none;
        width: 100%;
        padding-left: 20px;
    }
    
    .dropdown.dropdown-open .dropdown-content {
        display: block;
    }
    
    .dropdown-content a {
        font-size: 1rem;
        padding: 12px 0;
        color: #d1d5db;
        border-bottom: none;
    }
    
    /* Show mobile language switcher */
    .mobile-lang-switch {
        display: block;
        padding: 20px;
        border-top: 1px solid rgba(255,255,255,0.1);
        margin-top: 20px;
    }
    
    .mobile-lang-switch a {
        color: white;
        margin: 0 10px;
        font-weight: 500;
    }
    
    .mobile-lang-switch a.active {
        color: var(--accent-cyan);
    }
    
    /* Show close button */
    .nav-close {
        display: flex;
    }
    
    /* Prevent hover effects on mobile */
    .dropdown:hover .dropdown-content {
        display: none;
    }
    
    /* Hamburger Animation - Active State */
    .menu-toggle.is-active {
        position: fixed;
        right: 20px;
        top: 20px;
        z-index: 1006;
    }

    .menu-toggle.is-active span {
        background-color: white; /* Change to white when on dark drawer */
    }
    
    .menu-toggle.is-active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    
    .menu-toggle.is-active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.is-active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    /* Hero Mobile */
    .hero-video-wrapper {
        height: auto;
        padding: 80px 0;
        min-height: 400px;
    }
    
    .hero-content-layer {
        gap: var(--space-lg);
        padding: 0 var(--space-sm);
    }
    
    .hero h1 {
        font-size: 2rem;
        margin-bottom: var(--space-sm);
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: var(--space-md);
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .hero-hud {
        flex-direction: column;
        gap: var(--space-md);
        margin-top: var(--space-md);
    }
    
    .hud-item {
        min-width: auto;
        width: 100%;
    }
    
    /* Stats & Grids Mobile */
    .section-pad {
        padding: var(--space-xl) 0;
    }
    
    .section-header {
        margin-bottom: var(--space-xl);
    }
    
    .row-split {
        flex-direction: column;
        gap: var(--space-lg);
    }
    
    .reverse-mobile {
        flex-direction: column-reverse;
    }
    
    .operations-stats {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .product-grid,
    .live-feed-grid,
    .news-grid,
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .product-card {
        padding: var(--space-lg);
    }
    
    .stat-row {
        grid-template-columns: 1fr;
    }
    
    /* Ticker Mobile */
    .ticker-label {
        display: none;
    }
    
    .ticker-section .container {
        justify-content: flex-start;
    }
    
    .ticker-wrap {
        gap: 20px;
    }
    
    .ticker-item {
        font-size: 0.8rem;
    }
    
    /* Map Markers Mobile */
    .map-marker {
        transform: translate(-50%, -100%) scale(0.8);
    }
    
    .marker-label {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
    
    /* Buttons Mobile */
    .btn,
    .btn-outline {
        display: block;
        width: 100%;
        margin: 8px 0;
        padding: 14px 20px;
        font-size: 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    /* Footer Mobile */
    .site-footer .footer-col {
        text-align: center;
    }
    
    .footer-grid {
        gap: var(--space-lg);
    }
}

/* Small Mobile Styles (max-width: 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-sm);
    }
    
    .hero-video-wrapper {
        padding: 60px 0;
        min-height: 350px;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .hero p {
        font-size: 0.9rem;
    }
    
    .badge-pill {
        font-size: 0.75rem;
        padding: 6px 12px;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .product-card {
        padding: var(--space-md);
    }
    
    .card-icon {
        font-size: 2rem;
    }
    
    .op-stat {
        padding: var(--space-md);
    }
    
    .op-number {
        font-size: 1.75rem;
    }
    
    .awards-grid {
        grid-template-columns: 1fr;
    }
}

/* Large Desktop Styles (min-width: 1400px) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-video-wrapper {
        max-height: 900px;
    }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-video-wrapper {
        background-color: var(--primary-dark);
    }
}

/* Print Styles */
@media print {
    .site-header,
    .hero-video-wrapper,
    .ticker-section,
    .site-footer {
        display: none;
    }
    
    body {
        background: white;
        color: black;
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .container {
        max-width: none;
        margin: 0;
        padding: 0;
    }
}
/* =========================================
   MOBILE DROPDOWN FIX (Add/Update this section)
   ========================================= */

/* 1. Style the new Div to look like a Link */
.menu-label {
    cursor: pointer;
    display: flex; /* Ensures the click area fills the width */
    justify-content: space-between;
    align-items: center;
    width: 100%;
    font-weight: 500;
    color: #333; /* Default text color */
}

/* Mobile Specific Fixes */
@media (max-width: 767px) {
    
    .menu-label {
        color: white; /* White text on dark mobile menu */
        padding: 15px 0; /* Make the touch target big */
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(255,255,255,0.1); /* Match other links */
    }

    /* Make the arrow visible and click-through */
    .arrow {
        display: inline-block;
        width: 0; 
        height: 0; 
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-top: 5px solid white;
        margin-left: 10px;
        transition: transform 0.2s ease;
        pointer-events: none; /* Crucial: Clicks pass through the arrow to the div */
    }

    /* Rotate arrow when open */
    .dropdown.dropdown-open .arrow {
        transform: rotate(180deg);
    }
    
    /* Ensure content pushes down (Static) */
    .dropdown-content {
        display: none;
        position: static;
        width: 100%;
        background: rgba(255,255,255,0.05);
        padding-left: 20px;
    }

    .dropdown.dropdown-open .dropdown-content {
        display: block;
        animation: slideDown 0.2s ease-out forwards;
    }
}

/* Desktop Hover Fix */
@media (min-width: 768px) {
    .menu-label:hover {
        color: var(--accent-cyan);
    }
    /* Allow hover only on desktop */
    .dropdown:hover .dropdown-content {
        display: block;
    }
}

/* =========================================
   MARKET DATA SECTION (FIXED)
   ========================================= */

/* 1. The Container for the split row */
.insights-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Equal split */
    gap: 20px;
    width: 100%;
    /* No fixed height on the parent grid to allow stacking on mobile */
}

/* 2. The Columns */
.insight-col {
    height: 500px; /* Force height here */
    background: white;
    border: 1px solid #e0e3eb;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

/* 3. Mobile Responsiveness */
@media (max-width: 991px) {
    .insights-grid {
        grid-template-columns: 1fr; /* Stack vertically on tablet/mobile */
        gap: 30px;
    }

    .insight-col {
        height: 500px; /* Keep the height even on mobile so widgets don't collapse */
    }
    
    .market-overview-wrapper {
        height: 500px !important; /* Slightly shorter main chart on mobile */
    }
}