/* ============================================================
   SOFTEKUS — Responsive Breakpoints
   ============================================================
   Breakpoints:
   - xs: 0 – 479px     (small phones)
   - sm: 480 – 639px    (phones)
   - md: 640 – 767px    (large phones / small tablets)
   - lg: 768 – 1023px   (tablets)
   - xl: 1024 – 1279px  (small desktops / landscape tablets)
   - 2xl: 1280+         (desktops — default)
   ============================================================ */

/* ============================================================
   XL: 1024 – 1279px
   ============================================================ */
@media (max-width: 1279px) {
    :root {
        --container-padding: 2rem;
    }

    .about__grid {
        gap: var(--space-10);
    }

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

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

    .project__content {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .project__content--reverse .project__info {
        order: 1;
    }

    .project__content--reverse .project__visual {
        order: 2;
    }
}

/* ============================================================
   LG: 768 – 1023px
   ============================================================ */
@media (max-width: 1023px) {
    .section {
        padding: var(--space-20) 0;
    }

    .section__header {
        margin-bottom: var(--space-12);
    }

    /* Nav: mobile menu */
    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 400px;
        height: 100vh;
        background: var(--color-bg);
        padding: calc(var(--header-height) + var(--space-8)) var(--space-8) var(--space-8);
        transition: right var(--duration-normal) var(--ease-out);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
        z-index: var(--z-sticky);
        overflow-y: auto;
    }

    [data-theme="dark"] .nav__menu {
        background: var(--color-bg-dark);
    }

    .nav__menu.open {
        right: 0;
    }

    .nav__list {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-1);
    }

    .nav__link {
        font-size: var(--text-lg);
        padding: var(--space-3) var(--space-4);
        width: 100%;
        color: var(--color-text);
    }

    .header:not(.scrolled) .nav__link {
        color: var(--color-text);
    }

    .header:not(.scrolled) .nav__link:hover,
    .header:not(.scrolled) .nav__link.active {
        color: var(--color-primary);
    }

    .nav__toggle {
        display: flex;
    }

    .nav__cta {
        display: none;
    }

    /* Mobile menu overlay */
    .nav__menu::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: all var(--duration-normal) var(--ease-out);
        z-index: -1;
    }

    .nav__menu.open::before {
        opacity: 1;
        visibility: visible;
    }

    /* About */
    .about__grid {
        grid-template-columns: 1fr;
        gap: var(--space-10);
    }

    .about__visual {
        max-width: 500px;
        margin: 0 auto;
    }

    .about__floating-card--1 {
        left: 10px;
        bottom: -10px;
    }

    .about__floating-card--2 {
        right: 10px;
        top: -10px;
    }

    /* Services */
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Tech */
    .tech__categories {
        grid-template-columns: 1fr;
    }

    /* Contact */
    .contact__grid {
        grid-template-columns: 1fr;
        gap: var(--space-10);
    }

    .contact__info {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }

    .contact__map {
        grid-column: 1 / -1;
    }

    /* Footer */
    .footer__top {
        grid-template-columns: 1fr;
        gap: var(--space-10);
    }

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

/* ============================================================
   MD: 640 – 767px
   ============================================================ */
@media (max-width: 767px) {
    .section {
        padding: var(--space-16) 0;
    }

    .hero__stats {
        gap: var(--space-6);
    }

    .hero__stat-number {
        font-size: var(--text-3xl);
    }

    .hero__stat-divider {
        display: none;
    }

    .hero__stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        text-align: center;
    }

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

    .service-card {
        padding: var(--space-6);
    }

    .project {
        padding: var(--space-6);
    }

    .project__results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-3);
    }

    .team__grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .tech__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-3);
    }

    .testimonial-card {
        padding: var(--space-6);
    }

    .testimonial-card__quote {
        font-size: var(--text-base);
    }

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

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

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

    .footer__bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================================
   SM: 480 – 639px
   ============================================================ */
@media (max-width: 639px) {
    :root {
        --container-padding: 1.25rem;
        --header-height: 64px;
    }

    .hero__title {
        font-size: clamp(var(--text-3xl), 8vw, var(--text-5xl));
    }

    .hero__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero__actions .btn {
        justify-content: center;
    }

    .process__step {
        gap: var(--space-5);
    }

    .process__line {
        left: 24px;
    }

    .process__step-marker {
        width: 48px;
        height: 48px;
    }

    .project__title {
        font-size: var(--text-2xl);
    }

    .about__image-grid {
        height: 360px;
    }

    .clients__logos {
        gap: var(--space-6);
    }
}

/* ============================================================
   XS: < 480px
   ============================================================ */
@media (max-width: 479px) {
    :root {
        --container-padding: 1rem;
    }

    .section__title {
        font-size: var(--text-2xl);
    }

    .hero__stats {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-4);
    }

    .hero__stat-number {
        font-size: var(--text-2xl);
    }

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

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

    .footer__links {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .footer__legal {
        flex-direction: column;
        gap: var(--space-3);
    }
}
