/* Explain: Layout, responsive spacing, and section padding adjustments. */
.section-pad {
    padding-top: clamp(5rem, 9vw, 8rem);
    padding-bottom: clamp(5rem, 9vw, 8rem);
}

.content-shell {
    width: min(100% - 2rem, 1180px);
    margin-inline: auto;
}

.wide-shell {
    width: min(100% - 1rem, 1440px);
    margin-inline: auto;
}

.board-grid {
    background-image:
        linear-gradient(rgba(32, 33, 36, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(32, 33, 36, 0.045) 1px, transparent 1px);
    background-size: 42px 42px;
}

.layered-offset {
    transform: translateY(clamp(-3rem, -5vw, -1.5rem));
}

@media (max-width: 767px) {
    .layered-offset {
        transform: none;
    }

    .section-pad {
        padding-top: clamp(3.75rem, 12vw, 5rem);
        padding-bottom: clamp(3.75rem, 12vw, 5rem);
    }

    header img[alt="ברכת הצנרת"] {
        max-height: 7.5rem;
    }

    #top > section:first-child:not(.store-catalog):not(.service-detail-hero):not(.services-list-section):not(.product-detail-section):not(.cart-page-section):not(.contact-hero) {
        min-height: 88svh;
    }

    #top > section:first-child:not(.store-catalog):not(.service-detail-hero):not(.services-list-section):not(.product-detail-section):not(.cart-page-section):not(.contact-hero) .content-shell {
        min-height: 88svh;
        padding-top: 9.5rem;
        padding-bottom: 3rem;
    }

    #top > section:first-child .eyebrow {
        max-width: min(100%, 22rem);
        padding: 0.65rem 1rem;
        font-size: 0.66rem;
        line-height: 1.45;
        letter-spacing: 0.08em;
    }

    #top > section:first-child h1 {
        font-size: clamp(2.35rem, 10.5vw, 3.2rem);
        line-height: 1.08;
    }

    #top > section:first-child p {
        font-size: 1rem;
        line-height: 1.65;
    }

    #top > section:first-child .flex.flex-col.justify-center {
        width: 100%;
        max-width: 22rem;
    }

    #top > section:first-child .btn {
        width: 100%;
        min-height: 3.25rem;
        padding-inline: 1.25rem;
        font-size: 1rem;
    }

    #top > section:not(:first-child) h2 {
        font-size: clamp(2rem, 8.5vw, 2.75rem);
        line-height: 1.15;
    }

    #top > section:not(:first-child) h3 {
        font-size: clamp(1.65rem, 7vw, 2.2rem);
        line-height: 1.2;
    }

    #top > section:not(:first-child) p,
    #top > section:not(:first-child) li {
        font-size: 1rem;
        line-height: 1.75;
    }
}

/* צמצום הרווח שבין "תחומי התמחות" למחירון המוצרים */
.about-services-tight-bottom {
    padding-bottom: clamp(2.5rem, 4vw, 4rem);
}

.catalog-tight-top {
    padding-top: clamp(2.5rem, 4vw, 4rem);
}

/* דפי שירות - צמצום הרווח העליון במובייל ובטאבלט כך שהמלל צמוד לראש הדף */
.page-services-list {
    padding-top: 7rem;
}

@media (max-width: 1023px) {
    .page-service main {
        padding-top: 8.75rem;
    }

    .page-services-list {
        padding-top: 8.75rem;
    }

    .service-detail-hero.section-pad {
        padding-top: 0.5rem;
    }

    .page-services-list .services-list-section.section-pad {
        padding-top: 0.5rem;
    }
}

@media (min-width: 640px) and (max-width: 1023px) {
    .page-service main {
        padding-top: 12rem;
    }

    .page-services-list {
        padding-top: 12rem;
    }
}

/* דפי מוצר, קטלוג, קטגוריות ושירותים - במובייל ובטאבלט התוכן עולה עד לתחתית הלוגו,
   בלי רווח מיותר, וכפתור "חזרה" נשאר גלוי ולא נחסם על ידי הלוגו. */
@media (max-width: 1023px) {
    .page-product main,
    .page-store main,
    .page-catalog main,
    .page-shop main,
    .page-category main,
    .page-service main,
    .page-services-list main {
        padding-top: 8.5rem;
    }

    .page-product main > .section-pad:first-child,
    .page-product .product-detail-section.section-pad,
    .page-store .store-catalog.section-pad,
    .page-catalog .store-catalog.section-pad,
    .page-shop .store-catalog.section-pad,
    .page-category .store-catalog.section-pad,
    .page-service .service-detail-hero.section-pad,
    .page-services-list .services-list-section.section-pad {
        padding-top: 0;
    }
}

@media (min-width: 640px) and (max-width: 1023px) {
    .page-product main,
    .page-store main,
    .page-catalog main,
    .page-shop main,
    .page-category main,
    .page-service main,
    .page-services-list main {
        padding-top: 11.75rem;
    }
}

/* צור קשר וסל קניות - צמצום הרווח הגדול מעל הכותרת במובייל ובטאבלט */
@media (max-width: 767px) {
    #top > section.contact-hero .content-shell {
        padding-top: 3rem;
    }

    .cart-page-section.section-pad {
        padding-top: 2rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    #top > section.contact-hero .content-shell {
        padding-top: 4rem;
    }

    .cart-page-section.section-pad {
        padding-top: 3rem;
    }
}

@media (min-width: 1024px) {
    .cart-page-section.section-pad {
        padding-top: 4rem;
    }
}
