/* =========================================
   MAVIHAM HOMEPAGE
   Clean RTL + Responsive + Performance-friendly
========================================= */

/* -----------------------------------------
   LOCAL FONT
   Put font files in: assets/fonts/
----------------------------------------- */
@font-face {
    font-family: "Vazirmatn";
    src: url("../fonts/Vazirmatn-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Vazirmatn";
    src: url("../fonts/Vazirmatn-Medium.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Vazirmatn";
    src: url("../fonts/Vazirmatn-SemiBold.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Vazirmatn";
    src: url("../fonts/Vazirmatn-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --mavi-primary: #b88a3b;
    --mavi-primary-dark: #9f742e;
    --mavi-text: #222;
    --mavi-muted: #6f6f6f;
    --mavi-border: #e9e9e9;
    --mavi-soft: #f8f8f8;
    --mavi-radius: 18px;
}

.mavi-home,
.mavi-home button,
.mavi-home input,
.mavi-home textarea,
.mavi-home select {
    font-family: "Vazirmatn", sans-serif;
}

.mavi-home {
    direction: rtl;
    color: var(--mavi-text);
}

.mavi-home *,
.mavi-home *::before,
.mavi-home *::after {
    box-sizing: border-box;
}

/* -----------------------------------------
   GLOBAL CONTAINER
----------------------------------------- */
.mavi-container {
    width: min(calc(100% - 64px), 1400px);
    margin-inline: auto;
}

/* Important: remove the old global rule that gave every section padding.
   Each section below controls its own spacing. */

/* -----------------------------------------
   SHARED SECTION HEADER
----------------------------------------- */
.mavi-section-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
}

.mavi-section-title h2 {
    margin: 4px 0 0;
    color: var(--mavi-text);
    font-size: clamp(24px, 2vw, 32px);
    line-height: 1.5;
    font-weight: 700;
}

.mavi-section-eyebrow {
    display: block;
    color: var(--mavi-primary);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.8;
}

.mavi-section-link,
.mavi-section-title a {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    padding: 6px 0;
    color: var(--mavi-primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.mavi-section-link:hover,
.mavi-section-title a:hover {
    color: var(--mavi-primary-dark);
}

/* -----------------------------------------
   HERO
----------------------------------------- */
.mavi-hero {
    position: relative;
    min-height: 560px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-image: url("../images/maviham-hero.webp");
    background-size: cover;
    background-position: center;
}

.mavi-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(
        270deg,
        rgba(255, 255, 255, .94) 0%,
        rgba(255, 255, 255, .82) 35%,
        rgba(255, 255, 255, .20) 65%,
        rgba(255, 255, 255, 0) 100%
    );
}

.mavi-hero .mavi-container {
    position: relative;
    z-index: 1;
}

.mavi-hero__content {
    max-width: 680px;
    padding: 60px 0;
    text-align: right;
}

.mavi-hero__eyebrow {
    display: inline-block;
    margin-bottom: 15px;
    color: #a97828;
    font-size: 15px;
    font-weight: 600;
}

.mavi-hero h1 {
    margin: 0;
    color: #242424;
    font-size: clamp(38px, 4vw, 64px);
    font-weight: 800;
    line-height: 1.35;
}

.mavi-hero p {
    max-width: 600px;
    margin: 20px 0 0;
    color: #555;
    font-size: 18px;
    line-height: 2;
}

.mavi-hero__actions {
    display: flex;
    flex-wrap: wrap;
    margin-top: 28px;
    gap: 12px;
}

.mavi-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 30px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    transition: transform .2s ease, background .2s ease;
}

.mavi-btn--primary {
    background: var(--mavi-primary);
    color: #fff;
}

.mavi-btn--primary:hover {
    background: var(--mavi-primary-dark);
    color: #fff;
    transform: translateY(-2px);
}

/* -----------------------------------------
   FEATURES
----------------------------------------- */
.mavi-features {
    padding: 24px 0;
}

.mavi-features-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.mavi-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--mavi-border);
    border-radius: 16px;
    transition: transform .2s ease, box-shadow .2s ease;
}

.mavi-feature:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .05);
}

.mavi-feature__icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    font-size: 24px;
    background: #f8f5ef;
    border-radius: 12px;
}

.mavi-feature h3 {
    margin: 0 0 3px;
    font-size: 15px;
    line-height: 1.7;
}

.mavi-feature p {
    margin: 0;
    color: #777;
    font-size: 12px;
    line-height: 1.8;
}

/* -----------------------------------------
   CATEGORIES
----------------------------------------- */
.mavi-categories {
    padding: 70px 0;
}

.mavi-category-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 20px;
}

