/* Font Faces for Dana Pro */
@font-face {
    font-family: 'Dana';
    src: url('./DanaPro(13Wt)/Webfonts/woff2/Dana-Hairline.woff2') format('woff2'),
         url('./DanaPro(13Wt)/Webfonts/woff/Dana-Hairline.woff') format('woff');
    font-weight: 10;
    font-style: normal;
}

@font-face {
    font-family: 'Dana';
    src: url('./DanaPro(13Wt)/Webfonts/woff2/Dana-Thin.woff2') format('woff2'),
         url('./DanaPro(13Wt)/Webfonts/woff/Dana-Thin.woff') format('woff');
    font-weight: 100;
    font-style: normal;
}

@font-face {
    font-family: 'Dana';
    src: url('./DanaPro(13Wt)/Webfonts/woff2/Dana-UltraLight.woff2') format('woff2'),
         url('./DanaPro(13Wt)/Webfonts/woff/Dana-UltraLight.woff') format('woff');
    font-weight: 200;
    font-style: normal;
}

@font-face {
    font-family: 'Dana';
    src: url('./DanaPro(13Wt)/Webfonts/woff2/Dana-Light.woff2') format('woff2'),
         url('./DanaPro(13Wt)/Webfonts/woff/Dana-Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Dana';
    src: url('./DanaPro(13Wt)/Webfonts/woff2/Dana-Regular.woff2') format('woff2'),
         url('./DanaPro(13Wt)/Webfonts/woff/Dana-Regular.woff') format('woff');
    font-weight: normal; /* 400 */
    font-style: normal;
}

@font-face {
    font-family: 'Dana';
    src: url('./DanaPro(13Wt)/Webfonts/woff2/Dana-Medium.woff2') format('woff2'),
         url('./DanaPro(13Wt)/Webfonts/woff/Dana-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Dana';
    src: url('./DanaPro(13Wt)/Webfonts/woff2/Dana-DemiBold.woff2') format('woff2'),
         url('./DanaPro(13Wt)/Webfonts/woff/Dana-DemiBold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Dana';
    src: url('./DanaPro(13Wt)/Webfonts/woff2/Dana-Bold.woff2') format('woff2'),
         url('./DanaPro(13Wt)/Webfonts/woff/Dana-Bold.woff') format('woff');
    font-weight: bold; /* 700 */
    font-style: normal;
}

@font-face {
    font-family: 'Dana';
    src: url('./DanaPro(13Wt)/Webfonts/woff2/Dana-ExtraBold.woff2') format('woff2'),
         url('./DanaPro(13Wt)/Webfonts/woff/Dana-ExtraBold.woff') format('woff');
    font-weight: 800;
    font-style: normal;
}

@font-face {
    font-family: 'Dana';
    src: url('./DanaPro(13Wt)/Webfonts/woff2/Dana-Black.woff2') format('woff2'),
         url('./DanaPro(13Wt)/Webfonts/woff/Dana-Black.woff') format('woff');
    font-weight: 900;
    font-style: normal;
}

@font-face {
    font-family: 'Dana';
    src: url('./DanaPro(13Wt)/Webfonts/woff2/Dana-ExtraBlack.woff2') format('woff2'),
         url('./DanaPro(13Wt)/Webfonts/woff/Dana-ExtraBlack.woff') format('woff');
    font-weight: 930;
    font-style: normal;
}

@font-face {
    font-family: 'Dana';
    src: url('./DanaPro(13Wt)/Webfonts/woff2/Dana-Heavy.woff2') format('woff2'),
         url('./DanaPro(13Wt)/Webfonts/woff/Dana-Heavy.woff') format('woff');
    font-weight: 960;
    font-style: normal;
}

@font-face {
    font-family: 'Dana';
    src: url('./DanaPro(13Wt)/Webfonts/woff2/Dana-fat.woff2') format('woff2'),
         url('./DanaPro(13Wt)/Webfonts/woff/Dana-fat.woff') format('woff');
    font-weight: 990;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Dana', Arial, sans-serif;
    direction: rtl;
    background-color: #f8f8f8;
    color: #333;
    line-height: 1.7;
    padding-top: 80px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

header {
    background-color: #8b0000;
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 80px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.header-inner {
    display: flex;
    flex-direction: row-reverse; /* برعکس کردن جای عناصر */
    justify-content: space-between; /* یکی چپ یکی راست */
    align-items: center;
    height: 80px;
    padding: 0 15px;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    letter-spacing: 1px;
}

.desktop-menu {
    display: none;
}

.desktop-menu a {
    color: white;
    text-decoration: none;
    font-size: 18px;
    margin-left: 40px;
}

.menu-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;

    width: 100%;
    height: 100vh; /* ❗ منو فقط 70٪ صفحه */
    background-color: rgba(170, 18, 18, 0.5); /* ❗ شفاف */

    backdrop-filter: blur(20px); /* اختیاری → تار کردن پشت منو */

    z-index: 99999;
    transition: right 0.4s ease;

    display: flex;
    flex-direction: column;

    border-bottom-left-radius: 25px;
    border-bottom-right-radius: 25px;

    /* برای اینکه وسط قرار گیرد */
}

.mobile-menu.active {
    right: 0;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.close-menu {
    background: none;
    border: none;
    color: white;
    font-size: 44px;
    cursor: pointer;
}

.menu-links a {
    display: block;
    color: white;
    font-size: 24px;
    padding: 20px;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.menu-contact {
    margin-top: auto;
    padding: 30px 20px;
    text-align: center;
    color: white;
    font-size: 18px;
}

.menu-contact img {
    width: 24px;
    vertical-align: middle;
    margin-left: 10px;
}

.hero-section {
    position: relative;
    width: 100%;
}

.hero-img {
    width: 100%;
    height: auto;
    display: block;
}
/* === موبایل (پیش‌فرض) === */
.overlay-text {
      position: absolute;
      bottom: 58px;
      bottom: 120px;
      left: 53%;
      transform: translateX(-50%);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 15px;
}
/* پیش‌فرض: موبایل */
.carousel-item img {
    width: 100%;
    height: auto; /* ارتفاع طبیعی موبایل */
    object-fit: cover;
}

/* استایل برای branch-item */
.branch-item {
    position: relative;
    flex: 1;
    margin: 0 10px;
}

.branch-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* استایل برای carousel-caption در branch-item - override Bootstrap */
.branch-item .carousel-caption {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    padding: 15px !important;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent) !important;
    text-align: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
    transform: none !important;
}

.branch-item .carousel-caption h5 {
    color: white;
    font-size: 18px;
    font-weight: bold;
    margin: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent) !important;
}

/* موبایل - استایل carousel-caption */
@media (max-width: 767px) {
    .branch-item {
        margin: 0;
        position: relative; /* مطمئن شدن از position relative */
    }
    
    .branch-item .carousel-caption {
        bottom: 10px;
        padding: 10px;
        background: linear-gradient(to top, rgba(0,0,0,0.7), transparent) !important;
        z-index: 5; /* افزایش z-index */
    }
    
    .branch-item .carousel-caption h5 {
        font-size: 16px;
    }
}

/* دسکتاپ */
@media (min-width: 768px) {
    .carousel-item img {
        max-height: 400px; /* حداکثر ارتفاع دسکتاپ */
        width: 100%;
        object-fit: cover; /* تصویر برش داده شود ولی نسبت حفظ شود */
    }

    .branch-item {
        position: relative;
        flex: 1;
        margin: 0 10px;
    }

    .branch-item .carousel-caption {
        position: absolute !important;
        bottom: 20px !important; /* فاصله از پایین */
        left: 50% !important;
        transform: translateX(-50%) !important;
        background: rgba(0,0,0,0.6) !important;
        padding: 10px 20px !important;
        border-radius: 5px !important;
        width: auto !important;
        right: auto !important;
    }
}

/* تصاویر داخل متن موبایل */
.overlay-text img {
    max-width: 90%;
    height: auto;
}

/* === دسکتاپ === */
@media (min-width: 768px) {
    .countdown-section {
    background-image: url("Mobile/Pictures/Countdown-bg.jpg");
        background-position: center;
        background-size: cover;
        background-repeat: no-repeat;
    }
    .mobile-banner {
        display: none;
    }

    .desktop-banner {
        display: block;
    }

    .overlay-text {
        position: absolute;
        bottom: 58px;
        left: 81%;
        transform: translateX(-50%);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .overlay-text img {
        max-width: 90%;
        height: auto;
    }

}


.overlay-text img {
    max-width: 90%;
    height: auto;
}

.promo-section {
    padding: 100px 0;
    text-align: center;
    background-color: white;
}

.promo-section h2 {
    color: #8b0000;
    font-size: 34px;
    font-weight: 700;
    margin-bottom: 15px;
}

.promo-section h3 {
    color: #8b0000;
    font-size: 32px;
    margin-bottom: 40px;
}

.promo-section p {
    font-size: 19px;
    text-align: right;
    max-width: 900px;
    margin: 15px auto;
    color: #555;
}

.countdown-section {
          background-image: url("Desktop/Pictures/Countdown-bg_Desktop.jpg");

    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;

    padding: 120px 0;
    text-align: center;
    color: white;
}

.countdown-section h3 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 15px;
}

.countdown-tagline {
    font-size: 22px;
    margin-bottom: 60px;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.timer-box {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(12px);
    width: 140px;
    height: 140px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 4px solid rgba(255,255,255,0.3);
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    gap: 8px;
}

.timer-box span {
    font-size: 52px;
    font-weight: bold;
    line-height: 1;
    margin: 0;
    order: 1;
    display: block;
}

.timer-box p {
    font-size: 18px;
    margin: 0;
    line-height: 1;
    order: 2;
    display: block;
}

/* بخش بنرهای زنانه و مردانه */
.gender-banners-section {
    padding: 60px 0;
    background-color: #f8f8f8;
}

.gender-banners-section-title {
    font-size: 28px;
    font-weight: 700;
    color: #8b0000;
    margin: 0 0 40px 0;
    text-align: center;
}

.gender-banners-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    margin: 25px 0 40px;
}

.product-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    padding: 15px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    display: block;
    color: inherit;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.12);
}

.product-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 12px;
}

.product-card p {
    font-size: 16px;
    font-weight: 600;
    color: #8b0000;
    white-space: nowrap; /* Prevent text from wrapping */
    overflow: hidden; /* Hide overflowing text */
    text-overflow: ellipsis; /* Add ellipsis for truncated text */
    max-width: 100%; /* Ensure it respects the card's width */
}

.gender-banner {
    display: block;
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
}

.gender-banner:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.gender-banner img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center;
}

