/* ============================================================
   BarelyThere Studio – v2 Modern Redesign
   Design system built on CSS custom properties.
   ============================================================ */

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
    --rose:        #e8a0ae;
    --rose-dark:   #c97588;
    --rose-light:  #f5d5dc;
    --rose-faint:  #fdf0f2;
    --text:        #2a2a2a;
    --muted:       #6e6e6e;
    --bg:          #faf8f6;
    --surface:     #ffffff;
    --border:      #e8e2dd;
    --shadow-sm:    0 2px 8px  rgba(0,0,0,0.07);
    --shadow:       0 6px 20px rgba(0,0,0,0.10);
    --shadow-hover: 0 16px 40px rgba(0,0,0,0.14);
    --r-sm:  4px;
    --r:    10px;
    --r-lg: 20px;
    --font-body:    'Montserrat', Arial, sans-serif;
    --font-display: 'Lavishly Yours', cursive;
    --t: 0.3s ease;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    font-family: var(--font-body);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4 {
    color: var(--text);
    text-align: center;
    font-weight: 500;
    margin-top: 0;
    line-height: 1.2;
}

p { line-height: 1.75; color: var(--muted); margin-top: 0; }

a { color: var(--text); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--rose-dark); }

.link-rose { color: var(--rose-dark); text-decoration: underline; font-weight: 600; }
.link-rose:hover { color: var(--rose); }

.success { color: #2e7d32; }
.error   { color: #c62828; }

.page-intro {
    font-size: 1.05em;
    text-align: center;
    max-width: 600px;
    margin: 8px auto 32px;
    color: var(--muted);
}

.sold-note { color: var(--muted); font-style: italic; }

img { max-width: 100%; }

/* ============================================================
   LAYOUT
   ============================================================ */
.content-wrapper {
    padding: 48px 24px 24px;
    max-width: 700px;
    margin: 0 auto;
}

/* ============================================================
   HEADER  –  sticky glass effect
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(250, 248, 246, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow var(--t);
    padding: 16px 24px 12px;
    text-align: center;
}

.site-header.scrolled {
    box-shadow: var(--shadow);
}

.header-top {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.header-top h1 {
    font-family: var(--font-display);
    font-size: clamp(2.4em, 6vw, 3.4em);
    font-weight: normal;
    margin: 0 auto;
    letter-spacing: 0.01em;
}

.lang-switch-desktop {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: -4px;
}

.lang-switch-desktop a {
    font-size: 0.78em;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--muted);
    padding: 3px 9px;
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: all var(--t);
}

.lang-switch-desktop a:hover,
.lang-switch-desktop a[style*="bold"] {
    background: var(--rose-faint);
    color: var(--rose-dark);
    border-color: var(--rose-light);
}

.lang-switch-mobile { display: none; }

.menu-toggle { display: none; }

.burger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    width: 22px;
    height: 16px;
    z-index: 5;
}

.burger span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.main-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 28px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.main-nav a {
    position: relative;
    font-size: 0.78em;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    padding-bottom: 4px;
    transition: color var(--t);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--rose-dark);
    transition: width var(--t);
}

.main-nav a:hover,
.main-nav a.active { color: var(--text); }

.main-nav a:hover::after,
.main-nav a.active::after { width: 100%; }

.search-btn {
    width: 28px;
    height: 28px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><circle cx="10" cy="10" r="7" stroke="%23888" stroke-width="2" fill="none"/><line x1="15" y1="15" x2="22" y2="22" stroke="%23888" stroke-width="2"/></svg>') no-repeat center;
    background-size: 18px;
    border: none;
    cursor: pointer;
    background-color: transparent;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    height: calc(100vh - 100px);
    min-height: 400px;
    width: 100%;
    overflow: hidden;
    z-index: 1;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    will-change: opacity;
    animation: fade 18s infinite;
}

.slide1 { background-image: url('../static/images/webp/obrazok1-1200.webp'); animation-delay: 0s; }
.slide2 { background-image: url('../static/images/webp/obrazok2-1200.webp'); animation-delay: 6s; }
.slide3 { background-image: url('../static/images/webp/obrazok3-1200.webp'); animation-delay: 12s; }

@keyframes fade {
    0%     { opacity: 0; }
    5.5%   { opacity: 1; }
    33.33% { opacity: 1; }
    38.88% { opacity: 0; }
    100%   { opacity: 0; }
}

.overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(250,248,246,0.1) 0%,
        rgba(250,248,246,0.0) 50%,
        rgba(250,248,246,0.35) 100%
    );
    z-index: 1;
}

/* ============================================================
   HOME PAGE SECTIONS
   ============================================================ */
.uvitaci-blok {
    text-align: center;
    padding: 70px 24px;
    background: var(--surface);
}

.uvitaci-blok h2 {
    font-size: clamp(1.4em, 3vw, 1.9em);
    margin-bottom: 16px;
}

.uvitaci-text {
    max-width: 580px;
    margin: 0 auto;
    font-size: 1.05em;
}

.nova-kolekce {
    text-align: center;
    padding: 70px 24px;
    background: var(--bg);
}

.nova-kolekce h2 { font-size: clamp(1.4em, 3vw, 1.9em); margin-bottom: 12px; }

.nova-kolekce-intro {
    max-width: 580px;
    margin: 0 auto 32px;
    font-size: 1.05em;
}

.nova-kolekce-link-wrap { text-decoration: none; color: inherit; }
.nova-kolekce-img-link  { display: inline-block; }

.nova-kolekce-img-wrap {
    position: relative;
    display: inline-block;
    border-radius: var(--r);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: box-shadow var(--t), transform var(--t);
}

.nova-kolekce-img-wrap:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.nova-kolekce-img-wrap img {
    display: block;
    max-width: min(100%, 560px);
    height: auto;
}

.nova-kolekce-caption {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.90);
    backdrop-filter: blur(6px);
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 0.88em;
    font-weight: 700;
    letter-spacing: 0.05em;
    white-space: nowrap;
    color: var(--text);
}

/* ============================================================
   GALLERY GRID
   ============================================================ */
.grid-obrazov {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    max-width: 1040px;
    margin: 0 auto;
    padding: 16px 20px 48px;
}

/* ============================================================
   GALLERY CARD  –  hover overlay
   ============================================================ */
.obraz-card {
    position: relative;
    border-radius: var(--r);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--t), transform var(--t);
    background: var(--surface);
}