.mavi-category-card {
    display: block;
    text-align: center;
    text-decoration: none;
    color: var(--mavi-text);
    background: #fff;
    border: 1px solid var(--mavi-border);
    border-radius: var(--mavi-radius);
    padding: 18px;
    transition: transform .25s ease, box-shadow .25s ease;
}

.mavi-category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
}

.mavi-category-card img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 14px;
}

.mavi-category-card h3 {
    margin: 14px 0 4px;
    font-size: 16px;
    line-height: 1.7;
}

.mavi-category-card span {
    color: #777;
    font-size: 13px;
}

/* -----------------------------------------
   PRODUCTS
----------------------------------------- */
.mavi-products {
    padding: 70px 0;
}

.mavi-products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.mavi-product-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--mavi-border);
    border-radius: var(--mavi-radius);
    transition: transform .25s ease, box-shadow .25s ease;
}

.mavi-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, .08);
}

.mavi-product-image {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f7f7f7;
}

.mavi-product-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .35s ease;
}

.mavi-product-card:hover .mavi-product-image img {
    transform: scale(1.04);
}

.mavi-sale-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 10px;
    background: var(--mavi-primary);
    color: #fff;
    font-size: 12px;
    border-radius: 8px;
}

.mavi-product-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 16px;
}

.mavi-product-title {
    margin: 0;
    font-size: 15px;
    line-height: 1.8;
}

.mavi-product-title a {
    color: var(--mavi-text);
    text-decoration: none;
}

.mavi-product-price {
    margin-top: 12px;
    font-weight: 700;
}

.mavi-product-actions {
    margin-top: auto;
    padding-top: 16px;
}

.mavi-product-button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: 10px;
    background: #1d1d1d;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    transition: background .2s ease;
}

.mavi-product-button:hover {
    background: var(--mavi-primary);
    color: #fff;
}

/* -----------------------------------------
   PROMO BANNERS
----------------------------------------- */
.mavi-banners {
    padding: 20px 0 70px;
}

.mavi-banners-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.mavi-banner {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 300px;
    overflow: hidden;
    padding: 35px;
    border-radius: 22px;
    text-decoration: none;
    background-size: cover;
    background-position: center;
}

.mavi-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(0, 0, 0, .72), rgba(0, 0, 0, .15));
}

.mavi-banner__content {
    position: relative;
    z-index: 1;
    max-width: 360px;
    color: #fff;
}

.mavi-banner__content span {
    font-size: 14px;
    opacity: .85;
}

.mavi-banner__content h2 {
    margin: 10px 0;
    color: #fff;
    font-size: 30px;
    line-height: 1.4;
}

.mavi-banner__content p {
    margin: 0 0 20px;
    color: rgba(255, 255, 255, .85);
    line-height: 1.8;
}

.mavi-banner__content strong {
    display: inline-block;
    padding: 10px 18px;
    background: var(--mavi-primary);
    border-radius: 8px;
    font-size: 13px;
}

.mavi-banner--faucet {
    background-image: url("../images/banner-faucet.webp");
}

.mavi-banner--building {
    background-image: url("../images/banner-building.webp");
}

/* -----------------------------------------
   POPULAR BRANDS
----------------------------------------- */
.mavi-brands {
    padding: 70px 0;
    background: var(--mavi-soft);
}

.mavi-brands-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}

.mavi-brand-card {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 110px;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--mavi-border);
    border-radius: 16px;
    text-decoration: none;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.mavi-brand-card:hover {
    transform: translateY(-4px);
    border-color: rgba(184, 138, 59, .5);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .07);
}

.mavi-brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 65px;
}

.mavi-brand-logo img {
    display: block;
    max-width: 100%;
    max-height: 65px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.mavi-brand-name {
    color: var(--mavi-text);
    font-size: 17px;
    font-weight: 700;
    text-align: center;
}

/* -----------------------------------------
   BLOG
----------------------------------------- */
.mavi-blog {
    padding: 70px 0;
}

.mavi-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.mavi-blog-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--mavi-border);
    border-radius: 20px;
    transition: transform .25s ease, box-shadow .25s ease;
}

.mavi-blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, .08);
}

.mavi-blog-image {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f5f5f5;
}

.mavi-blog-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.mavi-blog-card:hover .mavi-blog-image img {
    transform: scale(1.04);
}

.mavi-blog-content {
    padding: 20px;
}

.mavi-blog-meta {
    margin-bottom: 10px;
    color: #888;
    font-size: 12px;
}

.mavi-blog-title {
    margin: 0 0 12px;
    font-size: 18px;
    line-height: 1.8;
}

.mavi-blog-title a {
    color: var(--mavi-text);
    text-decoration: none;
}

.mavi-blog-excerpt {
    margin: 0;
    color: #777;
    font-size: 14px;
    line-height: 2;
}

