/* responsive.css - only media queries and overrides */

/* ---------- Mobile-first: base already mobile-friendly ---------- */

/* Small phones */
@media (max-width: 480px) {
    :root {
        --max-width: 1000px
    }

    .hero {
        min-height: 60vh
    }

    .hero-inner {
        flex-direction: column;
        gap: 18px
    }

    .hero-left {
        order: 2;
        text-align: center
    }

    .hero-right {
        order: 1
    }

    .hero-title {
        font-size: 2rem
    }

    .hero-card {
        width: 90%
    }

    .nav-links {
        display: none
    }

    .nav-toggle {
        display: block
    }

    .brand-text {
        display: none
    }

    .features-grid {
        grid-template-columns: 1fr
    }

    .how-grid {
        grid-template-columns: 1fr
    }

    .projects-grid {
        grid-template-columns: 1fr
    }

    .project-card {
        flex-direction: column;
        align-items: flex-start
    }

    .project-thumb {
        width: 100%;
        max-width: 100%;
        margin-bottom: 12px
    }

    .project-thumb img {
        height: 200px
    }

    .testimonials-grid {
        grid-template-columns: 1fr
    }

    .contact-grid {
        grid-template-columns: 1fr
    }

    .hero {
        background-attachment: scroll
    }

    /* fixed backgrounds cause issues on small devices */
}

@media (max-width: 480px) {
    .project-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .project-thumb {
        width: 100%;
        max-width: 100%;
        margin-bottom: 12px;
    }

    /* ✅ Fix image scaling */
    .project-thumb img {
        width: 100%;
        /* take full width of card */
        height: auto;
        /* keep proportions */
        object-fit: cover;
        /* crop if necessary */
        display: block;
        border-radius: 8px;
    }

    .project-body {
        width: 100%;
        text-align: center;
    }
}

/* Small tablets / large phones */
@media (min-width: 481px) and (max-width: 767px) {
    .nav-links {
        display: none
    }

    .nav-toggle {
        display: block
    }

    .hero-inner {
        flex-direction: column
    }

    .hero-left {
        text-align: center
    }

    .hero-right {
        text-align: center
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .how-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .projects-grid {
        grid-template-columns: 1fr
    }

    .project-card {
        flex-direction: column
    }

    .contact-grid {
        grid-template-columns: 1fr
    }

    .hero-card {
        max-width: 360px
    }

    .project-thumb img {
        height: 180px
    }
}

/* Tablets / small desktops */
@media (min-width:768px) and (max-width: 991px) {
    .nav-links {
        display: flex
    }

    .nav-toggle {
        display: none
    }

    .features-grid {
        grid-template-columns: repeat(3, 1fr)
    }

    .how-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .project-card {
        flex-direction: row
    }

    .project-thumb img {
        height: 160px
    }

    .contact-grid {
        grid-template-columns: 1fr 300px
    }

    .hero-title {
        font-size: 2.2rem
    }
}

/* Desktop */
@media (min-width:992px) and (max-width: 1200px) {
    .features-grid {
        grid-template-columns: repeat(4, 1fr)
    }

    .how-grid {
        grid-template-columns: repeat(4, 1fr)
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr)
    }
}

/* Large desktops */
@media (min-width:1201px) {
    .nav-toggle {
        display: none
    }

    .nav-links {
        display: flex
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .features-grid {
        grid-template-columns: repeat(4, 1fr)
    }

    .hero {
        background-attachment: fixed
    }
}

/* Desktop mode */
@media (min-width: 768px) {
    .nav-toggle {
        display: none;
    }

    .nav-links {
        display: flex !important;
        flex-direction: row;
        background: none;
        position: static;
    }
}