/* Community Dancers Brno – consolidated stylesheet
 * Refactor of site.css / v2.18.5
 * Historical overrides merged; current visual behaviour preserved.
 */

:root {
    --site-version: "2.0.1";
    --navy: #032b52;
    --navy2: #021d36;
    --red: #cf171d;
    --paper: #f4ecdf;
    --paper-warm: #f7f0e6;
    --paper-ink: #062c52;
    --ink: #082c51;
    --green: #299d38;
    --magenta: #c71967;
    --blue: #1181c7;
    --orange: #f28c00;
    --white: #fff;
    --scrap-g1: #168c29;
    --scrap-g2: #3baa30;
    --scrap-m1: #b40e53;
    --scrap-m2: #dc1d70;
    --scrap-b1: #0769aa;
    --scrap-b2: #168acb;
    --scrap-o1: #dd7300;
    --scrap-o2: #f19400;
    --shadow: 0 14px 40px rgba(0, 20, 40, .18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "Oswald", Arial, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Header ------------------------------------------------------------------ */
.topbar {
    height: 82px;
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 7px 2vw;
    background: linear-gradient(#052d54, #021c34);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: 0 4px 18px #0006;
}

.brand {
    width: 250px;
    min-width: 205px;
    height: 150px;
    display: flex;
    margin-top: auto;
    align-items: center;
    justify-content: center;
    padding: 7px 14px;
    border-radius: 10px;
    background: linear-gradient(135deg, #d7d1c7, #aaa69e 45%, #ddd7cd 75%, #9d9992);
    border: 1px solid #6e6962;
    box-shadow: inset 0 1px 0 #fff8, inset 0 -1px 0 #514c45, 0 3px 10px #0007;
}

.brand img {
    max-height: 140px;
    min-height: 100px;
    width: auto;
    filter: none;
    transform: none;
}

.nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 22px;
    flex: 1;
}

.nav a {
    font-weight: 700;
    text-transform: uppercase;
    font-size: .86rem;
    position: relative;
    white-space: nowrap;
}

.nav a::after {
    content: "";
    position: absolute;
    height: 3px;
    background: var(--red);
    bottom: -11px;
    left: 0;
    right: 100%;
    transition: .2s;
}

.nav a:hover::after,
.nav a.active::after { right: 0; }

.menu-toggle {
    display: none;
    margin-left: auto;
    background: transparent;
    border: 1px solid #fff6;
    color: #fff;
    padding: 8px 11px;
    border-radius: 4px;
}

.cta {
    background: var(--red);
    color: #fff !important;
    border: 0;
    border-radius: 5px;
    padding: 12px 20px;
    font-family: "Oswald", sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 0 #941014;
}

.top-cta { white-space: nowrap; }

/* Main / hero -------------------------------------------------------------- */
main {
    background: linear-gradient(180deg, #052c52 0%, #03213e 100%);
}

.hero-poster {
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto !important;
    overflow: hidden;
    background: #052b52;
}

.hero-poster > img {
    display: block;
    width: 100% !important;
    height: auto !important;
    max-width: none;
    object-fit: contain !important;
    object-position: center center;
    aspect-ratio: auto !important;
    transform: none !important;
}

/* One continuous scene from hero through course information. */
.hero-course-scene {
    position: relative;
    z-index: 1;
    isolation: isolate;
    overflow: hidden;
    background-color: #052b52;
    background-image: url('../img/hero-course-scene.jpg?v=2.16.3');
    background-repeat: no-repeat;
    background-position: center top;
    background-size: 100% auto;
}

.hero-course-scene .hero-poster {
    position: relative;
    z-index: 1;
    width: 100%;
    aspect-ratio: 1536 / 329;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible;
    background: transparent !important;
}

.hero-course-scene .hero-poster > img { display: none !important; }

/* About ------------------------------------------------------------------- */
.about-section {
    padding: 54px 6vw;
    background: #f5eee3;
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 60px;
    align-items: start;
}

.eyebrow {
    font-family: "Permanent Marker", cursive;
    color: var(--red);
    font-size: 1.25rem;
    margin: 0;
}

.about-section h2 {
    font-family: "Anton", Impact, sans-serif;
    text-transform: uppercase;
    font-size: 3rem;
    margin: 4px 0 12px;
}

.about-section p {
    font-family: Arial, sans-serif;
    line-height: 1.65;
    margin: 0;
}

.about-levels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.about-levels article {
    background: #fff9;
    padding: 25px;
    border-left: 6px solid var(--green);
    box-shadow: 0 8px 24px #0001;
}

.about-levels article:last-child { border-left-color: var(--red); }

.about-levels h3 {
    font-family: "Anton", Impact, sans-serif;
    text-transform: uppercase;
    font-size: 1.7rem;
    margin: 0 0 8px;
}

/* Course paper panel ------------------------------------------------------- */
.paper-panel {
    position: relative;
    z-index: 5;
    isolation: isolate;
    margin: -44px 3.25vw 0;
    padding: 24px 3.2vw 29px;
    background: transparent;
    overflow: visible;
    filter: drop-shadow(0 5px 4px rgba(0, 18, 38, .22));
}

.paper-panel::before,
.paper-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .6;
    -webkit-mask-image: url('../img/ui/torn-paper-wide-mask.png?v=2.16.4');
    mask-image: url('../img/ui/torn-paper-wide-mask.png?v=2.16.4');
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-mode: alpha;
    mask-mode: alpha;
}

.paper-panel::before {
    z-index: -2;
    background:
        radial-gradient(circle at 16% 28%, rgba(85, 57, 28, .045) 0 1px, transparent 1.6px) 0 0 / 24px 24px,
        radial-gradient(circle at 77% 71%, rgba(85, 57, 28, .03) 0 1px, transparent 1.5px) 0 0 / 29px 29px,
        linear-gradient(92deg, #f7f0e5 0%, #fbf6ed 47%, #f4eadc 100%);
}

.paper-panel::after {
    z-index: -1;
    background:
        repeating-linear-gradient(6deg, rgba(88, 61, 34, .025) 0 1px, transparent 1px 7px),
        linear-gradient(180deg, rgba(255, 255, 255, .16), transparent 28%, rgba(78, 48, 20, .025));
}

.hero-course-scene .paper-panel {
    position: relative;
    z-index: 5;
    margin: 50px 3.25vw 0;
    background: transparent;
}

.features-layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 2.28fr repeat(5, minmax(0, 1fr));
    max-width: 1450px;
    min-height: 154px;
    margin: auto;
    align-items: center;
}

.courses-for-all {
    padding: 0 30px 0 8px;
    border-right: 2px dotted rgba(70, 70, 70, .42);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.courses-for-all h2 {
    font-family: "Oswald", Arial, sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: clamp(1.9rem, 2.35vw, 2.65rem);
    line-height: .98;
    letter-spacing: .01em;
    margin: 0 0 13px;
    color: var(--paper-ink);
}

.level-brushes {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: "Oswald", Arial, sans-serif;
    font-size: clamp(1.18rem, 1.45vw, 1.65rem);
    font-weight: 700;
}

.level-brushes strong {
    font-size: clamp(1.8rem, 2vw, 2.2rem);
    color: var(--navy);
    line-height: 1;
}

.brush {
    position: relative;
    padding: 7px 25px 8px;
    min-width: 142px;
    text-align: center;
    color: #fff;
    text-transform: uppercase;
    font-weight: 700;
    line-height: 1.05;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .18);
    filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .10));
    clip-path: polygon(1% 17%,8% 8%,18% 12%,28% 4%,39% 10%,50% 3%,61% 10%,72% 4%,83% 11%,98% 6%,94% 22%,99% 36%,95% 50%,100% 64%,95% 80%,99% 94%,84% 90%,72% 98%,60% 91%,49% 97%,37% 90%,25% 99%,13% 91%,2% 96%,6% 81%,1% 67%,6% 52%,0 38%,5% 24%);
}

.brush.green { background: var(--green); }
.brush.red { background: var(--red); }

.levels-caption {
    font-family: "Oswald", Arial, sans-serif;
    font-size: clamp(.88rem, .98vw, 1.03rem);
    font-weight: 500;
    margin: 13px 0 0;
    color: #171717;
}

.red-script {
    font-family: "Permanent Marker", cursive;
    color: var(--red);
    font-size: clamp(.96rem, 1.12vw, 1.18rem);
    margin: 11px 0 0;
    transform: rotate(-1deg);
    line-height: 1.1;
}

.feature-item {
    min-height: 150px;
    padding: 3px 14px;
    text-align: center;
    border-right: 2px dotted rgba(70, 70, 70, .42);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.feature-item:last-child { border-right: 0; }

.feature-icon {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    margin: 0 auto 9px;
    display: grid;
    place-items: center;
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), 0 1px 2px rgba(0, 0, 0, .12);
}

.feature-icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    display: block;
}