.mavi-blog-readmore {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    color: var(--mavi-primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.mavi-blog-readmore span {
    transition: transform .2s ease;
}

.mavi-blog-readmore:hover span {
    transform: translateX(-4px);
}

/* -----------------------------------------
   FINAL CTA
----------------------------------------- */
.mavi-cta {
    padding: 30px 0 70px;
}

.mavi-cta__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 50px;
    background: linear-gradient(135deg, #1d1d1d, #303030);
    border-radius: 24px;
    color: #fff;
}

.mavi-cta__content {
    max-width: 700px;
}

.mavi-cta__content .mavi-section-eyebrow {
    color: #d6aa5c;
}

.mavi-cta__content h2 {
    margin: 10px 0 15px;
    color: #fff;
    font-size: 30px;
    line-height: 1.5;
}

.mavi-cta__content p {
    margin: 0;
    color: rgba(255, 255, 255, .75);
    font-size: 15px;
    line-height: 2;
}

.mavi-cta__actions {
    display: flex;
    flex-shrink: 0;
    gap: 12px;
}

.mavi-cta__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: transform .2s ease, background .2s ease;
}

.mavi-cta__button:hover {
    transform: translateY(-2px);
}

.mavi-cta__button--primary {
    background: var(--mavi-primary);
    color: #fff;
}

.mavi-cta__button--secondary {
    border: 1px solid rgba(255, 255, 255, .35);
    color: #fff;
}

/* -----------------------------------------
   RESPONSIVE
----------------------------------------- */
@media (max-width: 1100px) {
    .mavi-category-grid,
    .mavi-brands-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .mavi-products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .mavi-hero {
        min-height: 500px;
    }

    .mavi-hero__content {
        max-width: 580px;
    }

    .mavi-hero h1 {
        font-size: 48px;
    }

    .mavi-features-grid,
    .mavi-blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mavi-cta__inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 700px) {
    .mavi-container {
        width: min(calc(100% - 32px), 1400px);
    }

    .mavi-section-title {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 24px;
    }

    .mavi-section-title h2 {
        font-size: 24px;
    }

    .mavi-hero {
        min-height: 620px;
        align-items: flex-end;
        background-position: 28% center;
    }

    .mavi-hero::before {
        background: linear-gradient(
            0deg,
            rgba(255, 255, 255, .97) 0%,
            rgba(255, 255, 255, .92) 42%,
            rgba(255, 255, 255, .25) 100%
        );
    }

    .mavi-hero__content {
        width: 100%;
        max-width: none;
        padding: 35px 0 45px;
    }

    .mavi-hero__eyebrow {
        font-size: 13px;
    }

    .mavi-hero h1 {
        font-size: 34px;
        line-height: 1.45;
    }

    .mavi-hero p {
        margin-top: 15px;
        font-size: 15px;
        line-height: 1.9;
    }

    .mavi-hero__actions,
    .mavi-btn {
        width: 100%;
    }

    .mavi-features {
        padding: 15px 0;
    }

    .mavi-features-grid,
    .mavi-category-grid,
    .mavi-products-grid,
    .mavi-brands-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .mavi-feature {
        padding: 14px 10px;
        gap: 8px;
    }

    .mavi-feature__icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .mavi-feature h3 {
        font-size: 13px;
    }

    .mavi-feature p {
        display: none;
    }

    .mavi-categories,
    .mavi-products,
    .mavi-brands,
    .mavi-blog {
        padding: 45px 0;
    }

    .mavi-category-card {
        padding: 12px;
    }

    .mavi-product-card {
        border-radius: 14px;
    }

    .mavi-product-content {
        padding: 12px;
    }

    .mavi-product-title,
    .mavi-product-price {
        font-size: 13px;
    }

    .mavi-product-button {
        min-height: 38px;
        font-size: 12px;
    }

    .mavi-banners {
        padding: 10px 0 45px;
    }

    .mavi-banners-grid,
    .mavi-blog-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .mavi-banner {
        min-height: 240px;
        padding: 25px;
        border-radius: 18px;
    }

    .mavi-banner__content h2 {
        font-size: 24px;
    }

    .mavi-brand-card {
        min-height: 90px;
        padding: 15px;
        border-radius: 14px;
    }

    .mavi-brand-logo,
    .mavi-brand-logo img {
        max-height: 50px;
    }

    .mavi-blog-card {
        border-radius: 16px;
    }

    .mavi-blog-content {
        padding: 16px;
    }

    .mavi-blog-title {
        font-size: 16px;
    }

    .mavi-cta {
        padding: 20px 0 45px;
    }

    .mavi-cta__inner {
        padding: 30px 20px;
        border-radius: 18px;
        gap: 25px;
    }

    .mavi-cta__content h2 {
        font-size: 23px;
    }

    .mavi-cta__content p {
        font-size: 14px;
    }

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

    .mavi-cta__button {
        width: 100%;
    }
}
