/* COMPLETE RESPONSIVE CSS WITH MOBILE DASHBOARD FIX */

/* Reset and Base Fixes */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden !important;
    width: 100% !important;
}

/* Hero Section Base */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, 
        #ffffff 0%, 
        rgba(110, 161, 98, 0.02) 50%, 
        rgba(33, 77, 102, 0.03) 100%);
    overflow: hidden !important;
    width: 100% !important;
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 180px 2rem 80px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
    width: 100%;
}

/* Dashboard Base Styles */
.hero-visual {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    animation: slideUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}

.dashboard {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(33, 77, 102, 0.08);
    position: relative;
    overflow: hidden;
    animation: float 8s ease-in-out infinite;
}

.dashboard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #214D66, #6EA162, #E67E6B);
    border-radius: 24px 24px 0 0;
}

/* MOBILE RESPONSIVE STYLES - AGGRESSIVE OVERRIDES */

/* Tablet (max-width: 1024px) */
@media screen and (max-width: 1024px) {
    .hero {
        min-height: auto !important;
        padding: 80px 0 40px !important;
    }
    
    .hero-container {
        grid-template-columns: 1fr !important;
        padding: 100px 20px 40px !important;
        gap: 2rem !important;
        text-align: center !important;
    }
    
    .hero-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .hero-badge {
        margin: 0 auto 1.5rem !important;
    }
    
    .hero h1 {
        text-align: center !important;
        width: 100% !important;
    }
    
    .hero-subtitle {
        text-align: center !important;
        width: 100% !important;
    }
    
    .hero-description {
        text-align: center !important;
        margin: 0 auto 2rem !important;
        max-width: 600px !important;
        width: 100% !important;
    }
    
    .hero-actions {
        width: 100% !important;
        justify-content: center !important;
    }
    
    .hero-stats {
        margin: 0 auto !important;
        justify-content: center !important;
    }
    
    /* Dashboard responsive for tablet */
    .hero-visual {
        width: 100% !important;
        max-width: 500px !important;
        margin: 2rem auto 0 !important;
        padding: 0 20px !important;
    }
    
    .dashboard {
        width: 100% !important;
        padding: 1.5rem !important;
        display: block !important; /* Ensure visibility */
    }
}

