/* ============================================================
   TURNTABLE — Reveloni CMS theme v1.0.0
   Audiophile vinyl. A bold departure from the Classic grid:
   the hero is a spinning platter with tonearm, and the cards
   are round vinyl records (not rectangles). Warm walnut plinth,
   chrome, scheme-colored label light. Dark = dim listening room;
   light = daytime. Motion: continuously spinning platter and
   record cards, tonearm drops on hover. Obeys panel switch +
   reduced motion.
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Scheme colors injected inline by the engine. */
    --text: #2a2018;
    --text-light: #6d6055;
    --bg: #f3ece1;
    --bg-light: #e7ddcd;
    --border: #d6c8b2;

    /* Plinth / deck surfaces */
    --panel: #fbf6ee;
    --vinyl: #14131a;              /* record black, both modes */
    --vinyl-sheen: rgba(255, 255, 255, 0.12);
    --walnut-1: #5a3d28;
    --walnut-2: #6d4b30;
    --walnut-3: #432d1d;
    --chrome-hi: #f4f1ea;
    --chrome-lo: #c2bcae;
    --rail: rgba(42, 32, 24, 0.14);

    --label: var(--accent);
    --label-glow: color-mix(in srgb, var(--accent) 45%, transparent);
    --label-soft: color-mix(in srgb, var(--accent) 22%, transparent);
    --label-faint: color-mix(in srgb, var(--accent) 10%, transparent);
    --primary-soft: color-mix(in srgb, var(--primary) 12%, transparent);
}

[data-theme="dark"] {
    --text: #ece4d6;
    --text-light: #b3a692;
    --bg: #1a1410;
    --bg-light: #120d0a;
    --border: #3a2c20;

    --panel: #211a13;
    --vinyl: #0c0b10;
    --vinyl-sheen: rgba(255, 255, 255, 0.1);
    --walnut-1: #3a2718;
    --walnut-2: #46301d;
    --walnut-3: #2a1c11;
    --chrome-hi: #4a443a;
    --chrome-lo: #2a251d;
    --rail: rgba(236, 228, 214, 0.1);

    --label-glow: color-mix(in srgb, var(--accent) 60%, transparent);
    --label-soft: color-mix(in srgb, var(--accent) 30%, transparent);
    --label-faint: color-mix(in srgb, var(--accent) 14%, transparent);
    --primary-soft: color-mix(in srgb, var(--primary) 18%, transparent);
}

body {
    font-family: 'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg-light);
    transition: background 0.3s, color 0.3s;
}

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

h1, h2, h3, h4 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* ---------- Scroll animations (panel-controlled) ---------- */
.animate-on-scroll {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

body.js-ready[data-animations-enabled="true"] .animate-on-scroll {
    opacity: 0;
    transform: translateY(var(--animation-offset, 30px));
}

body.js-ready[data-animations-enabled="true"] .animate-on-scroll.animated,
.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Decorative keyframes ---------- */
@keyframes tt-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes tt-spin-card {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ---------- Dark mode toggle: spinning record ---------- */
.dark-mode-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    font-size: 0;
    color: transparent;
    background: var(--vinyl);
    border: 2px solid color-mix(in srgb, var(--accent) 40%, var(--chrome-lo));
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), 0 0 16px var(--label-faint);
    z-index: 1000;
    transition: transform 0.25s, box-shadow 0.3s, border-color 0.3s;
    overflow: hidden;
}

/* grooves + scheme label */
.dark-mode-toggle::before {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background:
        radial-gradient(circle,
            var(--accent) 0 18%, var(--vinyl) 18% 22%,
            transparent 22% 40%, var(--vinyl-sheen) 40% 42%,
            transparent 42% 62%, var(--vinyl-sheen) 62% 64%,
            transparent 64% 96%, color-mix(in srgb, var(--accent) 50%, transparent) 96% 100%);
    z-index: 1;
}

/* spindle */
.dark-mode-toggle::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 5px;
    height: 5px;
    margin: -2.5px 0 0 -2.5px;
    border-radius: 50%;
    background: var(--chrome-hi);
    z-index: 2;
}

[data-theme="dark"] .dark-mode-toggle { border-color: var(--accent); }

body[data-animations-enabled="true"][data-theme="dark"] .dark-mode-toggle::before {
    animation: tt-spin 3.5s linear infinite;
}

.dark-mode-toggle:hover {
    transform: scale(1.07);
    border-color: var(--accent);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4), 0 0 24px var(--label-glow);
}

