/* ============================================
   Redesign 2026 — Header, Nav & Footer overrides
   Loaded AFTER main.css to override old styles.
   ============================================ */

/* --- Rubik font (imported in base.html via Google Fonts link) --- */

/* ============================
   CSS Variables
   ============================ */
:root {
    --r26-white: #e9e9e9;
    --r26-black: #1e1e1e;
    --r26-blue: #0147c0;
    --r26-yellow: #ffcb1f;
    --r26-yellow-line: rgba(200, 160, 20, 0.35);
    --r26-font: 'Rubik', 'Open Sans', sans-serif;
}

/* Squared paper background pattern */
.r26-grid-bg {
    background-color: var(--r26-yellow);
    background-image:
        linear-gradient(var(--r26-yellow-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--r26-yellow-line) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* ============================
   Layout overrides
   ============================ */
#wrap {
    max-width: 100%;
    padding: 0;
    box-shadow: none;
    background-color: var(--r26-yellow);
    background-image:
        linear-gradient(var(--r26-yellow-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--r26-yellow-line) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Content blocks that relied on #wrap's old padding need inner constraint */
#content,
#contacts,
#gallery-list,
#calendar,
#supporters,
#carousel {
    max-width: 945px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 50px;
    padding-right: 50px;
    box-sizing: border-box;
}

/* StreamField blocks are already full-width by design */
.hero-block,
.values-block,
.bubbles-section,
.gallery-preview {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

/* Carousel needs full width */
#carousel {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}

/* ============================
   Navbar
   ============================ */
header.group {
    position: relative;
    z-index: 3;
    height: auto;
    min-height: 0;
    overflow: visible;
    background-color: var(--r26-white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 60px;
}

header .navbar-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 1320px;
    height: 90px;
}

header img#domatprieks {
    position: static;
    display: block;
    margin: 0;
    width: 157px;
    height: 50px;
    max-width: none;
    flex-shrink: 0;
    transform: none;
    left: auto;
    top: auto;
}

/* Hide old social & language blocks in header */
#social {
    display: none;
}
#lng {
    display: none;
}

/* New language selector in navbar */
.nav-lang-wrap {
    position: relative;
    flex-shrink: 0;
}
.nav-lang {
    display: flex;
    align-items: center;
    gap: 5px;
    opacity: 0.6;
    font-family: var(--r26-font);
    font-size: 14px;
    color: var(--r26-black);
    flex-shrink: 0;
    cursor: pointer;
    background: none;
    border: none;
    padding: 6px 8px;
    border-radius: 8px;
    transition: opacity 0.2s;
}
.nav-lang:hover {
    opacity: 1;
}
.nav-lang svg {
    width: 11px;
    height: 11px;
    transition: transform 0.2s;
}
.nav-lang-wrap.open .nav-lang svg {
    transform: rotate(180deg);
}
.nav-lang-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    padding: 6px 0;
    z-index: 100;
    min-width: 60px;
}
.nav-lang-wrap.open .nav-lang-dropdown {
    display: block;
}
.nav-lang-dropdown form {
    margin: 0;
    padding: 0;
}
.nav-lang-option {
    display: block;
    width: 100%;
    padding: 8px 16px;
    font-family: var(--r26-font);
    font-size: 14px;
    font-weight: 400;
    color: var(--r26-black);
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.15s;
}
.nav-lang-option:hover {
    background-color: rgba(0, 0, 0, 0.04);
}
.nav-lang-option.active {
    font-weight: 700;
    color: var(--r26-blue);
}

/* Shopping cart icon */
.nav-cart {
    display: none; /* hidden for now, enable when shop is ready */
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--r26-blue);
    color: #fff;
    border: none;
    cursor: pointer;
    position: relative;
    font-size: 20px;
    align-items: center;
    justify-content: center;
}

/* ============================
   Navigation
   ============================ */
nav {
    position: static;
    margin: 0;
    background: none;
    display: flex;
    flex: 1;
    justify-content: flex-end;
    align-items: center;
    gap: 0;
}

nav > ul {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: center;
    line-height: normal;
    text-transform: none;
    gap: 0;
    align-items: center;
}

nav > ul > li {
    position: relative;
    display: inline-flex;
}

nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-family: var(--r26-font);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--r26-black);
    text-decoration: none;
    border-radius: 144px;
    transition: background-color 0.2s;
    white-space: nowrap;
}

nav > ul > li > a:hover {
    background-color: rgba(0, 0, 0, 0.06);
    color: var(--r26-black);
}

nav > ul > li.active > a,
nav > ul > li.active > a:hover {
    background-color: var(--r26-blue);
    color: #fff;
}

/* Dropdown submenu */
nav > ul > li > ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    line-height: normal;
    text-transform: none;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    padding: 8px 0;
    min-width: 180px;
}

/* Invisible bridge to prevent hover gap */
nav > ul > li > ul:before {
    content: "";
    display: block;
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 20px;
}

nav > ul > li:hover > ul {
    display: block;
}


nav > ul > li > ul > li {
    display: block;
    border-bottom: none;
}

nav > ul > li > ul > li a,
nav > ul > li.active > ul > li a {
    display: block;
    padding: 8px 20px;
    font-family: var(--r26-font);
    font-size: 14px;
    font-weight: 400;
    color: var(--r26-black);
    white-space: nowrap;
    background-color: transparent;
    border-radius: 0;
}

nav > ul > li > ul > li a:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

/* ============================
   Mobile hamburger button
   ============================ */
a#mob-nav {
    display: none;
    width: 48px;
    height: 48px;
    padding: 0;
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background-color 0.2s;
}

a#mob-nav:before {
    content: "";
    display: block;
    width: 24px;
    height: 2px;
    background: var(--r26-black);
    position: absolute;
    top: 16px;
    left: 12px;
    box-shadow: 0 8px 0 var(--r26-black), 0 16px 0 var(--r26-black);
    transition: all 0.3s;
}

a#mob-nav.active {
    background-color: transparent;
}

a#mob-nav.active:before {
    top: 23px;
    transform: rotate(45deg);
    box-shadow: none;
}

a#mob-nav.active:after {
    content: "";
    display: block;
    width: 24px;
    height: 2px;
    background: var(--r26-black);
    position: absolute;
    top: 23px;
    left: 12px;
    transform: rotate(-45deg);
}

/* ============================
   Mobile menu overlay
   ============================ */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--r26-white);
    z-index: 1000;
    flex-direction: column;
    overflow-y: auto;
}

.mobile-menu-overlay.open {
    display: flex;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 26px;
    height: 90px;
    flex-shrink: 0;
}

.mobile-menu-header img {
    width: 157px;
    height: 50px;
}

.mobile-menu-close {
    width: 48px;
    height: 48px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.mobile-menu-close svg {
    width: 24px;
    height: 24px;
    stroke: var(--r26-black);
    stroke-width: 2;
}

.mobile-menu-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 26px 72px;
}

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

.mobile-menu-links li a,
.mobile-menu-links li > span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    font-family: var(--r26-font);
    font-size: 18px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--r26-black);
    text-decoration: none;
    cursor: pointer;
}

.mobile-menu-links li > span svg {
    width: 24px;
    height: 24px;
    transition: transform 0.2s;
}

.mobile-menu-links li.open > span svg {
    transform: rotate(180deg);
}

.mobile-menu-links li ul {
    list-style: none;
    margin: 0;
    padding: 0 0 0 16px;
    display: none;
}

