@media (max-width: 1199px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 991px) {
    .hero-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero-preview-stack {
        min-height: 520px;
        margin-top: 10px;
    }

    .section-heading h2,
    .contact-text h2 {
        font-size: 36px;
    }

    .demo-preview-panel {
        width: 98vw;
        height: 94vh;
        margin: 3vh auto;
    }

    .demo-preview-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .demo-preview-actions {
        width: 100%;
        flex-wrap: wrap;
    }
}

@media (max-width: 767px) {
    .hero-section,
    .portfolio-section,
    .contact-section {
        padding: 70px 0;
    }

    .hero-content h1 {
        font-size: 44px;
    }

    .hero-content p {
        font-size: 17px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .contact-form .form-row {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .preview-one {
        width: 75%;
        height: 170px;
    }

    .preview-two {
        width: 90%;
        top: 130px;
        height: 210px;
    }

    .preview-three {
        width: 82%;
        height: 190px;
        right: 0;
    }

    .hero-preview-stack {
        min-height: 390px;
    }

    .demo-preview-meta h3 {
        white-space: normal;
    }
}

@media (max-width: 575px) {
    .btn-main,
    .btn-secondary,
    .filter-btn {
        width: 100%;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .contact-form-wrap {
        padding: 22px;
    }

    .section-heading h2,
    .contact-text h2 {
        font-size: 30px;
    }

    .demo-preview-open,
    .demo-preview-close {
        width: 100%;
    }

    .demo-preview-topbar {
        padding: 16px;
    }
}