.banner-text {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: rgb(201, 146, 29);
    font-size: 24px;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 2;
}

.male-text {
    right: 2px;
}

.female-text {
    left: 10px;
}

.percent-sign {
    position: absolute;
    top: 0px;
    width: 118px !important;
    height: 129px !important;
    z-index: 10;
}

.male-percent-sign {
    left: 5px; /* Adjust left position for male banner */
}

.female-percent-sign {
    right: 5px; /* Adjust right position for female banner */
}

/* موبایل */
@media (max-width: 767px) {
    .gender-banners-section {
        padding: 40px 15px;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
        gap: 12px;
    }
    
    .product-card {
        padding: 10px;
    }
    
    .product-card img {
        height: 200px;
    }
    
    .product-card p {
        font-size: 13px;
    }

    .gender-banners-section-title {
        font-size: 15px;
        margin-bottom: 25px;
    }
    
    .gender-banners-wrapper {
        gap: 15px;
    }
    
    .gender-banner {
        border-radius: 8px;
        /* بنر در موبایل - ارتفاع بیشتر */
        position: relative;
        width: 100%;
        aspect-ratio: 1 / 1.4;
        overflow: hidden;
    }

    .gender-banner picture,
    .gender-banner img {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        object-position: center;
    }
    .banner-text {
        font-size: 11px;
        padding: 8px 15px;
    }
    .male-text {
        right: 10px;
    }
    .female-text {
        left: 10px;
    }
    .percent-sign {
        top: 0px;
        width: 60px !important;
        height: 68px !important;
    }
    .male-percent-sign {
        left: 5px; /* Adjust left position for mobile */
    }
    .female-percent-sign {
        right: 5px; /* Adjust right position for mobile */
    }

    .countdown-section h3 { font-size: 36px; }

    .branch-item .carousel-caption {
        background: linear-gradient(to top, rgba(0,0,0,0.7), transparent) !important;
    }

    /* Mobile specific styles for image swap */
    .image-swap-container .grayscale-image {
        display: none; /* Hide grayscale image on mobile */
    }

    .image-swap-container .color-image {
        opacity: 1; /* Always show color image on mobile */
    }
}

