/* ============================================
   GLOBAL RESPONSIVE CSS - Desktop First Approach
   ============================================
   This file adds responsive overrides to existing styles
   without breaking the current desktop design
   ============================================ */

/* ============================================
   TYPOGRAPHY - Responsive Font Sizes
   ============================================ */

/* Tablet breakpoint (1023px and below) */
@media (max-width: 1023px) {
    /* Reduce large headings */
    h1, .project-name {
        font-size: clamp(1.5rem, 6vw, 2.5rem) !important;
    }
    
    h2 {
        font-size: clamp(1.25rem, 5vw, 2rem) !important;
    }
    
    h3 {
        font-size: clamp(1.1rem, 4vw, 1.5rem) !important;
    }
    
    /* Neon text in header */
    .neon-text {
        font-size: 1.25rem !important;
    }
    
    /* Body text and paragraphs */
    p, .project-blog-box p {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }
}

/* Mobile breakpoint (767px and below) */
@media (max-width: 767px) {
    /* Further reduce headings for mobile */
    h1, .project-name {
        font-size: clamp(1.25rem, 8vw, 2rem) !important;
        margin-bottom: 20px !important;
    }
    
    h2 {
        font-size: clamp(1.1rem, 6vw, 1.5rem) !important;
    }
    
    h3 {
        font-size: clamp(1rem, 5vw, 1.25rem) !important;
    }
    
    /* Header neon text */
    .neon-text {
        font-size: 1rem !important;
        letter-spacing: 0.1em !important;
    }
    
    /* Body text */
    p, .project-blog-box p {
        font-size: 0.875rem !important;
        line-height: 1.5 !important;
    }
    
    /* Button text */
    .project-button, .neon-button, button {
        font-size: 0.875rem !important;
    }
}

/* ============================================
   LAYOUT & SPACING
   ============================================ */

/* Small viewport height fix */
@media (max-height: 700px) {
    /* Ensure project names are visible on small height screens */
    .project-side {
        justify-content: flex-start !important;
        padding-top: 80px !important;
    }
    
    .project-name {
        margin-bottom: 20px !important;
    }
    
    .project-blog-box {
        margin-top: 30px !important;
        padding: 20px !important;
    }
    
    /* Allow scrolling on small height viewports */
    .project-container {
        min-height: auto !important;
        height: auto !important;
    }
}

/* Extra small viewport height (landscape phones) */
@media (max-height: 500px) {
    .project-side {
        padding-top: 60px !important;
        padding-bottom: 20px !important;
    }
    
    .project-name {
        font-size: clamp(1.2rem, 5vw, 2rem) !important;
        margin-bottom: 15px !important;
    }
    
    .project-button {
        padding: 10px 20px !important;
    }
    
    .project-blog-box {
        margin-top: 20px !important;
        padding: 15px !important;
        font-size: 0.85rem !important;
    }
}

/* Tablet breakpoint */
@media (max-width: 1023px) {
    /* General container adjustments */
    .content {
        padding: 20px !important;
    }
    
    /* Project containers */
    .project-side {
        padding: 30px !important;
    }
    
    /* Blog boxes */
    .project-blog-box {
        margin-top: 40px !important;
        padding: 25px !important;
        max-width: 90% !important;
    }
    
    /* Welcome page sections */
    .welcome-content {
        padding: 40px 20px !important;
    }
    
    /* About us content */
    .about-content {
        padding: 40px 20px !important;
    }
}

