/* ==========================================================================
   Dancebourhood - Modern Mobile-First Theme with Woosh SmartPage Support
   ========================================================================== */

/* ── 1. Local Offline Fonts (Dancebourhood Brand) ── */
@font-face {
    font-family: 'Chivo';
    font-style: normal;
    font-weight: 400;
    src: url('chivo-v10-latin_latin-ext-regular.woff2') format('woff2'),
         url('chivo-v10-latin_latin-ext-regular.woff') format('woff');
}

@font-face {
    font-family: 'Chivo';
    font-style: italic;
    font-weight: 400;
    src: url('chivo-v10-latin_latin-ext-italic.woff2') format('woff2'),
         url('chivo-v10-latin_latin-ext-italic.woff') format('woff');
}

@font-face {
    font-family: 'Chivo';
    font-style: normal;
    font-weight: 700;
    src: url('chivo-v10-latin_latin-ext-700.woff2') format('woff2'),
         url('chivo-v10-latin_latin-ext-700.woff') format('woff');
}

@font-face {
    font-family: 'Chivo';
    font-style: italic;
    font-weight: 700;
    src: url('chivo-v10-latin_latin-ext-700italic.woff2') format('woff2'),
         url('chivo-v10-latin_latin-ext-700italic.woff') format('woff');
}

@font-face {
    font-family: 'Chivo';
    font-style: normal;
    font-weight: 900;
    src: url('chivo-v10-latin_latin-ext-900.woff2') format('woff2'),
         url('chivo-v10-latin_latin-ext-900.woff') format('woff');
}

@font-face {
    font-family: 'Titillium Semibold';
    font-style: normal;
    font-weight: 400;
    src: url('Titillium-Semibold.woff') format('woff');
}

@font-face {
    font-family: 'Titillium Semibold Italic';
    font-style: italic;
    font-weight: 400;
    src: url('Titillium-SemiboldItalic.woff') format('woff');
}

/* ── 2. Design Tokens & Root Variables ── */
:root {
    --bg-color: #000000;
    --text-color: #9c9e9f;
    --text-light: #d5d7d8;
    --heading-color: #ffffff;
    --link-color: #ffffff;
    --link-hover-color: rgb(172, 172, 172);
    --border-color: rgba(255, 255, 255, 0.15);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --card-bg: rgba(20, 20, 20, 0.85);
    --highlight-color: #ffffff;
    --focus-ring: #ffffff;

    --fontfamily-primary: "Titillium Semibold", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --fontfamily-headers: 'Chivo', Helvetica, Arial, sans-serif;
    --fontfamily-nav: 'Chivo', sans-serif;

    --max-content-width: 1240px;
    --logo-natural-width: 558px;
    --logo-natural-height: 54px;
}

/* ── 3. Reset & Base Layout ── */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-color);
}

body {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-color);
    background-image: url('uppersplash90.png');
    background-repeat: no-repeat;
    background-position: right top;
    background-attachment: scroll;
    color: var(--text-color);
    font-family: var(--fontfamily-primary);
    font-size: 15px;
    line-height: 1.5;
    letter-spacing: 0.5px;
    overflow-x: hidden;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
}

p {
    margin-top: 0;
    margin-bottom: 1.25em;
}

/* ── 4. Typography & Stretched Heading Effect ── */
h1, h2, h3, h4, h5, h6 {
    display: block;
    position: relative;
    color: var(--heading-color);
    font-family: var(--fontfamily-headers);
    font-weight: 900;
    line-height: 1.1;
    margin-top: 1.2em;
    margin-bottom: 0.6em;
    max-width: 80%; /* Compensates for horizontal stretch of 1.25 */
    transform: matrix(1.25, 0, 0, 1, 0, 0);
    transform-origin: left top;
    letter-spacing: -0.04em;
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 0.8em;
}

h2 {
    font-size: 1.7rem;
    margin-bottom: 0.6em;
}

h3 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0;
}

h4 {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0;
}

ul, ol {
    margin: 0 0 1.5em 1.5em;
    padding: 0;
}

li {
    margin-bottom: 0.4em;
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ── 5. Accessibility (WCAG 2.1 AA) ── */
.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    background: #ffffff;
    color: #000000;
    padding: 0.75rem 1.5rem;
    z-index: 9999;
    font-family: var(--fontfamily-headers);
    font-weight: 700;
    text-decoration: none;
    border-radius: 0 0 4px 4px;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid var(--highlight-color);
}

:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

/* ── 6. Header Component (Mobile-First) ── */
.site-header {
    width: 100%;
    position: relative;
    z-index: 100;
    background: transparent;
}