/* ---------- Header: deck top edge / walnut plinth ---------- */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background:
        repeating-linear-gradient(92deg,
            transparent 0 16px, rgba(0,0,0,0.06) 16px 17px,
            transparent 17px 34px, rgba(255,255,255,0.03) 34px 36px),
        linear-gradient(180deg, var(--walnut-2), var(--walnut-1) 60%, var(--walnut-3));
    box-shadow: 0 3px 14px rgba(42, 32, 24, 0.32);
}

header::after {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(180deg, var(--chrome-hi), var(--chrome-lo));
    box-shadow: 0 0 8px var(--label-faint);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.1rem 0;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-container img {
    height: 80px;
    width: auto;
}

.logo-container a {
    transition: opacity 0.3s;
}

.logo-container a:hover {
    opacity: 0.85;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #f4ecd9;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
    padding: 0.8rem 0;
    font-size: 0.88rem;
}

.breadcrumbs a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.breadcrumbs span {
    color: var(--text-light);
    margin: 0 0.5rem;
}

/* ---------- Navigation ---------- */
nav ul {
    display: flex;
    list-style: none;
    gap: 1.7rem;
    align-items: center;
}

nav a {
    color: #efe6d2;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    padding: 0.35rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.25s, border-color 0.25s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

nav a:hover {
    color: #ffffff;
}

nav a.active {
    color: #ffffff;
    border-bottom-color: var(--accent);
}

/* ---------- Hamburger & dropdown ---------- */
.hamburger-menu {
    position: relative;
}

.hamburger-btn {
    background: linear-gradient(180deg, var(--chrome-hi), var(--chrome-lo));
    border: 1px solid var(--rail);
    border-radius: 6px;
    font-size: 1.35rem;
    cursor: pointer;
    color: var(--text);
    padding: 0.45rem 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(42,32,24,0.3), inset 0 1px 0 rgba(255,255,255,0.5);
    transition: box-shadow 0.25s;
}

.hamburger-btn:hover {
    box-shadow: 0 2px 6px rgba(42,32,24,0.35), 0 0 12px var(--label-soft);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--panel);
    border: 1px solid var(--border);
    border-top: 3px solid var(--accent);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(42, 32, 24, 0.3);
    min-width: 250px;
    max-height: 80vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    margin-top: 0.5rem;
    z-index: 1000;
}

.dropdown-menu.active {
    display: block;
}

.dropdown-menu ul {
    display: block;
    padding: 0.5rem 0;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.dropdown-menu a:hover {
    background: var(--bg-light);
    color: var(--primary);
    border-left-color: var(--accent);
}

.dropdown-submenu {
    padding-left: 2rem;
    font-size: 0.9rem;
}

.dropdown-submenu a {
    padding: 0.5rem 1.5rem;
}

.dropdown-subsubmenu {
    padding-left: 3rem;
    font-size: 0.85rem;
}

.dropdown-subsubmenu a {
    padding: 0.4rem 1.5rem;
}

/* ---------- Hero: spinning platter with tonearm ---------- */
.hero {
    position: relative;
    background:
        radial-gradient(ellipse at 50% 0%, var(--label-faint), transparent 55%),
        linear-gradient(180deg,
            color-mix(in srgb, var(--walnut-1) 20%, var(--bg)),
            var(--bg));
    color: var(--text);
    padding: 4rem 0 5rem;
    text-align: center;
    overflow: hidden;
}

/* the platter (a big spinning record behind the title) */
.hero::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 340px;
    height: 340px;
    margin: -170px 0 0 -170px;
    border-radius: 50%;
    background:
        radial-gradient(circle,
            var(--accent) 0 11%, var(--vinyl) 11% 15%,
            transparent 15% 26%, var(--vinyl-sheen) 26% 27%,
            transparent 27% 40%, var(--vinyl-sheen) 40% 41%,
            transparent 41% 54%, var(--vinyl-sheen) 54% 55%,
            transparent 55% 68%, var(--vinyl-sheen) 68% 69%,
            transparent 69% 82%, var(--vinyl-sheen) 82% 83%,
            transparent 83%),
        var(--vinyl);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.4), 0 0 40px var(--label-faint);
    opacity: 0.55;
    z-index: 0;
}

body[data-animations-enabled="true"] .hero::before {
    animation: tt-spin 14s linear infinite;
}

/* tonearm reaching onto the platter */
.hero::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 160px;
    height: 6px;
    margin: -140px 0 0 -10px;
    transform-origin: left center;
    transform: rotate(28deg);
    background: linear-gradient(180deg, var(--chrome-hi), var(--chrome-lo));
    border-radius: 3px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    z-index: 1;
    pointer-events: none;
}

