/* =========================================================
   RESET
   ========================================================= */

   * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    min-height: 100%;
}

body {
    background: #fff;
    overflow-x: hidden;
}

a {
    text-decoration: none;
}


/* =========================================================
   FONTS
   ========================================================= */

@font-face {
    font-family: 'YekanBakhEN05Medium';
    src: url('/campaign/bts-campaign-1405/assets/font/Yekan-Bakh-EN-05-Medium.ttf') format('truetype');
    font-display: swap;
}


/* =========================================================
   HERO SECTIONS
   ========================================================= */

.hero {
    position: relative;
    width: 100%;
    line-height: 0;
    overflow: hidden;
}

.hero-image {
    display: block;
    width: 100%;
    height: auto;
}

/* در موبایل: دسکتاپ مخفی است */
.hero-desktop-section {
    display: none;
}

.hero-mobile-section {
    display: block;
}


/* =========================================================
   HERO BUTTONS
   ========================================================= */

.hero-buttons {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 7%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 94%;
}

.hero-button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 105px;
    height: 36px;
    padding: 0 12px;
    background: #1452a2;
    color: #fff;
    border-radius: 20px;
    font-family: 'YekanBakhEN05Medium', sans-serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.hero-button:hover {
    background: #0d4389;
    transform: translateY(-2px);
}


/* =========================================================
   CONTENT WRAPPER
   ========================================================= */

.landing-content {
    width: calc(100% - 32px);
    max-width: 1400px;
    margin: 16px auto 24px;
}


/* =========================================================
   GENERAL IMAGE CARD
   ========================================================= */

.image-card {
    display: block;
    width: 100%;
    line-height: 0;
    overflow: hidden;
}

/* استایل دهی به تگ img که داخل picture یا a قرار دارد */
.image-card img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.25s ease;
}

.image-card:hover img {
    transform: scale(1.01);
}


/* =========================================================
   GRID LAYOUTS
   ========================================================= */

.grid-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.grid-one {
    width: 100%;
    margin-bottom: 16px;
}

.grid-four {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}


/* =========================================================
   MOBILE (MAX-WIDTH: 767PX)
   ========================================================= */

@media screen and (max-width: 767px) {
    .landing-content {
        width: calc(100% - 20px);
        margin-top: 10px;
    }
    .grid-two, .grid-four {
        gap: 10px;
        margin-bottom: 10px;
    }
    .grid-one {
        margin-bottom: 10px;
    }
    .hero-buttons {
        bottom: 5%;
        gap: 3px;
        width: 96%;
    }
    .hero-button {
        min-width: 0;
        width: 31%;
        height: 30px;
        padding: 0 5px;
        border-radius: 16px;
        font-size: 10px;
    }
}


/* =========================================================
   TABLET / DESKTOP (MIN-WIDTH: 768PX)
   ========================================================= */

@media screen and (min-width: 768px) {
    /* تغییر وضعیت نمایش سکشن هیرو برای دسکتاپ */
    .hero-mobile-section {
        display: none;
    }
    .hero-desktop-section {
        display: block;
    }

    .hero-buttons {
        left: 72%;
        bottom: 9%;
        transform: translateX(-50%);
        width: auto;
        gap: 8px;
    }
    .hero-button {
        min-width: 145px;
        height: 44px;
        padding: 0 20px;
        border-radius: 24px;
        font-size: 15px;
    }
    .landing-content {
        margin-top: 20px;
    }
}


/* =========================================================
   LARGE DESKTOP (MIN-WIDTH: 1400PX)
   ========================================================= */

@media screen and (min-width: 1400px) {
    .landing-content {
        width: calc(100% - 40px);
        max-width: 1400px;
    }
    .grid-two, .grid-four {
        gap: 18px;
    }
    .grid-one {
        margin-bottom: 18px;
    }
    .hero-button {
        min-width: 160px;
        height: 48px;
        font-size: 17px;
    }
}



/* =========================================================
   INSTAGRAM BANNER (IOS SAFARI FIXED)
   ========================================================= */

/* غیرفعال‌سازی کامل در دسکتاپ */
@media screen and (min-width: 768px) {
    .bottom-banner {
        display: none !important;
    }
}

/* مخصوص موبایل و آیفون */
@media screen and (max-width: 767px) {
    body.has-banner {
        padding-bottom: 55px;
    }

    .bottom-banner {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        background-color: #ffffff;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.12);
        z-index: 999999;
        
        /* رعایت حاشیه نوار پایینی آیفون (Safe Area) */
        padding-top: 8px;
        padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
        padding-left: 10px;
        padding-right: 10px;

        /* انیمیشن ظهور */
        -webkit-transform: translateY(100%);
        transform: translateY(100%);
        -webkit-transition: -webkit-transform 0.3s ease-out;
        transition: transform 0.3s ease-out;
        
        font-family: 'YekanBakhEN05Medium', sans-serif;
        box-sizing: border-box;
    }

    .bottom-banner.show {
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }

    /* فیکس اصلی سافاری: min-width: 0 */
    .banner-wrapper {
        display: -webkit-box;
        display: -webkit-flex;
        display: flex;
        -webkit-box-align: center;
        -webkit-align-items: center;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 6px;
        min-width: 0; /* جلوگیری از زدن دکمه به بیرون صفحه در آیفون */
    }

    .banner-text {
        font-size: 11px;
        font-weight: bold;
        color: #222;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        
        /* فیکس سافاری برای اسپن */
        -webkit-box-flex: 1;
        -webkit-flex: 1 1 auto;
        flex: 1 1 auto;
        min-width: 0; 
    }

    .banner-btn {
        display: -webkit-inline-flex;
        display: inline-flex;
        -webkit-box-align: center;
        -webkit-align-items: center;
        align-items: center;
        justify-content: center;
        
        background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
        color: #ffffff !important;
        padding: 6px 12px;
        border-radius: 14px;
        font-size: 10px;
        font-weight: 600;
        white-space: nowrap;
        
        /* فیکس سافاری: جلوگیری از جمع شدن یا محو شدن دکمه */
        -webkit-flex-shrink: 0;
        flex-shrink: 0;
        height: 28px;
        line-height: 1;
        -webkit-appearance: none;
    }

    .close-btn {
        background: rgba(0, 0, 0, 0.06);
        border: none;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        font-size: 14px;
        color: #555;
        cursor: pointer;
        display: -webkit-inline-flex;
        display: inline-flex;
        -webkit-box-align: center;
        -webkit-align-items: center;
        align-items: center;
        justify-content: center;
        
        -webkit-flex-shrink: 0;
        flex-shrink: 0;
        padding: 0;
        margin: 0;
        -webkit-appearance: none;
    }
}