/* ========================================
   STRUCTURAL CORRECTIONS - LAYOUT FIX
   Navigation | Cards | Desktop Responsiveness
   NO REDESIGN - ONLY STRUCTURAL REFINEMENT
   ======================================== */

/* ==========================================
   1. HOMEPAGE HEADER & NAVIGATION FIX
   ========================================== */

/* Navbar Container - Centered Max-Width */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.navbar .container {
    max-width: 1280px !important;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

/* Logo Positioning - Stable */
.navbar .logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    margin-right: 2rem;
}

.navbar .logo img {
    height: 50px !important;
    width: auto !important;
    display: block;
}

/* Navigation Menu - Clean Flexbox Alignment */
.nav-menu {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: 2rem;
    list-style: none;
    margin: 0 !important;
    padding: 0 !important;
    flex: 1;
}

.nav-menu li {
    margin: 0 !important;
    padding: 0 !important;
}

.nav-menu a {
    font-size: 0.95rem;
    font-weight: 500;
    color: #272147;
    text-decoration: none;
    transition: color 0.3s ease;
    white-space: nowrap;
    display: inline-block;
    padding: 0.5rem 0;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #4d6db8;
}

/* Contact Us Button - Aligned Right, No Overlap */
.nav-menu .btn-nav {
    background: #4d6db8;
    color: #ffffff !important;
    padding: 0.65rem 1.5rem !important;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-left: 1rem;
}

.nav-menu .btn-nav:hover {
    background: #3a316a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(77, 109, 184, 0.25);
}

/* Prevent Menu Wrapping on Desktop */
@media (min-width: 992px) {
    .nav-menu {
        flex-wrap: nowrap;
    }
    
    .mobile-menu-toggle {
        display: none !important;
    }
}

/* Mobile Menu Toggle (Preserve Mobile Functionality) */
@media (max-width: 991px) {
    .navbar .container {
        height: 70px;
        padding: 0 1.5rem !important;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 280px;
        height: calc(100vh - 70px);
        background: #ffffff;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 2rem !important;
        gap: 1.5rem;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 999;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu a {
        display: block;
        width: 100%;
        padding: 0.75rem 0;
    }
    
    .nav-menu .btn-nav {
        margin-left: 0;
        text-align: center;
        display: block;
        width: 100%;
    }
    
    .mobile-menu-toggle {
        display: flex !important;
        flex-direction: column;
        gap: 5px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0.5rem;
    }
    
    .mobile-menu-toggle span {
        width: 25px;
        height: 3px;
        background: #272147;
        transition: all 0.3s ease;
        border-radius: 2px;
    }
}

/* ==========================================
   2. INVESTMENT OUTLOOK - CARD FIX
   ========================================== */

/* Stat Highlight Cards - Standardized Proportions */
.stat-highlight-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.75rem !important;
    margin: 2.5rem 0 !important;
}

.stat-highlight-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 2rem 1.5rem !important;
    border-radius: 8px;
    text-align: center;
    border-left: 3px solid #4d6db8;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    min-height: 180px !important;
    max-height: 180px !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.stat-highlight-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(77, 109, 184, 0.15);
}

/* Reduce Stat Number Size - Proportional */
.stat-number {
    font-size: 2.8rem !important;
    font-weight: 700;
    color: #272147;
    line-height: 1;
    margin-bottom: 0.5rem;
    font-family: 'Montserrat', sans-serif;
}

.stat-label {
    font-size: 0.8rem !important;
    font-weight: 600;
    color: #4d6db8;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 0.75rem;
}

.stat-description {
    font-size: 0.8rem !important;
    color: #6c757d;
    line-height: 1.4;
    margin: 0;
}

/* Data Highlight Section - Reduced Height */
.data-highlight-section {
    background: linear-gradient(135deg, #272147 0%, #3a316a 100%);
    padding: 3rem 2rem !important;
    border-radius: 10px;
    margin: 2.5rem 0 !important;
}

.data-metric-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2rem !important;
}

