/* countdown.css */
*,body {
	font-family: sans-serif;
}

body {
    background-color: #f2f1ed;
}

:root {
    --color-shop: #327942;       /* رنگ برای shop */
    --color-service:  #891e1f;  /* رنگ برای service */
	--color-education:  #482782;  /* رنگ برای education */
}

/* تنظیم رنگ برای ID "shop" و زیرمجموعه‌های آن */
#shop, #shop * {
    color: var(--color-shop);
}

#service, #service * {
    color: var(--color-service);
}

#education, #education * {
    color: var(--color-education);
}

.hag-daily-ideas-main {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: center;
    align-items: center;
}

.hag-daily-ideas {
    width: 90%;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: center;
    align-items: center;
}

.hag-img {
    width: 40%;
    display: flex    ;
    justify-content: center;
    align-items: center;
    align-content: center;
    flex-wrap: nowrap;
    flex-direction: column;
}

/* .hag-img img {
	max-height: 80vh !important;
	max-width: 40vh !important;
} */



.wrap {
    bottom: 0;
    top: 0;
    left: 0;
    right: 0;
    margin: auto;
    height: 310px;
    width: 60%;
}

a {
    text-decoration: none;
    color: #1a1a1a;
}

.wrap h3 {
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.5em;
    font-weight: 600;
}

.hag-retry-chance {
	text-align: center;
	margin: 30px 0;
}

#shop .hag-retry-chance #retry-button {
	border: 2px solid var(--color-shop);
	background: var(--color-shop);
	color: #ffffff;
	border-radius: 8px;
	font-size: 20px;
}

#shop .hag-retry-chance #retry-button:hover{
	border: 2px solid var(--color-shop);
	color: var(--color-shop);
	background: #ffffff;
}

#service .hag-retry-chance #retry-button {
	border: 2px solid var(--color-service);
	background: var(--color-service);
	color: #ffffff;
	border-radius: 8px;
	font-size: 20px;
}

#service .hag-retry-chance #retry-button:hover{
	border: 2px solid var(--color-service);
	color: var(--color-service);
	background: #ffffff;
}

#education .hag-retry-chance #retry-button {
	border: 2px solid var(--color-education);
	background: var(--color-education);
	color: #ffffff;
	border-radius: 8px;
	font-size: 20px;
}

#education .hag-retry-chance #retry-button:hover{
	border: 2px solid var(--color-education);
	color: var(--color-education);
	background: #ffffff;
}


.countdown {
    width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: row-reverse;
    align-content: center;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;

    .bloc-time {
        margin-right: 45px;
        text-align: center;

        &:last-child {
            margin-right: 0;
        }
    }

    .count-title {
        display: block;
        margin-bottom: 15px;
        font-size: 0.94em;
        color: #1a1a1a;
        text-transform: uppercase;
    }

    .figure {
        position: relative;
        float: left;
        height: 66px;
        width: 60px;
        margin-right: 10px;
        background-color: #fff;
        border-radius: 8px;
        box-shadow: 0 3px 4px 0 rgba(0, 0, 0, .2), inset 2px 4px 0 0 rgba(255, 255, 255, .08);

        &:last-child {
            margin-right: 0;
        }

        >span {
            position: absolute;
            left: 0;
            right: 0;
            margin: auto;
            font-size: 3.56em;
            line-height: 60px;
            font-weight: 700;
            color: #327249;
        }

        .top, .bottom-back {
            &:after {
                content: "";
                position: absolute;
                z-index: -1;
                left: 0;
                bottom: 0;
                width: 100%;
                height: 100%;
                border-bottom: 1px solid rgba(0, 0, 0, .1);
            }
        }

        .top {
            z-index: 3;
            background-color: #f7f7f7;
            transform-origin: 50% 100%;
            border-top-left-radius: 10px;
            border-top-right-radius: 10px;
            transform: perspective(200px);
        }

        .bottom {
            z-index: 1;

            &:before {
                content: "";
                position: absolute;
                display: block;
                top: 0;
                left: 0;
                width: 100%;
                height: 50%;
                background-color: rgba(0, 0, 0, .02);
            }
        }

        .bottom-back {
            z-index: 2;
            top: 0;
            height: 50%;
            overflow: hidden;
            background-color: #f7f7f7;
            border-top-left-radius: 10px;
            border-top-right-radius: 10px;

            span {
                position: absolute;
                top: 0;
                left: 0;
                right: 0;
                margin: auto;
            }
        }

        .top, .top-back {
            height: 50%;
            overflow: hidden;
            backface-visibility: hidden;
        }

        .top-back {
            z-index: 4;
            bottom: 0;
            background-color: #fff;
            transform-origin: 50% 0;
            transform: perspective(200px) rotateX(180deg);
            border-bottom-left-radius: 10px;
            border-bottom-right-radius: 10px;

            span {
                position: absolute;
                top: -100%;
                left: 0;
                right: 0;
                margin: auto;
            }
        }
    }
}

