
@font-face {
    font-family: "Aviny";
    src: url("./fonts/aviny.ttf");
}

* {
    box-sizing: border-box;
}

html {
    font-family: "Aviny";
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background-color: rgb(224, 226, 224);
    direction: rtl;
}

/* هدر */

.header {
    width: 100%;
    min-height: 12vh;
    background-color: rgb(4, 158, 4);
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    padding: 2vh 3%;
    gap: 2vw;
}

.logo {
    color: white;
    font-size: 4vh;
    margin: 0;
}

.nav {
    display: flex;
    gap: 3vw;
    flex-wrap: wrap;
}

.nav a {
    text-decoration: none;
    color: white;
    font-size: 2.5vh;
}

.cart-link {
    text-decoration: none;
    color: white;
    font-size: 2.5vh;
    background-color: rgb(0, 110, 0);
    padding: 1vh 2%;
    border-radius: 2vw;
}

/* بخش اصلی */

.hero {
    width: 90%;
    min-height: 65vh;
    margin: 5vh auto;
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 4%;
    background-color: white;
    padding: 5vh 4%;
    border-radius: 3vw;
}

.hero-content {
    width: 55%;
}

.hero-label {
    color: rgb(4, 158, 4);
    font-size: 2.5vh;
}

.hero-content h2 {
    font-size: 5vh;
    color: rgb(30, 80, 30);
    margin: 2vh 0;
}

.hero-content p {
    font-size: 2.7vh;
    line-height: 2;
    color: #555;
}

.hero-button {
    display: inline-block;
    background-color: rgb(4, 158, 4);
    color: white;
    text-decoration: none;
    font-size: 2.7vh;
    padding: 1.5vh 4%;
    border-radius: 2vw;
    margin-top: 2vh;
}

.hero-image {
    width: 40%;
}

.hero-image img {
    width: 100%;
    height: 42vh;
    object-fit: cover;
    border-radius: 3vw;
}

/* درباره سبزایران */

.about {
    width: 85%;
    margin: 8vh auto;
    text-align: center;
}

.about h2 {
    font-size: 4vh;
    color: rgb(4, 130, 4);
}

.about p {
    font-size: 2.7vh;
    line-height: 2;
    color: #444;
}

/* محصولات */

.product-section {
    width: 90%;
    margin: 8vh auto;
    text-align: center;
}

.product-section h2 {
    font-size: 4.5vh;
    color: rgb(4, 130, 4);
}

.section-description {
    font-size: 2.7vh;
    color: #555;
    margin-bottom: 5vh;
}

.product-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4vh 3%;
}

.blog-card {
    background-color: white;
    border-radius: 2.5vw;
    overflow: hidden;
    box-shadow: 0 1vh 2vh rgba(0,0,0,0.08);
    transition: 0.3s;
}

.blog-card:hover {
    transform: translateY(-1vh);
}

.blog-card img {
    width: 100%;
    height: 35vh;
    object-fit: cover;
}

.card-content {
    padding: 2vh 5%;
}

.card-content h3 {
    font-size: 3.5vh;
    color: rgb(4, 130, 4);
}

.card-content p {
    font-size: 2.5vh;
    line-height: 2;
    color: #555;
}

.card-content strong {
    display: block;
    font-size: 2.5vh;
    color: #222;
    margin: 2vh 0;
}

.card-content a {
    display: inline-block;
    background-color: rgb(4, 158, 4);
    color: white;
    text-decoration: none;
    font-size: 2.5vh;
    padding: 1vh 5%;
    border-radius: 1.5vw;
}

/* بخش وبلاگ */

.blog-section {
    width: 85%;
    margin: 10vh auto;
    padding: 5vh 5%;
    background-color: white;
    border-radius: 3vw;
}

.blog-section h2 {
    text-align: center;
    font-size: 4vh;
    color: rgb(4, 130, 4);
    margin-bottom: 4vh;
}

.blog-content p {
    font-size: 2.7vh;
    line-height: 2.2;
    text-align: justify;
    color: #444;
}

/* دعوت به خرید */

.final-section {
    width: 90%;
    margin: 8vh auto;
    padding: 6vh 4%;
    background-color: rgb(4, 130, 4);
    border-radius: 3vw;
    text-align: center;
    color: white;
}

.final-section h2 {
    font-size: 4.5vh;
}

.final-section p {
    font-size: 2.7vh;
}

.final-button {
    display: inline-block;
    text-decoration: none;
    color: rgb(4, 130, 4);
    background-color: white;
    padding: 1.5vh 5%;
    border-radius: 2vw;
    font-size: 2.8vh;
    margin-top: 2vh;
}

/* فوتر */

.footer {
    width: 100%;
    padding: 4vh 3%;
    background-color: #263b2b;
    color: white;
    text-align: center;
}

.footer h2 {
    font-size: 4vh;
}

.footer p {
    font-size: 2.3vh;
}

/* تبلت */

@media (max-width: 900px) {

    .hero {
        width: 94%;
    }

    .hero-content h2 {
        font-size: 4vh;
    }

    .product-grid {
        gap: 3vh 3%;
    }

}

/* موبایل */

@media (max-width: 600px) {

    .header {
        flex-direction: column;
        gap: 2vh;
        padding: 3vh 4%;
    }

    .nav {
        justify-content: center;
        gap: 5vw;
    }

    .nav a {
        font-size: 2.5vh;
    }

    .hero {
        flex-direction: column;
        padding: 4vh 5%;
        gap: 3vh;
    }

    .hero-content {
        width: 100%;
        text-align: center;
    }

    .hero-content h2 {
        font-size: 4vh;
    }

    .hero-content p {
        font-size: 2.5vh;
    }

    .hero-image {
        width: 100%;
    }

    .hero-image img {
        height: 30vh;
    }

    .about {
        width: 92%;
    }

    .about p {
        font-size: 2.5vh;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 4vh;
    }

    .blog-card {
        border-radius: 4vw;
    }

    .blog-card img {
        height: 30vh;
    }

    .card-content h3 {
        font-size: 3.5vh;
    }

    .card-content p {
        font-size: 2.5vh;
    }

    .blog-section {
        width: 92%;
        padding: 4vh 5%;
    }

    .blog-section h2 {
        font-size: 3.5vh;
    }

    .blog-content p {
        font-size: 2.5vh;
        text-align: right;
    }

    .final-section h2 {
        font-size: 3.7vh;
    }

    .final-section p {
        font-size: 2.5vh;
    }

}
