/* =========================================================
   MYTHRA CRAFT — ANA SAYFA DİNAMİK DUYURU ETİKETİ

   LeaderOS $announcements verisi home.php içinde kullanılır.
   Bu dosya yalnızca masaüstü görünümünü biçimlendirir.
   ========================================================= */

@media (min-width: 1280px) {
    #__heroSection .mythra-home-announcement {
        position: absolute;
        z-index: 45;
        top: 230px;
        left: 0;

        display: inline-flex;
        align-items: center;
        gap: 12px;

        width: fit-content;
        max-width: min(440px, calc(100vw - 36px));
        min-height: 58px;
        padding: 11px 22px 12px 18px;
        box-sizing: border-box;

        color: #fff;
        text-decoration: none;
        border: 0;
        border-radius: 0 18px 18px 0;
        overflow: hidden;
        isolation: isolate;

        /* Ana yüzey + dairesel desen */
        background:
            radial-gradient(
                circle at 15px 15px,
                rgba(255, 255, 255, 0.13) 0 9px,
                transparent 10px
            ) 0 0 / 30px 30px,
            radial-gradient(
                circle at 15px 15px,
                transparent 0 8px,
                rgba(255, 255, 255, 0.10) 9px 11px,
                transparent 12px
            ) 15px 15px / 30px 30px,
            linear-gradient(
                105deg,
                rgba(112, 14, 105, 0.98) 0%,
                rgba(213, 28, 132, 0.98) 48%,
                rgba(255, 91, 143, 0.98) 100%
            );

        box-shadow:
            inset 0 3px 0 rgba(255, 255, 255, 0.24),
            inset 0 -5px 0 rgba(85, 0, 61, 0.38),
            0 3px 0 #ff0099,
            0 12px 28px rgba(17, 0, 14, 0.34),
            0 0 24px rgba(255, 0, 153, 0.16);

        transform: translate3d(0, 0, 0);
        animation: mythraAnnouncementEnter 680ms cubic-bezier(.2, .85, .25, 1) both;
        transition:
            filter 180ms ease,
            box-shadow 180ms ease;
    }

    /* Deseni metinden ayıran yumuşak karartma */
    #__heroSection .mythra-home-announcement::before {
        content: "";
        position: absolute;
        z-index: -1;
        inset: 0;
        pointer-events: none;
        background: linear-gradient(
            90deg,
            rgba(24, 0, 27, 0.10),
            rgba(24, 0, 27, 0.24) 55%,
            rgba(24, 0, 27, 0.08)
        );
    }

    #__heroSection .mythra-home-announcement__icon {
        position: relative;
        z-index: 1;
        flex: 0 0 auto;
        display: grid;
        place-items: center;
        width: 34px;
        height: 34px;
        border-radius: 11px;
        color: #5b1645;
        font-size: 14px;

        background: linear-gradient(180deg, #fff8b8 0%, #ffe05f 50%, #ffc928 100%);
        box-shadow:
            inset 0 2px 0 rgba(255, 255, 255, 0.78),
            inset 0 -3px 0 rgba(151, 78, 0, 0.22),
            0 3px 0 rgba(91, 22, 69, 0.48),
            0 0 14px rgba(255, 218, 69, 0.28);
    }

    #__heroSection .mythra-home-announcement__text {
        position: relative;
        z-index: 1;
        min-width: 0;
        font-size: 15px;
        line-height: 1.35;
        font-weight: 800;
        letter-spacing: -0.015em;
        overflow-wrap: anywhere;
        text-shadow:
            0 2px 0 rgba(67, 7, 55, 0.78),
            0 0 10px rgba(255, 255, 255, 0.10);
      width: auto;