/* Media Queries */
@media (max-width: 1024px) {
    .hag-daily-ideas {
        width: 95%;
    }
    
    .countdown {
        width: 95%;
        margin: 0 auto;

        .bloc-time {
            margin-right: 30px;
            text-align: center;

            &:last-child {
                margin-right: 0;
            }
        }

        .count-title {
            display: block;
            margin: 15px auto;
            font-size: 0.94em;
            color: #1a1a1a;
            text-transform: uppercase;
        }

        .figure {
            position: relative;
            float: left;
            height: 55px;
            width: 50px;
            margin-right: 10px;
            background-color: #fff;
            border-radius: 8px;
            box-shadow: 0 3px 4px 0 rgba(0, 0, 0, .2), inset 2px 4px 0 0 rgba(255, 255, 255, .08);

            &:last-child {
                margin-right: 0;
            }

            >span {
                position: absolute;
                left: 0;
                right: 0;
                margin: auto;
                font-size: 2.97em;
                line-height: 52px;
                font-weight: 700;
                color: #327249;
            }

            .top, .bottom-back {
                &:after {
                    content: "";
                    position: absolute;
                    z-index: -1;
                    left: 0;
                    bottom: 0;
                    width: 100%;
                    height: 100%;
                    border-bottom: 1px solid rgba(0, 0, 0, .1);
                }
            }

            .top {
                z-index: 3;
                background-color: #f7f7f7;
                transform-origin: 50% 100%;
                border-top-left-radius: 10px;
                border-top-right-radius: 10px;
                transform: perspective(200px);
            }

            .bottom {
                z-index: 1;

                &:before {
                    content: "";
                    position: absolute;
                    display: block;
                    top: 0;
                    left: 0;
                    width: 100%;
                    height: 50%;
                    background-color: rgba(0, 0, 0, .02);
                }
            }

            .bottom-back {
                z-index: 2;
                top: 0;
                height: 50%;
                overflow: hidden;
                background-color: #f7f7f7;
                border-top-left-radius: 10px;
                border-top-right-radius: 10px;

                span {
                    position: absolute;
                    top: 0;
                    left: 0;
                    right: 0;
                    margin: auto;
                }
            }

            .top, .top-back {
                height: 50%;
                overflow: hidden;
                backface-visibility: hidden;
            }

            .top-back {
                z-index: 4;
                bottom: 0;
                background-color: #fff;
                transform-origin: 50% 0;
                transform: perspective(200px) rotateX(180deg);
                border-bottom-left-radius: 10px;
                border-bottom-right-radius: 10px;

                span {
                    position: absolute;
                    top: -100%;
                    left: 0;
                    right: 0;
                    margin: auto;
                }
            }
        }
    }
}