/* دسکتاپ */
@media (min-width: 768px) {
    /* چیدمان دسکتاپ: هر بنر در یک ستون و محصولات همان دسته در ستون کناری ۲×۲ */
    .gender-banners-wrapper {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr)); /* دو ستون با عرض برابر */
        grid-auto-rows: auto;
        gap: 30px;
        max-width: 100%;
        align-items: stretch;
        direction: ltr; /* برای کنترل چپ و راست ستون‌ها در دسکتاپ */
    }

    /* Grayscale and hover effect for desktop images */
    .gender-banner img,
    .product-card img {
        filter: grayscale(100%);
        transition: filter 0.5s ease-in-out;
    }

    .gender-banner:hover img,
    .product-card:hover img {
        filter: grayscale(0%);
    }

    .male-banner {
        grid-column: 1;
        grid-row: 1;
    }

    .male-products {
        grid-column: 2;
        grid-row: 1;
    }

    .female-banner {
        grid-column: 2;
        grid-row: 2;
    }

    .female-products {
        grid-column: 1;
        grid-row: 2;
    }

    /* بنرها در دسکتاپ - ارتفاع بیشتر */
    .gender-banner {
        position: relative;
        width: 100%;
        min-height: 800px; /* Set a minimum height for desktop banners */
    }

    .gender-banner picture,
    .gender-banner img {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    /* Image swap container for grayscale to color on hover */
    .image-swap-container {
        position: relative;
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

    .image-swap-container .grayscale-image,
    .image-swap-container .color-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: opacity 0.5s ease-in-out;
    }

    .image-swap-container .color-image {
        opacity: 0;
    }

    .product-card:hover .image-swap-container .color-image,
    .gender-banner:hover .image-swap-container .color-image {
        opacity: 1;
    }

    .product-card:hover .image-swap-container .grayscale-image,
    .gender-banner:hover .image-swap-container .grayscale-image {
        opacity: 0;
    }

    .banner-text,
    .percent-sign {
        z-index: 3;
    }

    /* گرید ۲×۲ محصولات کنار هر بنر */
    .male-products,
    .female-products {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
        margin: 0; /* کنار بنر، بدون فاصله عمودی اضافه */
    }
}



