/* =========================================
   RESPONSIVE STYLES
   ========================================= */

/* Large Laptops - 1200px */
@media (max-width: 1200px) {
    .products__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .features__item {
        gap: 48px;
    }
}

/* Tablets Landscape - 1024px */
@media (max-width: 1024px) {
    :root {
        --container-padding: 20px;
    }

    .section {
        padding: 80px 0;
    }

    .navbar__menu {
        display: none;
    }

    .navbar__toggle {
        display: flex;
    }

    .navbar__cta {
        display: none;
    }

    .hero__inner {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero__content {
        max-width: 100%;
    }

    .hero__subtitle {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .hero__actions {
        justify-content: center;
    }

    .hero__visual {
        min-height: 350px;
    }

    .about__grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .about__content {
        max-width: 100%;
        text-align: center;
    }

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

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

    .features__timeline::before {
        right: 30px;
        transform: none;
    }

    .features__item {
        grid-template-columns: 1fr;
        gap: 24px;
        padding-right: 60px;
    }

    .features__item:nth-child(even) .features__item-content {
        order: 1;
    }

    .features__item:nth-child(even) .features__item-visual {
        order: 2;
    }

    .features__item-dot {
        right: 18px;
    }

    .portfolio__grid {
        columns: 2;
    }

    .order__grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

/* Tablets Portrait - 768px */
@media (max-width: 768px) {
    .section {
        padding: 64px 0;
    }

    .section__header {
        margin-bottom: 48px;
    }

    .section__title {
        font-size: clamp(1.75rem, 4vw, 2.25rem);
    }

    .hero {
        min-height: auto;
        padding-top: calc(var(--header-height) + 40px);
        padding-bottom: 60px;
    }

    .hero__title {
        font-size: clamp(3rem, 9vw, 4.25rem);
        margin-left: auto;
        margin-right: 0;
    }

    .hero__subtitle {
        font-size: 17px;
    }

    .hero__visual {
        min-height: 280px;
    }

    .hero__pen-container {
        height: 300px;
    }

    .about__stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

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

    .products__grid.products__grid--catalog {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin: 0 auto;
    }

    .portfolio__grid {
        columns: 1;
        max-width: 480px;
        margin: 0 auto;
    }

    .order__form-wrapper {
        padding: 28px;
    }

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

    .footer__grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer__bottom-inner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .footer__bottom-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Mobile - 480px */
@media (max-width: 480px) {
    :root {
        --container-padding: 16px;
        --header-height: 70px;
    }

    .section {
        padding: 56px 0;
    }

    .hero__actions {
        flex-direction: column;
        width: 100%;
    }

    .hero__title {
        font-size: clamp(2.8rem, 13.6vw, 3.4rem);
        width: min(100%, 290px);
    }

    /* Keep Arabic words complete on narrow screens. */
    main h1,
    main h2,
    main h3,
    main h4,
    main h5,
    main h6,
    main p,
    .section__label,
    .btn {
        max-width: 100%;
        word-break: keep-all;
        overflow-wrap: normal;
        -webkit-hyphens: none;
        hyphens: none;
    }

    .section__label {
        font-size: 17px;
        letter-spacing: 1px;
        white-space: nowrap;
    }

    .section__label::before,
    .section__label::after {
        width: 18px;
        flex-shrink: 1;
    }

    .hero__title-line,
    .hero__title-line--second,
    .hero__title-line--accent {
        width: 100%;
        white-space: normal;
        transform: none;
        margin-inline: auto;
        text-align: center;
    }

    .products-showcase__name {
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
        word-break: keep-all;
    }

    .hero__actions .btn {
        width: 100%;
    }

    .hero__visual {
        min-height: 220px;
    }

    .hero__pen-container {
        height: 240px;
    }

    .about__stats {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .stat {
        padding: 16px;
        background: rgba(255,255,255,0.5);
        border-radius: var(--radius-lg);
    }

    .order__form-wrapper {
        padding: 20px;
    }

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

    .partners__track {
        --partners-gap: 32px;
    }

    .partners__logo {
        width: 110px;
        height: 55px;
    }

    .mobile-menu__link {
        font-size: 22px;
    }
}
