@media (max-width: 1024px) {
    .founders-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    * {
        max-width: 100vw !important;
    }

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

    .main-nav {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .nav-container {
        padding: 0 12px !important;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .nav-logo {
        gap: 8px;
        min-width: auto;
    }

    .logo-image {
        max-width: 30px;
        height: 30px;
        object-fit: cover;
    }

    .brand-name {
        font-size: 14px;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 68px;
        left: 0;
        width: 100vw;
        max-width: 100vw;
        background: var(--primary);
        flex-direction: column;
        padding: 12px;
        border-bottom: 1px solid var(--border);
        gap: 12px;
        text-align: center;
        box-sizing: border-box;
        overflow: hidden;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-link {
        color: #fff;
        font-size: 14px;
        padding: 8px 0;
    }

    .nav-link:hover {
        color: rgba(255, 255, 255, 0.8);
    }

    .nav-cta {
        width: calc(100% - 24px);
        margin: 0 12px;
    }

    .hamburger {
        display: block;
    }

    h1 { font-size: 28px; }
    h2 { font-size: 24px; }
    h3 { font-size: 18px; }
    h4 { font-size: 16px; }

    .container {
        padding: 0 12px !important;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin: 0 !important;
    }

    main {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        margin-top: 68px;
    }

    .hero-grid, .about-grid, .calc-grid, .contact-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .founders-grid {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        display: flex;
        justify-content: center;
        margin-top: 30px;
    }

    .dashboard-image {
        max-width: 200px !important;
        width: 100%;
        height: auto;
    }

    .hero {
        padding-top: 30px;
        padding-bottom: 40px;
    }

    .hero-content {
        padding: 0;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .stat-card {
        padding: 15px 10px;
    }

    .stat-num {
        font-size: 18px;
    }

    .stat-label {
        font-size: 12px;
    }

    .services-grid, .announcements-grid, .digital-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .about-gallery {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-bottom .bottom-grid {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    section {
        padding: 40px 0;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
    }

    .btn, input, select, textarea {
        width: 100%;
        box-sizing: border-box;
        max-width: 100%;
    }

    .hero-btns {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    .value-pills {
        justify-content: center;
    }

    /* Carousel responsive styles - Show mobile carousel on small screens */
    .digital-images-desktop {
        display: none !important;
    }

    .digital-images-mobile {
        display: block !important;
        margin-top: 40px;
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    .board-grid-desktop {
        display: none !important;
    }

    .board-carousel-container-mobile {
        display: block !important;
        position: relative;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    .carousel-container {
        max-width: 100vw !important;
        width: 100%;
        overflow: hidden;
    }

    .carousel-btn {
        display: block !important;
    }

    .carousel-track {
        width: 100%;
        overflow: hidden;
    }

    .board-carousel-track {
        width: 100%;
        overflow: hidden;
    }

    .product-list, .digital-steps {
        padding-left: 15px;
        font-size: 14px;
    }

    .service-category, .service-card, .digital-card {
        padding: 20px;
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    .board-card {
        padding: 15px;
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    .board-img {
        height: auto;
        overflow: hidden;
    }

    .wendi-gallery {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 20px;
        padding-bottom: 15px;
        -webkit-overflow-scrolling: touch;
    }

    .wendi-card {
        flex: 0 0 85%;
        scroll-snap-align: center;
    }

    .wendi-gallery-img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }


    /* Additional mobile friendly rules */
    .dashboard-mockup {
        width: 100%;
        padding: 16px;
        box-sizing: border-box;
    }

    .mock-balance .amount {
        font-size: 24px;
    }

    .about-card {
        padding: 20px;
        width: 100%;
        box-sizing: border-box;
    }

    /* Ensure forms are mobile friendly */
    .form-group {
        margin-bottom: 15px;
        width: 100%;
    }

    input[type="text"],
    input[type="email"],
    input[type="number"],
    input[type="tel"],
    textarea,
    select {
        width: 100% !important;
        padding: 10px;
        box-sizing: border-box;
        max-width: 100%;
    }

    .calc-grid {
        width: 100%;
        overflow: hidden;
    }

    .calc-card {
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    .footer-brand {
        width: 100%;
    }

    footer {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    /* Additional overflow prevention */
    div {
        max-width: 100vw;
    }

    section > div {
        overflow-x: hidden;
    }
}
