/* RESPONSIVE FIX - Better viewport handling */

/* Reset box sizing */
* {
    box-sizing: border-box;
}

/* HTML and body responsive setup */
html {
    width: 100%;
    overflow-x: hidden;
}

body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Main content wrapper */
main {
    width: 100%;
    overflow-x: hidden;
}

/* Container with proper responsive behavior */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(15px, 4vw, 40px);
}

/* Hero section proper responsive design */
.hero {
    width: 100%;
    min-height: auto;
    background: linear-gradient(180deg, 
        #FFECD2 0%,
        #FFD4A3 25%,
        #FFBE7D 50%,
        #FFA65C 75%,
        #FF9A4D 100%
    );
    padding: clamp(80px, 10vw, 120px) 0 0 0;
    position: relative;
    overflow: visible;
}

/* Hero container should be full width */
.hero .container {
    max-width: 100% !important;
    padding: 0 clamp(40px, 5vw, 80px) !important;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: clamp(40px, 5vw, 60px) 0;
    text-align: left;
    width: 100%;
    max-width: none;
}

/* Hero typography with better responsive scaling */
.hero h1 {
    font-size: clamp(3rem, 7vw, 6rem);
    line-height: 1.05;
    margin-bottom: clamp(24px, 3vw, 40px);
    font-weight: 800;
    color: #1A2938;
    letter-spacing: -0.02em;
    max-width: 100%;
}

.hero p {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    line-height: 1.5;
    margin-bottom: clamp(40px, 5vw, 60px);
    max-width: 100%;
    color: #4a5568;
    font-weight: 400;
}

/* Hero actions responsive */
.hero-actions {
    display: flex;
    gap: clamp(16px, 2vw, 24px);
    flex-wrap: wrap;
    justify-content: flex-start;
}

.hero-actions a,
.btn {
    padding: clamp(14px, 2vw, 18px) clamp(28px, 4vw, 40px);
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    white-space: nowrap;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
}

/* Hero image container - allow full expansion */
.hero .hero-image-container {
    position: relative !important;
    width: 100vw !important;
    margin-top: clamp(60px, 8vw, 100px) !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    margin-bottom: 0 !important;
    overflow: visible !important;
    height: auto !important;
}

.hero .hero-image-container img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    object-fit: cover !important;
    object-position: center 20% !important;
    max-width: none !important;
    max-height: 80vh !important;
    border-radius: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    margin-bottom: -5px;
}

/* Services and other sections */
.services-section,
.stats-section,
.research-section,
.strategy-section,
.cta-section {
    width: 100%;
    padding: clamp(60px, 8vw, 100px) 0;
}

/* Grid layouts with proper responsive behavior */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(24px, 3vw, 40px);
    width: 100%;
}

.pillars-grid,
.strategy-grid,
.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(20px, 3vw, 32px);
    width: 100%;
}

/* Cards */
.service-card,
.pillar-card,
.strategy-item,
.research-card {
    padding: clamp(20px, 3vw, 32px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover,
.pillar-card:hover,
.strategy-item:hover,
.research-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Footer */
.site-footer {
    width: 100%;
    padding: clamp(40px, 6vw, 80px) 0;
    background: var(--color-navy-dark, #1A2938);
    color: white;
}

/* Large screens - allow full width */
@media screen and (min-width: 1400px) {
    .hero .hero-image-container img {
        max-height: 80vh !important;
    }
}

/* Medium screens - 2 column services */
@media screen and (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet breakpoint */
@media screen and (max-width: 768px) {
    .hero {
        min-height: auto;
        padding: clamp(60px, 8vw, 80px) 0;
    }
    
    .hero-image-container {
        margin-top: 30px;
    }
    
    .hero-image-container img {
        border-radius: 8px 8px 0 0;
    }
    
    .hero h1 {
        font-size: clamp(1.75rem, 6vw, 3rem);
    }
    
    .hero p {
        font-size: clamp(0.9375rem, 2.5vw, 1.125rem);
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .hero-actions a {
        width: 100%;
        text-align: center;
    }
    
    .services-grid,
    .pillars-grid,
    .strategy-grid,
    .research-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile breakpoint */
@media screen and (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
}

/* Ensure images don't break layout */
img {
    max-width: 100%;
    height: auto;
}

/* Prevent horizontal scroll */
body > * {
    max-width: 100vw;
    overflow-x: hidden;
}

/* Remove debug helper for production */
body::after {
    display: none !important;
}