/* ML BABY — main stylesheet
   Look follows the live mlbaby.sk (dark header over a full-height hero, uppercase Poppins
   navigation and headings with a short rule underneath, dark-overlay product tiles, light
   4-column footer), re-built without Canvas/Bootstrap and tuned to the gold of the logo. */

:root {
    --primary: #b48a3c;          /* gold from the logo */
    --primary-dark: #8f6a28;
    --primary-light: #efe3cb;
    --accent: #f2a65a;           /* warm accent from the old site, for small highlights only */
    --ink: #2f2a26;              /* dark header / overlays */
    --heading: #333;
    --text: #555;
    --muted: #888;
    --line: #e6e1d9;
    --tint: #f8f5f0;             /* alternating section background (old #f9f9f9, warmed up) */
    --footer: #f0ece6;
    --footer-bottom: #e5dfd6;
    --white: #fff;

    --fb: #205cc0;
    --ig: #ec1e62;
    --maps: #2cc51c;

    --font-heading: 'Poppins', system-ui, sans-serif;
    --font-body: 'Lato', system-ui, sans-serif;

    --radius: 6px;
    --radius-lg: 14px;
    --shadow-soft: 0 4px 14px rgba(47, 42, 38, 0.06);
    --shadow-medium: 0 10px 30px rgba(47, 42, 38, 0.12);
    --transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    --header-h: 96px;
    --container: 1200px;
}

/* Reset -------------------------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 72px; /* = scrolled header height */
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--text);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    /* Sticky footer: main grows to fill the viewport so short pages keep the footer at the bottom */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
}

.main {
    flex: 1 0 auto;
}

.footer {
    flex-shrink: 0;
}

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

a {
    color: var(--primary-dark);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--heading);
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 0.6em;
}

p {
    margin: 0 0 1em;
}

button {
    font: inherit;
}

::selection {
    background: var(--primary);
    color: var(--white);
}

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

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 2000;
    padding: 10px 16px;
    background: var(--ink);
    color: var(--white);
    border-radius: var(--radius);
}

.skip-link:focus {
    top: 16px;
    color: var(--white);
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.container--narrow {
    max-width: 820px;
}

/* Buttons -------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--primary);
    color: var(--white);
    border: 2px solid var(--primary);
    border-radius: 3px;
    font-family: var(--font-heading);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    line-height: 1.5;
    cursor: pointer;
    transition: var(--transition);
}

.btn:hover {
    background: #444;
    border-color: #444;
    color: var(--white);
}

.btn--light {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.85);
    color: var(--white);
}

.btn--light:hover {
    background: var(--white);
    border-color: var(--white);
    color: var(--ink);
}

.btn--dark {
    background: var(--ink);
    border-color: var(--ink);
}

.btn--dark:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.btn--outline {
    background: transparent;
    border-color: var(--heading);
    color: var(--heading);
}

.btn--outline:hover {
    background: var(--heading);
    border-color: var(--heading);
    color: var(--white);
}

.btn--sm {
    padding: 8px 18px;
    font-size: 0.75rem;
}

/* Header + navigation ------------------------------------------------------------- */

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--ink);
    transition: background 0.35s ease, box-shadow 0.35s ease;
}

.header--overlay {
    position: fixed;
    left: 0;
    right: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
}

.header--overlay.is-scrolled,
.header.is-scrolled {
    background: rgba(47, 42, 38, 0.97);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}

.header__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: var(--header-h);
    transition: height 0.35s ease;
}

.header.is-scrolled .header__container {
    height: 72px;
}

.header__logo img {
    height: 62px;
    width: auto;
    transition: height 0.35s ease;
}

.header.is-scrolled .header__logo img {
    height: 46px;
}

