@font-face{
    font-family: Estedad;
    src:url(../font/Estedad.woff2) ;
}

:root{
--text-50: #f2f2f2;
--text-100: #e6e6e6;
--text-200: #cccccc;
--text-300: #b3b3b3;
--text-400: #999999;
--text-500: #808080;
--text-600: #666666;
--text-700: #4d4d4d;
--text-800: #333333;
--text-900: #1a1a1a;
--text-950: #0d0d0d;

--background-50: #f3f1f1;
--background-100: #e8e3e3;
--background-200: #d0c8c8;
--background-300: #b9acac;
--background-400: #a19191;
--background-500: #8a7575;
--background-600: #6e5e5e;
--background-700: #534646;
--background-800: #372f2f;
--background-900: #1c1717;
--background-950: #0e0c0c;

--primary-50: #f4f1f1;
--primary-100: #e8e3e3;
--primary-200: #d2c7c6;
--primary-300: #bbabaa;
--primary-400: #a48f8e;
--primary-500: #8e7271;
--primary-600: #715c5b;
--primary-700: #554544;
--primary-800: #392e2d;
--primary-900: #1c1717;
--primary-950: #0e0b0b;

--secondary-50: #f4f1f0;
--secondary-100: #e9e2e2;
--secondary-200: #d4c5c4;
--secondary-300: #bea8a7;
--secondary-400: #a88b8a;
--secondary-500: #936e6c;
--secondary-600: #755857;
--secondary-700: #584241;
--secondary-800: #3b2c2b;
--secondary-900: #1d1616;
--secondary-950: #0f0b0b;

--accent-50: #f5f0f0;
--accent-100: #ebe1e0;
--accent-200: #d6c3c2;
--accent-300: #c2a5a3;
--accent-400: #ad8785;
--accent-500: #996966;
--accent-600: #7a5452;
--accent-700: #5c3f3d;
--accent-800: #3d2a29;
--accent-900: #1f1514;
--accent-950: #0f0a0a;
}

*{
    box-sizing: border-box;
    scroll-behavior: smooth;
}

html{
    font-size: 18px;
}

body{
    font-family:Estedad,vazir;
    background-color: var(--background-500);
    background-attachment: fixed;
}

p{
    line-height: 1.6rem;
    color: var(--secondary-300);
}


h1{
    text-align: center;
    color: var(--text-200);
    text-shadow: 2px 4px 5px var(--text-500);
    background: var(--secondary-900);
    border-radius: 30px;
    padding:10px 0px;
    box-shadow: 2px 4px 5px var(--accent-950);
}

h2{
    color: var(--text-200);
    text-shadow: 2px 4px 5px var(--text-500);
    /* text-align: center; */
}

h3{
    color: var(--text-200);
    text-shadow: 2px 4px 5px var(--text-500);
}

h5{
    text-align: center;
}

address{
    color: var(--secondary-300);
}

a{
    text-decoration: none;
    color: var(--accent-200);
}

a:hover{
    color: var(--text-600);
    transition: 0.3s;
}

video{
    border-radius: 40px;
    box-shadow: 2px 6px 5px var(--accent-950);
    display: block;
    margin: 0 auto;
    width: 90%;
    height: 300px;
    background: var(--background-900);
}

article img{
    width: 90%;
    height: 350px;
    margin: 0 10px;
    box-shadow: 4px 7px 7px var(--accent-950);
}

article figcaption{
     text-align: center;
     margin-top: 15px;
}

article .about-img{
    width: 200px;
    height: 200px;
    margin: 0 10px;
    object-fit: cover;
    transition: 0.3s;
}

article .about-img:hover{
    width: 200px;
    height: 200px;
    margin: 0 10px;
    object-fit: cover;
    transform: scale(1.1);
    box-shadow: 3px 7px 6px var(--accent-950);
}

iframe{
    border-radius: 40px;
    box-shadow: 2px 6px 5px var(--accent-950);
    display: block;
    margin: 0 auto;
    width: 90%;
    height: 300px;
}

#up {
    position: fixed;
    bottom: 25px;
    left: 25px;
    width: 50px;
    height: 50px;
    background-color: var(--accent-600);
    color: var(--text-50);
    border: 2px solid var(--accent-200);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ساخت آیکون فلش بالا با CSS */
