﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'Aviny';
    src: url('/fonts/aviny.woff') format('woff'), url('fonts/aviny.ttf') format('truetype');
}

@font-face {
    font-family: 'Vazir';
    src: url('/fonts/vazir.woff') format('woff'), url('fonts/vazir.ttf') format('truetype');
}

html {
    font-size: 16px;
}

@media (max-width: 950px) {
    html {
        font-size: 14px
    }
}


body {
    background-color: #F5F5F5;
}

/* Header */

header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin: 1.5rem 3.5rem;
    padding: 1rem 2rem;
    background-color: snow;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2), 0 8px 20px rgba(0,0,0,0.1);
    position: relative;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    max-height: 80px;
    height: auto;
    width: auto;
}

.navigation ul {
    display: flex;
    gap: 2.3rem;
    list-style: none;
    font-family: 'Aviny';
}

.navigation a {
    text-decoration: none;
    font-size: 1.8rem;
    color: #4B5563;
}

    .navigation a:hover {
        color: #7BB142;
    }

.auth {
    display: flex;
    gap: 1.2rem;
    list-style: none;
    font-family: 'Aviny';
    font-size: 1.8rem;
    list-style: none;
    margin: 0;
}

.login {
    color: #4B5563;
    padding: 0.1rem 2rem;
    border: 2px solid #3F7D58;
    border-radius: 15px;
    cursor: pointer;
}

.register {
    color: snow;
    background-color: #3F7D58;
    padding: 0.1rem 2rem;
    border-radius: 15px;
    cursor: pointer;
}

.hamburger {
    display: none;
    cursor: pointer;
}

@media (max-width: 840px) {
        .navigation ul {
            display: none;
            flex-direction: column;
            gap: 1rem;
            position: absolute;
            top: 105%;
            right: 0.2rem;
            width: 100%;
            background-color: snow;
            padding: 1rem 2rem;
            border-radius: 10px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.2), 0 8px 20px rgba(0,0,0,0.1);
            z-index: 100;
        }

            .navigation ul.show {
                display: flex;
            }

    .auth {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 135%;
        right: 60%;
        z-index: 101;
    }

    .auth.show {
        display:flex;
    }

    .login, .register {
        display: none;
    }

    .login.show, .register.show {
        display: block;
    }

    .hamburger {
        display: block;
        font-size: 2.5rem;
        color: #4B5563;
    }

    html {
        font-size: 12px;
    }
}

/* Footer */

footer {
    display: flex;
    flex-wrap: wrap;
    margin: 1.5rem 3.5rem;
    padding: 1rem 2rem 0.5rem 2rem;
    background-color: #3F7D58;
    border-radius: 0 0 10px 10px;
    color: #E5E7EB;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2), 0 8px 20px rgba(0,0,0,0.1);
}

.footer-about {
    flex: 1 1 60%;
    font-family: Vazir;
    font-size: 1.1rem;
    text-align: justify;
}

.footer-about h3 {
    font-family: Aviny;
    font-size: 2rem;
}

.footer-social {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1 1 40%;
    font-size: 3rem;
}

    .footer-social div {
        display: flex;
        justify-content: center;
        margin: 0.1rem;
    }

        .footer-social div i {
            cursor: pointer;
            margin: 0.1rem;
        }

.footer-social h3 {
    font-family: Aviny;
    font-size: 2rem;
}

.footer-bottom {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1 1 100%;
    font-family: 'Vazir';
}

    .footer-bottom hr {
        width: 60%;
        margin: 8px auto;
        background-color: #d1d5db;
        height: 1.5px;
        border-radius: 2px;
    }

@media (max-width: 680px) {
    .footer-about {
        flex: 1 1 100%;
        margin-bottom: 1.5rem;
    }

    .footer-social {
        flex: 1 1 100%
    }
}

/* Home - Index */

.index-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main-text {
    font-family: 'Aviny';
    font-size: 8rem;
    color: #4B5563;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.15);
}

.di {
    color: #7BB142;
}

