/*
Theme Name:  Brass Ukraine
Theme URI:   https://brassukraine.com
Author:      Brass Ukraine
Author URI:  https://brassukraine.com
Description: Офіційна тема для сайту ансамблю мідних духових Brass Ukraine.
Version:     3.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: brass-ukraine
Tags:        one-page, music, custom-fields
*/

/* ── Змінні ────────────────────────────────────────────────── */
:root {
    --gold:    #e8b208;
    --dark:    #111111;
    --white:   #ffffff;
    --grey-bg: #f7f7f7;
    --pad:     60px 20px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body   { font-family: 'Open Sans', sans-serif; color: #333; margin: 0; padding: 0; background: #fff; }
h1,h2,h3,h4 { font-family: 'Raleway', sans-serif; font-weight: 700; margin: 0 0 16px; }
p      { margin: 0 0 16px; line-height: 1.7; }
img    { max-width: 100%; height: auto; display: block; }
a      { color: var(--gold); text-decoration: none; transition: color .2s; }
a:hover { text-decoration: underline; }

/* ── Анімація появи ────────────────────────────────────────── */
/* БАГ ВИПРАВЛЕНО: прибрано padding з .visible */
.fade-on-scroll { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.fade-on-scroll.visible { opacity: 1; transform: none; }

/* ── Preloader ─────────────────────────────────────────────── */
#preloader {
    position: fixed; inset: 0;
    background: url('img/preloader.svg') center/60px no-repeat #fff;
    z-index: 9999;
    transition: opacity .5s ease;
}

/* ════════════════════════════════════════════════════════════
   HEADER
════════════════════════════════════════════════════════════ */
#header {
    position: sticky; top: 0; z-index: 500;
    background: var(--dark);
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
}

/* Логотип у хедері */
#header .site-name a {
    color: #fff;
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: 22px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
}

/* Десктопне меню */
.nav-menu {
    list-style: none; margin: 0; padding: 0;
    display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
}
.nav-menu a {
    color: #ccc; font-weight: 500; font-size: 14px;
    padding: 8px 12px; display: block;
    transition: color .2s;
    text-decoration: none;
}
.nav-menu a:hover,
.nav-menu a.menu-active { color: var(--gold); text-decoration: none; }

/* ════════════════════════════════════════════════════════════
   BURGER (тільки мобільний)
════════════════════════════════════════════════════════════ */
.burger-btn {
    display: none;               /* приховано на десктопі */
    flex-direction: column;
    justify-content: space-between;
    width: 40px; height: 40px;
    padding: 10px 8px;
    background: transparent; border: none; cursor: pointer;
    border-radius: 4px; flex-shrink: 0;
    transition: background .2s;
}
.burger-btn:hover { background: rgba(255,255,255,.08); }
.burger-btn span {
    display: block; width: 24px; height: 2px;
    background: #fff; border-radius: 2px;
    transition: transform .28s ease, opacity .2s ease;
    transform-origin: center;
}

/* Хрестик */
.burger-btn.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger-btn.open span:nth-child(2) { opacity: 0; }
.burger-btn.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Overlay */
.nav-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 498;
    backdrop-filter: blur(2px);
}
.nav-overlay.open { display: block; }

/* ════════════════════════════════════════════════════════════
   SECTIONS — загальне
════════════════════════════════════════════════════════════ */
section { padding: var(--pad); }

.section-title {
    text-align: center; font-size: 30px;
    text-transform: uppercase; letter-spacing: 1px;
    margin-bottom: 8px;
}
.section-description {
    text-align: center; color: #777;
    font-size: 15px; margin-bottom: 36px;
}

/* ════════════════════════════════════════════════════════════
   HERO
════════════════════════════════════════════════════════════ */
#brass {
    min-height: 100vh;
    background: url('img/brass.webp') center/cover no-repeat;
    display: flex; align-items: center; justify-content: center;
    text-align: center; color: #fff; position: relative;
}
/* БАГ ВИПРАВЛЕНО: margin-bottom прибрано */
.brass-logo { width: 180px; margin: 0 auto 32px; }
.brass-container { padding: 40px 20px; }
#brass h1 { font-size: 48px; color: #fff; }
#brass h2 { font-size: 22px; color: rgba(255,255,255,.85); font-weight: 400; }

/* ════════════════════════════════════════════════════════════
   ABOUT
════════════════════════════════════════════════════════════ */
#about { background: #fff; }
.about-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 40px; align-items: center; max-width: 1100px; margin: 0 auto;
}
.about-img img { border-radius: 12px; width: 100%; }
.about-content { text-align: justify; }

/* ════════════════════════════════════════════════════════════
   POSTER / SWIPER
════════════════════════════════════════════════════════════ */
#poster { background: #1a1a1a; color: #fff; padding: 50px 20px 70px; }
#poster .section-title { color: #fff; }
#poster .section-description { color: #999; }