.hero h1 {
    position: relative;
    z-index: 2;
    font-size: 3.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero p {
    position: relative;
    z-index: 2;
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-light);
}

/* ---------- Content panel ---------- */
.content-section {
    background: var(--panel);
    margin: 2rem auto;
    padding: 3rem;
    border: 1px solid var(--rail);
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(42, 32, 24, 0.1);
}

.content-section div {
    color: inherit;
}

.content-section ul,
.content-section ol {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.content-section ul {
    list-style-type: disc;
}

.content-section ol {
    list-style-type: decimal;
}

.content-section li {
    margin: 0.35rem 0;
    line-height: 1.65;
}

/* ============================================================
   PAGE CARDS AS ROUND VINYL RECORDS
   The engine markup is .page-card > (.page-card-image|placeholder)
   + .page-card-content. We make the whole card circular, turn the
   image into the round record with a centre label, and lay the
   text below it.
   ============================================================ */
.onepage-sections {
    margin: 4rem auto;
}

.subpages-sections {
    margin: 2rem auto 4rem;
}

.page-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem 2rem;
    margin-top: 3rem;
    justify-items: center;
}

.page-card {
    position: relative;
    background: transparent;
    border: none;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 320px;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.page-card:hover {
    transform: translateY(-6px);
}

/* The record itself: a perfect circle with grooves + centre label */
.page-card-image,
.page-card-placeholder {
    width: 250px;
    height: 250px;
    max-width: 80%;
    aspect-ratio: 1;
    border-radius: 50%;
    object-fit: cover;
    background:
        radial-gradient(circle,
            transparent 0 26%,
            var(--vinyl-sheen) 26% 27%, transparent 27% 40%,
            var(--vinyl-sheen) 40% 41%, transparent 41% 54%,
            var(--vinyl-sheen) 54% 55%, transparent 55% 68%,
            var(--vinyl-sheen) 68% 69%, transparent 69% 82%,
            var(--vinyl-sheen) 82% 83%, transparent 83% 96%,
            color-mix(in srgb, var(--accent) 45%, transparent) 96% 100%),
        var(--vinyl);
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.35),
        0 0 0 1px var(--rail),
        0 0 26px var(--label-faint);
    position: relative;
    overflow: hidden;
}

/* centre label punched into the record */
.page-card-image::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 40%;
    height: 40%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle,
        var(--accent) 0 70%, color-mix(in srgb, var(--accent) 60%, black) 100%);
    box-shadow: inset 0 0 0 2px rgba(255,255,255,0.2);
}

/* actual uploaded image clipped to the centre label disc */
.page-card picture {
    display: block;
    position: absolute;
    left: 50%;
    top: 50%;
    width: 40%;
    height: 40%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    overflow: hidden;
    z-index: 1;
}

.page-card picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* spindle hole */
.page-card-image::before,
.page-card-placeholder::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 9px;
    height: 9px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: var(--bg-light);
    box-shadow: inset 0 0 0 1px var(--rail);
    z-index: 3;
}

/* placeholder centre label (no uploaded image): scheme disc + variants */
.page-card-placeholder::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 40%;
    height: 40%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle,
        var(--accent) 0 70%, color-mix(in srgb, var(--accent) 60%, black) 100%);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.2);
    z-index: 2;
}

/* alternate label tints across the grid for variety */
.page-card:nth-child(2n) .page-card-placeholder::before { z-index: 3; }
.page-card:nth-child(2n) .page-card-placeholder::after {
    background: radial-gradient(circle,
        var(--primary) 0 70%, color-mix(in srgb, var(--primary) 60%, black) 100%);
}
.page-card:nth-child(3n) .page-card-placeholder::before { z-index: 3; }
.page-card:nth-child(3n) .page-card-placeholder::after {
    background: radial-gradient(circle,
        var(--secondary) 0 70%, color-mix(in srgb, var(--secondary) 60%, black) 100%);
}

/* hover: label glows */
.page-card:hover .page-card-placeholder::before { z-index: 3; }
.page-card:hover .page-card-placeholder::after {
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.3), 0 0 18px var(--label-glow);
}
.page-card:nth-child(3n):hover .page-card-placeholder::after {
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.3), 0 0 18px var(--label-glow);
}

/* records spin slowly while animations are on */
body[data-animations-enabled="true"] .page-card-image,
body[data-animations-enabled="true"] .page-card-placeholder {
    animation: tt-spin-card 16s linear infinite;
}

.page-card:hover .page-card-image,
.page-card:hover .page-card-placeholder {
    animation-duration: 5s;
}

.page-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
}