.mobile-menu-links li.open ul {
    display: block;
}

.mobile-menu-links li ul li a {
    font-size: 16px;
    padding: 8px 0;
}

.mobile-menu-lang {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    font-family: var(--r26-font);
    font-size: 16px;
    color: var(--r26-black);
}

.mobile-menu-lang svg.globe {
    width: 16px;
    height: 16px;
    stroke: var(--r26-black);
    fill: none;
    stroke-width: 1.5;
}

.mobile-menu-lang .lang-options {
    display: flex;
    align-items: center;
    gap: 0;
}

.mobile-menu-lang .lang-options button {
    background: none;
    border: none;
    font-family: var(--r26-font);
    font-size: 16px;
    color: var(--r26-black);
    padding: 8px 4px;
    cursor: pointer;
    font-weight: 400;
    line-height: 1.5;
}

.mobile-menu-lang .lang-options button.active {
    font-weight: 700;
}

.mobile-menu-lang .lang-sep {
    margin: 0 4px;
    opacity: 0.5;
}

.mobile-menu-social {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 0;
    margin-top: 12px;
}

.mobile-menu-social a {
    display: block;
    width: 32px;
    height: 32px;
    color: var(--r26-black);
}

.mobile-menu-social a svg {
    width: 32px;
    height: 32px;
    fill: var(--r26-black);
}

/* ============================
   Footer
   ============================ */
footer {
    position: relative;
    bottom: auto;
    left: auto;
    width: 100%;
    min-height: auto;
    margin: 0;
    padding: 50px 60px;
    background-color: #fff;
    font-size: 16px;
    text-align: left;
    overflow: visible;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    font-family: var(--r26-font);
    color: var(--r26-black);
}

footer:after {
    display: none;
}

footer p {
    position: static;
    line-height: 1.5;
    margin: 0;
    z-index: auto;
    font-family: var(--r26-font);
}

.footer-main {
    display: flex;
    gap: 32px;
    width: 100%;
    max-width: 1320px;
    align-items: flex-start;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 592px;
    flex-shrink: 0;
}

.footer-brand img.footer-logo {
    width: 157px;
    height: 50px;
}

.footer-brand .footer-tagline {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    max-width: 320px;
    color: var(--r26-black);
}

.footer-social {
    display: flex;
    gap: 16px;
    align-items: center;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--r26-blue);
    color: #fff;
    text-decoration: none;
    transition: opacity 0.2s;
}

.footer-social a:hover {
    opacity: 0.85;
}

.footer-social a svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 280px;
    flex-shrink: 0;
}

.footer-col h3 {
    font-family: var(--r26-font);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--r26-blue);
    margin: 0;
}

.footer-col-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col-list li {
    font-family: var(--r26-font);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--r26-black);
}

.footer-col-list li a {
    color: var(--r26-black);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col-list li a:hover {
    color: var(--r26-blue);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1320px;
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
}

.footer-copyright {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--r26-black);
}

.footer-legal {
    display: flex;
    gap: 24px;
    align-items: center;
}

.footer-legal a {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--r26-black);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-legal a:hover {
    color: var(--r26-blue);
}

/* ============================
   Hero Block
   ============================ */
.hero-block {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 1035px;
    max-height: 1035px;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 64px 112px;
    box-sizing: border-box;
}

.hero-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1320px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.hero-title {
    display: flex;
    flex-direction: column;
    width: 100%;
    text-transform: uppercase;
}

.hero-seg {
    display: block;
    font-family: 'Rubik One', var(--r26-font);
    font-weight: 400;
    font-size: clamp(48px, 9vw, 128px);
    line-height: 1.1;
    color: var(--r26-blue);
}

.hero-seg-left {
    text-align: left;
}

.hero-seg-right {
    text-align: right;
}

.hero-subtitle {
    font-family: var(--r26-font);
    font-weight: 500;
    font-size: clamp(18px, 2vw, 28px);
    line-height: 1.5;
    color: var(--r26-black);
    max-width: 805px;
    margin: 0;
}

/* --- Floating collage images --- */
.hero-images {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.hero-collage-item {
    position: absolute;
    width: 322px;
    height: 322px;
    border-radius: 20px;
    overflow: hidden;
    will-change: transform;
    animation: heroFloat 6s ease-in-out infinite;
}

/* Stagger each image with different duration, delay, and amplitude */
.hero-collage-item-1 { animation: heroFloat1 7s ease-in-out infinite; }
.hero-collage-item-2 { animation: heroFloat2 5.5s ease-in-out 0.8s infinite; }
.hero-collage-item-3 { animation: heroFloat3 6.5s ease-in-out 1.6s infinite; }
.hero-collage-item-4 { animation: heroFloat4 8s ease-in-out 2.4s infinite; }

@keyframes heroFloat1 {
    0%, 100% { translate: 0 0; }
    25%      { translate: 4px -12px; }
    50%      { translate: -2px -18px; }
    75%      { translate: 3px -6px; }
}

@keyframes heroFloat2 {
    0%, 100% { translate: 0 0; }
    30%      { translate: -5px 14px; }
    60%      { translate: 3px 8px; }
    80%      { translate: -2px 16px; }
}

@keyframes heroFloat3 {
    0%, 100% { translate: 0 0; }
    20%      { translate: 6px -10px; }
    50%      { translate: -4px -16px; }
    70%      { translate: 2px -6px; }
}

@keyframes heroFloat4 {
    0%, 100% { translate: 0 0; }
    35%      { translate: -3px 12px; }
    65%      { translate: 5px 20px; }
    85%      { translate: -2px 8px; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-collage-item,
    .hero-collage-item-1,
    .hero-collage-item-2,
    .hero-collage-item-3,
    .hero-collage-item-4 {
        animation: none !important;
        translate: none !important;
    }
}

.hero-collage-img {
    display: block;
    width: 322px;
    height: 322px;
    object-fit: cover;
    border-radius: 20px;
}

/* Figma canvas: 1440×1035.
   Positions converted from Figma absolute coords to right/left/top/bottom.
   img1 (top-right, checkerboard): Figma left:1094 top:-144 rotate:12deg
   img2 (mid-right, girl thinking): Figma left:1048 top:426 rotate:-5deg
   img3 (bottom-right, kids playing): Figma left:697 top:697 rotate:5deg
   img4 (bottom-left, group photo): Figma left:289 top:740 rotate:-8deg */
.hero-collage-item-1 {
    top: -144px;
    right: 24px;
    transform: rotate(12deg);
}

.hero-collage-item-2 {
    top: 426px;
    right: 70px;
    transform: rotate(-5deg);
}

.hero-collage-item-3 {
    top: 697px;
    right: 421px;
    transform: rotate(5deg);
}

.hero-collage-item-4 {
    top: 740px;
    left: 289px;
    transform: rotate(-8deg);
}

/* ============================
   Values Block
   ============================ */
.values-block {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
}

.values-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 80px;
    align-items: center;
    width: 100%;
    max-width: 1440px;
    padding: 60px;
    box-sizing: border-box;
    background-color: var(--r26-blue);
    border-radius: 50px 50px 0 0;
    position: relative;
    overflow: hidden;
    /* Checkered pattern overlay */
    background-image:
        linear-gradient(45deg, rgba(255,255,255,0.04) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255,255,255,0.04) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.04) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.04) 75%);
    background-size: 40px 40px;
    background-position: 0 0, 0 20px, 20px -20px, -20px 0;
}