.khor {
    color: #FF9B2F;
}

.search-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 800px;
    padding: 1rem 2.5rem;
    margin-bottom: 3rem;
}

.search-form {
    position: relative;
    background-color: snow;
    border-radius: 25px;
    padding: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2), 0 8px 20px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
}

.search-input {
    flex: 1;
    height: 70px;
    border: none;
    outline: none;
    background: transparent;
    font-family: 'Vazir';
    font-size: 1.5rem;
    color: #4B5563;
}

    .search-input::placeholder {
        color: #9CA3AF;
    }

.search-button {
    border: none;
    border-radius: 18px;
    height: 60px;
    width: 70px;
    background-color: #7BB142;
    color: snow;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2), 0 8px 20px rgba(0,0,0,0.1);
}

.suggestions-list {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    margin-top: 10px;
    flex-direction: column;
    list-style: none;
    font-family: 'Vazir';
    font-size: 1rem;
    color: #4B5563;
    background-color: snow;
    border-radius: 10px;
    padding: 0.7rem;
}

.suggestions-items {
    background-color: #3F7D5810;
    border-radius: 12px;
    margin: 5px 0;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease-in-out;
}

    .suggestions-items:hover {
        background-color: #3F7D5820;
        transform: translateX(5px); 
        box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    }

/* Food - FoodDetail */

.food-detail-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0 3.5rem;
    font-family: Aviny;
    color: #4B5563;
    gap: 1.5rem;
    text-align: justify;
}

.food-name {
    width: 100%;
    font-size: 3rem;
    padding: 0 1.5rem;
    border-radius: 10px;
    background-color: snow;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: start;
}

    .food-name i {
        position: relative;
        top: 0.4rem;
        color: #7BB142;
        margin-left: 0.4rem;
    }

.section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-family: Vazir;
    padding: 1.5rem;
    border-radius: 10px;
    background-color: snow;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

    .section h2 {
        font-size: 1.5rem;
    }

        .section h2 span {
            color: #7BB142;
            text-decoration: underline;
        }

    .section h2 i {
        color: #7BB142;
        font-size: 2rem;
    }


.bar-chart {
    text-align: center;
    width: 70%;
    height: 30rem;
    margin: 2rem auto;
}

.circle-chart {
    position: relative;
    width: 18.75rem;
    height: 18.75rem;
    border-radius: 50%;
    background: conic-gradient( #9AA6B2 0deg 90deg, /* خشک - orange */
    #9AA6B2 90deg 180deg, /* گرم - red */
    #9AA6B2 180deg 270deg, /* تر - light blue */
    #9AA6B2 270deg 360deg /* سرد - blue */
    );
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: Aviny;
    margin: 0 auto;
}

.circle-center {
    position: absolute;
    width: 7.5rem;
    height: 7.5rem;
    background-color: #9AA6B2; /* center color */
    border: solid 2px white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #17313E;
    font-size: 1.8rem;
}

.label {
    position: absolute;
    font-size: 1.4rem;
    color: #17313E;
    transform: translate(-50%, -50%);
}

.khoshk {
    top: 25%;
    left: 75%;
}

.garm {
    top: 75%;
    left: 75%;
}

.tar {
    top: 75%;
    left: 25%;
}

.sard {
    top: 25%;
    left: 25%;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem auto;
    max-width: 600px;
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    font-family: Vazir;
}

    table th,
    table td {
        padding: 1rem;
        text-align: center;
    }

    table th {
        background-color: #2f855a; /* dark green */
        color: #fff;
        font-weight: bold;
        font-size: 1.2rem;
    }

    table tr:nth-child(even) {
        background-color: #f9f9f9;
    }

    table tr:hover {
        background-color: #f0fff4; /* very light green hover */
    }

    table td {
        font-size: 1.1rem;
        color: #333;
    }

.deficient span, .deficient i {
    color: #E55050 !important;
}

.warning {
    max-width: 17.5rem;
    margin: auto;
}