.data-metric {
    text-align: center;
    padding: 1.5rem !important;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    min-height: 140px !important;
    max-height: 140px !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.data-metric-value {
    font-size: 2.4rem !important;
    font-weight: 700;
    color: #96a9d5;
    margin-bottom: 0.5rem;
    font-family: 'Montserrat', sans-serif;
}

.data-metric-label {
    font-size: 0.75rem !important;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.data-metric-note {
    font-size: 0.75rem !important;
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
}

/* Insight Blocks - Standardized */
.insight-blocks {
    display: grid;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem !important;
    margin: 2.5rem 0 !important;
}

.insight-block {
    background: #ffffff;
    padding: 1.5rem !important;
    border-radius: 6px;
    border-left: 3px solid #4d6db8;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    min-height: 220px !important;
}

/* ==========================================
   3. DESKTOP RESPONSIVENESS FIX (GLOBAL)
   ========================================== */

/* Global Container Standardization */
.container {
    max-width: 1280px !important;
    width: 100%;
    margin: 0 auto !important;
    padding: 0 2rem !important;
}

/* Prevent Horizontal Overflow */
body {
    overflow-x: hidden !important;
    margin: 0;
    padding: 0;
}

html {
    overflow-x: hidden !important;
}

/* Section Standardization */
.section {
    padding: 5rem 0 !important;
    width: 100%;
    overflow: hidden;
}

.section .container {
    max-width: 1280px !important;
}

/* Hero Section Fix */
.hero {
    padding: 180px 0 100px !important;
    width: 100%;
    position: relative;
}

.hero .container {
    max-width: 1280px !important;
}

.hero-content {
    max-width: 1000px;
    margin: 0 auto;
}

/* Grid System Standardization */
.features-grid,
.services-grid,
.process-grid,
.outlook-grid {
    display: grid;
    gap: 2rem !important;
    width: 100%;
}

/* 3-Column Grids */
.outlook-grid {
    grid-template-columns: repeat(3, 1fr) !important;
}

/* 2-Column Grids */
.framework-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 2rem !important;
}

/* 4-Column Grids */
.info-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 1.75rem !important;
}

/* Prevent Grid Overflow */
.stat-highlight-grid,
.data-metric-grid,
.insight-blocks,
.outlook-grid,
.framework-grid,
.info-grid {
    max-width: 100%;
}

/* Chart Section Standardization */
.chart-section {
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border: 1px solid rgba(77, 109, 184, 0.08);
    border-radius: 10px;
    padding: 2.5rem !important;
    margin: 2.5rem 0 !important;
    max-width: 100%;
}

.chart-wrapper-large {
    position: relative;
    height: 320px !important;
    max-width: 100%;
}

/* Footer Standardization */
footer {
    width: 100%;
}

footer .container {
    max-width: 1280px !important;
}

/* ==========================================
   RESPONSIVE BREAKPOINTS - DESKTOP ONLY
   ========================================== */

/* Large Desktop (1920px) */
@media (min-width: 1920px) {
    .navbar .container,
    .section .container,
    .hero .container,
    footer .container {
        max-width: 1400px !important;
    }
}

/* Standard Desktop (1440px-1919px) */
@media (min-width: 1440px) and (max-width: 1919px) {
    .navbar .container,
    .section .container,
    .hero .container,
    footer .container {
        max-width: 1280px !important;
    }
}

/* Laptop (1366px-1439px) */
@media (min-width: 1366px) and (max-width: 1439px) {
    .navbar .container,
    .section .container,
    .hero .container,
    footer .container {
        max-width: 1200px !important;
    }
    
    .nav-menu {
        gap: 1.5rem;
    }
}

/* Small Laptop (1200px-1365px) */
@media (min-width: 1200px) and (max-width: 1365px) {
    .navbar .container,
    .section .container,
    .hero .container,
    footer .container {
        max-width: 1140px !important;
    }
    
    .nav-menu {
        gap: 1.25rem;
    }
    
    .nav-menu a {
        font-size: 0.9rem;
    }
}

/* Tablet Landscape (992px-1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .navbar .container,
    .section .container,
    .hero .container,
    footer .container {
        max-width: 960px !important;
    }
    
    .stat-highlight-grid,
    .data-metric-grid,
    .outlook-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .info-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Tablet Portrait (768px-991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .navbar .container,
    .section .container,
    .hero .container,
    footer .container {
        max-width: 720px !important;
        padding: 0 1.5rem !important;
    }
    
    .section {
        padding: 4rem 0 !important;
    }
    
    .hero {
        padding: 150px 0 80px !important;
    }
    
    .stat-highlight-grid,
    .data-metric-grid,
    .insight-blocks,
    .outlook-grid,
    .framework-grid,
    .info-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .stat-highlight-card,
    .data-metric,
    .insight-block {
        min-height: auto !important;
        max-height: none !important;
    }
}

/* Mobile (Max 767px) - Preserve Existing Mobile Layout */
@media (max-width: 767px) {
    .navbar .container,
    .section .container,
    .hero .container,
    footer .container {
        padding: 0 1.25rem !important;
    }
    
    .section {
        padding: 3.5rem 0 !important;
    }
    
    .hero {
        padding: 130px 0 70px !important;
    }
    
    .stat-highlight-card,
    .data-metric {
        padding: 1.5rem !important;
    }
    
    .stat-number {
        font-size: 2.4rem !important;
    }
    
    .data-metric-value {
        font-size: 2rem !important;
    }
    
    .chart-wrapper-large {
        height: 280px !important;
    }
}

/* Prevent Text Overflow */
h1, h2, h3, h4, h5, h6, p, a, span, li {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

/* Image Constraint */
img {
    max-width: 100% !important;
    height: auto !important;
}

/* Clear Any Float Issues */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}