.poster-swiper { width: 100%; padding-bottom: 50px; }
.poster-slide {
    background: #282828; border-radius: 10px;
    overflow: hidden; position: relative;
    height: 400px;
    box-shadow: 0 4px 20px rgba(0,0,0,.5);
}
.poster-slide img { width: 100%; height: 100%; object-fit: cover; }
.poster-info {
    position: absolute; bottom: 0; left: 0; width: 100%;
    background: rgba(0,0,0,.7); color: #fff;
    padding: 14px; opacity: 0; transition: opacity .3s;
}
.poster-slide:hover .poster-info { opacity: 1; }
.poster-info h3 { margin: 0 0 4px; font-size: 15px; }
.poster-info p  { margin: 0; font-size: 12px; }
.poster-button-next, .poster-button-prev { color: var(--gold) !important; }

/* ════════════════════════════════════════════════════════════
   TEAM
════════════════════════════════════════════════════════════ */
#team { padding: 50px 20px; background: var(--grey-bg); }
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px; max-width: 1100px; margin: 0 auto;
}
.team-member {
    width: 200px; height: 260px;
    margin: 0 auto; perspective: 1000px; cursor: pointer;
}
.card-inner {
    width: 100%; height: 100%;
    position: relative; transition: transform .6s;
    transform-style: preserve-3d;
}
.team-member:hover .card-inner,
.card-inner.is-flipped { transform: rotateY(180deg); }
.card-face {
    position: absolute; inset: 0;
    backface-visibility: hidden; border-radius: 12px; overflow: hidden;
}
.card-face img { width: 100%; height: 100%; object-fit: cover; }
.card-front { z-index: 2; }
.card-back  { transform: rotateY(180deg); z-index: 1; }
.card-back .overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,.25));
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    color: #fff; text-align: center; padding: 12px;
}
.card-back .overlay p, .card-back .overlay i { margin: 4px 0; }

/* ════════════════════════════════════════════════════════════
   TICKETS / SUBSCRIBE
════════════════════════════════════════════════════════════ */
#tickets, #subscribe {
    background: linear-gradient(rgba(0,0,0,.7),rgba(0,0,0,.7)),
                url('img/subscribe-bg1.jpg') center/cover;
    color: #fff; text-align: center; padding: 60px 20px;
}
#tickets .section-title, #subscribe .section-title { color: #fff; }
#tickets .section-description { color: rgba(255,255,255,.7); }
#subscribe .section-description { color: rgba(255,255,255,.8); }

.social-grid {
    display: flex; flex-wrap: wrap;
    justify-content: center; gap: 12px;
    margin-top: 24px;
}
.subscribe-btn {
    display: inline-flex; align-items: center; gap: 8px;
    border: 2px solid #fff; border-radius: 30px;
    padding: 10px 22px; color: #fff;
    font-weight: 700; text-transform: uppercase; font-size: 13px;
    transition: all .3s; white-space: nowrap; text-decoration: none;
}
.subscribe-btn:hover {
    background: var(--gold); border-color: var(--gold);
    color: #fff; transform: scale(1.05);
    box-shadow: 0 0 18px var(--gold); text-decoration: none;
}
.social-icon-fa { font-size: 18px; transition: transform .5s; }
.subscribe-btn:hover .social-icon-fa { transform: rotate(360deg); }