.page-card-placeholder span { display: none; }

.page-card-content {
    padding: 1.5rem 1rem 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
    margin-bottom: 0.7rem;
}

.page-card-excerpt {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.2rem;
    max-width: 280px;
}

.page-card-link {
    display: inline-block;
    color: white;
    background: var(--primary);
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1.4rem;
    border-radius: 30px;
    transition: background 0.3s, box-shadow 0.3s;
}

.page-card-link:hover {
    background: var(--secondary);
    box-shadow: 0 0 16px var(--label-soft);
}

.page-card-link::after {
    content: ' ♪';
}

/* ---------- Gallery ---------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 2rem auto;
    justify-content: center;
    max-width: 100%;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--rail);
    cursor: pointer;
    aspect-ratio: 4/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.35s, filter 0.35s;
}

.gallery-item:hover img {
    transform: scale(1.05);
    filter: brightness(1.05);
}

/* ---------- Lightbox ---------- */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: rgba(10, 8, 6, 0.94);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    cursor: pointer;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 80%;
    border-radius: 10px;
    box-shadow: 0 0 46px var(--label-faint);
    cursor: default;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
}

.lightbox-counter {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.95rem;
    margin-top: 1rem;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    font-size: 2rem;
    padding: 1rem;
    cursor: pointer;
    border-radius: 50%;
    z-index: 2001;
    transition: background 0.25s, box-shadow 0.25s;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 16px var(--label-soft);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* ---------- CTA: play button ---------- */
.cta-button {
    display: inline-block;
    padding: 1rem 2.8rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 40px;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
    font-size: 1.08rem;
    margin: 2rem 0;
    transition: transform 0.25s, box-shadow 0.3s, background 0.3s;
    box-shadow: 0 4px 14px var(--primary-soft);
}

.cta-button::before {
    content: '♪  ';
}

.cta-button:hover {
    transform: translateY(-2px);
    background: var(--secondary);
    box-shadow: 0 8px 22px var(--label-soft), 0 0 18px var(--label-faint);
}

/* ---------- Contact form ---------- */
.contact-form {
    background: var(--bg-light);
    border: 1px solid var(--rail);
    padding: 2rem;
    border-radius: 14px;
    margin: 2rem 0;
}

.contact-form h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

/* ---------- Testimonials ---------- */
.testimonials-section {
    background: var(--bg-light);
    border: 1px solid var(--rail);
    padding: 3rem 0;
    margin: 2rem 0;
    border-radius: 14px;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.testimonial-card {
    background: var(--panel);
    padding: 2rem;
    border: 1px solid var(--rail);
    border-left: 3px solid var(--accent);
    border-radius: 14px;
    box-shadow: 0 3px 10px rgba(42, 32, 24, 0.1);
}

.testimonial-rating {
    color: var(--accent);
    font-size: 1.4rem;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.testimonial-author {
    font-weight: 700;
    color: var(--primary);
}

/* ---------- Price tag ---------- */
.price-tag {
    display: inline-block;
    background: var(--vinyl);
    color: var(--accent);
    border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
    padding: 0.55rem 1.6rem;
    border-radius: 30px;
    font-size: 1.4rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    margin: 1rem 0;
    text-shadow: 0 0 12px var(--label-glow);
    box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.5), 0 0 14px var(--label-faint);
}

/* ---------- Footer: walnut base ---------- */
footer {
    background-color: var(--footer-bg, var(--walnut-3));
    background-image:
        repeating-linear-gradient(92deg,
            transparent 0 16px, rgba(0,0,0,0.14) 16px 17px,
            transparent 17px 34px, rgba(255,255,255,0.03) 34px 36px);
    color: #f0e8d6;
    padding: 2rem 0 0.75rem;
    margin-top: 3rem;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent) 50%, transparent);
    box-shadow: 0 0 10px var(--label-soft);
    opacity: 0.8;
}

