/* ==================== RESPONSIVE DESIGN ==================== */

/* Tablet (1024px and below) */
@media (max-width: 1024px) {
    /* Hero */
    section[style*="min-height: 100vh"] img {
        width: clamp(200px, 50vw, 300px) !important;
    }
    
    .hero-title {
        font-size: clamp(4rem, 15vw, 8rem) !important;
    }
    
    /* Bento Grid - 2 columns */
    section div[style*="grid-template-columns: repeat(4, 1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }
    
    /* Geometric Section - Stack vertically */
    .geometric-why-vertex {
        grid-template-columns: 1fr !important;
        height: auto !important;
        position: relative !important;
    }
    
    .geometric-why-vertex > div {
        min-height: 60vh !important;
    }
    
    /* Disable geometric wrapper height on mobile */
    div[style*="height: 300vh"] {
        height: auto !important;
    }
    
    /* Add swipe indicator */
    .geometric-why-vertex::after {
        content: '← Swipe →';
        position: absolute;
        bottom: 80px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.875rem;
        opacity: 0.5;
        z-index: 30;
        pointer-events: none;
    }
    
    /* News carousel - 2 items */
    .news-carousel-item {
        flex: 0 0 calc(50% - 15px) !important;
    }
    
    /* Stats grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Technology grid */
    section div[style*="grid-template-columns: repeat(2, 1fr)"] {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
    }
    
    /* Timeline */
    div[style*="grid-template-columns: 1fr auto 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        text-align: center !important;
    }
    
    div[style*="grid-template-columns: 1fr auto 1fr"] > div:nth-child(2) {
        display: none !important;
    }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
    /* Hide desktop nav */
    #desktopNav {
        display: none !important;
    }
    
    /* Hero */
    section[style*="min-height: 100vh"] {
        padding: 100px 15px 40px !important;
    }
    
    section[style*="min-height: 100vh"] img {
        width: clamp(180px, 60vw, 250px) !important;
        margin-bottom: 15px !important;
    }
    
    .hero-title {
        font-size: clamp(3rem, 18vw, 6rem) !important;
        margin-bottom: 15px !important;
    }
    
    section[style*="min-height: 100vh"] > div {
        margin-top: -100px !important;
    }
    
    /* Marquee */
    .marquee {
        padding: 20px 0 !important;
    }
    
    .marquee-item {
        font-size: 1.25rem !important;
        padding: 0 20px !important;
    }
    
    /* Bento Grid - 1 column */
    section div[style*="grid-template-columns: repeat(4, 1fr)"],
    section div[style*="grid-template-columns: repeat(2, 1fr)"] {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    /* News carousel - 1 item */
    .news-carousel-item {
        flex: 0 0 calc(100% - 20px) !important;
        min-width: 280px !important;
    }
    
    /* News grid - 1 column */
    section div[style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Stats grid - 1 column */
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Why VERTEX - Stack */
    .geometric-why-vertex > div:first-child h2 {
        font-size: 3rem !important;
    }
    
    .geometric-why-vertex > div:first-child p {
        font-size: 1.125rem !important;
    }
    
    /* Mini carousel */
    .mini-carousel-number {
        font-size: 5rem !important;
    }
    
    .mini-carousel-title {
        font-size: 1rem !important;
    }
    
    /* Geometric content */
    .geometric-content > div {
        padding: 30px 25px !important;
    }
    
    .geo-number {
        font-size: 5rem !important;
    }
    
    .geo-title {
        font-size: 1.75rem !important;
    }
    
    .geo-desc {
        font-size: 1rem !important;
    }
    
    /* Footer grid */
    footer div[style*="grid-template-columns: 1.5fr 1fr 1fr 1fr"] {
        grid-template-columns: 1fr 1fr !important;
        gap: 40px !important;
    }
    
    /* Pricing cards */
    section div[style*="grid-template-columns: repeat(4"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Headings */
    h1 {
        font-size: clamp(2rem, 10vw, 3.5rem) !important;
    }
    
    h2 {
        font-size: clamp(1.75rem, 8vw, 2.5rem) !important;
    }
    
    /* Sections padding */
    section[style*="padding: 100px"],
    section[style*="padding: 120px"],
    section[style*="padding: 150px"] {
        padding: 60px 20px !important;
    }
    
    /* Diagonal section */
    .diagonal-section {
        padding: 80px 20px !important;
        margin: 40px 0 !important;
    }
    
    .diagonal-content p {
        font-size: 1.25rem !important;
    }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(2.5rem, 20vw, 4.5rem) !important;
    }
    
    .geo-number {
        font-size: 4rem !important;
    }
    
    .mini-carousel-number {
        font-size: 4rem !important;
    }
    
    footer div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Forms */
    form input,
    form textarea,
    form button {
        font-size: 16px !important;
    }
}

/* Login/Register Forms */
@media (max-width: 768px) {
    section div[style*="max-width: 500px"] {
        max-width: 100% !important;
        padding: 30px 20px !important;
    }
    
    form {
        width: 100% !important;
    }
}

/* Dashboard */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }
}

/* News full-width cards */
@media (max-width: 1024px) {
    article[style*="grid-template-columns: 400px 1fr"] {
        grid-template-columns: 1fr !important;
    }
    
    article[style*="grid-template-columns: 400px 1fr"] > div:first-child {
        min-height: 250px !important;
    }
}

/* Related Reading */
@media (max-width: 1024px) {
    div[style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    div[style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: 1fr !important;
    }
}

