/* Сторінка «Колядки». Спільні стилі (шапка, перша секція, бургер-меню, футер) — у layout.css */
:root {
    --navy: #001c5b;
    --deep: #031746;
    --blue: #0b3b91;
    --border: #218bd2;
}
button,
input {
    font: inherit;
}
button {
    cursor: pointer;
}
a {
    color: inherit;
    text-decoration: none;
}
.svg-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}
.button {
    min-height: 44px;
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--gold);
    border-radius: 30px;
    color: #071a4c;
    font-weight: 700;
    font-size: 13px;
    box-shadow: 0 0 19px #ffda2666;
    transition:
        transform 0.2s,
        box-shadow 0.2s;
}
.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 26px #ffda2680;
}
.button svg {
    width: 19px;
    height: 19px;
    color: white;
}
/* Фон секції зі сніжинками — спільний клас .page-section у layout.css */
.carols-slider {
    position: relative;
}
.carols-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px 24px;
}
.carol-card {
    min-width: 0;
    min-height: 365px;
    padding: 18px 18px 15px;
    border: 1.5px solid var(--border);
    border-radius: 22px;
    background: linear-gradient(180deg, #0a3683, #06235d 85%);
    box-shadow: 0 0 15px #0b94fe80;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.carol-card__art-wrap {
    height: 185px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.carol-card__art {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.carol-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.carol-card__title {
    font-weight: 500;
    line-height: 1.25;
    font-size: clamp(20px, 1.8vw, 29px);
    letter-spacing: 0.035em;
    margin: 15px 0 18px;
    min-height: 70px;
}
.carol-card__player {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: auto;
}
.carol-card__play {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    display: grid;
    place-items: center;
    padding: 0;
}
.carol-card__play svg {
    width: 17px;
    height: 17px;
}
.carol-card__play .pause-icon {
    display: none;
}
.carol-card.is-playing .play-icon {
    display: none;
}
.carol-card.is-playing .pause-icon {
    display: block;
}
.carol-card__timeline {
    flex: 1;
    min-width: 0;
}
.carol-card__time {
    font-size: 11px;
    margin-bottom: 5px;
}
.carol-card__seek {
    display: block;
    width: 100%;
    height: 4px;
    margin: 0;
    accent-color: #fff;
    cursor: pointer;
}
.carousel-arrow {
    display: none;
}
.playlist-toggle {
    display: none;
}
.carols-status {
    min-height: 22px;
    padding-top: 10px;
    text-align: center;
    font-size: 12px;
    color: #ffe7a3;
}
.promo {
    position: relative;
    min-height: 330px;
    margin-top: 30px;
    border: 1.5px solid var(--border);
    border-radius: 22px;
    box-shadow: 0 0 15px #0b94fe77;
    background: linear-gradient(180deg, #0a3683, #04225b);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 25px;
    overflow: hidden;
}
.promo h2 {
    margin: 0 0 30px;
    font-size: clamp(30px, 3vw, 64px);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.03em;
}
.promo h2 span {
    color: var(--gold);
}
.promo__branch {
    position: absolute;
    /* 29% ≈ 360px на макеті 1440; на вужчих екранах гілочки зменшуються і не налазять на заголовок */
    width: 29%;
    max-width: 360px;
}
.promo__branch--left {
    left: 5%;
    top: 30%;
}
.promo__branch--right {
    right: 5%;
    top: 30%;
}
@media (max-width: 1024px) {
    .carols-grid {
        display: flex;
        gap: 16px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        scroll-behavior: smooth;
        padding: 6px 1px 18px;
    }
    .carols-grid::-webkit-scrollbar {
        display: none;
    }
    .carol-card {
        flex: 0 0 calc((100% - 16px) / 2);
        scroll-snap-align: start;
        min-height: 286px;
        padding: 12px;
    }
    .carol-card__art-wrap {
        height: 135px;
    }
    .carol-card__title {
        font-size: 19px;
        min-height: 58px;
        margin: 10px 0;
    }
    .carousel-arrow {
        display: grid;
        place-items: center;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 5;
        border: 0;
        background: transparent;
        color: #fff;
        width: 28px;
        height: 52px;
        padding: 0;
    }
    .carousel-arrow svg {
        width: 28px;
        height: 28px;
    }
    .carousel-arrow--prev {
        left: -29px;
        transform: translateY(-50%) rotate(180deg);
    }
    .carousel-arrow--next {
        right: -29px;
    }
    .carousel-arrow:disabled {
        opacity: 0.2;
    }
    .promo {
        min-height: 240px;
        margin-top: 20px;
    }
    .promo h2 {
        font-size: 34px;
    }
    .promo__branch {
        width: 26%;
    }
}
/* Вузькі планшети й телефони: гілочки не вміщаються по боках заголовка */
@media (max-width: 767px) {
    /* Промо: заголовок → дві гілочки поруч → кнопка */
    .promo {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "title title"
            "left right"
            "button button";
        align-items: center;
        min-height: 0;
        margin-top: 15px;
        padding: 26px 12px 28px;
        border-radius: 14px;
    }
    .promo h2 {
        grid-area: title;
        margin: 0;
        /* 18px на телефоні (як у макеті), трохи більше на вузьких планшетах */
        font-size: clamp(18px, 3.4vw, 26px);
        line-height: 1.25;
        letter-spacing: 0.05em;
    }
    /* «Співаймо українське» — в один рядок */
    .promo h2 br:first-of-type {
        display: none;
    }
    .promo__branch {
        position: static;
        width: 88%;
        max-width: 220px;
        margin-top: 14px;
    }
    .promo__branch img {
        width: 100%;
        height: auto;
    }
    .promo__branch--left {
        grid-area: left;
        justify-self: start;
    }
    .promo__branch--right {
        grid-area: right;
        justify-self: end;
    }
    .promo .button {
        grid-area: button;
        justify-self: center;
        min-height: 40px;
        margin-top: 16px;
        padding: 0 20px 0 24px;
        gap: 14px;
        font-size: 13px;
        font-weight: 500;
    }
    .promo .button svg {
        width: 18px;
        height: 18px;
    }
}
@media (max-width: 600px) {
    .carols-grid {
        gap: 10px;
    }
    .carol-card {
        flex-basis: calc((100% - 10px) / 2);
        min-height: 176px;
        padding: 8px;
        border-radius: 12px;
    }
    .carol-card__art-wrap {
        height: 88px;
    }
    .carol-card__title {
        font-size: 14px;
        min-height: 40px;
        margin: 6px 0;
    }
    .carol-card__play {
        width: 18px;
        height: 18px;
        flex-basis: 18px;
        border-width: 1.5px;
    }
    .carol-card__play svg {
        width: 11px;
        height: 11px;
    }
    .carol-card__player {
        gap: 8px;
    }
    .carol-card__time {
        font-size: 7px;
    }
    .carousel-arrow--prev {
        left: -13px;
    }
    .carousel-arrow--next {
        right: -13px;
    }
    .carousel-arrow svg {
        width: 19px;
        height: 19px;
    }
}
/* On narrow phones, switch to the stacked playlist from the 3rd reference image. */
@media (max-width: 390px) {
    .carols-grid {
        display: flex;
        flex-direction: column;
        gap: 10px;
        overflow: visible;
        padding: 0;
    }
    .carol-card {
        flex: initial;
        display: grid;
        grid-template-columns: 86px minmax(0, 1fr) 27px;
        align-items: center;
        min-height: 76px;
        padding: 7px 9px;
        border-radius: 17px;
        column-gap: 9px;
        overflow: visible;
    }
    .carol-card:nth-child(n + 6) {
        display: none;
    }
    .carols-grid.is-expanded .carol-card:nth-child(n + 6) {
        display: grid;
    }
    .carol-card__art-wrap {
        grid-column: 1;
        height: 60px;
    }
    .carol-card__body {
        grid-column: 2 / 4;
        display: grid;
        grid-template-columns: minmax(0, 1fr) 27px;
        gap: 4px 6px;
        align-items: center;
    }
    .carol-card__title {
        grid-column: 1;
        grid-row: 1;
        min-height: 0;
        margin: 0;
        font-size: 12px;
        letter-spacing: 0;
    }
    .carol-card__player {
        display: contents;
    }
    .carol-card__play {
        grid-column: 2;
        grid-row: 1;
        width: 27px;
        height: 27px;
        border-width: 2px;
        justify-self: end;
    }
    .carol-card__play svg {
        width: 15px;
        height: 15px;
    }
    .carol-card__timeline {
        display: none;
    }
    .carousel-arrow {
        display: none;
    }
    .playlist-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        width: 100%;
        border: 0;
        background: none;
        color: #fff;
        min-height: 43px;
        font-size: 12px;
    }
    .playlist-toggle svg {
        width: 18px;
        height: 18px;
        transform: rotate(90deg);
    }
    .playlist-toggle[aria-expanded="true"] svg {
        transform: rotate(-90deg);
    }
}
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