[data-theme="dark"] footer {
    background-color: var(--footer-bg, #160f09);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-section h3 {
    color: var(--accent);
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.footer-section p {
    margin: 0.5rem 0;
    opacity: 0.9;
}

.footer-menu {
    list-style: none;
}

.footer-menu li {
    margin: 0.5rem 0;
}

.footer-menu a {
    color: #f0e8d6;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-menu a:hover {
    color: var(--accent);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    background: var(--primary);
    border-radius: 30px;
    transition: background 0.3s, box-shadow 0.3s;
}

.social-links a:hover {
    background: var(--secondary);
    box-shadow: 0 0 14px var(--label-soft);
}

.copyright {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.7;
    font-size: 0.9rem;
}

/* ---------- Admin panel ---------- */
.admin-panel {
    background: var(--panel);
    margin: 2rem auto;
    padding: 2rem;
    border: 1px solid var(--rail);
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(42, 32, 24, 0.08);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border);
    flex-wrap: wrap;
}

.tab {
    padding: 1rem 2rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 600;
    color: var(--text-light);
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--accent);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ---------- Gallery admin ---------- */
.gallery-admin {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.gallery-admin-item {
    position: relative;
    aspect-ratio: 1;
    border: 2px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    cursor: move;
}

.gallery-admin-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-admin-item .delete-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-admin-item.dragging {
    opacity: 0.5;
}

/* ---------- Forms ---------- */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: var(--bg);
    color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

textarea {
    min-height: 200px;
    resize: vertical;
}

.btn {
    padding: 0.75rem 2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.3s, box-shadow 0.3s;
}

.btn:hover {
    background: var(--secondary);
    box-shadow: 0 0 14px var(--label-soft);
}

.btn-danger {
    background: #ef4444;
}

.btn-danger:hover {
    background: #dc2626;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.3);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* ---------- Login ---------- */
.login-container {
    max-width: 400px;
    margin: 4rem auto;
    padding: 2rem;
    background: var(--panel);
    border: 1px solid var(--rail);
    border-top: 3px solid var(--accent);
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(42, 32, 24, 0.12);
}

.login-container h1 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 2rem;
}

.error {
    background: #fee;
    color: #c00;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.success {
    background: #efe;
    color: #080;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

/* ---------- Pages list ---------- */
.pages-list {
    display: grid;
    gap: 1rem;
}

.page-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 10px;
    border: 1px solid var(--border);
}

.page-info h3 {
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.page-actions {
    display: flex;
    gap: 0.5rem;
}

.theme-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.theme-option {
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
}

.theme-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(42, 32, 24, 0.12);
}

.theme-option.selected {
    border-color: var(--primary);
    background: var(--bg-light);
    box-shadow: 0 0 12px var(--label-faint);
}

.color-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin: 0 auto 0.5rem;
}

.testimonial-item {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .hero h1 {
        font-size: 2.1rem;
    }

    .hero {
        padding: 3rem 0 4rem;
    }

    .hero::before {
        width: 240px;
        height: 240px;
        margin: -120px 0 0 -120px;
        opacity: 0.4;
    }

    .hero::after {
        width: 110px;
        margin-top: -95px;
    }

    .content-section {
        padding: 1.5rem;
    }

    .tabs {
        flex-wrap: wrap;
    }

    .page-item {
        flex-direction: column;
        gap: 1rem;
    }

    .dark-mode-toggle {
        bottom: 10px;
        right: 10px;
    }

    .dropdown-menu {
        max-height: 70vh;
    }
}

/* ---------- WYSIWYG editor ---------- */
.editor-toolbar {
    background: var(--bg-light);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    padding: 0.5rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.editor-toolbar button {
    background: var(--bg);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    color: var(--text);
}

.editor-toolbar button:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
}

.editor-toolbar button strong,
.editor-toolbar button em,
.editor-toolbar button u {
    pointer-events: none;
}

.toolbar-separator {
    color: var(--text-light);
    margin: 0 0.25rem;
}

.wysiwyg-editor {
    min-height: 300px;
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0 0 10px 10px;
    background: var(--bg);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    overflow-y: auto;
    max-height: 600px;
}

.wysiwyg-editor:focus {
    outline: none;
    border-color: var(--primary);
}

.wysiwyg-editor h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 1rem 0;
}

.wysiwyg-editor h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0.75rem 0;
}

.wysiwyg-editor p {
    margin: 0.5rem 0;
}

.wysiwyg-editor ul,
.wysiwyg-editor ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.wysiwyg-editor ul {
    list-style-type: disc;
}

.wysiwyg-editor ol {
    list-style-type: decimal;
}

.wysiwyg-editor li {
    margin: 0.25rem 0;
}

.wysiwyg-editor strong {
    font-weight: 700;
}

.wysiwyg-editor em {
    font-style: italic;
}

.wysiwyg-editor u {
    text-decoration: underline;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .hero::before,
    .page-card-image,
    .page-card-placeholder,
    .dark-mode-toggle::before {
        animation: none !important;
    }

    .page-card:hover .page-card-image,
    .page-card:hover .page-card-placeholder {
        animation: none !important;
    }

    .dark-mode-toggle,
    .dark-mode-toggle:hover {
        transition: none;
        transform: none;
    }
}

/* ---------- Keyboard focus (accessibility) ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
