/* =========================================================
   HOME PAGE STYLES (index.php)
   - marquee mask WITHOUT changing logo design
   - SEO accordion styles
   ========================================================= */

/* =========================================================
   MARQUEE MASK (v2)
   Цель: скрыть бегущую строку в зоне логотипа, НЕ меняя
   оформление логотипа.

   Реализация:
   - основной способ: CSS mask (вырез в самой бегущей строке)
   - fallback: прозрачный оверлей .marquee-cutout с фоном шапки
   ========================================================= */

/* Контейнер шапки/верхней зоны, где есть бегущая строка */
.marquee-mask-scope{
    position: relative;
    overflow: hidden; /* чтобы бегущая строка не вылезала за пределы */
}

/* Бегущая строка должна быть ниже по слоям, чем логотип */
.marquee-mask-target{
    position: relative;
    z-index: 1 !important;
    pointer-events: none;
}

/* Логотип — выше (без подложек/затемнений) */
.logo-mask-target{
    position: relative !important;
    z-index: 3 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    isolation: isolate;
}

/* Важно: если у вас осталась старая версия CSS с ::before,
   эта строка полностью отключит псевдоэлемент и вернёт вид как был. */
.logo-mask-target::before{ content: none !important; }

.logo-mask-target img,
.logo-mask-target svg{
    position: relative;
    z-index: 1;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))){
    .logo-mask-target::before{ content: none !important; }
}

/* Fallback-оверлей (если mask не поддерживается) */
.marquee-mask-target .marquee-cutout{
    position: absolute;
    top: 0;
    height: 100%;
    z-index: 10; /* выше текста/линии в бегущей строке */
    pointer-events: none;
    /* фон назначается из JS (берётся фон шапки),
       поэтому визуально ничего не меняется */
}

/* Основной способ: вырез в самой бегущей строке (современные браузеры) */
@supports ((-webkit-mask-image: linear-gradient(#000 0 0)) and (-webkit-mask-composite: xor)) or
          ((mask-image: linear-gradient(#000 0 0)) and (mask-composite: exclude)) {
    .marquee-mask-target{
        /* координаты/размер выреза задаются JS через CSS-переменные */
        --cut-left: 0px;
        --cut-top: 0px;
        --cut-w: 0px;
        --cut-h: 0px;

        -webkit-mask-image: linear-gradient(#000 0 0), linear-gradient(#000 0 0);
        -webkit-mask-size: 100% 100%, var(--cut-w) var(--cut-h);
        -webkit-mask-position: 0 0, var(--cut-left) var(--cut-top);
        -webkit-mask-repeat: no-repeat;
        -webkit-mask-composite: xor;

        mask-image: linear-gradient(#000 0 0), linear-gradient(#000 0 0);
        mask-size: 100% 100%, var(--cut-w) var(--cut-h);
        mask-position: 0 0, var(--cut-left) var(--cut-top);
        mask-repeat: no-repeat;
        mask-composite: exclude;
    }

    /* если работает mask, то fallback-оверлей не нужен */
    .marquee-mask-target .marquee-cutout{ display: none; }
}


/* =========================================================
   SEO ACCORDION (Trafford Style)
   ========================================================= */

.seo-details{
    margin-top: 26px;
    border-radius: 22px;
    background: rgba(10, 18, 28, 0.45);
    backdrop-filter: blur(22px);
    border: 1px solid rgba(0, 220, 255, 0.14);
    box-shadow:
        0 0 40px rgba(0, 220, 255, 0.08),
        0 20px 70px rgba(0, 0, 0, 0.55);
    overflow: hidden;
}

.seo-details > summary{
    cursor: pointer;
    list-style: none;
    padding: 14px 16px;
    display: inline-flex;
    align-items: center;
    gap: 10px;

    margin: 16px;
    border-radius: 14px;

    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(0, 220, 255, 0.18);

    font-weight: 700;
    letter-spacing: 0.3px;
    color: rgba(255, 255, 255, 0.92);

    transition: 0.25s ease;
}

.seo-details > summary:hover{
    box-shadow: 0 0 18px rgba(0, 220, 255, 0.18);
    transform: translateY(-1px);
}

.seo-details > summary::-webkit-details-marker{ display: none; }

.seo-details > summary::before{
    content: "+";
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(0, 220, 255, 0.12);
    border: 1px solid rgba(0, 220, 255, 0.22);
    color: #19f0ff;
    font-weight: 900;
}

.seo-details[open] > summary::before{ content: "–"; }

.seo-text{
    padding: 0 22px 24px 22px;
    animation: seoFade 0.25s ease;
}

@keyframes seoFade{
    from{ opacity: 0; transform: translateY(8px); }
    to  { opacity: 1; transform: translateY(0); }
}

.seo-text h2{
    font-size: 20px;
    margin: 8px 0 12px;
}

.seo-grid{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 14px;
}

@media (max-width: 900px){
    .seo-grid{ grid-template-columns: 1fr; }
}

.seo-card{
    border-radius: 18px;
    padding: 16px 16px 14px;
    background: rgba(0, 0, 0, 0.32);
    border: 1px solid rgba(0, 220, 255, 0.12);
    transition: 0.25s ease;
}

.seo-card:hover{
    transform: translateY(-2px);
    box-shadow: 0 0 22px rgba(0, 220, 255, 0.14);
}

.seo-card h3{
    margin: 0 0 8px;
    color: #19f0ff;
    font-size: 15px;
    letter-spacing: 0.2px;
}

.seo-card p{
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    opacity: 0.92;
}

.seo-lead{
    opacity: 0.92;
    line-height: 1.55;
}