#up::before {
    content: '';
    width: 12px;
    height: 12px;
    border-top: 3px solid var(--text-50);
    border-right: 3px solid var(--text-50);
    transform: rotate(-45deg);
    margin-top: 4px;
    transition: transform 0.3s ease;
}

/* افکت شناور شدن و هاور */
#up:hover {
    background-color: var(--accent-500);
    transform: translateY(-5px) scale(1.08);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
    border-color: var(--text-50);
}

#up:hover::before {
    transform: rotate(-45deg) translate(2px, -2px);
}

/* website structure */

main{
    width: 950px;
    max-width: 100%;
    min-height: 1000px;
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    gap: 10px;
    grid-template-areas:
        "header header"
        "aside article"
        "footer footer";
    margin: 0 auto;
    padding: 10px;
    border: 10px solid var(--accent-900);
    border-image: url(../images/border.png) 20% stretch;
}

header,aside,article,footer{
    background-color: var(--primary-800);
    border-radius: 20px;
    border: 1px solid var(--accent-100);
}

header{
    grid-area: header;
}

aside{
 grid-area: aside;
min-width: 0;
}

article{
    grid-area: article;
    min-width: 0;
    padding: 15px;
    overflow-wrap: anywhere;
}

article img{
    border-radius: 30px;
    object-fit: cover;
}

article .gallery-iframe{
    width: 100%;
    height: 400px;
}

article .gallery-link{
    background: var(--background-700);
    padding: 5px 10px;
    border-radius: 15px;
    transition: 0.3s;
}

article .gallery-link:hover{
    box-shadow: 5px 6px 10px var(--accent-900);
    background: var(--primary-800);
}

article .article-link{
    background: var(--background-800);
    padding: 15px 35px;
    border-radius: 10px;
    box-shadow: 5px 6px 10px var(--text-950);
}

article .websites-link{
    background: var(--background-700);
    padding: 5px 10px;
    border-radius: 15px;
    transition: 0.3s;
}

article .websites-link:hover{
    box-shadow: 5px 6px 10px var(--accent-900);
    background: var(--primary-800);
}

article .sitemap-link{
    background: var(--background-800);
    padding: 15px 40px;
    border-radius: 10px;
    box-shadow: 5px 6px 10px var(--text-950);
}

article label{
    color: var(--text-300);
}

article ol li{
    color: var(--text-400);
}

article summary{
    color: var(--text-50);
}

article small{
    font-weight: bold;
    background: var(--background-700);
    padding: 5px 10px;
    border-radius: 30px;
}

article figcaption{
    color: var(--text-200);
}

footer{
    grid-area: footer;
    direction: ltr;
    letter-spacing: 7px;
    text-align: center;
    color: var(--text-100);
}

/* menu */

#main-menu ul{
    list-style-type: none;
    padding: 0;
    margin: 0;
}

#main-menu ul li{
    margin: 2px;
    padding: 3px;
    height: 35px;
}

#main-menu ul li a{
    width: 100%;
    height: 100%;
    display: block;
    padding: 4px 7px;
    background-color: var(--primary-700);
    color: var(--text-200);
    border-right: 4px solid var(--accent-900);
    transition: 0.3s;
    border-radius: 10px 0px 0px 10px;
}

#main-menu ul li a:hover{
    background-color: var(--primary-600);
    color: var(--text-300);
    box-shadow: 3px 4px 0px var(--primary-400);
}

/* nav */

#nav ul{
    list-style-type: none;
    margin: 0;
    padding: 0;
    text-align: center;
}

#nav ul li{
    display: inline-block;
    padding: 1px;
}

#nav ul li a{
    display: block;
    width: 100%;
    height: 100%;
    padding: 5px 4px;
    border-radius: 10px 10px 0px 0px;
    background-color: var(--primary-700);
    color: var(--primary-200);
    border-bottom: 2px solid var(--accent-900);
    transition: 0.3s;
}

#nav ul li a:hover{
    background-color: var(--primary-600);
    color: var(--text-300);
    box-shadow: 4px -3px 0px var(--primary-400);
}

#advertising {
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 999999;
    width: 165px;
    height: 165px;
    background: linear-gradient(135deg, var(--accent-600) 50%);
    clip-path: polygon(0 0, 0 100%, 100% 100%);
    cursor: pointer;
    overflow: hidden;
    /* انیمیشن نرم برای تغییر رنگ و سایه */
    transition: background 0.8s ease, transform 0.3s ease, filter 0.3s ease;
    filter: drop-shadow(2px -2px 6px rgba(0, 0, 0, 0.4));
}