.nav__list {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav__item {
    position: relative;
    display: flex;
    align-items: center;
}

.nav__link {
    display: block;
    padding: 10px 13px;
    font-family: var(--font-heading);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #f7f7f7;
    position: relative;
}

.nav__link::after {
    content: '';
    position: absolute;
    left: 13px;
    right: 13px;
    bottom: 4px;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.nav__link:hover,
.nav__link:focus-visible {
    color: var(--white);
}

.nav__link:hover::after,
.nav__link:focus-visible::after {
    transform: scaleX(1);
}

/* Last link's text ends exactly on the content edge (logo starts on the other one) */
.nav__item:last-child .nav__link {
    padding-right: 0;
}

.nav__item:last-child .nav__link::after {
    right: 0;
}

.nav__sub-toggle {
    display: none;
}

.nav__sub {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 230px;
    list-style: none;
    margin: 0;
    padding: 8px 0;
    background: var(--white);
    border: 1px solid #eee;
    border-top: 2px solid var(--primary);
    box-shadow: 0 13px 42px 11px rgba(0, 0, 0, 0.06);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.nav__item--dropdown:hover .nav__sub,
.nav__item--dropdown:focus-within .nav__sub {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav__sub-link {
    display: block;
    padding: 9px 20px;
    font-family: var(--font-heading);
    font-size: 0.8125rem;
    font-weight: 500;
    color: #444;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.nav__sub-link:hover,
.nav__sub-link:focus-visible {
    color: var(--primary-dark);
    padding-left: 26px;
}

.nav__mobile-header {
    display: none;
}

.header__toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
}

.header__toggle span {
    display: block;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
}

.nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 1090;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 1180px) {
    .header__toggle {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 1100;
        width: min(340px, 86vw);
        background: var(--white);
        overflow-y: auto;
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 0.35s cubic-bezier(0.165, 0.84, 0.44, 1), visibility 0.35s;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
    }

    .nav.active {
        transform: translateX(0);
        visibility: visible;
    }

    .nav__mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        border-bottom: 1px solid var(--line);
    }

    .nav__mobile-logo {
        height: 44px;
        width: auto;
    }

    .nav__close {
        width: 40px;
        height: 40px;
        background: none;
        border: none;
        font-size: 2rem;
        line-height: 1;
        color: var(--heading);
        cursor: pointer;
    }

    .nav__list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 0;
    }

    .nav__item {
        flex-wrap: wrap;
        border-bottom: 1px solid #f2efea;
    }

    .nav__link {
        flex: 1;
        padding: 14px 24px;
        color: var(--heading);
    }

    .nav__link::after {
        display: none;
    }

    .nav__link:hover {
        color: var(--primary-dark);
    }

    .nav__sub-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 52px;
        align-self: stretch;
        background: none;
        border: none;
        border-left: 1px solid #f2efea;
        color: var(--heading);
        cursor: pointer;
    }

    .nav__sub-toggle svg {
        transition: transform 0.25s ease;
    }

    .nav__item.is-open .nav__sub-toggle svg {
        transform: rotate(180deg);
    }

    .nav__sub {
        position: static;
        flex-basis: 100%;
        min-width: 0;
        display: none;
        padding: 0 0 8px;
        border: none;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: var(--tint);
    }

    .nav__item.is-open .nav__sub {
        display: block;
    }

    .nav__sub-link {
        padding: 10px 36px;
    }
}

/* Layout ---------------------------------------------------------------------------- */

.main--overlay {
    padding-top: 0;
}

.section {
    padding: 96px 0;
}

.section--tight {
    padding: 64px 0 88px;
}

.section--tinted {
    background: var(--tint);
}

.section__intro {
    max-width: 720px;
    margin: 0 auto 48px;
    text-align: center;
}

.section__intro--row {
    max-width: none;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    text-align: left;
}

.section__intro--row .heading {
    margin-bottom: 0;
}

.section__lead {
    font-size: 1.125rem;
    color: var(--muted);
    margin: 0;
}

.section__more {
    margin-top: 48px;
    text-align: center;
}

.section__more--spaced {
    margin-top: 80px;
}

.empty {
    text-align: center;
    color: var(--muted);
}

/* Section heading with the short rule underneath (live .heading-block) */
.heading {
    font-size: clamp(1.5rem, 1.1rem + 1.4vw, 1.9rem);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 32px;
}

.heading::after {
    content: '';
    display: block;
    width: 40px;
    margin-top: 22px;
    border-top: 2px solid var(--primary);
}

.heading--center::after {
    margin-left: auto;
    margin-right: auto;
}

.rich-text > :last-child {
    margin-bottom: 0;
}

.rich-text img {
    border-radius: var(--radius);
}

.rich-text h2,
.rich-text h3 {
    margin-top: 1.4em;
}

.rich-text ul {
    padding-left: 1.2em;
}

.rich-text li::marker {
    color: var(--primary);
}

/* Text + image split */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.split--shop {
    grid-template-columns: 5fr 7fr;
    align-items: start;
}

.split__media {
    margin: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
}

.split__media img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.split__media-stack {
    display: grid;
    gap: 24px;
}

@media (max-width: 900px) {
    .split,
    .split--shop {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* Hero ------------------------------------------------------------------------------- */

.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--white);
    text-align: center;
    background: var(--ink);
}

.hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: hero-zoom 18s ease-out both;
}

/* Softer replacement for the old 200px inset black vignette */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(ellipse at center, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.55) 100%),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.35));
}

.hero__content {
    position: relative;
    z-index: 2;
    padding-top: var(--header-h);
    animation: fade-up 1s ease 0.2s both;
}

.hero__logo {
    width: min(360px, 70vw);
    height: auto;
    margin: 0 auto 8px;
    filter: drop-shadow(0 2px 14px rgba(0, 0, 0, 0.35)) brightness(1.15);
}

.hero__title {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.hero__tagline {
    font-family: var(--font-heading);
    font-size: clamp(1.1rem, 0.9rem + 1vw, 1.6rem);
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
    margin-bottom: 36px;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

.hero__scroll {
    position: absolute;
    z-index: 2;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.85);
    animation: bob 2.2s ease-in-out infinite;
}

.hero__scroll:hover {
    color: var(--white);
}

@keyframes hero-zoom {
    from { transform: scale(1.08); }
    to { transform: scale(1); }
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: none; }
}

@keyframes bob {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 8px); }
}

/* Sub-page header band */
.page-hero {
    position: relative;
    padding: 72px 0 56px;
    background: var(--ink);
    color: var(--white);
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(47, 42, 38, 0.78), rgba(47, 42, 38, 0.88)), var(--page-hero-img, none);
    background-size: cover;
    background-position: center;
}

.page-hero .container {
    position: relative;
}

.page-hero__title {
    color: var(--white);
    font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0;
}

.page-hero__title::after {
    content: '';
    display: block;
    width: 40px;
    margin-top: 20px;
    border-top: 2px solid var(--primary);
}

.page-hero__meta {
    display: block;
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.75);
}

.breadcrumb a:hover {
    color: var(--primary-light);
}

/* Služby — feature cards ------------------------------------------------------------- */

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

.feature {
    height: 100%;
    padding: 40px 28px 32px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    text-align: center;
    transition: var(--transition);
}

.features > .admin-editable,
.tiles > .admin-editable,
.cards > .admin-editable,
.carousel > .admin-editable {
    height: 100%;
}

.feature:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-medium);
}

.feature__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    margin: 0 auto 24px;
}

.feature__icon img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.feature__title {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.feature__text {
    font-size: 0.975rem;
    margin: 0;
}

@media (max-width: 1024px) {
    .features {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .features {
        grid-template-columns: 1fr;
    }
}

/* Predajňa — social icons + map ------------------------------------------------------- */

.social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin: 28px 0 0;
    padding: 0;
}

.social__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid #ccc;
    border-radius: 3px;
    color: #666;
    transition: var(--transition);
}

a.social__link:hover {
    color: var(--white);
    border-color: transparent;
    background: var(--primary);
}

a.social__link--facebook:hover { background: var(--fb); }
a.social__link--instagram:hover { background: var(--ig); }
a.social__link--map:hover { background: var(--maps); }

.map {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    background: var(--tint);
}

.map iframe {
    display: block;
    width: 100%;
    height: 280px;
    border: 0;
}

/* Produkty — category tiles ----------------------------------------------------------- */

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

.tile {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 250px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    isolation: isolate;
    box-shadow: var(--shadow-soft);
}

.tile__img {
    position: absolute;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: contrast(1.1) brightness(0.72);
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), filter 0.4s ease;
}

.tile__title {
    padding: 0 16px;
    color: var(--white);
    font-family: var(--font-heading);
    font-size: clamp(1.25rem, 1rem + 0.8vw, 1.6rem);
    font-weight: 600;
    letter-spacing: 1px;
    text-align: center;
    text-shadow: 0 0 25px rgba(0, 0, 0, 0.8);
}

.tile__title::after {
    content: '';
    display: block;
    width: 0;
    margin: 10px auto 0;
    border-top: 2px solid var(--primary-light);
    transition: width 0.35s ease;
}

.tile:hover .tile__img,
.tile:focus-visible .tile__img {
    transform: scale(1.06);
    filter: contrast(1.1) brightness(0.6);
}

.tile:hover .tile__title::after,
.tile:focus-visible .tile__title::after {
    width: 40px;
}

/* 7 categories: the last one spans the remaining columns instead of sitting alone */
.tiles > :last-child:nth-child(4n + 3) {
    grid-column: span 2;
}