.header-main {
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: 0.75rem 1.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

/* Logo - takes remaining space without exceeding its natural dimensions */
.logo {
    display: block;
    width: 100%;
    max-width: min(calc(100% - 3.5rem), var(--logo-natural-width));
    z-index: 102;
    transition: opacity 0.2s ease;
}

.logo img {
    width: 100%;
    max-width: var(--logo-natural-width);
    height: auto;
    display: block;
}

.logo:hover {
    opacity: 0.85;
}

/* Hidden hamburger checkbox */
.menu-btn {
    display: none;
}

/* Hamburger Icon */
.menu-icon {
    display: block;
    cursor: pointer;
    width: 2.2rem;
    height: 2.2rem;
    position: relative;
    z-index: 102;
    flex-shrink: 0;
    padding: 0.3rem 0;
}

.menu-icon span,
.menu-icon span::before,
.menu-icon span::after {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: #ffffff;
    border-radius: 2px;
    transition: transform 0.3s ease, background 0.2s ease, top 0.3s ease;
    left: 0;
}

.menu-icon span {
    top: 50%;
    transform: translateY(-50%);
}

.menu-icon span::before {
    content: "";
    top: -8px;
}

.menu-icon span::after {
    content: "";
    top: 8px;
}

/* Hamburger active transformation */
.menu-btn:checked + .menu-icon span {
    background: transparent;
}

.menu-btn:checked + .menu-icon span::before {
    top: 0;
    transform: rotate(45deg);
}

.menu-btn:checked + .menu-icon span::after {
    top: 0;
    transform: rotate(-45deg);
}

/* Navigation Drawer on Mobile */
.header-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    padding: 1.25rem 0 1rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border-color);
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(8px);
}

.menu-btn:checked ~ .header-nav {
    display: flex;
}

.menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.menu li a {
    display: block;
    padding: 0.6rem 0.5rem;
    color: #ffffff;
    font-family: var(--fontfamily-nav);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.menu li a:hover,
.menu li a:focus {
    color: var(--link-hover-color);
    background: rgba(255, 255, 255, 0.06);
    text-decoration: none;
}

.noscript-sitemap {
    margin-top: 1rem;
    font-size: 0.85rem;
}

/* ── 7. Large Screen Header Layout (> 840px) ── */
/* In large screen mode the menu items go in their own space below the logo.
   The logo takes the remaining space without being enlarged more than its natural dimensions. */
@media (min-width: 840px) {
    .menu-icon {
        display: none;
    }

    .header-main {
        padding: 1.25rem 1.5rem 0.75rem;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
    }

    .logo {
        width: 100%;
        max-width: var(--logo-natural-width);
    }

    .logo img {
        width: 100%;
        max-width: var(--logo-natural-width);
        height: auto;
    }

    /* Menu items in their own dedicated space below the logo */
    .header-nav {
        display: flex;
        width: 100%;
        padding: 0.6rem 0 0.2rem;
        margin: 0;
        border: none;
        border-top: 1px solid var(--border-subtle);
        background: transparent;
        backdrop-filter: none;
    }

    .menu {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.4rem 1.5rem;
        width: 100%;
    }

    .menu li a {
        font-size: 1rem;
        padding: 0.35rem 0.5rem;
        position: relative;
    }

    .menu li a::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0.5rem;
        right: 0.5rem;
        height: 2px;
        background: #ffffff;
        transform: scaleX(0);
        transition: transform 0.2s ease;
    }

    .menu li a:hover::after {
        transform: scaleX(1);
    }
}

/* ── 8. Main Content Layout ── */
main#main-content {
    flex: 1 0 auto;
    width: 100%;
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: 1.5rem 1.25rem 3rem;
}

.hero-section {
    padding: 1.5rem 0 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.hero-section auto-page-title h1,
.hero-section h1 {
    margin-top: 0;
}

.content-layout {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.content-layout article {
    flex: 1 1 auto;
    min-width: 0;
}

/* Breadcrumbs Styling */
.breadcrumbs-container,
auto-breadcrumbs {
    display: block;
    margin-bottom: 1.5rem;
    font-size: 0.88rem;
    color: var(--text-color);
}

auto-breadcrumbs a {
    color: var(--link-color);
}

auto-breadcrumbs a:hover {
    color: var(--link-hover-color);
}

/* ── 9. Block Editor & Content Formatting ── */
#woosh-editable-content,
block-editor {
    display: block;
    line-height: 1.7;
    font-size: 1.05rem;
    color: var(--text-light);
}

#woosh-editable-content p {
    font-family: "Titillium Semibold", sans-serif;
    margin-bottom: 1.4em;
}

#woosh-editable-content h2,
#woosh-editable-content h3 {
    margin-top: 1.6em;
}

#woosh-editable-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1.5rem auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

#woosh-editable-content a {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

#woosh-editable-content a:hover {
    color: var(--link-hover-color);
}

include-html {
    display: block;
}

/* Desktop 2-Column Content Layout */
@media (min-width: 840px) {
    .content-layout {
        flex-direction: row;
        gap: 3.5rem;
        align-items: flex-start;
    }

    .content-layout article {
        flex: 1 1 68%;
        min-width: 0;
    }

    .content-layout include-html,
    .site-sidebar {
        flex: 0 0 260px;
        position: sticky;
        top: 2rem;
    }
}