.obraz-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.obraz-card a { display: block; text-decoration: none; color: inherit; }

.obraz-card picture,
.obraz-card picture img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

.obraz-card:hover picture img { transform: scale(1.04); }

/* Title overlay slides up on hover */
.obraz-card .card-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 36px 14px 14px;
    background: linear-gradient(transparent, rgba(0,0,0,0.48));
    color: white;
    font-size: 0.88em;
    font-weight: 600;
    transform: translateY(6px);
    opacity: 0;
    transition: opacity var(--t), transform var(--t);
}

.obraz-card:hover .card-title {
    opacity: 1;
    transform: translateY(0);
}

/* Fallback title below card */
.obraz-card h3 {
    text-align: left;
    margin: 10px 12px 12px;
    font-size: 0.88em;
    font-weight: 500;
    color: var(--text);
}

/* Badges */
.novy-stitek,
.predane-stitek {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    color: white;
    padding: 3px 10px;
    font-size: 0.70rem;
    font-weight: 700;
    border-radius: 20px;
    letter-spacing: 0.04em;
}

.novy-stitek    { background: var(--rose); }
.predane-stitek { background: #999; }

/* Scroll-in fade animation */
.card-animate {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.card-animate.visible {
    opacity: 1;
    transform: none;
}

.detail-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 18px;
    background: var(--rose);
    color: white;
    border-radius: 20px;
    font-size: 0.82em;
    font-weight: 700;
    transition: background var(--t);
}

.detail-btn:hover { background: var(--rose-dark); color: white; }

/* ============================================================
   PAINTING DETAIL
   ============================================================ */
.detail-container {
    display: flex;
    flex-wrap: wrap;
    gap: 36px;
    align-items: flex-start;
    max-width: 920px;
    margin: 0 auto;
    padding: 32px 24px 56px;
}

.gallery-detail-container { flex: 1 1 320px; display: flex; justify-content: center; }

.gallery-detail { display: flex; flex-direction: column; gap: 12px; width: 100%; }

.main-image {
    width: 100%;
    max-width: 460px;
    border-radius: var(--r);
    box-shadow: var(--shadow);
    display: block;
    transition: box-shadow var(--t);
}

.main-image:hover { box-shadow: var(--shadow-hover); }

.thumbnails { display: flex; gap: 8px; flex-wrap: wrap; }

.thumbnails img,
.thumb {
    width: 58px;
    height: 58px;
    object-fit: cover;
    cursor: pointer;
    border-radius: var(--r-sm);
    border: 2px solid transparent;
    transition: transform var(--t), border-color var(--t), box-shadow var(--t);
}

.thumbnails img:hover, .thumb:hover { transform: scale(1.08); }

.thumbnails img.active, .thumb.active {
    border-color: var(--rose-dark);
    box-shadow: 0 2px 8px rgba(201,117,136,0.30);
}

.obraz-info { flex: 1 1 280px; text-align: left; }

.obraz-info p,
.obraz-info ul,
.obraz-info h1 { text-align: left; }

.obraz-info ul {
    padding-left: 18px;
    margin: 6px 0 12px;
    font-size: 0.88em;
    line-height: 1.6;
}

.obraz-info ul li { margin-bottom: 5px; color: var(--muted); }

.action-buttons { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

.btn-primary {
    display: inline-block;
    padding: 11px 24px;
    background: var(--rose);
    color: white;
    border: none;
    border-radius: 30px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.88em;
    cursor: pointer;
    transition: background var(--t), transform 0.15s;
    letter-spacing: 0.03em;
}

.btn-primary:hover { background: var(--rose-dark); transform: translateY(-1px); }

.btn-back {
    display: inline-block;
    padding: 11px 24px;
    background: transparent;
    color: var(--muted);
    border: 1.5px solid var(--border);
    border-radius: 30px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.88em;
    cursor: pointer;
    transition: border-color var(--t), color var(--t);
}

.btn-back:hover { border-color: var(--rose); color: var(--rose-dark); }

.zajem-form { margin-top: 20px; width: 100%; }

.zajem-form form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 320px;
}

.zajem-form input,
.zajem-form textarea {
    width: 100%;
    padding: 11px 14px;
    border-radius: var(--r);
    border: 1.5px solid var(--border);
    font-family: var(--font-body);
    font-size: 0.92em;
    background: var(--surface);
    color: var(--text);
    transition: border-color var(--t), box-shadow var(--t);
}

.zajem-form input:focus,
.zajem-form textarea:focus {
    outline: none;
    border-color: var(--rose);
    box-shadow: 0 0 0 3px rgba(232,160,174,0.18);
}

.form-buttons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

.btn-close {
    padding: 10px 16px;
    background: transparent;
    border: 1.5px solid var(--border);
    border-radius: 30px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--muted);
    transition: border-color var(--t), color var(--t);
}