#advertising:hover {
    transform: scale(1.04);
    filter: drop-shadow(3px -3px 10px rgba(0, 0, 0, 0.6));
}

.banner-content {
    position: absolute;
    bottom: 10px;
    left: 1px; /* موقعیت متن در سمت چپ */
    display: flex;
    flex-direction: column;
    text-align: center;
    direction: rtl;
    width: 110px;
    max-height: 110px;
    justify-content: flex-end;
}

.banner-content span {
    color: #ffffff;
    font-size: 10.5px;
    font-weight: bold;
    line-height: 1.35;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    white-space: normal;
    word-wrap: break-word;
}

.banner-content .highlight {
    color: #ffe082; /* رنگ طلایی خط آخر */
    font-size: 10px;
    margin-top: 2px;
}

#up{
    position: fixed;
    inset-inline-start: 10px;
    inset-inline-end: 10px;
}

#gallery{
    text-align: center;
}

#gallery img{
    margin: 5px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 125px;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 50%;
}

#gallery img:hover{
    transform: translateY(-5px) scale(1.08);
    box-shadow: 0 8px 20px var(--text-950);
    border-color: var(--text-50);
}

#gallery img:hover::before {
    transform: rotate(-45deg) translate(2px, -2px);
}

@keyframes logoplay{
    from{
        opacity: 0;
        transform: translate(-300px);
    }
    to{
        opacity: 1;
        transform: translate(0px);
    }
}

#logo{
    animation: logoplay 2s;
    width: 200px;
}
@keyframes menuplay{
    0%{
            transform: translate(300px);
    }
    50%{
        transform: translate(-50px);
    }
    100%{
        transform: translate(0px);
        opacity: 1;
    }
}

#main-menu ul li{
    animation: menuplay 2s forwards;
    opacity: 0;
}

@media screen and (max-width: 1024px) {
    main {
        width: 100%;
    }

    h1 {
        font-size: 1.3em;
    }

    #nav {
        display: none;
    }
}

@media screen and (max-width: 500px) {
    main {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto auto auto;
        grid-template-areas:
            "header"
            "aside"
            "article"
            "footer";
        padding: 5px;
        border-width: 5px;
    }
    #logo {
        width: 200px;
        max-width: 100%;
        height: auto;
    }
    article {
        padding: 10px;
    }
    video,
    iframe {
        width: 100%;
        max-width: 100%;
    }
    footer {
        letter-spacing: 2px;
    }
}

.rating-box {
    max-width: 450px;
    margin: 30px auto;
    padding: 25px;
    background: var(--accent-900);
    border: 1px solid var(--accent-200);
    border-radius: 18px;
    text-align: center;
    color: var(--accent-200);
}

.rating-box h3 {
    color: var(--text-300);
}

.rating-box p {
    text-align: center;
    color: var(--accent-200);
}

.rating-numbers {
    display: flex;
    justify-content: space-between;
    direction: ltr;
    margin: 20px 0 5px;
    color: var(--text-100);
    font-size: 14px;
}

.rating-box input[type="range"] {
    width: 100%;
    direction: ltr;
    accent-color: var(--accent-800);
    cursor: pointer;
    margin: 10px 0;
}

 .caffe-rose-point{
    background: var(--background-700);
    padding: 15px 0px;
    border-radius: 30px;
 }

 @media screen and (max-width: 500px) {
    main {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto auto auto;
        grid-template-areas:
            "header"
            "aside"
            "article"
            "footer";
        padding: 5px;
        border-width: 5px;
    }
    
    #logo {
        width: 150px;
        max-width: 100%;
        height: auto;
        display: block;
        margin: 0 auto;
    }

    article {
        padding: 10px;
    }

    /* تنظیم تصاویر کلی مقاله برای موبایل */
    article img {
        width: 100% !important;
        height: auto !important;
        margin: 10px 0 !important;
    }

    /* تنظیم اختصاصی عکس‌های کوچک درباره ما در موبایل */
    article .about-img {
        width: 100% !important;
        height: 220px !important;
        object-fit: cover;
        margin: 8px 0 !important;
        display: block;
    }

    video,
    iframe {
        width: 100%;
        max-width: 100%;
        height: 220px;
    }

    footer {
        letter-spacing: 2px;
        font-size: 0.85rem;
    }
}