@media (max-width: 1024px) {
    .tiles {
        grid-template-columns: repeat(3, 1fr);
    }

    .tiles > :last-child:nth-child(4n + 3) {
        grid-column: auto;
    }
}

@media (max-width: 760px) {
    .tiles {
        grid-template-columns: repeat(2, 1fr);
    }

    .tile {
        height: 190px;
    }

    .tiles > :last-child:nth-child(odd) {
        grid-column: span 2;
    }
}

@media (max-width: 420px) {
    .tiles {
        grid-template-columns: 1fr;
    }

    .tiles > :last-child:nth-child(odd) {
        grid-column: auto;
    }
}

/* Blog — cards + carousel ------------------------------------------------------------- */

.carousel {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 3 * 24px) / 4);
    column-gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 8px 4px 20px;
    margin: -8px -4px 0;
}

.carousel::-webkit-scrollbar {
    display: none;
}

.carousel > * {
    scroll-snap-align: start;
}

@media (max-width: 1024px) {
    .carousel {
        grid-auto-columns: calc((100% - 24px) / 2);
    }
}

@media (max-width: 600px) {
    .carousel {
        grid-auto-columns: 85%;
    }
}

.carousel__controls {
    display: flex;
    gap: 8px;
}

.carousel__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--heading);
    cursor: pointer;
    transition: var(--transition);
}

.carousel__btn:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--white);
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

@media (max-width: 960px) {
    .cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .cards {
        grid-template-columns: 1fr;
    }
}

.post-card {
    height: 100%;
}

.post-card__link {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    color: inherit;
    transition: var(--transition);
}

/* Underline that grows on hover (live .item-in:before) */
.post-card__link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 3px;
    background: var(--primary);
    transition: width 0.4s ease;
}

.post-card__link:hover {
    color: inherit;
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.post-card__link:hover::after {
    width: 100%;
}

.post-card__image {
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.post-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.post-card__link:hover .post-card__image img {
    transform: scale(1.05);
}

.post-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 28px 26px 26px;
}

.post-card__date {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 6px;
}

.post-card__title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.post-card__sep {
    display: block;
    width: 35px;
    height: 3px;
    margin-bottom: 16px;
    background: #777;
}

.post-card__desc {
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card__more {
    margin-top: auto;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--primary-dark);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 56px;
}

.pagination__link {
    min-width: 44px;
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 3px;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--heading);
}

.pagination__link:hover,
.pagination__link.is-active {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--white);
}

/* Article (blog detail) */
.article__lead {
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--heading);
    margin-bottom: 32px;
}

/* Category detail + gallery cover ------------------------------------------------------ */

.category__text {
    max-width: 820px;
    font-size: 1.075rem;
}

/* Blog entry with a gallery: text on the left, gallery cover on the right */
.entry:has(.gallery-cover) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
    gap: 56px;
    align-items: start;
}

.entry:has(.gallery-cover) .entry__text {
    max-width: none;
}

/* Blog entry gallery: one cover card that opens the lightbox (as in pdelectric) */
.gallery-cover {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    text-align: center;
}

.gallery-cover__title {
    margin-bottom: 20px;
    font-size: 1.375rem;
}

@media (max-width: 900px) {
    .entry:has(.gallery-cover) {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }

    .gallery-cover {
        position: static;
        max-width: 640px;
        width: 100%;
        margin: 0 auto;
    }
}

.gallery-cover__card {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: none;
    box-shadow: var(--shadow-medium);
    cursor: pointer;
    aspect-ratio: 4 / 3;
}

.gallery-cover__card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-cover__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    opacity: 0;
    transition: var(--transition);
}

.gallery-cover__card:hover img,
.gallery-cover__card:focus-visible img {
    transform: scale(1.04);
}

.gallery-cover__card:hover .gallery-cover__overlay,
.gallery-cover__card:focus-visible .gallery-cover__overlay {
    opacity: 1;
}

/* No hover on touch screens: keep the button visible at the bottom */
@media (hover: none) {
    .gallery-cover__overlay {
        opacity: 1;
        align-items: flex-end;
    }
}

.btn--gallery {
    flex-direction: column;
    gap: 2px;
    padding: 12px 30px;
    box-shadow: 0 10px 30px rgba(180, 138, 60, 0.35);
    pointer-events: none; /* clicks go to the card */
}

.btn__count {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-transform: none;
    opacity: 0.9;
}

/* Galleries (albums) */
.album {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

.album:hover {
    box-shadow: var(--shadow-medium);
}

.album__image {
    position: relative;
    display: block;
    padding: 0;
    border: none;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--tint);
    cursor: zoom-in;
}