/* ════════════════════════════════════════════════════════════
   GALLERY
════════════════════════════════════════════════════════════ */
#gallery { padding: 50px 20px; background: #fafafa; }
.gm-grid {
    display: flex; flex-wrap: wrap;
    justify-content: center;
    max-width: 1200px; margin: 0 auto;
}
.gm-grid .item {
    width: 240px; margin: 10px;
    border-radius: 10px; overflow: hidden; background: #fff;
    box-shadow: 0 3px 14px rgba(0,0,0,.1);
    transition: transform .3s, box-shadow .3s;
}
.gm-grid .item:hover { transform: translateY(-4px); box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.gm-grid img { width: 100%; display: block; border-bottom: 4px solid var(--gold); }

/* ════════════════════════════════════════════════════════════
   CONTACT
════════════════════════════════════════════════════════════ */
#contact { padding: 50px 20px; }
.contact-grid {
    display: grid; grid-template-columns: 1fr 2fr 1fr;
    gap: 40px; max-width: 1100px; margin: 0 auto;
}
.form-field { margin-bottom: 14px; }
.form-field label { display: block; font-size: 13px; font-weight: 600; color: #555; margin-bottom: 4px; }
.contact-form input,
.contact-form textarea {
    width: 100%; padding: 10px;
    border: 1px solid #ccc; border-radius: 4px;
    font-family: 'Open Sans', sans-serif;
    transition: border-color .2s;
}
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px rgba(232,178,8,.15); }
.contact-form button {
    background: var(--gold); border: none;
    padding: 11px 24px; color: #fff;
    border-radius: 4px; cursor: pointer; font-size: 14px; font-weight: 600;
    transition: background .2s;
}
.contact-form button:hover { background: var(--dark); }
.form-message { font-size: 14px; margin-top: 8px; min-height: 20px; }
.map-container iframe { width: 100%; height: 260px; border-radius: 8px; border: 0; }

/* ════════════════════════════════════════════════════════════
   FOOTER
════════════════════════════════════════════════════════════ */
#footer { background: var(--dark); color: #fff; padding: 20px; text-align: center; font-size: 14px; }

/* Back to top */
.back-to-top {
    display: none; position: fixed; bottom: 20px; right: 20px;
    width: 44px; height: 44px;
    background: var(--gold); color: #fff; border: none;
    border-radius: 6px; font-size: 18px; cursor: pointer; z-index: 497;
    transition: background .2s;
}
.back-to-top:hover { background: var(--dark); }

/* ════════════════════════════════════════════════════════════
   MOBILE SWIPER WRAPPERS (приховані за замовч.)
════════════════════════════════════════════════════════════ */
.team-swiper-wrap,
.gallery-swiper-wrap { display: none; }

.team-swiper,
.gallery-swiper { width: 100%; padding-bottom: 48px !important; }

.team-swiper .swiper-slide   { display: flex; justify-content: center; padding: 8px 4px; }

.gallery-swiper .swiper-slide { border-radius: 10px; overflow: hidden; }
.gallery-swiper .swiper-slide img { width: 100%; border-bottom: 4px solid var(--gold); }

.swiper-pagination-bullet        { width: 8px; height: 8px; background: #bbb; opacity: 1; }
.swiper-pagination-bullet-active { background: var(--gold); transform: scale(1.4); }

/* ════════════════════════════════════════════════════════════
   MOBILE  ≤ 768px
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    /* Burger — показати */
    .burger-btn { display: flex; }

    /* Header — компактний */
    #header { padding: 12px 16px; }
    #header .site-name a { font-size: 17px; }

    /* Nav — прихована, відкривається бургером */
    #header nav {
        display: none;
        position: fixed;
        top: 0; right: 0;
        width: 75vw; max-width: 300px;
        height: 100vh;
        background: #1a1a1a;
        z-index: 499;
        padding: 72px 0 32px;
        overflow-y: auto;
        box-shadow: -4px 0 24px rgba(0,0,0,.5);
    }
    #header nav.open { display: block; }

    /* Меню вертикальне */
    .nav-menu { flex-direction: column; gap: 0; width: 100%; }
    .nav-menu li { border-bottom: 1px solid rgba(255,255,255,.07); }
    .nav-menu li:first-child { border-top: 1px solid rgba(255,255,255,.07); }
    .nav-menu a { padding: 14px 24px; font-size: 15px; color: #ccc; display: block; }
    .nav-menu a:hover,
    .nav-menu a.menu-active { color: var(--gold); background: rgba(232,178,8,.08); padding-left: 32px; }

    /* Hero — показати всіх на фото */
    #brass { background-size: contain !important; background-position: top center !important; background-color: #111 !important; align-items: flex-end; min-height: 100svh; }
    #brass .brass-container { padding: 0 20px 32px; width: 100%; }
    .brass-logo { width: 60px; position: absolute; top: 12px; left: 50%; transform: translateX(-50%); margin: 0; }
    #brass h1 { font-size: 28px; }
    #brass h2 { font-size: 17px; }

    /* About */
    .about-grid { grid-template-columns: 1fr; gap: 24px; }

    /* Poster — 1 слайд */
    .poster-slide { height: 320px; }

    /* Team — swiper замість grid */
    #team .team-grid     { display: none !important; }
    .team-swiper-wrap    { display: block; }

    /* Gallery — swiper замість grid */
    #gallery .gm-grid    { display: none !important; }
    .gallery-swiper-wrap { display: block; }

    /* Subscribe — тільки іконки */
    .subscribe-btn { border: none; border-radius: 50%; padding: 12px; width: 48px; height: 48px; justify-content: center; }
    .social-label  { display: none; }
    .social-icon-fa { font-size: 20px; }

    /* Contact */
    .contact-grid { grid-template-columns: 1fr; gap: 24px; }

    section { padding: 40px 16px; }
    .section-title { font-size: 22px; }
}

/* ════════════════════════════════════════════════════════════
   DESKTOP  ≥ 769px  (гарантуємо видимість nav)
════════════════════════════════════════════════════════════ */
@media (min-width: 769px) {
    .burger-btn   { display: none !important; }
    .nav-overlay  { display: none !important; }

    #header nav {
        display: block !important;
        position: static !important;
        width: auto !important; height: auto !important;
        background: transparent !important;
        padding: 0 !important; box-shadow: none !important;
        overflow: visible !important;
    }
    .nav-menu { flex-direction: row !important; }

    .team-swiper-wrap    { display: none !important; }
    #team .team-grid     { display: grid !important; }
    .gallery-swiper-wrap { display: none !important; }
    #gallery .gm-grid    { display: flex !important; }
}

/* Admin bar */
.admin-bar #header { top: 32px; }
@media screen and (max-width: 782px) { .admin-bar #header { top: 46px; } }