/* ── 10. Sidebar (Header Utilities: Lang, Search, Social) ── */
.site-sidebar {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Language Switcher */
.site-sidebar .lang-switch {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--fontfamily-headers);
    font-weight: 700;
    font-size: 1.05rem;
}

.site-sidebar .lang-link {
    color: #ffffff;
    padding: 0.25rem 0.55rem;
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.site-sidebar .lang-link.active {
    background: rgba(255, 255, 255, 0.2);
    text-decoration: underline;
}

.site-sidebar .lang-link:hover {
    color: var(--link-hover-color);
}

.site-sidebar .sep {
    color: rgba(255, 255, 255, 0.4);
}

/* Search Form */
.site-sidebar .search-form {
    display: flex;
    align-items: center;
    background: rgba(40, 40, 40, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 6px;
    padding: 3px 8px;
    width: 100%;
}

.site-sidebar .search-form input[type="text"] {
    background: transparent;
    border: none;
    color: #ffffff;
    font-family: var(--fontfamily-primary);
    font-size: 0.95rem;
    padding: 0.4rem 0.6rem;
    width: 100%;
    outline: none;
}

.site-sidebar .search-form input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.site-sidebar .search-form button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.2rem;
    display: flex;
    align-items: center;
}

.site-sidebar .search-form button img {
    width: 18px;
    height: 18px;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.site-sidebar .search-form button:hover img {
    opacity: 1;
}

/* Social Links */
.site-sidebar .social-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    font-family: var(--fontfamily-headers);
}

.site-sidebar .social-links a {
    color: #ffffff;
    transition: color 0.2s ease;
}

.site-sidebar .social-links a:hover {
    color: var(--link-hover-color);
}

/* ── 11. Footer Styling ── */
footer {
    width: 100%;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    background: rgba(5, 5, 5, 0.95);
    padding: 2.5rem 1.25rem 2rem;
    color: var(--text-color);
    font-size: 0.92rem;
}

.footer-content {
    max-width: var(--max-content-width);
    margin: 0 auto;
}

.footer-top {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: center;
    text-align: center;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--border-subtle);
}

.brand-title {
    font-family: var(--fontfamily-headers);
    font-weight: 900;
    font-size: 1.4rem;
    color: #ffffff;
    display: block;
}

.brand-tagline {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    color: var(--text-color);
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    font-family: var(--fontfamily-headers);
    font-weight: 700;
}

.footer-nav a {
    color: #ffffff;
}

.footer-nav .sep {
    color: rgba(255, 255, 255, 0.3);
}

.footer-back2top a {
    color: #ffffff;
    font-family: var(--fontfamily-headers);
    font-size: 0.88rem;
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.footer-back2top a:hover {
    background: rgba(255, 255, 255, 0.15);
    text-decoration: none;
}

.footer-bottom {
    padding-top: 1.25rem;
    text-align: center;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-bottom p {
    margin: 0;
}

@media (min-width: 768px) {
    .footer-top {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

    .brand-title {
        display: inline-block;
    }
}

/* ── 12. WCAG Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .skip-link {
        transition: none;
    }
}

/* ── 13. Gallery & Video Grid Styles ── */
.videosection {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
    align-items: start;
    margin-top: 2rem;
}

.videosection > div {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.videosection h3 {
    margin-top: 0;
    margin-bottom: 0.25rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-subtle);
}

.videosection figure {
    margin: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.videosection figure:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}

.videosection figure a.video-thumb,
.videosection figure > a {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    background-color: #121212;
    overflow: hidden;
    text-decoration: none;
}

.videosection figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.videosection figure:hover img {
    transform: scale(1.04);
    filter: brightness(1.08);
}

.videosection figure > a::after {
    content: "▶";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 38px;
    height: 38px;
    background: rgba(10, 10, 10, 0.7);
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.75);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    padding-left: 2px;
    opacity: 0.8;
    backdrop-filter: blur(4px);
    transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
    pointer-events: none;
}

.videosection figure:hover > a::after {
    transform: translate(-50%, -50%) scale(1.05);
    background: rgba(0, 0, 0, 0.9);
    border-color: #ffffff;
    opacity: 1;
}

.videosection figure iframe {
    width: 100%;
    aspect-ratio: 16 / 10;
    height: auto;
    border: none;
    display: block;
}

.videosection figure figcaption {
    padding: 0.85rem 0.95rem;
    font-size: 0.92rem;
    line-height: 1.4;
    color: var(--text-light);
    font-family: var(--fontfamily-primary);
}

.videosection figure figcaption a {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 600;
}

.videosection figure figcaption a:hover {
    color: var(--link-hover-color);
}

@media (max-width: 960px) and (min-width: 601px) {
    .videosection {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 600px) {
    .videosection {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}