max-width: 315px;
white-space: normal;
overflow-wrap: break-word;
word-break: normal;
    }

    /* PHP'nin otomatik sardığı bütün sayılar ve yüzde ifadeleri */
    #__heroSection .mythra-home-announcement__number {
        display: inline-block;
        margin-inline: 2px;
        color: #ffe45e;
        font-size: 1.18em;
        line-height: 1;
        font-weight: 950;
        letter-spacing: -0.025em;
        text-shadow:
            0 2px 0 #7b3146,
            0 0 10px rgba(255, 224, 69, 0.42);
    }

    #__heroSection .mythra-home-announcement__arrow {
        position: relative;
        z-index: 1;
        flex: 0 0 auto;
        color: rgba(255, 255, 255, 0.78);
        font-size: 12px;
        transition: transform 180ms ease, color 180ms ease;
    }

    #__heroSection .mythra-home-announcement:hover,
    #__heroSection .mythra-home-announcement:focus-visible {
        color: #fff;
        text-decoration: none;
        filter: brightness(1.06) saturate(1.05);
        box-shadow:
            inset 0 3px 0 rgba(255, 255, 255, 0.29),
            inset 0 -5px 0 rgba(85, 0, 61, 0.40),
            0 3px 0 #ff0099,
            0 14px 31px rgba(17, 0, 14, 0.38),
            0 0 30px rgba(255, 0, 153, 0.23);
    }

    #__heroSection .mythra-home-announcement:hover .mythra-home-announcement__arrow,
    #__heroSection .mythra-home-announcement:focus-visible .mythra-home-announcement__arrow {
        color: #ffe45e;
        transform: translateX(3px);
    }

    #__heroSection .mythra-home-announcement:focus-visible {
        outline: 2px solid #ffe45e;
        outline-offset: 4px;
    }
}

@keyframes mythraAnnouncementEnter {
    from {
        opacity: 0;
        transform: translate3d(-105%, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    #__heroSection .mythra-home-announcement {
        animation: none !important;
        transition: none !important;
    }
}

/* Tablet duyurusu hero içeriğinin üst güvenli alanında kalır. */
@media (min-width: 640px) and (max-width: 1279px) {
    #__heroSection > .mythra-home-announcement {
        top: clamp(205px, 24vw, 285px) !important;
        max-width: min(460px, calc(100vw - 32px)) !important;
    }
}
/* =========================================================
   MYTHRA CRAFT — DUYURU SİSTEMİ / TELEFON + TABLET

   Telefon (0–639px): Mobil açılır menünün içinde.
   Tablet  (640–1279px): Hero üzerinde bağımsız sol etiket.
   Masaüstü (1280px+): Mevcut masaüstü CSS'i aynen çalışır.
   ========================================================= */

/* Header partial'i bütün sayfalarda kullanılır; mobil duyuru
   varsayılan olarak kapalıdır ve yalnız ana sayfada açılır. */
.mythra-mobile-announcement {
    display: none;
}

/* =========================================================
   TELEFON — HAMBURGER PANELİNİN İÇİNDE
   ========================================================= */