@media (max-width: 768px) {
    .hag-daily-ideas {
        width: 100%;
        flex-direction: column;
    }
    
    .hag-img {
        width: 100%;
    }
    .hag-img img {
		margin-bottom: 20px;
		max-height: 70vh !important;
    	max-width: 35vh !important;
    }
    
    .wrap {
        width: 100%;
    }

    .countdown {
        width: 95%;
        margin: 0 auto;

        .bloc-time {
            margin-right: 20px;
            text-align: center;

            &:last-child {
                margin-right: 0;
            }
        }

        .count-title {
            display: block;
            margin: 15px auto;
            font-size: 0.94em;
            color: #1a1a1a;
            text-transform: uppercase;
        }

        .figure {
            position: relative;
            float: left;
            height: 50px;
            width: 45px;
            margin-right: 10px;
            background-color: #fff;
            border-radius: 8px;
            box-shadow: 0 3px 4px 0 rgba(0, 0, 0, .2), inset 2px 4px 0 0 rgba(255, 255, 255, .08);

            &:last-child {
                margin-right: 0;
            }

            >span {
                position: absolute;
                left: 0;
                right: 0;
                margin: auto;
                font-size: 2.97em;
                line-height: 46px;
                font-weight: 700;
                color: #327249;
            }

            .top, .bottom-back {
                &:after {
                    content: "";
                    position: absolute;
                    z-index: -1;
                    left: 0;
                    bottom: 0;
                    width: 100%;
                    height: 100%;
                    border-bottom: 1px solid rgba(0, 0, 0, .1);
                }
            }

            .top {
                z-index: 3;
                background-color: #f7f7f7;
                transform-origin: 50% 100%;
                border-top-left-radius: 10px;
                border-top-right-radius: 10px;
                transform: perspective(200px);
            }

            .bottom {
                z-index: 1;

                &:before {
                    content: "";
                    position: absolute;
                    display: block;
                    top: 0;
                    left: 0;
                    width: 100%;
                    height: 50%;
                    background-color: rgba(0, 0, 0, .02);
                }
            }

            .bottom-back {
                z-index: 2;
                top: 0;
                height: 50%;
                overflow: hidden;
                background-color: #f7f7f7;
                border-top-left-radius: 10px;
                border-top-right-radius: 10px;

                span {
                    position: absolute;
                    top: 0;
                    left: 0;
                    right: 0;
                    margin: auto;
                }
            }

            .top, .top-back {
                height: 50%;
                overflow: hidden;
                backface-visibility: hidden;
            }

            .top-back {
                z-index: 4;
                bottom: 0;
                background-color: #fff;
                transform-origin: 50% 0;
                transform: perspective(200px) rotateX(180deg);
                border-bottom-left-radius: 10px;
                border-bottom-right-radius: 10px;

                span {
                    position: absolute;
                    top: -100%;
                    left: 0;
                    right: 0;
                    margin: auto;
                }
            }
        }
    }
}

@media (max-width: 480px) {
    .countdown {
        width: 95%;
        margin: 0 0;

        .bloc-time {
            margin-right: 15px;
            text-align: center;

            &:last-child {
                margin-right: 0;
            }
        }

        .count-title {
            display: block;
            margin-bottom: 15px;
            font-size: 0.94em;
            color: #1a1a1a;
            text-transform: uppercase;
        }

        .figure {
            position: relative;
            float: left;
            height: 37px;
            width: 33px;
            margin-right: 4px;
            background-color: #fff;
            border-radius: 8px;
            box-shadow: 0 3px 4px 0 rgba(0, 0, 0, .2), inset 2px 4px 0 0 rgba(255, 255, 255, .08);

            &:last-child {
                margin-right: 0;
            }

            >span {
                position: absolute;
                left: 0;
                right: 0;
                margin: auto;
                /* font-family: 'Yekan Bakh FaNum', sans-serif; */
                font-size: 1.98em;
                line-height: 36px;
                font-weight: 700;
                color: #327249;
            }

            .top, .bottom-back {
                &:after {
                    content: "";
                    position: absolute;
                    z-index: -1;
                    left: 0;
                    bottom: 0;
                    width: 100%;
                    height: 100%;
                    border-bottom: 1px solid rgba(0, 0, 0, .1);
                }
            }

            .top {
                z-index: 3;
                background-color: #f7f7f7;
                transform-origin: 50% 100%;
                border-top-left-radius: 10px;
                border-top-right-radius: 10px;
                transform: perspective(200px);
            }

            .bottom {
                z-index: 1;

                &:before {
                    content: "";
                    position: absolute;
                    display: block;
                    top: 0;
                    left: 0;
                    width: 100%;
                    height: 50%;
                    background-color: rgba(0, 0, 0, .02);
                }
            }

            .bottom-back {
                z-index: 2;
                top: 0;
                height: 50%;
                overflow: hidden;
                background-color: #f7f7f7;
                border-top-left-radius: 10px;
                border-top-right-radius: 10px;

                span {
                    position: absolute;
                    top: 0;
                    left: 0;
                    right: 0;
                    margin: auto;
                }
            }

            .top, .top-back {
                height: 50%;
                overflow: hidden;
                backface-visibility: hidden;
            }

            .top-back {
                z-index: 4;
                bottom: 0;
                background-color: #fff;
                transform-origin: 50% 0;
                transform: perspective(200px) rotateX(180deg);
                border-bottom-left-radius: 10px;
                border-bottom-right-radius: 10px;

                span {
                    position: absolute;
                    top: -100%;
                    left: 0;
                    right: 0;
                    margin: auto;
                }
            }
        }
    }
}

.hag-no-idea {
	text-align: center;
    font-size: 36px;
    font-family: "yekan bakh";
    color: red;
    font-weight: 700;
    padding-top: 28px;
}

.happy-hag-button {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.happy-hag-button img {
	border-radius: 20px !important;
}