.branches-section h2 {
    text-align: center;
    font-size: 42px;
    margin-bottom: 60px;
}

.branches-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    justify-items: center;
}

.branch-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    text-align: center;
    max-width: 260px;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.branch-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.branch-card h5 {
    margin: 12px 0 6px;
    font-size: 18px;
    font-weight: 700;
}

.branch-address {
    font-size: 14px;
    color: #555;
    margin: 0 12px 10px;
}

.branch-phone {
    font-size: 14px;
    font-weight: 600;
    color: #8b0000;
    margin: 6px 12px 4px;
}

.branch-map-link {
    display: inline-block;
    margin-top: auto; /* دکمه را به پایین کارت می‌فرستد */
    margin-bottom: 12px;
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 999px;
    background-color: #8b0000;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.branch-map-link:hover {
    background-color: #a30d0d;
    transform: translateY(-2px);
}

@media (max-width: 767px) {
    .branches-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .branch-card {
        max-width: 100%;
    }

    .branch-card img {
        height: 140px;
    }

    .branch-card h5 {
        font-size: 16px;
        margin: 10px 0 4px;
    }

    .branch-address {
        font-size: 12px;
    }

    .branch-map-link {
        font-size: 12px;
        padding: 5px 11px;
    }
}

@media (max-width: 575px) {
    .branches-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .branch-card img {
        height: 130px;
    }

    .branch-card h5 {
        font-size: 16px;
    }

    .branch-address {
        font-size: 12px;
    }

    .branch-map-link {
        font-size: 12px;
        padding: 5px 10px;
    }
}

footer {
    background-color: #8b0000;
    color: white;
    text-align: center;
    padding: 60px 20px;
}

.footer-title {
    font-size: 28px;
    margin-bottom: 20px;
    color: #fff;
}

.footer-branch-img {
    width: 100%;
    max-width: 500px;
    border-radius: 12px;
    margin: 20px auto;
    display: block;
}

.footer-logo-text {
    font-size: 56px;
    font-weight: bold;
    margin: 30px 0;
    color: #fff;
}

.footer-contact {
    margin: 25px 0;
    font-size: 20px;
}

.footer-contact img {
    width: 26px;
    vertical-align: middle;
    margin-left: 12px;
}

.footer-social {
    margin: 30px 0;
    display: flex;
    justify-content: center;
    gap: 25px;
}

.footer-social a img {
    width: 40px;
    height: 40px;
    transition: transform 0.3s;
}

.footer-social a:hover img {
    transform: scale(1.2);
}

.footer-sign {
    width: 180px;
    margin: 40px auto;
    display: block;
}

.copyright {
    margin-top: 30px;
    opacity: 0.8;
    font-size: 15px;
}

@media (min-width: 992px) {
    .desktop-menu { display: block; }
    .menu-toggle { display: none; }
    body { padding-top: 90px; }
    header { height: 90px; }
    .header-inner { height: 90px; }
}

@media (max-width: 768px) {
    .overlay-text img { max-width: 80%; }
    .timer-box { width: 110px; height: 110px; }
    .timer-box span { font-size: 42px; }
    .footer-logo-text { font-size: 44px; }
}