/* Mobile breakpoint */
@media (max-width: 767px) {
    /* Content containers */
    .content {
        padding: 15px !important;
        min-height: 100vh !important;
    }
    
    /* Project layout - force vertical stacking */
    .project-container {
        flex-direction: column !important;
        height: auto !important;
        min-height: 100vh !important;
    }
    
    .project-side {
        padding: 20px !important;
        min-height: auto !important;
        margin-bottom: 30px !important;
    }
    
    /* Blog boxes full width on mobile */
    .project-blog-box {
        margin-top: 30px !important;
        padding: 20px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Welcome sections */
    .welcome-content {
        padding: 30px 15px !important;
    }
    
    .hero-content {
        padding: 20px !important;
    }
    
    /* About sections */
    .about-content {
        padding: 30px 15px !important;
    }
    
    .team-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}

/* ============================================
   NAVIGATION & HEADER
   ============================================ */

/* Tablet breakpoint */
@media (max-width: 1023px) {
    .header {
        top: 15px !important;
        left: 20px !important;
    }
    
    .menu {
        width: calc(100% - 40px) !important;
        max-width: 400px !important;
    }
}

/* Mobile breakpoint */
@media (max-width: 767px) {
    .header {
        top: 10px !important;
        left: 10px !important;
        gap: 10px !important;
    }
    
    .hamburger-button {
        padding: 8px 10px !important;
    }
    
    .hamburger {
        width: 24px !important;
        height: 18px !important;
    }
    
    /* Full width menu on mobile */
    .menu {
        left: 10px !important;
        right: 10px !important;
        width: calc(100% - 20px) !important;
        max-width: none !important;
        top: 60px !important;
    }
    
    .menu-item {
        padding: 10px 16px !important;
        font-size: 0.875rem !important;
    }
}

/* ============================================
   BUTTONS & INTERACTIVE ELEMENTS
   ============================================ */

/* Tablet breakpoint */
@media (max-width: 1023px) {
    .project-button {
        padding: 14px 32px !important;
    }
    
    .neon-button {
        padding: 12px 28px !important;
    }
}

/* Mobile breakpoint */
@media (max-width: 767px) {
    .project-button {
        padding: 12px 24px !important;
        min-width: 160px !important;
    }
    
    .neon-button {
        padding: 10px 20px !important;
        font-size: 0.875rem !important;
    }
    
    /* Stack buttons vertically on very small screens */
    @media (max-width: 480px) {
        .button-group {
            flex-direction: column !important;
            gap: 12px !important;
        }
        
        .button-group > * {
            width: 100% !important;
        }
    }
}

/* ============================================
   ANIMATIONS & EFFECTS
   ============================================ */

/* Reduce or disable complex animations on mobile for performance */
@media (max-width: 767px) {
    /* Simplify grid animation */
    body::before {
        animation-duration: 40s !important;
    }
    
    /* Reduce blur effects for performance */
    .project-blog-box {
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
    }
    
    .menu {
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
    }
}

/* ============================================
   UTILITIES & HELPERS
   ============================================ */

/* Hide elements on mobile if needed */
@media (max-width: 767px) {
    .desktop-only {
        display: none !important;
    }
}

/* Show elements only on mobile */
.mobile-only {
    display: none !important;
}

@media (max-width: 767px) {
    .mobile-only {
        display: block !important;
    }
}

/* ============================================
   SPECIFIC PAGE FIXES
   ============================================ */

/* Projects page viewport height fixes */
@media (max-height: 800px) and (min-width: 768px) {
    /* Desktop/tablet with small height */
    .project-container {
        height: auto !important;
        min-height: 100vh !important;
    }
    
    .project-side {
        min-height: 100vh !important;
        justify-content: flex-start !important;
        padding-top: 100px !important;
        overflow-y: auto !important;
    }
}

/* Projects page - ensure visibility and scrollability */
.project-container {
    overflow-y: auto !important;
}

.project-side {
    overflow-y: auto !important;
}

/* Welcome page hero adjustments */
@media (max-width: 767px) {
    .hero-text {
        font-size: clamp(1.5rem, 10vw, 2.5rem) !important;
    }
    
    .hero-subtext {
        font-size: clamp(0.875rem, 3vw, 1.1rem) !important;
    }
}

/* Work with us page */
@media (max-width: 767px) {
    .contact-info {
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    .contact-item {
        width: 100% !important;
        text-align: center !important;
    }
}

/* File audit page */
@media (max-width: 767px) {
    .file-grid {
        grid-template-columns: 1fr !important;
    }
    
    .file-item {
        padding: 15px !important;
    }
}

/* ============================================
   OVERFLOW & SCROLLING FIXES
   ============================================ */

/* Prevent horizontal scroll on mobile */
@media (max-width: 767px) {
    body {
        overflow-x: hidden !important;
    }
    
    .content,
    .project-container,
    .welcome-content,
    .about-content {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
}

/* ============================================
   Z-INDEX MANAGEMENT
   ============================================ */

/* Ensure proper stacking on mobile */
@media (max-width: 767px) {
    .header {
        z-index: 1000 !important;
    }
    
    .menu {
        z-index: 999 !important;
    }
    
    .project-blog-box {
        z-index: 10 !important;
    }
}