.btn-close:hover { border-color: var(--rose); color: var(--rose-dark); }

.btn-submit {
    padding: 10px 20px;
    background: var(--rose);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 700;
    transition: background var(--t);
}

.btn-submit:hover { background: var(--rose-dark); }

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.kontakt-formular {
    max-width: 540px;
    margin: 40px auto;
    padding: 40px 36px;
    background: var(--surface);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.kontakt-formular input,
.kontakt-formular textarea {
    width: 100%;
    padding: 11px 14px;
    margin-top: 6px;
    border-radius: var(--r);
    border: 1.5px solid var(--border);
    font-family: var(--font-body);
    font-size: 0.95em;
    background: var(--bg);
    color: var(--text);
    transition: border-color var(--t), box-shadow var(--t);
}

.kontakt-formular input:focus,
.kontakt-formular textarea:focus {
    outline: none;
    border-color: var(--rose);
    box-shadow: 0 0 0 3px rgba(232,160,174,0.18);
    background: var(--surface);
}

.kontakt-formular label {
    display: block;
    margin-top: 18px;
    font-weight: 600;
    font-size: 0.85em;
    letter-spacing: 0.04em;
}

.kontakt-formular button {
    margin-top: 24px;
    padding: 13px;
    background: var(--rose);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 700;
    font-family: var(--font-body);
    font-size: 0.95em;
    width: 100%;
    transition: background var(--t);
}

.kontakt-formular button:hover { background: var(--rose-dark); }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 28px 24px;
    text-align: center;
    font-size: 0.85em;
    color: var(--muted);
    margin-top: 48px;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}

.footer-item a { color: var(--muted); transition: color var(--t); }
.footer-item a:hover { color: var(--rose-dark); }

.footer-item img {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    vertical-align: middle;
    margin-right: 5px;
}

/* ============================================================
   SEARCH OVERLAY
   ============================================================ */
.search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(250,248,246,0.97);
    backdrop-filter: blur(6px);
    z-index: 200;
    align-items: center;
    justify-content: center;
}

.search-overlay.active { display: flex; }

.search-overlay form {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 560px;
    padding: 0 24px;
}