@media (max-width: 639px) {

    /* home.php içindeki masaüstü/tablet kopyasını telefonda kaldır. */
    #__heroSection > .mythra-home-announcement {
        display: none !important;
    }

    /* Yalnızca ana sayfada, mobil açılır panelin içinde görünür. */
    body:has(#__heroSection)
    #mythra-mobile-menu-panel
    .mythra-mobile-announcement {
        position: relative;
        z-index: 2;

        display: grid;
        grid-template-columns: 34px minmax(0, 1fr) 14px;
        align-items: center;
        gap: 10px;

        width: 100%;
        min-height: 58px;
        margin: 11px 0 14px;
        padding: 11px 12px;
        box-sizing: border-box;

        color: #fff;
        text-decoration: none;
        border: 0;
        border-radius: 15px;
        overflow: hidden;
        isolation: isolate;
        -webkit-tap-highlight-color: transparent;

        background:
            radial-gradient(
                circle at 13px 13px,
                rgba(255, 255, 255, 0.13) 0 8px,
                transparent 9px
            ) 0 0 / 26px 26px,
            radial-gradient(
                circle at 13px 13px,
                transparent 0 7px,
                rgba(255, 255, 255, 0.09) 8px 10px,
                transparent 11px
            ) 13px 13px / 26px 26px,
            linear-gradient(
                110deg,
                rgba(112, 14, 105, 0.99) 0%,
                rgba(213, 28, 132, 0.99) 50%,
                rgba(255, 91, 143, 0.99) 100%
            );

        box-shadow:
            inset 0 3px 0 rgba(255, 255, 255, 0.24),
            inset 0 -4px 0 rgba(85, 0, 61, 0.40),
            0 2px 0 #ff0099,
            0 9px 20px rgba(0, 0, 0, 0.28),
            0 0 18px rgba(255, 0, 153, 0.12);

        animation: mythraMobileAnnouncementIn 360ms cubic-bezier(.2, .8, .25, 1) both;
    }

    body:has(#__heroSection)
    #mythra-mobile-menu-panel
    .mythra-mobile-announcement::before {
        content: "";
        position: absolute;
        z-index: -1;
        inset: 0;
        pointer-events: none;
        background: linear-gradient(
            90deg,
            rgba(24, 0, 27, 0.08),
            rgba(24, 0, 27, 0.24) 58%,
            rgba(24, 0, 27, 0.07)
        );
    }

    .mythra-mobile-announcement__icon {
        position: relative;
        z-index: 1;
        display: grid;
        place-items: center;
        width: 34px;
        height: 34px;
        border-radius: 11px;
        color: #5b1645;
        font-size: 13px;

        background: linear-gradient(180deg, #fff8b8 0%, #ffe05f 50%, #ffc928 100%);
        box-shadow:
            inset 0 2px 0 rgba(255, 255, 255, 0.80),
            inset 0 -3px 0 rgba(151, 78, 0, 0.22),
            0 3px 0 rgba(91, 22, 69, 0.44),
            0 0 12px rgba(255, 218, 69, 0.24);
    }

    .mythra-mobile-announcement__text {
        position: relative;
        z-index: 1;
        width: 100%;
        min-width: 0;
        max-width: none;
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: normal;

        font-size: clamp(11.5px, 3.25vw, 13px);
        line-height: 1.34;
        font-weight: 800;
        letter-spacing: -0.015em;
        text-shadow:
            0 2px 0 rgba(67, 7, 55, 0.76),
            0 0 8px rgba(255, 255, 255, 0.08);
    }

    .mythra-mobile-announcement__number {
        display: inline-block;
        margin-inline: 1px;
        color: #ffe45e;
        font-size: 1.16em;
        line-height: 1;
        font-weight: 950;
        letter-spacing: -0.02em;
        text-shadow:
            0 2px 0 #7b3146,
            0 0 9px rgba(255, 224, 69, 0.38);
    }

    .mythra-mobile-announcement__arrow {
        position: relative;
        z-index: 1;
        color: rgba(255, 255, 255, 0.82);
        font-size: 10px;
    }

    .mythra-mobile-announcement:active {
        color: #fff;
        filter: brightness(0.96);
        transform: scale(0.988);
    }

    .mythra-mobile-announcement:focus-visible {
        color: #fff;
        outline: 2px solid #ffe45e;
        outline-offset: 3px;
    }
}

/* =========================================================
   TABLET — HERO ÜZERİNDE BAĞIMSIZ SOL ETİKET
   ========================================================= */

@media (min-width: 640px) and (max-width: 1279px) {
    #__heroSection > .mythra-home-announcement {
        position: absolute;
        z-index: 45;
        top: clamp(215px, 25vw, 310px);
        left: 0;

        display: grid;
        grid-template-columns: 34px minmax(0, 1fr) 12px;
        align-items: center;
        gap: 11px;

        width: fit-content;
        max-width: min(430px, calc(100vw - 32px));
        min-height: 58px;
        padding: 11px 17px 12px 16px;
        box-sizing: border-box;

        color: #fff;
        text-decoration: none;
        border: 0;
        border-radius: 0 17px 17px 0;
        overflow: hidden;
        isolation: isolate;

        background:
            radial-gradient(
                circle at 14px 14px,
                rgba(255, 255, 255, 0.13) 0 8px,
                transparent 9px
            ) 0 0 / 28px 28px,
            radial-gradient(
                circle at 14px 14px,
                transparent 0 7px,
                rgba(255, 255, 255, 0.09) 8px 10px,
                transparent 11px
            ) 14px 14px / 28px 28px,
            linear-gradient(
                105deg,
                rgba(112, 14, 105, 0.98) 0%,
                rgba(213, 28, 132, 0.98) 48%,
                rgba(255, 91, 143, 0.98) 100%
            );

        box-shadow:
            inset 0 3px 0 rgba(255, 255, 255, 0.24),
            inset 0 -5px 0 rgba(85, 0, 61, 0.38),
            0 3px 0 #ff0099,
            0 12px 26px rgba(17, 0, 14, 0.34),
            0 0 22px rgba(255, 0, 153, 0.14);

        transform: translate3d(0, 0, 0);
        animation: mythraTabletAnnouncementIn 560ms cubic-bezier(.2, .85, .25, 1) both;
    }

    #__heroSection > .mythra-home-announcement::before {
        content: "";
        position: absolute;
        z-index: -1;
        inset: 0;
        pointer-events: none;
        background: linear-gradient(
            90deg,
            rgba(24, 0, 27, 0.08),
            rgba(24, 0, 27, 0.23) 56%,
            rgba(24, 0, 27, 0.07)
        );
    }

    #__heroSection > .mythra-home-announcement .mythra-home-announcement__icon {
        position: relative;
        z-index: 1;
        display: grid;
        place-items: center;
        width: 34px;
        height: 34px;
        border-radius: 11px;
        color: #5b1645;
        font-size: 13px;
        background: linear-gradient(180deg, #fff8b8 0%, #ffe05f 50%, #ffc928 100%);
        box-shadow:
            inset 0 2px 0 rgba(255, 255, 255, 0.80),
            inset 0 -3px 0 rgba(151, 78, 0, 0.22),
            0 3px 0 rgba(91, 22, 69, 0.44),
            0 0 12px rgba(255, 218, 69, 0.24);
    }

    #__heroSection > .mythra-home-announcement .mythra-home-announcement__text {
        position: relative;
        z-index: 1;
        width: auto;
        min-width: 0;
        max-width: 315px;
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: normal;
        font-size: 14px;
        line-height: 1.35;
        font-weight: 800;
        letter-spacing: -0.015em;
        text-shadow:
            0 2px 0 rgba(67, 7, 55, 0.76),
            0 0 8px rgba(255, 255, 255, 0.08);
    }

    #__heroSection > .mythra-home-announcement .mythra-home-announcement__number {
        display: inline-block;
        margin-inline: 1px;
        color: #ffe45e;
        font-size: 1.16em;
        line-height: 1;
        font-weight: 950;
        letter-spacing: -0.02em;
        text-shadow:
            0 2px 0 #7b3146,
            0 0 9px rgba(255, 224, 69, 0.38);
    }

    #__heroSection > .mythra-home-announcement .mythra-home-announcement__arrow {
        position: relative;
        z-index: 1;
        color: rgba(255, 255, 255, 0.82);
        font-size: 10px;
    }
}

@media (min-width: 640px) and (max-width: 1279px) and (hover: hover) and (pointer: fine) {
    #__heroSection > .mythra-home-announcement:hover {
        color: #fff;
        filter: brightness(1.055) saturate(1.04);
    }

    #__heroSection > .mythra-home-announcement:hover .mythra-home-announcement__arrow {
        color: #ffe45e;
        transform: translateX(2px);
    }
}

@keyframes mythraMobileAnnouncementIn {
    from {
        opacity: 0;
        transform: translate3d(-18px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes mythraTabletAnnouncementIn {
    from {
        opacity: 0;
        transform: translate3d(-100%, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .mythra-mobile-announcement,
    #__heroSection > .mythra-home-announcement {
        animation: none !important;
        transition: none !important;
    }
}