.values-left {
    flex: 1 0 0;
    min-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    justify-content: center;
}

.values-heading {
    font-family: 'Rubik One', var(--r26-font);
    font-weight: 400;
    font-size: 64px;
    line-height: 1.2;
    color: var(--r26-white);
    margin: 0;
    text-transform: none;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 1px;
}

.tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 20px 30px;
    border-radius: 100px;
    background-color: var(--r26-white);
    font-family: var(--r26-font);
    font-weight: 400;
    font-size: 20px;
    line-height: 1.2;
    color: var(--r26-black);
    white-space: nowrap;
}

.tag--active {
    background-color: var(--r26-yellow);
    color: var(--r26-blue);
    font-family: 'Rubik One', var(--r26-font);
    font-weight: 400;
}

.values-right {
    flex: 1 0 0;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    color: var(--r26-white);
}

.values-para {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.values-para-title {
    font-family: 'Rubik One', var(--r26-font);
    font-weight: 400;
    font-size: 40px;
    line-height: 1.2;
    color: var(--r26-yellow);
    margin: 0;
}

.values-para-text,
.values-para-text p {
    font-family: var(--r26-font);
    font-weight: 400;
    font-size: 18px;
    line-height: 1.5;
    color: var(--r26-white);
    margin: 0;
}

/* ============================
   Navigation Bubbles Block
   ============================ */
.bubbles-section {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
}

.bubbles-grid {
    display: grid;
    /* 6 columns: bubbles placed in specific cells, text spans middle */
    grid-template-columns: 240px 240px 1fr 240px 1fr 240px;
    grid-template-rows: 240px auto 240px;
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    background-color: var(--r26-blue);
    padding: 80px 0;
    overflow: clip;
}

/* All bubbles share these base styles */
.bubble {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

a.bubble:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.bubble__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.bubble__overlay {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    opacity: 0.45;
    pointer-events: none;
}

.bubble__label {
    position: relative;
    z-index: 1;
    font-family: 'Rubik One', var(--r26-font);
    font-weight: 400;
    font-size: 30px;
    line-height: 1;
    color: var(--r26-white);
    text-align: center;
    white-space: pre-line;
}

/* --- Grid placement for 8 bubbles matching Figma layout ---
   Row 1: bubble 1 (img, col1), 2 (text, col2), 3 (img, col4), 4 (text, col6)
   Row 2: bubble 5 (img, col1 span2), central text (col3 span2)
   Row 3: bubble 6 (img, col3), 7 (text, col4), 8 (img, col6) */
.bubble--1 { grid-column: 1; grid-row: 1; }
.bubble--2 { grid-column: 2; grid-row: 1; }
.bubble--3 { grid-column: 4; grid-row: 1; }
.bubble--4 { grid-column: 6; grid-row: 1; }
.bubble--5 { grid-column: 1 / span 2; grid-row: 2; justify-self: center; align-self: start; }
.bubble--6 { grid-column: 3; grid-row: 3; justify-self: center; }
.bubble--7 { grid-column: 4; grid-row: 3; }
.bubble--8 { grid-column: 6; grid-row: 3; }

/* Central text spans the middle area */
.bubbles-text {
    grid-column: 3 / span 3;
    grid-row: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 100px 20px 0;
}

.bubbles-text p {
    font-family: 'Rubik One', var(--r26-font);
    font-weight: 400;
    font-size: 48px;
    line-height: 1.2;
    color: var(--r26-white);
    text-align: center;
    margin: 0;
}

.bubbles-text--highlight {
    color: var(--r26-yellow);
}

/* Also add to streamfield full-width override */
.bubbles-section {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

/* ============================
   Gallery Preview Block
   ============================ */
.gallery-preview {
    display: flex;
    justify-content: center;
    padding: 0 64px;
}

.gallery-preview__inner {
    width: 100%;
    max-width: 1440px;
    padding: 80px 0 120px;
    position: relative;
}

.gallery-preview__heading {
    font-family: 'Rubik One', var(--r26-font);
    font-weight: 400;
    font-size: clamp(48px, 9vw, 128px);
    line-height: 1.2;
    color: var(--r26-blue);
    text-align: center;
    margin: 0 0 -60px;
    position: relative;
    z-index: 2;
}

.gallery-preview__cards {
    position: relative;
    width: 100%;
    height: 1100px;
}

/* Base card styles */
.gallery-card {
    position: absolute;
    width: 359px;
    height: 359px;
    border-radius: 20px;
    overflow: hidden;
    will-change: transform;
    animation: galleryFloat 7s ease-in-out infinite;
    text-decoration: none;
    cursor: pointer;
}

.gallery-card__image {
    position: absolute;
    inset: 0;
}

.gallery-card__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    transition: transform 0.4s ease;
}

.gallery-card:not(.gallery-card--cta):hover .gallery-card__img {
    transform: scale(1.08);
}

.gallery-card:not(.gallery-card--cta):hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.gallery-card__label {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background-color: var(--r26-white);
    border-radius: 15px;
    padding: 10px 20px;
    z-index: 1;
    transition: transform 0.4s ease, box-shadow 0.3s ease;
}

.gallery-card:not(.gallery-card--cta):hover .gallery-card__label {
    transform: translateY(-6px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.gallery-card__label p {
    font-family: 'Rubik One', var(--r26-font);
    font-weight: 400;
    font-size: 18px;
    line-height: 1.2;
    color: var(--r26-blue);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* CTA card */
.gallery-card--cta {
    background-color: var(--r26-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-card--cta:hover {
    transform: scale(1.05) rotate(-10.5deg) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.gallery-card__cta-text {
    font-family: 'Rubik One', var(--r26-font);
    font-weight: 400;
    font-size: 50px;
    line-height: 1;
    color: var(--r26-white);
    text-align: center;
}

/* Figma positions (1440×1371 canvas, 359px cards):
   card1: left:-115 top:86 rotate:-19deg  (top-left, partially clipped)
   card2: left:395  top:259 rotate:6deg   (center-top)
   card3: left:899  top:0   rotate:12deg  (top-right)
   card4: left:73   top:684 rotate:-8deg  (bottom-left)
   card5: left:409  top:837 rotate:5deg   (bottom-center)
   card6: left:872  top:467 rotate:-5deg  (mid-right)
   cta:   left:834  top:953 rotate:-11deg (bottom-right) */
.gallery-card--1 { left: -5%; top: 12%;  transform: rotate(-19deg); animation-duration: 8s; }
.gallery-card--2 { left: 28%; top: 24%;  transform: rotate(6deg);   animation-duration: 6.5s; animation-delay: 0.5s; }
.gallery-card--3 { right: 2%; top: 8%;   transform: rotate(12deg);  animation-duration: 7.5s; animation-delay: 1s; }
.gallery-card--4 { left: 5%;  top: 50%;  transform: rotate(-8deg);  animation-duration: 6s;   animation-delay: 1.5s; }
.gallery-card--5 { left: 28%; top: 61%;  transform: rotate(5deg);   animation-duration: 7s;   animation-delay: 2s; }
.gallery-card--6 { right: 5%; top: 34%;  transform: rotate(-5deg);  animation-duration: 5.5s; animation-delay: 0.8s; }
/* CTA is typically card 6 or 7 depending on gallery count */
.gallery-card--cta:last-child { right: 8%; top: 70%; transform: rotate(-11deg); animation-duration: 8.5s; animation-delay: 2.5s; }

/* Floating keyframes for gallery cards */
@keyframes galleryFloat {
    0%, 100% { translate: 0 0; }
    30%      { translate: 3px -10px; }
    60%      { translate: -4px -16px; }
    80%      { translate: 2px -6px; }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-card {
        animation: none !important;
        translate: none !important;
    }
}

/* ============================
   Content area adjustments
   ============================ */

/* Footer is no longer absolute, so remove old padding-bottom hacks */
#content,
#contacts,
#gallery-list,
#calendar,
#supporters {
    padding-bottom: 40px;
}

/* ============================
   Responsive
   ============================ */
@media screen and (max-width: 1100px) {
    .footer-main {
        flex-wrap: wrap;
    }
    .footer-brand {
        width: 100%;
    }
    .footer-col {
        width: auto;
        flex: 1;
        min-width: 180px;
    }
}

@media screen and (max-width: 1100px) {
    .values-inner {
        flex-direction: column;
        gap: 40px;
    }

    .values-left {
        min-width: 0;
    }

    .values-right {
        max-width: none;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 30px;
    }

    .values-para {
        flex: 1 1 260px;
    }
}

@media screen and (max-width: 1000px) {
    .bubbles-grid {
        grid-template-columns: 1fr 1fr 1fr;
        grid-template-rows: auto;
        gap: 16px;
        padding: 0 26px;
    }

    .bubble {
        width: 100%;
        height: 0;
        padding-bottom: 100%;
    }

    .bubble__label {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
    }

    .bubble--1 { grid-column: 1; grid-row: 1; }
    .bubble--2 { grid-column: 2; grid-row: 1; }
    .bubble--3 { grid-column: 3; grid-row: 1; }
    .bubble--4 { grid-column: 1; grid-row: 2; }
    .bubble--5 { grid-column: 2; grid-row: 2; justify-self: stretch; }
    .bubble--6 { grid-column: 3; grid-row: 2; justify-self: stretch; }
    .bubble--7 { grid-column: 1; grid-row: 4; }
    .bubble--8 { grid-column: 2; grid-row: 4; }

    .bubbles-text {
        grid-column: 1 / -1;
        grid-row: 3;
        padding: 20px 0;
    }

    .bubbles-text p {
        font-size: 36px;
    }
}

@media screen and (max-width: 540px) {
    .bubbles-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        padding: 0 20px;
    }

    .bubble--1 { grid-column: 1; grid-row: 1; }
    .bubble--2 { grid-column: 2; grid-row: 1; }
    .bubble--3 { grid-column: 1; grid-row: 2; }
    .bubble--4 { grid-column: 2; grid-row: 2; }
    .bubble--5 { grid-column: 1; grid-row: 3; justify-self: stretch; }
    .bubble--6 { grid-column: 2; grid-row: 3; justify-self: stretch; }

    .bubbles-text {
        grid-column: 1 / -1;
        grid-row: 4;
    }

    .bubbles-text p {
        font-size: 28px;
    }

    .bubble--7 { grid-column: 1; grid-row: 5; }
    .bubble--8 { grid-column: 2; grid-row: 5; }

    .bubble__label {
        font-size: 22px;
    }
}

@media screen and (max-width: 900px) {
    .gallery-preview {
        padding: 0 26px;
    }

    .gallery-preview__inner {
        padding: 60px 0 80px;
    }

    .gallery-preview__heading {
        margin-bottom: -30px;
    }

    .gallery-preview__cards {
        height: 800px;
    }

    .gallery-card {
        width: 240px;
        height: 240px;
    }

    .gallery-card__cta-text {
        font-size: 32px;
    }

    .gallery-card__label p {
        font-size: 14px;
    }

    .gallery-card__label {
        bottom: 12px;
        left: 12px;
        right: 12px;
        padding: 8px 14px;
        border-radius: 10px;
    }
}

@media screen and (max-width: 540px) {
    .gallery-preview__cards {
        height: 600px;
    }

    .gallery-card {
        width: 180px;
        height: 180px;
        border-radius: 14px;
    }

    .gallery-card__img {
        border-radius: 14px;
    }

    .gallery-card__label {
        bottom: 8px;
        left: 8px;
        right: 8px;
        padding: 6px 10px;
        border-radius: 8px;
    }

    .gallery-card__label p {
        font-size: 12px;
    }

    .gallery-card__cta-text {
        font-size: 24px;
    }
}

@media screen and (max-width: 850px) {
    .values-inner {
        border-radius: 30px 30px 0 0;
    }

    .values-inner {
        padding: 40px 26px;
        gap: 40px;
    }

    .values-heading {
        font-size: 40px;
    }

    .values-left {
        min-width: 0;
    }

    .tag {
        font-size: 16px;
        padding: 14px 22px;
    }

    .values-para-title {
        font-size: 28px;
    }

    .values-para-text,
    .values-para-text p {
        font-size: 16px;
    }

    .hero-block {
        padding: 80px 26px 80px;
        min-height: 70vh;
        min-height: 70svh;
    }

    .hero-collage-item {
        width: clamp(120px, 28vw, 200px);
        border-radius: 14px;
    }

    .hero-collage-img {
        border-radius: 14px;
    }

    .hero-block {
        height: auto;
        max-height: none;
        min-height: 600px;
        padding: 80px 26px 80px;
    }

    .hero-collage-item {
        width: 200px;
        height: 200px;
    }

    .hero-collage-img {
        width: 200px;
        height: 200px;
    }

    .hero-collage-item-1 {
        top: -60px;
        right: -20px;
    }

    .hero-collage-item-2 {
        top: 280px;
        right: -40px;
    }

    .hero-collage-item-3 {
        bottom: 20px;
        right: 80px;
        left: auto;
        top: auto;
    }

    .hero-collage-item-4 {
        bottom: -20px;
        left: 40px;
        top: auto;
        right: auto;
    }

    header.group {
        padding: 0 26px;
    }

    nav a {
        font-size: 14px;
        padding: 8px 14px;
    }

    footer {
        padding: 40px 26px;
    }

    #wrap {
        padding: 0;
    }

    nav,
    footer {
        margin: 0;
    }

    /* Override old responsive rule */
    header {
        margin-bottom: 0;
    }

    #content,
    #contacts,
    #gallery-list,
    #calendar,
    #supporters {
        padding-left: 2%;
        padding-right: 2%;
    }
}

@media screen and (max-width: 720px) {
    header.group {
        min-height: 0;
        height: auto;
        padding: 0 26px;
    }

    header .navbar-inner {
        height: 70px;
    }

    header img#domatprieks {
        width: 130px;
        height: auto;
        position: static;
        left: auto;
        top: auto;
        transform: none;
        max-width: none;
    }

    a#mob-nav {
        display: flex;
        margin-left: auto;
    }

    nav {
        display: none;
    }

    .nav-lang-wrap {
        display: none;
    }

    /* Footer mobile */
    footer {
        padding: 30px 26px;
    }

    .footer-main {
        flex-direction: column;
        gap: 30px;
    }

    .footer-brand {
        width: 100%;
    }

    .footer-col {
        width: 100%;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .footer-legal {
        justify-content: center;
    }

    /* Reset old mobile rules */
    footer {
        position: relative;
        width: 100%;
        margin: 0;
    }
}

@media screen and (max-width: 540px) {
    .hero-block {
        padding: 60px 20px 60px;
        min-height: 500px;
    }

    .hero-collage-item {
        width: 140px;
        height: 140px;
        border-radius: 12px;
    }

    .hero-collage-img {
        width: 140px;
        height: 140px;
        border-radius: 12px;
    }

    .hero-collage-item-1 {
        top: -40px;
        right: -20px;
    }

    .hero-collage-item-2 {
        top: 200px;
        right: -30px;
    }

    .hero-collage-item-3 {
        bottom: 10px;
        right: 40px;
    }

    .hero-collage-item-4 {
        bottom: -10px;
        left: 10px;
    }

    .hero-subtitle {
        max-width: 75%;
    }
}

@media screen and (max-width: 490px) {
    header .navbar-inner {
        height: 60px;
    }
    header img#domatprieks {
        width: 110px;
    }
}


/* ============================
   Gallery Index Page
   ============================ */

.gi-page {
    background-color: var(--r26-yellow);
    background-image:
        linear-gradient(var(--r26-yellow-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--r26-yellow-line) 1px, transparent 1px);
    background-size: 40px 40px;
    padding: 120px 0 80px;
}

.gi-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 40px;
}

.gi-title {
    font-family: 'Rubik One', var(--r26-font);
    font-weight: 400;
    font-size: clamp(36px, 5vw, 64px);
    color: var(--r26-blue);
    margin: 0 0 48px;
}

.gi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.gi-card {
    position: relative;
    aspect-ratio: 1;
    border-radius: 20px;
    overflow: hidden;
    border: none;
    padding: 0;
    cursor: pointer;
    background: var(--r26-blue);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.gi-card:hover {
    transform: scale(1.03);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.gi-card__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gi-card:hover .gi-card__img {
    transform: scale(1.08);
}

.gi-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        0deg,
        rgba(1, 71, 192, 0.85) 0%,
        rgba(1, 71, 192, 0.2) 50%,
        transparent 100%
    );
    transition: opacity 0.35s ease;
}

.gi-card:hover .gi-card__overlay {
    opacity: 0.8;
}

.gi-card__title {
    position: absolute;
    bottom: 48px;
    left: 20px;
    right: 20px;
    font-family: 'Rubik One', var(--r26-font);
    font-weight: 400;
    font-size: 18px;
    line-height: 1.25;
    color: var(--r26-white);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: left;
}

.gi-card__count {
    position: absolute;
    bottom: 20px;
    left: 20px;
    font-family: var(--r26-font);
    font-size: 14px;
    font-weight: 500;
    color: rgba(233, 233, 233, 0.7);
    text-align: left;
}

/* Pagination */
.gi-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 56px;
}