.search-overlay input[type="text"] {
    flex: 1;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--r);
    font-size: 1em;
    font-family: var(--font-body);
    background: var(--surface);
}

.search-overlay input[type="text"]:focus {
    outline: none;
    border-color: var(--rose);
    box-shadow: 0 0 0 3px rgba(232,160,174,0.18);
}

.search-overlay button[type="submit"] {
    padding: 12px 20px;
    border: none;
    background: var(--rose);
    color: white;
    cursor: pointer;
    border-radius: var(--r);
    font-family: var(--font-body);
    font-weight: 700;
    transition: background var(--t);
}

.search-overlay button[type="submit"]:hover { background: var(--rose-dark); }

.search-overlay #close-search {
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 1.6em;
    cursor: pointer;
    color: var(--muted);
    line-height: 1;
}

.lang-switch-desktop .search-btn { margin-left: 12px; }

/* ============================================================
   ABOUT PAGE (o_mne)
   ============================================================ */
.omne-text { font-size: 1.05em; line-height: 1.75; color: var(--muted); }
.omne-img { width: 150px; border-radius: var(--r); }
.omne-img--left  { float: left;  margin: 0 20px 16px 0; }
.omne-img--right { float: right; margin: 0 0 16px 20px; }

/* ============================================================
   RESPONSIVE – MOBILE (≤ 768 px)
   ============================================================ */
@media (max-width: 768px) {
    .site-header { padding: 12px 16px 10px; }
    .header-top h1 {
        font-size: 2.2em;
        position: absolute;
        left: 0;
        right: 0;
        text-align: center;
        pointer-events: none;
    }
    .header-top h1 a { pointer-events: all; }

    .header-top { justify-content: space-between; gap: 10px; }

    .burger {
        display: flex;
        position: static;
        transform: none;
        order: -1;
    }

    /* On mobile: hide the inline lang switcher so title stays centered */
    .lang-switch-mobile { display: none; }

    /* Show the desktop lang switcher inside the open nav instead */
    .lang-switch-desktop {
        display: inline-flex;
        margin-top: 4px;
    }

    .main-nav {
        display: none;
        flex-direction: column;
        gap: 14px;
        margin-top: 14px;
    }

    .menu-toggle:checked ~ .main-nav { display: flex; }

    .site-header:has(.menu-toggle:checked) .burger span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .site-header:has(.menu-toggle:checked) .burger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
    .site-header:has(.menu-toggle:checked) .burger span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

    .grid-obrazov {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 12px 12px 40px;
    }

    /* On touch devices, always show title overlay */
    .obraz-card .card-title { opacity: 1; transform: none; }

    .detail-container { flex-direction: column; padding: 20px 16px 40px; }
    .gallery-detail-container { width: 100%; }
    .obraz-info { width: 100%; padding-left: 0; }
    .action-buttons { justify-content: center; }
    .zajem-form form { max-width: 100%; }

    .omne-img--left, .omne-img--right {
        float: none;
        display: block;
        margin: 0 auto 16px;
    }

    .footer-content { flex-direction: column; gap: 10px; }

    .hero { height: 60vmax; min-height: 300px; }

    .lang-switch-desktop .search-btn { display: none; }
    #open-search-mobile { order: 2; }

    .kontakt-formular { padding: 28px 20px; margin: 20px 16px; }
}

@media (min-width: 769px) {
    .burger { display: none; }
    #open-search-mobile { display: none; }
}

/* ============================================================
   IMAGE ORIENTATION  –  respect EXIF rotation in WebP/JPEG
   ============================================================ */
img { image-orientation: from-image; }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
}

.lightbox.active { display: flex; }

.lightbox img {
    max-width: min(92vw, 1200px);
    max-height: 88vh;
    object-fit: contain;
    border-radius: var(--r);
    image-orientation: from-image;
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 1.8em;
    line-height: 1;
    color: rgba(255,255,255,0.8);
    background: none;
    border: none;
    cursor: pointer;
    transition: color var(--t);
    padding: 4px;
}

.lightbox-close:hover { color: white; }

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3em;
    line-height: 1;
    color: rgba(255,255,255,0.7);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 16px;
    transition: color var(--t);
    user-select: none;
}

.lightbox-prev:hover,
.lightbox-next:hover { color: white; }

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

.lightbox-counter {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.6);
    font-size: 0.82em;
    letter-spacing: 0.05em;
}

@media (max-width: 768px) {
    .lightbox-prev { left: 0; padding: 8px 10px; }
    .lightbox-next { right: 0; padding: 8px 10px; }
}