.feature-blue .feature-icon img {
    width: 50px;
    height: 50px;
}

.feature-green .feature-icon { background: linear-gradient(145deg, #56b423, #16862b); }
.feature-magenta .feature-icon { background: linear-gradient(145deg, #d82a7b, #a90d58); }
.feature-blue .feature-icon { background: linear-gradient(145deg, #178dd4, #0967a8); }
.feature-orange .feature-icon { background: linear-gradient(145deg, #f6a20a, #df7200); }

.feature-item h3 {
    font-family: "Oswald", Arial, sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: clamp(.92rem, 1.03vw, 1.08rem);
    line-height: 1.02;
    letter-spacing: .005em;
    margin: 1px 0 7px;
    white-space: nowrap;
}

.feature-green h3 { color: #19812b; }
.feature-magenta h3 { color: var(--magenta); }
.feature-blue h3 { color: #0871ad; }
.feature-orange h3 { color: #d97800; }

.feature-item p {
    font-family: "Oswald", Arial, sans-serif;
    font-size: clamp(.76rem, .82vw, .88rem);
    font-weight: 400;
    line-height: 1.36;
    margin: 0;
    color: #111;
    max-width: 230px;
}

/* Practical facts --------------------------------------------------------- */
.facts {
    position: relative;
    background: linear-gradient(180deg, #052c52 0%, #03213e 100%);
    padding: 8px 3.25vw 18px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
}

.facts::before { display: none; }

.hero-course-scene .facts {
    position: relative;
    z-index: 4;
    background: transparent !important;
    padding-top: 10px;
    padding-bottom: 22px;
    margin-bottom: 0;
}

.hero-course-scene .facts::before,
.hero-course-scene .facts::after { display: none !important; }

.fact {
    min-height: 132px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 17px;
    padding: 14px 21px 16px;
    position: relative;
    clip-path: none;
    overflow: visible;
    isolation: isolate;
    box-shadow: none;
    filter: drop-shadow(0 0 1px rgba(255, 242, 220, .95)) drop-shadow(0 6px 5px rgba(0, 0, 0, .30));
    opacity: .8;
    -webkit-mask-image: url('../img/ui/torn-scrap-mask.png');
    mask-image: url('../img/ui/torn-scrap-mask.png');
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    mask-mode: alpha;
}

.fact::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 18% 24%, rgba(255, 255, 255, .14) 0 1px, transparent 1.6px) 0 0 / 18px 18px,
        repeating-linear-gradient(8deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 7px),
        linear-gradient(180deg, rgba(255, 255, 255, .12), transparent 40%, rgba(0, 0, 0, .08));
}

.fact::after { display: none; }
.fact-green { background: linear-gradient(101deg, var(--scrap-g1) 0%, var(--scrap-g2) 100%); }
.fact-magenta { background: linear-gradient(101deg, var(--scrap-m1) 0%, var(--scrap-m2) 100%); }
.fact-blue { background: linear-gradient(101deg, var(--scrap-b1) 0%, var(--scrap-b2) 100%); }
.fact-orange { background: linear-gradient(101deg, var(--scrap-o1) 0%, var(--scrap-o2) 100%); }

.fact-icon {
    min-width: 76px;
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    position: relative;
    z-index: 1;
}

.fact-icon img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    display: block;
}

.fact > div:last-child {
    position: relative;
    z-index: 1;
}

.fact h2 {
    font-family: "Oswald", Arial, sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: clamp(1.42rem, 1.65vw, 1.72rem);
    line-height: 1;
    letter-spacing: .01em;
    margin: 0 0 5px;
    color: #fff;
}

.fact p {
    font-family: "Oswald", Arial, sans-serif;
    font-size: clamp(.89rem, .98vw, 1.04rem);
    font-weight: 400;
    line-height: 1.18;
    letter-spacing: .003em;
    margin: 1px 0;
}

.fact strong {
    font-family: "Oswald", Arial, sans-serif;
    font-size: clamp(1.3rem, 1.5vw, 1.62rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.05;
    letter-spacing: .003em;
}

.fact-blue strong { color: #ffd226; }

/* Instructors ------------------------------------------------------------- */
.instructors-section {
    position: relative;
    margin-top: 0;
    padding: 54px 5vw 52px;
    background:
        radial-gradient(circle at 30% 20%, rgba(115, 84, 48, .04) 0 1px, transparent 1.5px) 0 0 / 27px 27px,
        linear-gradient(94deg, #f7f0e6, #fbf6ee 50%, #f4ebde);
    clip-path: none;
    -webkit-mask-image: url('../img/ui/torn-paper-lektori-wide-mask.png');
    mask-image: url('../img/ui/torn-paper-lektori-wide-mask.png');
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    mask-mode: alpha;
    filter: drop-shadow(0 5px 5px rgba(0, 18, 38, .16));
}

.section-title {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-bottom: 38px;
}

.section-title h2,
.gallery-section h2 {
    font-family: "Oswald", Arial, sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: clamp(2.2rem, 3.7vw, 4rem);
    margin: 0;
    color: var(--navy);
    letter-spacing: .02em;
}

.section-title h2 {
    font-size: clamp(2.05rem, 3vw, 3.25rem);
    position: relative;
}

.section-title h2::after {
    content: "";
    position: absolute;
    left: 6%;
    right: 6%;
    bottom: -10px;
    height: 5px;
    background: var(--red);
    clip-path: polygon(0 45%,12% 28%,24% 52%,36% 30%,48% 55%,60% 29%,72% 52%,84% 27%,100% 45%,100% 72%,84% 58%,72% 77%,60% 56%,48% 76%,36% 56%,24% 76%,12% 57%,0 70%);
}

.section-title span {
    font-family: "Permanent Marker", cursive;
    color: var(--red);
    font-size: 2.65rem;
}

.instructors-grid {
    max-width: 1300px;
    margin: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 70px;
}

.instructor-card {
    display: grid;
    grid-template-columns: 215px 1fr;
    gap: 30px;
    align-items: center;
}

.portrait-frame {
    width: 215px;
    height: 215px;
    border-radius: 50%;
    padding: 7px;
    background: linear-gradient(135deg, #b78b4a, #f0d19a, #8e6532);
    box-shadow: 0 5px 12px rgba(0, 0, 0, .2), inset 0 0 0 2px rgba(255, 255, 255, .55);
}

.portrait-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid #f6eee1;
}

.instructor-card h3 {
    font-family: "Oswald", Arial, sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: clamp(1.5rem, 1.8vw, 1.95rem);
    margin: 0 0 14px;
    color: var(--navy);
}

.instructor-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-family: "Oswald", Arial, sans-serif;
    font-size: 1.04rem;
}

.instructor-card li {
    padding: 6px 0 6px 28px;
    position: relative;
}

.instructor-card li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: .8rem;
    font-weight: 900;
}

/* Gallery ----------------------------------------------------------------- */
.gallery-section {
    padding: 18px 2vw 42px;
    background: linear-gradient(94deg, #f7f0e6, #fbf6ee 50%, #f4ebde);
    text-align: center;
}

.gallery-section h2 {
    font-size: 2.1rem;
    margin-bottom: 22px;
}

.gallery-strip {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    max-width: 1480px;
    margin: auto;
}

.gallery-strip figure {
    margin: 0;
    overflow: hidden;
    border: 5px solid #efe3d2;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .18);
}

.gallery-strip img {
    width: 100%;
    height: 230px;
    object-fit: cover;
    transition: .25s;
}

.gallery-strip figure:hover img { transform: scale(1.03); }

/* CTA / contact ----------------------------------------------------------- */
.cta-band {
    margin: 0;
    background: var(--paper);
    padding: 18px 5vw 22px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 45px;
    position: relative;
}

.cta-band::before {
    content: "";
    position: absolute;
    left: 3%;
    right: 3%;
    top: 7px;
    bottom: 7px;
    background: #052b52;
    clip-path: polygon(0 18%,2% 3%,10% 15%,18% 0,27% 14%,36% 2%,45% 16%,55% 0,65% 15%,74% 4%,84% 17%,92% 2%,100% 16%,99% 85%,91% 98%,81% 85%,72% 100%,62% 86%,52% 99%,42% 84%,31% 99%,22% 86%,12% 98%,3% 84%);
}

.cta-band > * {
    position: relative;
    z-index: 2;
}

.cta-band strong {
    font-family: "Permanent Marker", cursive;
    color: #fff;
    font-size: clamp(1.4rem, 2.7vw, 2.5rem);
}

.contact-section {
    background: #032342;
    color: #fff;
    padding: 38px 5vw;
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    gap: 45px;
    align-items: start;
}

.contact-info {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 24px;
    align-items: center;
}

.contact-info img {
    width: 210px;
    filter: none;
    transform: none;
}

.contact-info p { margin: 8px 0; }

.contact-form {
    background: #fff;
    color: var(--ink);
    padding: 28px;
    border-radius: 6px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    box-shadow: var(--shadow);
}

.contact-form h2,
.contact-form .success,
.contact-form .full { grid-column: 1 / -1; }

.contact-form h2 {
    margin: 0;
    color: var(--navy);
    font-family: "Anton", Impact, sans-serif;
    text-transform: uppercase;
    font-size: 2rem;
}

.contact-form label { font-weight: 700; }

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 11px;
    margin-top: 6px;
    border: 1px solid #c9c1b7;
    border-radius: 4px;
    font: inherit;
}

.success {
    background: #e7f5e5;
    color: #245b20;
    padding: 12px;
    border-radius: 4px;
}

/* Footer ------------------------------------------------------------------ */
footer {
    background: #02182c;
    color: #fff;
    padding: 14px 5vw;
    display: flex;
    justify-content: space-between;
    font-size: .9rem;
}

footer a { color: #fff; }

footer .site-version {
    opacity: .72;
    margin-left: auto;
    padding-left: 18px;
}

/* Responsive -------------------------------------------------------------- */
@media (max-width: 1180px) {
    .top-cta { display: none; }
    .nav { gap: 14px; }
    .about-section { grid-template-columns: 1fr; }

    .gallery-strip { grid-template-columns: repeat(3, 1fr); }
    .gallery-strip figure:nth-child(n + 4) { display: none; }

    .features-layout {
        grid-template-columns: 1.65fr repeat(2, minmax(0, 1fr));
        min-height: auto;
    }

    .courses-for-all { grid-row: span 2; }

    .feature-item:nth-child(4),
    .feature-item:nth-child(5) {
        border-top: 2px dotted rgba(70, 70, 70, .42);
    }

    .facts {
        grid-template-columns: 1fr 1fr;
        gap: 11px;
        padding-left: 2vw;
        padding-right: 2vw;
    }

    .fact { min-height: 138px; }
}

@media (max-width: 900px) {
    .topbar { height: 74px; }

    .brand {
        width: 180px;
        min-width: 140px;
        min-height: 100px;
        height: 60px;
        padding: 6px 10px;
    }

    .brand img {
        height: 100px;
        max-height: 48px;
    }

    .menu-toggle { display: block; }

    .nav {
        position: absolute;
        top: 74px;
        left: 0;
        right: 0;
        background: #031d35;
        display: none;
        flex-direction: column;
        padding: 20px;
    }

    .nav.open { display: flex; }

    /* Preserve the original standalone-hero fallback behaviour. */
    .hero-poster { min-height: 390px; }
    .hero-poster > img { object-position: 50% center; }

    .paper-panel {
        margin: -24px 2vw 0;
        padding: 32px 5vw 37px;
    }

    .features-layout { grid-template-columns: 1fr 1fr; }

    .courses-for-all {
        grid-column: 1 / -1;
        grid-row: auto;
        border-right: 0;
        border-bottom: 2px dotted rgba(70, 70, 70, .4);
        padding: 2px 5px 24px;
    }

    .feature-item {
        min-height: 190px;
        padding: 20px 12px;
    }

    .facts {
        grid-template-columns: 1fr 1fr;
        padding-top: 8px;
        padding-bottom: 22px;
    }

    .instructors-section {
        -webkit-mask-image: none;
        mask-image: none;
        filter: none;
    }

    .instructors-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .contact-section { grid-template-columns: 1fr; }

    /*
     * Do 900 px zůstává jediným zdrojem obrazu společný background.
     * Šířku vždy zobrazíme celou (bez horizontálního ořezu), takže
     * hlavní text v hero zůstane viditelný a scéna se neduplikuje.
     */
    .hero-course-scene {
        background-size: 100% auto;
        background-position: center top;
    }

    .hero-course-scene .hero-poster {
        width: 100%;
        height: auto !important;
        min-height: 0 !important;
        aspect-ratio: 1536 / 329 !important;
        overflow: visible;
    }

    /* Technický IMG fallback zůstává skrytý – obraz se vykreslí jen jednou. */
    .hero-course-scene .hero-poster > img {
        display: none !important;
    }

    .hero-course-scene .paper-panel { margin: -2px 2vw 0; }
}

@media (max-width: 640px) {
    /* Kompaktní mobilní header: brand nepřesahuje výšku horní lišty. */
    .topbar {
        height: 55px;
        padding: 0 10px;
        gap: 10px;
    }

    .brand {
        width: 120px;
        min-width: 0;
        height: 74px;
        min-height: 0;
        margin: 0;
        padding: 5px 5px;
        align-self: stretch;
        border-radius: 0 0 8px 8px;
    }

    .brand img {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 74px;
        min-height: 50px;
        object-fit: contain;
    }

    .nav {
        position: absolute;
        top: 55px;
        left: 0;
        right: 0;
        background: #031d35;
        display: none;
        flex-direction: column;
        padding: 20px;
    }

    /* Mobile: hero musí být vždy celý, bez ořezu. */
    .hero-poster { min-height: 0; }
    .hero-poster > img { object-position: center center; }

    .about-levels { grid-template-columns: 1fr; }

    .paper-panel {
        margin: -16px 8px 0;
        padding: 31px 19px 35px;
    }

    /* Mobilní varianta otrhané masky papírového panelu. */
    .paper-panel::before,
    .paper-panel::after {
        -webkit-mask-image: url('../img/ui/torn-paper-wide-mobil-mask.png?v=2.18.5');
        mask-image: url('../img/ui/torn-paper-wide-mobil-mask.png?v=2.18.5');
    }

    .features-layout { grid-template-columns: 1fr; }

    .courses-for-all {
        text-align: center;
        padding-right: 0;
    }

    .level-brushes {
        flex-wrap: wrap;
        justify-content: center;
    }

    .feature-item {
        border-right: 0;
        border-bottom: 2px dotted rgba(70, 70, 70, .38);
        min-height: 165px;
    }

    .feature-item:last-child { border-bottom: 0; }
    .feature-item h3 { white-space: normal; }

    .feature-icon {
        width: 68px;
        height: 68px;
    }

    .feature-icon img {
        width: 44px;
        height: 44px;
    }

    .facts {
        grid-template-columns: 1fr;
        padding: 8px 10px 18px;
        gap: 9px;
    }

    .fact {
        min-height: 126px;
        padding: 16px 20px 18px;
    }

    .fact-icon {
        min-width: 68px;
        width: 68px;
        height: 68px;
    }

    .fact-icon img {
        width: 62px;
        height: 62px;
    }

    .instructors-section {
        padding-left: 20px;
        padding-right: 20px;
    }

    .instructor-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .portrait-frame { margin: auto; }

    .instructor-card ul {
        text-align: left;
        display: inline-block;
    }

    .gallery-strip { grid-template-columns: 1fr 1fr; }
    .gallery-strip figure:nth-child(3) { display: none; }

    .cta-band {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .contact-info {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .contact-info img { margin: auto; }

    .contact-form { grid-template-columns: 1fr; }
    .contact-form label { grid-column: 1 / -1; }

    /* Mobil zachovává celý společný obraz bez bočního ořezu. */
    .hero-course-scene {
        background-size: 100% auto;
        background-position: center top;
    }

    .hero-course-scene .paper-panel { margin: -2px 8px 0; }
}


/* ==========================================================================
   v2.18.5 – GALERIE
   Galerie se generuje podle skutečně existujících gallery-N / gallery-NN
   souborů; CSS proto není závislé na pevném počtu položek.
   ========================================================================== */
.gallery-strip .gallery-item{
    min-width:0;
}
.gallery-strip .gallery-item img{
    display:block;
    aspect-ratio:4 / 3;
}
.gallery-empty{
    margin:12px auto 0;
    max-width:760px;
    color:#6c6258;
    font-size:1rem;
}


/* ==========================================================================
   v2.18.5 – GALERIE: KARUSEL / MŘÍŽKA
   Výchozí je karusel, návštěvník může přepnout na grid.
   ========================================================================== */

.gallery-section{
    position:relative;
}

.gallery-toolbar{
    display:flex;
    justify-content:center;
    gap:.55rem;
    margin:0 0 1rem;
}

.gallery-view-btn{
    appearance:none;
    border:1px solid rgba(5,43,82,.22);
    background:#f7f0e6;
    color:#052b52;
    min-height:42px;
    padding:.62rem 1rem;
    border-radius:999px;
    font:700 .86rem/1 var(--font-condensed, Arial, sans-serif);
    text-transform:uppercase;
    letter-spacing:.035em;
    cursor:pointer;
    transition:transform .16s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.gallery-view-btn:hover{
    transform:translateY(-1px);
    box-shadow:0 5px 14px rgba(5,43,82,.12);
}

.gallery-view-btn.is-active{
    background:#052b52;
    color:#fff;
    border-color:#052b52;
}

.gallery-shell{
    position:relative;
    max-width:1480px;
    margin:0 auto;
}

.gallery-strip{
    scroll-behavior:smooth;
}

/* --- Výchozí karusel --- */
.gallery-shell[data-view="carousel"] .gallery-strip{
    display:grid;
    grid-auto-flow:column;
    grid-auto-columns:clamp(230px, 28vw, 390px);
    gap:12px;
    overflow-x:auto;
    overflow-y:hidden;
    padding:4px 48px 14px;
    scroll-snap-type:x mandatory;
    scrollbar-width:thin;
    scrollbar-color:rgba(5,43,82,.35) transparent;
}

.gallery-shell[data-view="carousel"] .gallery-item{
    scroll-snap-align:start;
    margin:0;
    min-width:0;
}

.gallery-shell[data-view="carousel"] .gallery-item img{
    width:100%;
    height:auto;
    aspect-ratio:4 / 3;
    object-fit:cover;
    border-radius:4px;
}

/* --- Grid --- */
.gallery-shell[data-view="grid"] .gallery-strip{
    display:grid;
    grid-template-columns:repeat(5, minmax(0, 1fr));
    gap:10px;
    overflow:visible;
    padding:4px 0 12px;
    scroll-snap-type:none;
}

.gallery-shell[data-view="grid"] .gallery-item{
    margin:0;
    min-width:0;
}

.gallery-shell[data-view="grid"] .gallery-item img{
    width:100%;
    height:auto;
    aspect-ratio:4 / 3;
    object-fit:cover;
    border-radius:4px;
}

/* Navigační šipky pouze pro karusel */
.gallery-nav{
    position:absolute;
    z-index:5;
    top:50%;
    transform:translateY(-50%);
    width:42px;
    height:58px;
    border:0;
    border-radius:7px;
    background:rgba(5,43,82,.88);
    color:#fff;
    font:400 2.1rem/1 Arial, sans-serif;
    cursor:pointer;
    box-shadow:0 4px 14px rgba(0,0,0,.18);
    transition:background-color .16s ease, opacity .16s ease;
}

.gallery-nav:hover{
    background:#052b52;
}

.gallery-nav-prev{ left:2px; }
.gallery-nav-next{ right:2px; }

.gallery-shell[data-view="grid"] .gallery-nav{
    display:none;
}

@media (max-width:1100px){
    .gallery-shell[data-view="grid"] .gallery-strip{
        grid-template-columns:repeat(4, minmax(0,1fr));
    }
}

@media (max-width:800px){
    .gallery-shell[data-view="carousel"] .gallery-strip{
        grid-auto-columns:min(76vw, 330px);
        padding-left:38px;
        padding-right:38px;
    }
    .gallery-shell[data-view="grid"] .gallery-strip{
        grid-template-columns:repeat(3, minmax(0,1fr));
    }
    .gallery-nav{
        width:36px;
        height:52px;
    }
}

@media (max-width:560px){
    .gallery-toolbar{
        margin-bottom:.75rem;
    }
    .gallery-view-btn{
        min-height:40px;
        padding:.58rem .85rem;
        font-size:.8rem;
    }
    .gallery-shell[data-view="carousel"] .gallery-strip{
        grid-auto-columns:82vw;
        gap:9px;
        padding-left:30px;
        padding-right:30px;
    }
    .gallery-shell[data-view="grid"] .gallery-strip{
        grid-template-columns:repeat(2, minmax(0,1fr));
        gap:7px;
    }
    .gallery-nav{
        width:30px;
        height:48px;
        font-size:1.7rem;
    }
}


/* ==========================================================================
   v2.18.5 – Inteligentní karusel: autoplay + click & drag
   ========================================================================== */
.gallery-shell[data-view="carousel"] .gallery-strip{
    cursor:grab;
    user-select:none;
    -webkit-user-select:none;
    touch-action:pan-y pinch-zoom;
    overscroll-behavior-x:contain;
}

.gallery-shell[data-view="carousel"] .gallery-strip.is-dragging{
    cursor:grabbing;
    scroll-behavior:auto !important;
    scroll-snap-type:none;
}

.gallery-shell[data-view="carousel"] .gallery-strip.is-dragging img{
    pointer-events:none;
}

@media (prefers-reduced-motion: reduce){
    .gallery-strip{
        scroll-behavior:auto !important;
    }
}


/* ==========================================================================
   v2.18.5 – Galerie: skrytý scrollbar
   ========================================================================== */
.gallery-shell[data-view="carousel"] .gallery-strip{
    scrollbar-width:none !important;      /* Firefox */
    -ms-overflow-style:none !important;   /* starší Edge/IE */
}
.gallery-shell[data-view="carousel"] .gallery-strip::-webkit-scrollbar{
    width:0 !important;
    height:0 !important;
    display:none !important;
}
.gallery-shell[data-view="carousel"] .gallery-strip::-webkit-scrollbar-track,
.gallery-shell[data-view="carousel"] .gallery-strip::-webkit-scrollbar-thumb{
    background:transparent !important;
}




/* ==========================================================================
   v2.18.5 – SEO text integrován do sekce „Tanec pro každého“
   ========================================================================== */
.course-seo-copy{
    margin:.8rem 0 0;
    max-width:62ch;
    color:#24364a;
    font-size:.97rem;
    line-height:1.6;
}
.course-seo-copy strong{
    color:#052b52;
}


/* ==========================================================================
   v2.18.5 – Registrace kurzů + sekce klubu
   ========================================================================== */
.registration-actions{
    display:flex;
    flex-wrap:wrap;
    gap:.65rem;
    margin-top:1rem;
}
.registration-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:42px;
    padding:.7rem 1rem;
    border-radius:5px;
    color:#fff;
    text-decoration:none;
    font-weight:800;
    line-height:1.15;
    box-shadow:0 4px 12px rgba(5,43,82,.13);
    transition:transform .16s ease,box-shadow .16s ease,filter .16s ease;
}
.registration-btn:hover,
.registration-btn:focus-visible{
    transform:translateY(-1px);
    box-shadow:0 7px 16px rgba(5,43,82,.18);
    filter:brightness(1.04);
}
.registration-btn-monday{background:#159447;}
.registration-btn-thursday{background:#c61f3f;}

.club-section{
    position:relative;
    padding:58px 5vw;
    background:#052b52;
    color:#fff;
    overflow:hidden;
}
.club-section::before{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    opacity:.08;
    background:
      radial-gradient(circle at 18% 20%,#fff 0 1px,transparent 1.5px),
      radial-gradient(circle at 78% 65%,#fff 0 1px,transparent 1.5px);
    background-size:34px 34px,44px 44px;
}
.club-section-inner{
    position:relative;
    z-index:1;
    max-width:1040px;
    margin:0 auto;
}
.club-kicker{
    margin:0 0 .4rem;
    color:#f3b01b;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.06em;
}
.club-section h2{
    margin:.1rem 0 .8rem;
    color:#fff;
    font-size:clamp(2rem,4vw,3.25rem);
}
.club-section p{
    margin:.5rem 0;
    max-width:70ch;
    line-height:1.65;
}
.club-web-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    margin-top:1.2rem;
    padding:.85rem 1.15rem;
    border-radius:5px;
    background:#d71920;
    color:#fff;
    text-decoration:none;
    font-weight:900;
    box-shadow:0 5px 14px rgba(0,0,0,.18);
    transition:transform .16s ease,background-color .16s ease;
}
.club-web-btn:hover,
.club-web-btn:focus-visible{
    transform:translateY(-1px);
    background:#bd141a;
}
@media (max-width:640px){
    .registration-actions{flex-direction:column;}
    .registration-btn{width:100%;}
    .club-section{padding:42px 22px;}
}

/* ==========================================================================
   v2.18.5 – Akce a workshopy
   ========================================================================== */
.events-section{padding:58px 5vw 66px;background:#f7f0e6;color:#052b52}
.events-inner{max-width:1180px;margin:0 auto}
.events-kicker{margin:0;text-align:center;color:#d71920;font-weight:900;text-transform:uppercase;letter-spacing:.08em}
.events-section h2{text-align:center;margin:.15rem 0 .35rem;font-size:clamp(2rem,4vw,3.25rem)}
.events-lead{text-align:center;margin:0 auto 2rem;max-width:720px;color:#425163}
.events-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.event-card{display:grid;grid-template-columns:128px 1fr;min-height:150px;background:#fffaf4;border-left:5px solid #0c7fc0;box-shadow:0 6px 18px rgba(5,43,82,.09);overflow:hidden}
.event-card-featured{border-left-color:#d71920}
.event-date{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:18px 12px;background:#052b52;color:#fff;text-align:center}
.event-date strong{font-size:1.35rem;line-height:1.05}.event-date span{margin-top:.4rem;font-size:.82rem;opacity:.86}
.event-body{padding:20px 22px}.event-type{color:#d71920;font-size:.78rem;font-weight:900;text-transform:uppercase;letter-spacing:.06em}
.event-body h3{margin:.28rem 0 .35rem;font-size:1.3rem}.event-body p{margin:.15rem 0 .75rem;color:#536170}
.event-body a{display:inline-block;color:#052b52;font-weight:900;text-decoration:none;border-bottom:2px solid #d71920}
.event-body a:hover,.event-body a:focus-visible{color:#d71920}
@media(max-width:820px){.events-grid{grid-template-columns:1fr}}
@media(max-width:520px){.events-section{padding:42px 20px}.event-card{grid-template-columns:1fr}.event-date{min-height:78px}}


/* ==========================================================================
   v2.18.5 – Revize hlavní navigace
   ========================================================================== */

/* Sticky header nesmí překrýt cílový obsah po kliknutí na kotvu. */
#courses,
#beginners,
#advanced,
#instructors,
#events,
#gallery,
#club,
#contact,
#about{
    scroll-margin-top:104px;
}

/* Devět logických položek se na běžném desktopu vejde bez přetékání. */
.nav{
    gap:clamp(11px,1.25vw,22px);
}
.nav a{
    font-size:clamp(.72rem,.78vw,.86rem);
}

/* Aktivní položka je zřetelná i bez hoveru. */
.nav a.active{
    color:#fff;
}
.nav a.active::after{
    right:0;
}

@media (max-width:1180px) and (min-width:901px){
    .topbar{
        gap:12px;
        padding-left:1.25vw;
        padding-right:1.25vw;
    }
    .brand{
        width:210px;
        min-width:175px;
    }
    .nav{
        gap:10px;
    }
    .nav a{
        font-size:.70rem;
    }
    .top-cta{
        padding-left:.72rem;
        padding-right:.72rem;
        white-space:nowrap;
    }
}

@media (max-width:900px){
    #courses,
    #beginners,
    #advanced,
    #instructors,
    #events,
    #gallery,
    #club,
    #contact,
    #about{
        scroll-margin-top:84px;
    }
}

@media (max-width:640px){
    #courses,
    #beginners,
    #advanced,
    #instructors,
    #events,
    #gallery,
    #club,
    #contact,
    #about{
        scroll-margin-top:64px;
    }
}

/* v2.18.5 – finální struktura horní navigace */
.nav-subtitle{font-size:.82em;font-weight:inherit;opacity:.82}
@media(max-width:900px){.nav-subtitle{font-size:inherit}}


/* ==========================================================================
   v2.18.5 – Plynulejší nekonečný karusel
   ========================================================================== */
.gallery-shell[data-view="carousel"] .gallery-strip{
    scroll-behavior:auto;
    scroll-snap-type:none;
    scrollbar-width:none !important;
    -ms-overflow-style:none !important;
    will-change:scroll-position;
}

.gallery-shell[data-view="carousel"] .gallery-strip::-webkit-scrollbar{
    width:0 !important;
    height:0 !important;
    display:none !important;
}

.gallery-shell[data-view="carousel"] .gallery-item{
    scroll-snap-align:none;
}

.gallery-shell[data-view="carousel"] .gallery-item img{
    -webkit-user-drag:none;
    user-select:none;
}

.gallery-shell[data-view="grid"] [data-gallery-clone]{
    display:none !important;
}

.gallery-shell[data-view="carousel"] .gallery-strip.is-dragging{
    scroll-behavior:auto !important;
    scroll-snap-type:none !important;
}

@media (prefers-reduced-motion: reduce){
    .gallery-shell[data-view="carousel"] .gallery-strip{
        scroll-behavior:auto !important;
    }
}