.album__image[disabled] {
    cursor: default;
}

.album__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.album:hover .album__image img {
    transform: scale(1.05);
}

.album__count {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(47, 42, 38, 0.8);
    color: var(--white);
    font-size: 0.8rem;
}

.album__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    flex: 1;
    padding: 22px 24px 24px;
}

.album__title {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0;
}

.album__body .btn {
    margin-top: auto;
}

/* Lightbox ---------------------------------------------------------------------------- */

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

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox__overlay {
    position: absolute;
    inset: 0;
    background: rgba(20, 17, 15, 0.94);
}

.lightbox__container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 56px 72px 16px;
}

.lightbox__content {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.lightbox__image {
    max-width: 100%;
    max-height: calc(100vh - 220px);
    object-fit: contain;
    border-radius: 4px;
    transition: opacity 0.2s ease;
}

.lightbox--single .lightbox__image {
    max-height: calc(100vh - 140px);
}

.lightbox__caption {
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    text-align: center;
}

.lightbox__counter {
    position: absolute;
    top: 18px;
    left: 24px;
    color: rgba(255, 255, 255, 0.6);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    transition: background 0.2s ease;
}

.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover {
    background: var(--primary);
}

.lightbox__close {
    top: 12px;
    right: 16px;
    width: 44px;
    height: 44px;
    font-size: 1.8rem;
}

.lightbox__prev,
.lightbox__next {
    top: 50%;
    width: 50px;
    height: 50px;
    margin-top: -60px;
    font-size: 2.2rem;
    line-height: 1;
}

.lightbox__prev {
    left: 14px;
}

.lightbox__next {
    right: 14px;
}

.lightbox--single .lightbox__prev,
.lightbox--single .lightbox__next {
    display: none;
}

.lightbox__thumbnails {
    display: flex;
    gap: 8px;
    max-width: 100%;
    margin-top: 16px;
    padding: 4px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.lightbox__thumb {
    flex: 0 0 auto;
    width: 76px;
    height: 54px;
    object-fit: cover;
    border-radius: 3px;
    opacity: 0.45;
    cursor: pointer;
    transition: opacity 0.2s ease, outline-color 0.2s ease;
    outline: 2px solid transparent;
}

.lightbox__thumb:hover,
.lightbox__thumb.active {
    opacity: 1;
}

.lightbox__thumb.active {
    outline-color: var(--primary);
}

@media (max-width: 600px) {
    .lightbox__container {
        padding: 56px 8px 12px;
    }

    .lightbox__prev,
    .lightbox__next {
        top: auto;
        bottom: 84px;
        margin-top: 0;
        width: 42px;
        height: 42px;
    }
}

/* Footer ------------------------------------------------------------------------------- */

.footer {
    position: relative;
    background: var(--footer);
    border-top: 3px solid var(--primary);
    color: #666;
    font-size: 0.95rem;
}

.footer__grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
    gap: 40px;
    padding: 72px 0 56px;
}

.footer__logo img {
    width: 180px;
    height: auto;
    margin-bottom: 16px;
}

.footer__about {
    max-width: 280px;
    margin: 0;
}

.footer__title {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 22px;
}

.footer__links {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Every footer list (social, contact, hours) uses the same item box, link or plain text alike. */
.footer__links li {
    margin: 0;
    padding: 5px 0;
    line-height: 1.6;
}

.footer__link {
    display: inline;
    margin: 0;
    padding: 0;
    color: #555;
}

.footer__link:hover {
    color: var(--primary-dark);
}

.footer__bottom {
    background: var(--footer-bottom);
    padding: 22px 0;
    font-size: 0.85rem;
}

.footer__bottom-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.footer__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

body.admin-mode .footer__nav .admin-add {
    margin-top: 0;
}

.footer__nav a {
    color: #666;
}

.footer__nav a:hover {
    color: var(--primary-dark);
}

@media (max-width: 960px) {
    .footer__grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    .footer__grid {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 56px 0 40px;
    }
}

/* 404 ----------------------------------------------------------------------------------- */

.error-page {
    max-width: 640px;
    text-align: center;
}

.error-page__code {
    font-family: var(--font-heading);
    font-size: clamp(5rem, 3rem + 10vw, 9rem);
    font-weight: 700;
    line-height: 1;
    color: var(--primary-light);
}

.error-page__title {
    font-size: 1.6rem;
    margin-top: 16px;
}

.error-page__desc {
    color: var(--muted);
    margin-bottom: 32px;
}

/* Reveal on scroll (js/main.js adds .js-reveal only when motion is allowed) ------------- */

.js-reveal .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.js-reveal .reveal.is-visible {
    opacity: 1;
    transform: none;
}

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

@media (max-width: 600px) {
    :root {
        --header-h: 76px;
    }

    body {
        font-size: 1rem;
    }

    .section {
        padding: 72px 0;
    }

    .container {
        padding: 0 16px;
    }

    .header__logo img {
        height: 48px;
    }

    .section__intro--row {
        align-items: center;
    }
}

/* Admin mode — toggle + edit overlay ------------------------------------------------ */

.admin-toggle {
    position: absolute;
    left: 20px;
    bottom: 20px;
    z-index: 500;
    display: inline-flex;
    align-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: var(--ink);
    color: rgba(255, 255, 255, 0.75);
    border: none;
    border-radius: 999px;
    box-shadow: var(--shadow-medium);
    cursor: pointer;
    overflow: hidden;
    transition: width 0.35s cubic-bezier(0.165, 0.84, 0.44, 1), color 0.3s ease, background 0.3s ease;
}

.admin-toggle__icon {
    flex: 0 0 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-toggle__label {
    white-space: nowrap;
    padding-right: 18px;
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.admin-toggle:hover,
.admin-toggle:focus-visible {
    width: 155px;
    color: var(--white);
}

.admin-toggle:hover .admin-toggle__label,
.admin-toggle:focus-visible .admin-toggle__label {
    opacity: 1;
    transition: opacity 0.2s ease 0.15s;
}

body.admin-mode .admin-toggle {
    background: var(--primary);
    color: var(--white);
}

@media (max-width: 480px) {
    .admin-toggle {
        left: 12px;
        bottom: 12px;
    }
}

/* Wrapper is invisible/no-op until admin mode is on. */
.admin-editable {
    position: relative;
}

.admin-pen {
    display: none;
}

body.admin-mode .admin-editable {
    outline: 2px dashed transparent;
    outline-offset: 4px;
    border-radius: 4px;
    transition: outline-color 0.15s ease;
}

body.admin-mode .admin-editable:hover {
    outline-color: var(--primary);
}

/* Inside the scrolling carousel the outline would be clipped too — draw it inside the card. */
body.admin-mode .carousel > .admin-editable {
    outline-offset: -2px;
    border-radius: var(--radius-lg);
}

body.admin-mode .admin-pen {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    /* Inset, not hanging outside the corner: many editables sit in overflow-clipped boxes
       (blog carousel, tiles, cards), where an outside pen gets cropped. */
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    padding: 0;
    background: var(--primary);
    color: var(--white);
    border: 2px solid var(--white);
    border-radius: 50%;
    box-shadow: var(--shadow-medium);
    cursor: pointer;
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
    transition: var(--transition);
}

body.admin-mode .admin-editable:hover .admin-pen {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

body.admin-mode .admin-pen:hover {
    background: var(--ink);
    transform: scale(1.1);
}

/* Standalone hotspot (see admin_hotspot() in includes/admin.php) — its own small hover area,
   independent of any editable content nested inside the same container. */
.admin-hotspot {
    display: none;
}

body.admin-mode .admin-hotspot {
    display: block;
    position: absolute;
    top: calc(var(--header-h) + 14px);
    right: 14px;
    width: 34px;
    height: 34px;
    z-index: 15;
}

body.admin-mode .admin-hotspot .admin-pen {
    position: static;
    width: 100%;
    height: 100%;
    opacity: 0.45;
    pointer-events: auto;
    transform: none;
}

body.admin-mode .admin-hotspot:hover .admin-pen {
    opacity: 1;
    transform: scale(1.08);
}

/* Explicit "add new item" button under a list (see admin_listitem_add_button() in
   includes/admin.php) — a normal inline button, not an overlay, so it reads as "add" and not
   "edit". */
.admin-add {
    display: none;
}

body.admin-mode .admin-add {
    display: block;
    margin-top: 12px;
}

.admin-add__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: transparent;
    color: var(--primary-dark);
    border: 1px dashed var(--primary);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.admin-add__btn:hover {
    background: var(--primary);
    color: var(--white);
    border-style: solid;
}

/* Hero tagline editable: hug the text instead of spanning the whole container */
.hero__content > .admin-editable {
    display: inline-block;
}