.gi-pagination__num,
.gi-pagination__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-family: 'Rubik One', var(--r26-font);
    font-weight: 400;
    font-size: 16px;
    color: var(--r26-blue);
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.gi-pagination__num:hover {
    background-color: rgba(1, 71, 192, 0.1);
}

.gi-pagination__num--active {
    background-color: var(--r26-blue);
    color: var(--r26-white);
}

.gi-pagination__num--active:hover {
    background-color: var(--r26-blue);
}

.gi-pagination__btn {
    color: var(--r26-blue);
}

.gi-pagination__btn:hover {
    background-color: rgba(1, 71, 192, 0.1);
}

/* Gallery Index responsive */
@media screen and (max-width: 1100px) {
    .gi-grid { grid-template-columns: repeat(3, 1fr); }
}
@media screen and (max-width: 720px) {
    .gi-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .gi-container { padding: 0 20px; }
    .gi-page { padding: 100px 0 60px; }
    .gi-title { margin-bottom: 32px; }
}
@media screen and (max-width: 490px) {
    .gi-grid { grid-template-columns: 1fr; gap: 16px; }
    .gi-card { aspect-ratio: 4/3; }
}


/* ============================
   Gallery Lightbox Modal
   ============================ */

.gl-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gl-modal[aria-hidden="true"] {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.gl-modal[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

.gl-modal[aria-hidden="false"] {
    user-select: none;
    -webkit-user-select: none;
}

.gl-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(30, 30, 30, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
}

.gl-modal__dialog {
    position: relative;
    width: 95vw;
    max-width: 1100px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.gl-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    flex-shrink: 0;
}

.gl-modal__title {
    font-family: 'Rubik One', var(--r26-font);
    font-weight: 400;
    font-size: 22px;
    color: var(--r26-white);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gl-modal__close {
    background: none;
    border: none;
    color: var(--r26-white);
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.gl-modal__close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.gl-modal__body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.gl-modal__stage {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.gl-modal__image-wrap {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.gl-modal__img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 12px;
    transition: opacity 0.25s ease;
    display: block;
}

.gl-modal__spinner {
    position: absolute;
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--r26-yellow);
    border-radius: 50%;
    animation: glSpin 0.7s linear infinite;
    display: none;
}

@keyframes glSpin {
    to { transform: rotate(360deg); }
}

.gl-modal__nav {
    background: none;
    border: none;
    color: var(--r26-white);
    cursor: pointer;
    padding: 12px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
    opacity: 0.7;
}

.gl-modal__nav:hover {
    background-color: rgba(255, 255, 255, 0.1);
    opacity: 1;
}

.gl-modal__counter {
    font-family: var(--r26-font);
    font-size: 14px;
    color: rgba(233, 233, 233, 0.5);
    text-align: center;
    margin: 0;
    padding-bottom: 8px;
    flex-shrink: 0;
}

/* Modal responsive */
@media screen and (max-width: 720px) {
    .gl-modal__dialog { width: 100vw; max-height: 100vh; padding: 0 16px; }
    .gl-modal__img { max-height: 70vh; border-radius: 8px; }
    .gl-modal__nav { padding: 8px; }
    .gl-modal__nav svg { width: 24px; height: 24px; }
    .gl-modal__title { font-size: 18px; }
}


/* ============================
   Calendar Page
   ============================ */

.cal-page {
    background-color: var(--r26-yellow);
    background-image:
        linear-gradient(var(--r26-yellow-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--r26-yellow-line) 1px, transparent 1px);
    background-size: 40px 40px;
    padding: 120px 0 80px;
}

.cal-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 40px;
}

.cal-header {
    margin-bottom: 40px;
}

.cal-title {
    font-family: 'Rubik One', var(--r26-font);
    font-weight: 400;
    font-size: clamp(36px, 5vw, 64px);
    color: var(--r26-blue);
    margin: 0 0 12px;
}

.cal-subtitle {
    font-family: var(--r26-font);
    font-size: 18px;
    color: var(--r26-black);
    margin: 0 0 24px;
    opacity: 0.7;
}

.cal-legend {
    display: flex;
    gap: 16px;
}

.cal-legend__item {
    font-family: 'Rubik One', var(--r26-font);
    font-weight: 400;
    font-size: 14px;
    padding: 6px 16px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.cal-legend__item--lv {
    background-color: var(--r26-yellow);
    color: var(--r26-black);
    border: 2px solid var(--r26-black);
}

.cal-legend__item--ru {
    background-color: var(--r26-blue);
    color: var(--r26-white);
}

/* Desktop table */
.cal-table-wrap {
    background: var(--r26-white);
    border-radius: 24px;
    overflow: hidden;
}

.cal-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--r26-font);
    font-size: 14px;
    table-layout: fixed;
}

.cal-table__corner {
    width: 110px;
    background: var(--r26-blue);
}

.cal-table thead tr {
    background: var(--r26-blue);
}

.cal-table__day-head {
    font-family: 'Rubik One', var(--r26-font);
    font-weight: 400;
    font-size: 15px;
    color: var(--r26-white);
    padding: 14px 8px;
    text-align: center;
    text-transform: uppercase;
}

.cal-table tbody tr {
    border-bottom: 1px solid rgba(30, 30, 30, 0.06);
}

.cal-table tbody tr:last-child {
    border-bottom: none;
}

.cal-table tbody tr:hover {
    background-color: rgba(1, 71, 192, 0.03);
}

.cal-table__time {
    font-family: 'Rubik One', var(--r26-font);
    font-weight: 400;
    font-size: 12px;
    color: var(--r26-black);
    padding: 10px 12px;
    text-align: center;
    white-space: nowrap;
    background: rgba(1, 71, 192, 0.05);
    border-right: 1px solid rgba(30, 30, 30, 0.06);
}

.cal-table__cell {
    padding: 8px 6px;
    text-align: center;
    vertical-align: top;
    font-weight: 600;
    font-size: 14px;
    border-right: 1px solid rgba(30, 30, 30, 0.04);
    transition: background-color 0.15s ease;
}

.cal-table__cell-time {
    display: block;
    font-weight: 400;
    font-size: 12px;
    opacity: 0.65;
    margin-bottom: 2px;
}

.cal-table__cell:last-child {
    border-right: none;
}

.cal-table__cell--lv {
    background-color: rgba(255, 203, 31, 0.35);
    color: var(--r26-black);
}

.cal-table__cell--ru {
    background-color: rgba(1, 71, 192, 0.2);
    color: var(--r26-blue);
}

/* Mobile accordion — hidden on desktop */
.cal-mobile {
    display: none;
    flex-direction: column;
    gap: 12px;
}

.cal-day-card {
    background: var(--r26-white);
    border-radius: 16px;
    overflow: hidden;
}

.cal-day-card__header {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 18px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-family: 'Rubik One', var(--r26-font);
    font-weight: 400;
    font-size: 18px;
    color: var(--r26-blue);
    text-align: left;
    gap: 12px;
    transition: background-color 0.2s ease;
}

.cal-day-card__header:hover {
    background-color: rgba(1, 71, 192, 0.04);
}

.cal-day-card__name {
    flex: 1;
    text-transform: uppercase;
}

.cal-day-card__count {
    font-family: var(--r26-font);
    font-size: 13px;
    font-weight: 600;
    background: var(--r26-blue);
    color: var(--r26-white);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cal-day-card__arrow {
    color: var(--r26-blue);
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.cal-day-card__header[aria-expanded="true"] .cal-day-card__arrow {
    transform: rotate(180deg);
}

.cal-day-card__body {
    padding: 0 20px 16px;
}

.cal-day-card__empty {
    font-family: var(--r26-font);
    font-size: 14px;
    color: rgba(30, 30, 30, 0.4);
    margin: 0;
    padding: 8px 0;
}

.cal-slot {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(30, 30, 30, 0.06);
}

.cal-slot:last-child {
    border-bottom: none;
}

.cal-slot__time {
    font-family: 'Rubik One', var(--r26-font);
    font-weight: 400;
    font-size: 13px;
    color: var(--r26-black);
    opacity: 0.5;
    min-width: 100px;
}

.cal-slot__event {
    font-family: var(--r26-font);
    font-weight: 600;
    font-size: 14px;
    padding: 4px 14px;
    border-radius: 12px;
}

.cal-slot__event--lv {
    background-color: rgba(255, 203, 31, 0.35);
    color: var(--r26-black);
}

.cal-slot__event--ru {
    background-color: rgba(1, 71, 192, 0.2);
    color: var(--r26-blue);
}

/* Responsive: switch to mobile accordion */
@media screen and (max-width: 800px) {
    .cal-table-wrap { display: none; }
    .cal-mobile { display: flex; }
    .cal-container { padding: 0 20px; }
    .cal-page { padding: 100px 0 60px; }
}

@media screen and (max-width: 490px) {
    .cal-day-card__header { padding: 14px 16px; font-size: 16px; }
    .cal-day-card__body { padding: 0 16px 12px; }
    .cal-slot__time { min-width: 85px; font-size: 12px; }
    .cal-slot__event { font-size: 13px; }
}


/* ============================
   Contact Section Block
   ============================ */

.cs {
    display: flex;
    justify-content: center;
    padding: 80px 64px;
}

.cs__card {
    width: 100%;
    max-width: 1160px;
    background: var(--r26-white);
    border-radius: 50px;
    padding: 50px;
    display: flex;
    flex-direction: column;
    gap: 80px;
}

/* --- Header: title + subtitle side by side --- */

.cs__header {
    display: flex;
    gap: 104px;
    align-items: flex-start;
}

.cs__title {
    font-family: 'Rubik One', var(--r26-font);
    font-weight: 400;
    font-size: 50px;
    line-height: 1.2;
    color: var(--r26-blue);
    margin: 0;
    flex-shrink: 0;
    width: 496px;
}

.cs__subtitle {
    font-family: var(--r26-font);
    font-weight: 500;
    font-size: 18px;
    line-height: 1.5;
    color: var(--r26-black);
    margin: 0;
    max-width: 422px;
}

/* --- Body: two-column layout --- */

.cs__body {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    justify-content: space-between;
}

.cs__left {
    flex: 0 0 460px;
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.cs__right {
    flex: 0 0 460px;
}

/* --- Contact info rich text styling --- */

.cs__info h3,
.cs__info b,
.cs__info strong {
    font-family: var(--r26-font);
    font-weight: 700;
    font-size: 25px;
    line-height: 1.5;
    color: var(--r26-black);
}

.cs__info p {
    font-family: var(--r26-font);
    font-weight: 400;
    font-size: 18px;
    line-height: 1.5;
    color: var(--r26-black);
    margin: 0 0 8px;
}

.cs__info a {
    font-family: var(--r26-font);
    font-size: 18px;
    color: var(--r26-black);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

.cs__info a:hover {
    color: var(--r26-blue);
}

/* --- Embedded Google Map --- */

.cs__map {
    border-radius: 16px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.04);
}

.cs__map iframe {
    display: block;
    width: 100%;
    min-height: 260px;
}

/* --- Contact form --- */

.cs-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.cs-form__field {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cs-form__label {
    font-family: var(--r26-font);
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    color: var(--r26-black);
}

.cs-form__req {
    color: #de4f3f;
    margin-left: 4px;
}

.cs-form input[type="text"],
.cs-form input[type="email"],
.cs-form input[type="url"],
.cs-form input[type="number"],
.cs-form input[type="tel"],
.cs-form textarea,
.cs-form select {
    width: 100%;
    padding: 14px 18px;
    font-family: var(--r26-font);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--r26-black);
    background: #fff;
    border: 1.5px solid rgba(30, 30, 30, 0.15);
    border-radius: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    -webkit-appearance: none;
}

.cs-form input:focus,
.cs-form textarea:focus,
.cs-form select:focus {
    border-color: var(--r26-blue);
    box-shadow: 0 0 0 3px rgba(1, 71, 192, 0.12);
}

.cs-form textarea {
    min-height: 140px;
    resize: vertical;
}

.cs-form__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    padding: 16px 48px;
    font-family: 'Rubik One', var(--r26-font);
    font-weight: 400;
    font-size: 16px;
    color: var(--r26-white);
    background: var(--r26-blue);
    border: none;
    border-radius: 144px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.15s;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.cs-form__submit:hover {
    background-color: #003da6;
    transform: translateY(-1px);
}

.cs-form__submit:active {
    transform: translateY(0);
}

/* --- Contact section responsive --- */

@media screen and (max-width: 1100px) {
    .cs__header {
        flex-direction: column;
        gap: 24px;
    }

    .cs__title {
        width: 100%;
        font-size: 40px;
    }

    .cs__subtitle {
        max-width: none;
    }

    .cs__body {
        flex-direction: column;
        gap: 50px;
    }

    .cs__left,
    .cs__right {
        flex: none;
        width: 100%;
    }
}

@media screen and (max-width: 850px) {
    .cs {
        padding: 60px 26px;
    }

    .cs__card {
        border-radius: 30px;
        padding: 30px;
        gap: 50px;
    }

    .cs__title {
        font-size: 32px;
    }
}

@media screen and (max-width: 490px) {
    .cs {
        padding: 40px 20px;
    }

    .cs__card {
        border-radius: 24px;
        padding: 24px;
        gap: 36px;
    }

    .cs__title {
        font-size: 28px;
    }

    .cs-form__submit {
        width: 100%;
        padding: 14px 32px;
    }
}

/* ============================
   Team section
   ============================ */

/* Override generic #content constraint for team page */
.template-team #content,
.template-contacts #contacts {
    max-width: none;
    padding: 0;
}

.tm {
    background: var(--r26-yellow);
    padding: 60px 50px 80px;
}

.tm__inner {
    max-width: 945px;
    margin: 0 auto;
    background: var(--r26-white);
    border-radius: 50px;
    padding: 60px 60px 70px;
    overflow: hidden;
}

.tm__title {
    font-family: 'Rubik One', var(--r26-font);
    font-size: 50px;
    color: var(--r26-blue);
    margin: 0 0 40px;
    line-height: 1.1;
}

.tm__layout {
    display: flex;
    gap: 50px;
    align-items: flex-start;
}

/* Left column: bio text */
.tm__text {
    flex: 1;
    min-width: 0;
}

.tm__bio {
    display: none;
}

.tm__bio--active {
    display: block;
}

.tm__bio-text {
    font-family: var(--r26-font);
    font-size: 18px;
    line-height: 1.55;
    color: var(--r26-black);
}

.tm__bio-text h3,
.tm__bio-text h4 {
    font-family: 'Rubik One', var(--r26-font);
    font-size: 25px;
    color: var(--r26-blue);
    margin: 32px 0 12px;
}

.tm__bio-text p {
    margin: 0 0 16px;
}

/* Right column: stacked cards */
.tm__cards {
    position: relative;
    width: 340px;
    height: 340px;
    flex-shrink: 0;
}

.tm__card {
    position: absolute;
    width: 220px;
    height: 280px;
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
    border: 5px solid var(--r26-blue);
    background: var(--r26-blue);
    padding: 0;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(.4, 0, .2, 1),
                z-index 0s,
                border-color 0.3s,
                background-color 0.3s;
    transform-origin: center center;
}

/* Default: all cards behind, offset right with slight rotation */
.tm__card {
    top: 20px;
    left: 110px;
    transform: rotate(8deg);
    z-index: 0;
}

/* Active card: front, upright, left position */
.tm__card--active {
    top: 10px;
    left: 0;
    z-index: 10;
    transform: rotate(0deg);
    border-color: var(--r26-yellow);
    background: var(--r26-yellow);
}

.tm__card-img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: block;
}

.tm__card-name {
    display: block;
    padding: 10px 16px;
    font-family: 'Rubik One', var(--r26-font);
    font-size: 20px;
    color: var(--r26-black);
    text-align: left;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Inactive card name color */
.tm__card:not(.tm__card--active) .tm__card-name {
    color: #fff;
}

/* Hover */
.tm__card:not(.tm__card--active):hover {
    transform: rotate(0deg) scale(1.03) !important;
    z-index: 5 !important;
}

/* ---- Team responsive ---- */
@media screen and (max-width: 850px) {
    .tm__inner {
        border-radius: 30px;
        padding: 40px 30px 50px;
    }

    .tm__title {
        font-size: 36px;
    }

    .tm__layout {
        flex-direction: column-reverse;
        gap: 40px;
    }

    .tm__cards {
        width: 100%;
        height: 300px;
        display: flex;
        justify-content: center;
    }

    .tm__card {
        width: 220px;
        height: 270px;
    }

    .tm__card-img {
        height: 200px;
    }

    .tm__card-name {
        font-size: 16px;
    }
}

@media screen and (max-width: 490px) {
    .tm {
        padding: 40px 20px;
    }

    .tm__inner {
        border-radius: 24px;
        padding: 24px 20px 36px;
    }

    .tm__title {
        font-size: 28px;
    }

    .tm__cards {
        height: 260px;
    }

    .tm__card {
        width: 180px;
        height: 230px;
    }

    .tm__card-img {
        height: 170px;
    }

    .tm__card-name {
        font-size: 14px;
        padding: 8px 12px;
    }

    .tm__bio-text {
        font-size: 16px;
    }
}


/* ============================
   Text Page (tp-)
   ============================ */
.tp-page {
    background-color: var(--r26-yellow);
    background-image:
        linear-gradient(var(--r26-yellow-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--r26-yellow-line) 1px, transparent 1px);
    background-size: 40px 40px;
    min-height: 100vh;
    padding: 0 0 80px;
}

.tp-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 40px;
}

.tp-header {
    padding: 100px 0 60px;
}

.tp-title {
    font-family: 'Rubik One', var(--r26-font);
    font-weight: 400;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.15;
    color: var(--r26-blue);
    margin: 0;
}

.tp-content {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.tp-block {
    background: #fff;
    border-radius: 24px;
    padding: 48px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.tp-block--with-image {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
    align-items: start;
}

.tp-block__image {
    position: relative;
}

.tp-block__img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 20px;
    display: block;
}

.tp-block__text {
    font-family: var(--r26-font);
    font-size: 18px;
    line-height: 1.7;
    color: var(--r26-black);
}

.tp-block__text h2,
.tp-block__text h3,
.tp-block__text h4 {
    font-family: 'Rubik One', var(--r26-font);
    font-weight: 400;
    color: var(--r26-blue);
    margin: 0 0 16px;
}

.tp-block__text h2 { font-size: 32px; }
.tp-block__text h3 { font-size: 24px; }
.tp-block__text h4 { font-size: 20px; }

.tp-block__text p {
    margin: 0 0 16px;
}

.tp-block__text p:last-child {
    margin-bottom: 0;
}

.tp-block__text ul,
.tp-block__text ol {
    margin: 0 0 16px;
    padding-left: 24px;
}

.tp-block__text li {
    margin-bottom: 8px;
}

.tp-block__text a {
    color: var(--r26-blue);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s;
}

.tp-block__text a:hover {
    opacity: 0.7;
}

.tp-block__text strong {
    font-weight: 600;
}

/* Text Page responsive */
@media screen and (max-width: 720px) {
    .tp-container {
        padding: 0 20px;
    }

    .tp-header {
        padding: 80px 0 40px;
    }

    .tp-block {
        padding: 32px 24px;
        border-radius: 20px;
    }

    .tp-block--with-image {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .tp-block__img {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
        max-width: 280px;
        margin: 0 auto;
    }

    .tp-block__text {
        font-size: 16px;
    }

    .tp-block__text h2 { font-size: 26px; }
    .tp-block__text h3 { font-size: 20px; }
}


/* ============================
   Article Index Page (ai-)
   ============================ */
.ai-page {
    background-color: var(--r26-yellow);
    background-image:
        linear-gradient(var(--r26-yellow-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--r26-yellow-line) 1px, transparent 1px);
    background-size: 40px 40px;
    min-height: 100vh;
    padding: 0 0 80px;
}

.ai-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.ai-header {
    padding: 100px 0 60px;
}

.ai-title {
    font-family: 'Rubik One', var(--r26-font);
    font-weight: 400;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.15;
    color: var(--r26-blue);
    margin: 0;
}

.ai-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.ai-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.ai-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.ai-card__image {
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: var(--r26-blue);
}

.ai-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.ai-card:hover .ai-card__img {
    transform: scale(1.06);
}

.ai-card__placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--r26-blue) 0%, #023a9a 100%);
}

.ai-card__body {
    padding: 28px 32px 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.ai-card__date {
    font-family: var(--r26-font);
    font-size: 14px;
    font-weight: 500;
    color: rgba(30, 30, 30, 0.5);
    text-transform: lowercase;
}

.ai-card__title {
    font-family: 'Rubik One', var(--r26-font);
    font-weight: 400;
    font-size: 22px;
    line-height: 1.3;
    color: var(--r26-blue);
    margin: 0;
}

.ai-card__lead {
    font-family: var(--r26-font);
    font-size: 15px;
    line-height: 1.6;
    color: var(--r26-black);
    opacity: 0.8;
}

.ai-card__lead p {
    margin: 0;
}

.ai-card__cta {
    font-family: var(--r26-font);
    font-size: 14px;
    font-weight: 600;
    color: var(--r26-blue);
    margin-top: auto;
    padding-top: 8px;
}

.ai-empty {
    grid-column: 1 / -1;
    font-family: var(--r26-font);
    font-size: 18px;
    color: var(--r26-black);
    opacity: 0.6;
    text-align: center;
    padding: 60px 20px;
}

/* Pagination for article index */
.ai-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 56px;
}

.ai-pagination__num,
.ai-pagination__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-family: 'Rubik One', var(--r26-font);
    font-weight: 400;
    font-size: 16px;
    color: var(--r26-blue);
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.ai-pagination__num:hover {
    background-color: rgba(1, 71, 192, 0.1);
}

.ai-pagination__num--active {
    background-color: var(--r26-blue);
    color: #fff;
}

.ai-pagination__num--active:hover {
    background-color: var(--r26-blue);
}

.ai-pagination__btn {
    color: var(--r26-blue);
}

.ai-pagination__btn:hover {
    background-color: rgba(1, 71, 192, 0.1);
}

/* Article Index responsive */
@media screen and (max-width: 900px) {
    .ai-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media screen and (max-width: 720px) {
    .ai-container {
        padding: 0 20px;
    }

    .ai-header {
        padding: 80px 0 40px;
    }

    .ai-card__body {
        padding: 20px 24px 24px;
    }

    .ai-card__title {
        font-size: 18px;
    }
}


/* ============================
   Single Article Page (ar-)
   ============================ */
.ar-page {
    background-color: var(--r26-yellow);
    background-image:
        linear-gradient(var(--r26-yellow-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--r26-yellow-line) 1px, transparent 1px);
    background-size: 40px 40px;
    min-height: 100vh;
    padding: 0 0 80px;
}

.ar-hero-wrap {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
}

.ar-hero {
    border-radius: 0 0 32px 32px;
    overflow: hidden;
}

.ar-hero__img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    display: block;
}

.ar-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 40px;
}

.ar-content {
    background: #fff;
    border-radius: 24px;
    padding: 48px;
    margin-top: -60px;
    position: relative;
    z-index: 1;
}

.ar-content--no-hero {
    margin-top: 100px;
}

.ar-header {
    padding: 0 0 32px;
}

.ar-date {
    display: block;
    font-family: var(--r26-font);
    font-size: 14px;
    font-weight: 500;
    color: rgba(30, 30, 30, 0.5);
    text-transform: lowercase;
    margin-bottom: 16px;
}

.ar-title {
    font-family: 'Rubik One', var(--r26-font);
    font-weight: 400;
    font-size: clamp(28px, 5vw, 48px);
    line-height: 1.2;
    color: var(--r26-blue);
    margin: 0;
}

.ar-lead {
    font-family: var(--r26-font);
    font-size: 20px;
    line-height: 1.6;
    color: var(--r26-black);
    font-weight: 500;
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 2px solid rgba(1, 71, 192, 0.15);
}

.ar-lead p {
    margin: 0;
}

.ar-body {
    font-family: var(--r26-font);
    font-size: 18px;
    line-height: 1.8;
    color: var(--r26-black);
}

.ar-body h2,
.ar-body h3,
.ar-body h4 {
    font-family: 'Rubik One', var(--r26-font);
    font-weight: 400;
    color: var(--r26-blue);
    margin: 40px 0 16px;
}

.ar-body h2 { font-size: 28px; }
.ar-body h3 { font-size: 22px; }
.ar-body h4 { font-size: 18px; }

.ar-body p {
    margin: 0 0 20px;
}

.ar-body ul,
.ar-body ol {
    margin: 0 0 20px;
    padding-left: 24px;
}

.ar-body li {
    margin-bottom: 8px;
}

.ar-body a {
    color: var(--r26-blue);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ar-body img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 24px 0;
}

/* Article gallery */
.ar-gallery {
    margin-top: 48px;
    padding-top: 48px;
    border-top: 2px solid rgba(1, 71, 192, 0.15);
}

.ar-gallery__title {
    font-family: 'Rubik One', var(--r26-font);
    font-weight: 400;
    font-size: 24px;
    color: var(--r26-blue);
    margin: 0 0 24px;
}

.ar-gallery__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.ar-gallery__item {
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    display: block;
}

.ar-gallery__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ar-gallery__item:hover .ar-gallery__img {
    transform: scale(1.08);
}

/* Article navigation */
.ar-nav {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 2px solid rgba(1, 71, 192, 0.15);
}

.ar-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--r26-font);
    font-size: 16px;
    font-weight: 600;
    color: var(--r26-blue);
    text-decoration: none;
    padding: 12px 20px 12px 16px;
    background: #fff;
    border-radius: 100px;
    transition: background-color 0.2s, transform 0.2s;
}

.ar-back:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateX(-4px);
}

.ar-back svg {
    flex-shrink: 0;
}

/* Article responsive */
@media screen and (max-width: 720px) {
    .ar-hero-wrap {
        padding: 0 20px;
    }

    .ar-hero {
        border-radius: 0 0 20px 20px;
    }

    .ar-container {
        padding: 0 20px;
    }

    .ar-content {
        padding: 32px 24px;
        margin-top: -40px;
        border-radius: 20px;
    }

    .ar-content--no-hero {
        margin-top: 80px;
    }

    .ar-header {
        padding: 0 0 24px;
    }

    .ar-lead {
        font-size: 18px;
        margin-bottom: 24px;
        padding-bottom: 24px;
    }

    .ar-body {
        font-size: 16px;
    }

    .ar-gallery__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
}