/* Mobile (max-width: 768px) */
@media screen and (max-width: 768px) {
    .hero {
        min-height: auto !important;
        padding: 60px 0 30px !important;
    }
    
    .hero::before {
        display: none !important;
    }
    
    .hero-container {
        padding: 80px 15px 30px !important;
        gap: 1.5rem !important;
    }
    
    .hero-badge {
        font-size: 0.7rem !important;
        padding: 0.4rem 0.8rem !important;
        margin-bottom: 1rem !important;
    }
    
    .hero h1 {
        font-size: 1.75rem !important;
        line-height: 1.2 !important;
        margin-bottom: 0.75rem !important;
        padding: 0 !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
        margin-bottom: 0.5rem !important;
        padding: 0 !important;
    }
    
    .hero-description {
        font-size: 0.875rem !important;
        line-height: 1.5 !important;
        margin-bottom: 1.5rem !important;
        padding: 0 10px !important;
    }
    
    .hero-actions {
        flex-direction: column !important;
        gap: 0.75rem !important;
        margin-bottom: 2rem !important;
        padding: 0 !important;
        width: 100% !important;
        align-items: center !important;
    }
    
    .btn {
        width: 90% !important;
        max-width: 280px !important;
        padding: 0.8rem 1.5rem !important;
        font-size: 0.9rem !important;
        margin: 0 auto !important;
        display: block !important;
        text-align: center !important;
    }
    
    .hero-stats {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.5rem !important;
        padding: 0 10px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .stat {
        padding: 0.5rem !important;
    }
    
    .stat-number {
        font-size: 1.5rem !important;
    }
    
    .stat-label {
        font-size: 0.65rem !important;
    }
    
    /* Dashboard responsive for mobile */
    .hero-visual {
        width: 100% !important;
        max-width: 400px !important;
        padding: 0 15px !important;
        margin-top: 1.5rem !important;
    }
    
    .dashboard {
        padding: 1.25rem !important;
        border-radius: 16px !important;
        animation: none !important; /* Disable animation on mobile */
        display: block !important; /* Keep visible */
        margin: 0 !important;
    }
    
    .dashboard-header {
        margin-bottom: 1rem !important;
        padding-bottom: 0.75rem !important;
    }
    
    .window-controls {
        gap: 0.3rem !important;
    }
    
    .control-dot {
        width: 8px !important;
        height: 8px !important;
    }
    
    .dashboard-title {
        font-size: 0.8rem !important;
    }
    
    .score-display {
        padding: 1.5rem 1rem !important;
        margin-bottom: 1rem !important;
        border-radius: 12px !important;
    }
    
    .score-number {
        font-size: 60px !important;
        margin-bottom: 0.25rem !important;
    }
    
    .score-label {
        font-size: 0.9rem !important;
    }
    
    .progress-section {
        gap: 1rem !important;
    }
    
    .progress-item {
        margin-bottom: 0.5rem !important;
    }
    
    .progress-label,
    .progress-value {
        font-size: 0.8rem !important;
    }
    
    .progress-bar {
        height: 5px !important;
    }
}

/* Small Mobile (max-width: 480px) */
@media screen and (max-width: 480px) {
    .hero-container {
        padding: 70px 10px 20px !important;
        gap: 1rem !important;
    }
    
    .hero-badge {
        font-size: 0.65rem !important;
        padding: 0.3rem 0.6rem !important;
    }
    
    .hero-badge::before {
        font-size: 0.7rem !important;
    }
    
    .hero h1 {
        font-size: 1.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .hero-subtitle {
        font-size: 0.9rem !important;
        margin-bottom: 0.4rem !important;
    }
    
    .hero-description {
        font-size: 0.8rem !important;
        margin-bottom: 1rem !important;
        padding: 0 5px !important;
    }
    
    .hero-actions {
        margin-bottom: 1.5rem !important;
    }
    
    .btn {
        width: 95% !important;
        max-width: 260px !important;
        padding: 0.7rem 1rem !important;
        font-size: 0.85rem !important;
    }
    
    .hero-stats {
        gap: 0.25rem !important;
        padding: 0 5px !important;
    }
    
    .stat-number {
        font-size: 1.25rem !important;
    }
    
    .stat-label {
        font-size: 0.6rem !important;
    }
    
    /* KEEP DASHBOARD VISIBLE BUT SIMPLIFIED */
    .hero-visual {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 10px !important;
        margin-top: 1rem !important;
    }
    
    .dashboard {
        padding: 1rem !important;
        border-radius: 12px !important;
        box-shadow: 0 10px 30px rgba(33, 77, 102, 0.08) !important;
        display: block !important; /* KEEP VISIBLE */
        background: rgba(255, 255, 255, 0.9) !important;
    }
    
    .dashboard::before {
        height: 3px !important;
    }
    
    .dashboard-header {
        margin-bottom: 0.75rem !important;
        padding-bottom: 0.5rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
    }
    
    .window-controls {
        gap: 0.25rem !important;
    }
    
    .control-dot {
        width: 6px !important;
        height: 6px !important;
    }
    
    .dashboard-title {
        font-size: 0.7rem !important;
        font-weight: 500 !important;
    }
    
    .score-display {
        padding: 1rem 0.75rem !important;
        margin-bottom: 0.75rem !important;
        border-radius: 10px !important;
        background: linear-gradient(135deg, 
            rgba(110, 161, 98, 0.05), 
            rgba(33, 77, 102, 0.08)) !important;
    }
    
    .score-number {
        font-size: 1.5rem !important;
        font-weight: 700 !important;
        color: #214D66 !important;
        margin-bottom: 0.2rem !important;
    }
    
    .score-label {
        font-size: 0.75rem !important;
        color: #6EA162 !important;
        font-weight: 500 !important;
    }
    
    .progress-section {
        gap: 0.75rem !important;
    }
    
    .progress-item {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-bottom: 0.3rem !important;
    }
    
    .progress-label {
        font-size: 0.7rem !important;
        color: #4a4a4a !important;
        font-weight: 500 !important;
    }
    
    .progress-value {
        font-size: 0.7rem !important;
        color: #6EA162 !important;
        font-weight: 600 !important;
    }
    
    .progress-bar {
        width: 100% !important;
        height: 4px !important;
        background: #f8fafc !important;
        border-radius: 2px !important;
        overflow: hidden !important;
    }
    
    .progress-fill {
        height: 100% !important;
        background: linear-gradient(90deg, #6EA162, #E67E6B) !important;
        border-radius: 2px !important;
    }
}

/* Extra Small Mobile (below 360px) */
@media screen and (max-width: 360px) {
    .hero h1 {
        font-size: 1.3rem !important;
    }
    
    .hero-subtitle {
        font-size: 0.85rem !important;
    }
    
    .hero-description {
        font-size: 0.75rem !important;
    }
    
    .btn {
        font-size: 0.8rem !important;
        padding: 0.6rem 0.8rem !important;
    }
    
    /* Stack stats vertically */
    .hero-stats {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    
    .stat {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        padding: 0.5rem 0.75rem !important;
        background: rgba(110, 161, 98, 0.05) !important;
        border-radius: 8px !important;
    }
    
    .stat-number {
        font-size: 1.1rem !important;
    }
    
    .stat-label {
        font-size: 0.7rem !important;
    }
    
    /* Dashboard ultra-compact for very small screens */
    .hero-visual {
        padding: 0 8px !important;
    }
    
    .dashboard {
        padding: 0.75rem !important;
        border-radius: 10px !important;
        display: block !important; /* Still visible */
    }
    
    .dashboard-header {
        margin-bottom: 0.5rem !important;
        padding-bottom: 0.4rem !important;
    }
    
    .control-dot {
        width: 5px !important;
        height: 5px !important;
    }
    
    .dashboard-title {
        font-size: 0.65rem !important;
    }
    
    .score-display {
        padding: 0.75rem 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .score-number {
        font-size: 1.25rem !important;
    }
    
    .score-label {
        font-size: 0.7rem !important;
    }
    
    .progress-section {
        gap: 0.5rem !important;
    }
    
    .progress-label,
    .progress-value {
        font-size: 0.65rem !important;
    }
    
    .progress-bar {
        height: 3px !important;
    }
}

/* Ultra small screens (below 320px) */
@media screen and (max-width: 320px) {
    /* Simplified compact dashboard */
    .dashboard {
        padding: 0.75rem !important;
    }
    
    /* Hide window controls to save space */
    .window-controls {
        display: none !important;
    }
    
    .dashboard-header {
        text-align: center !important;
        margin-bottom: 0.5rem !important;
        padding-bottom: 0.3rem !important;
    }
    
    .dashboard-title {
        font-size: 0.6rem !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
    }
    
    /* Combine score display */
    .score-display {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0.5rem !important;
    }
    
    .score-number {
        font-size: 1rem !important;
    }
    
    .score-label {
        font-size: 0.65rem !important;
    }
    
    /* Compact progress */
    .progress-label {
        font-size: 0.6rem !important;
    }
    
    .progress-value {
        font-size: 0.6rem !important;
    }
}

/* Landscape mobile fix */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: auto !important;
    }
    
    .hero-container {
        padding: 60px 20px 20px !important;
    }
    
    .hero h1 {
        font-size: 1.5rem !important;
    }
    
    .hero-actions {
        flex-direction: row !important;
        justify-content: center !important;
        gap: 0.5rem !important;
    }
    
    .btn {
        width: auto !important;
        flex: 1 !important;
        max-width: 200px !important;
    }
    
    /* Show compact dashboard in landscape */
    .hero-visual {
        max-width: 350px !important;
        margin-top: 1rem !important;
    }
    
    .dashboard {
        padding: 0.75rem !important;
        display: block !important;
    }
    
    .score-display {
        padding: 0.75rem !important;
    }
    
    .score-number {
        font-size: 1.25rem !important;
    }
    
    .progress-section {
        gap: 0.5rem !important;
    }
    
    .progress-bar {
        height: 3px !important;
    }
}

/* Ensure nothing overflows */
@media screen and (max-width: 768px) {
    * {
        max-width: 100% !important;
    }
    
    .hero,
    .hero-container,
    .hero-content,
    .hero-visual {
        overflow-x: hidden !important;
        overflow-y: visible !important;
    }
}

/* Animation adjustments for mobile */
@media screen and (max-width: 768px) {
    @keyframes float {
        0%, 100% { transform: translateY(0px); }
        50% { transform: translateY(-5px); } /* Reduced movement on mobile */
    }
    
    .dashboard {
        animation: none !important; /* Disable complex animations */
    }
}

/* Fix for iOS Safari */
@supports (-webkit-touch-callout: none) {
    .hero {
        min-height: -webkit-fill-available;
    }
    
    @media screen and (max-width: 768px) {
        .btn {
            -webkit-appearance: none;
            -webkit-tap-highlight-color: transparent;
        }
        
        .dashboard {
            -webkit-transform: translate3d(0, 0, 0);
            transform: translate3d(0, 0, 0);
        }
    }
}

/* Prevent horizontal scroll on all mobile devices */
@media screen and (max-width: 1024px) {
    html, body {
        overflow-x: hidden !important;
        position: relative !important;
        width: 100% !important;
    }
    
    .hero {
        width: 100vw !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
    
    .hero-container {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Ensure dashboard visibility with high specificity */
@media screen and (max-width: 768px) {
    .hero-visual,
    .hero-visual .dashboard {
        visibility: visible !important;
        opacity: 1 !important;
        display: block !important;
        position: relative !important;
    }
}

/* Animation keyframes */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
    }
    50% { 
        transform: translateY(-20px) rotate(1deg); 
    }
}