/* =====================================================
   PROMĚNNÉ
   ===================================================== */
:root {
    --navy:       #0b1640;
    --navy-light: #131e55;
    --purple:     #2a0f6a;
    --purple-card:#2d1275;
    --pink:       #e01b8c;
    --green:      #8ddb00;
    --light-bg:   #dce8f8;
    --white:      #ffffff;
    --text-light: rgba(255,255,255,0.85);
    --font:       'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius:     10px;
    --nav-h:      56px;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--light-bg);
    color: var(--navy);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

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

/* =====================================================
   NAVIGACE
   ===================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: #000;
}

/* WordPress admin bar */
.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) {
    .admin-bar .site-header { top: 46px; }
}

.main-nav { height: var(--nav-h); }

.nav-container {
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.nav-menu {
    display: flex;
    gap: 8px;
}

.nav-menu li a {
    display: block;
    padding: 7px 18px;
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 20px;
    transition: background 0.2s, color 0.2s;
}

.nav-menu li a:hover { background: rgba(255,255,255,0.12); }

.nav-menu li.current a {
    background: var(--pink);
    color: var(--white);
}

/* Ukázky prací – vždy zelené */
.nav-menu li:last-child a {
    background: var(--green);
    color: #000;
}
.nav-menu li:last-child a:hover { background: #a0f000; }

/* =====================================================
   PATIČKA
   ===================================================== */
.site-footer {
    background: #000;
    color: var(--white);
    padding: 40px 24px;
    margin-top: auto;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-dog { width: 40px; height: 40px; }

.footer-tagline {
    font-size: 1.3rem;
    font-weight: 700;
}

.footer-contact {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-contact a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-size: 0.95rem;
    transition: color 0.2s;
}

.footer-contact a:hover { color: var(--white); }
.footer-contact svg { width: 16px; height: 16px; flex-shrink: 0; }

/* =====================================================
   TLAČÍTKA
   ===================================================== */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 24px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: opacity 0.2s, transform 0.15s;
}
.btn:hover { opacity: 0.88; transform: translateY(-1px); }

.btn--dark {
    background: var(--navy);
    color: var(--white);
}

.btn--nav {
    background: var(--purple);
    color: var(--white);
    font-size: 0.85rem;
    padding: 9px 18px;
}

/* =====================================================
   ZÁHLAVÍ STRÁNEK (archiv / detail)
   ===================================================== */
.page-header {
    position: relative;
    background: var(--navy);
    padding: calc(var(--nav-h) + 28px) 0 0;
}

.page-header .container {
    padding-bottom: 24px;
}

.page-title {
    color: var(--white);
    font-size: 1.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* SVG zigzag – generovaný PHP funkcí ws_zigzag() */
.svg-zigzag {
    display: block;
    width: 100%;
    height: 24px;
    flex-shrink: 0;
}

/* =====================================================
   KARTY PORTFOLIA
   ===================================================== */
.portfolio-card {
    display: block;
    background: var(--purple-card);
    color: var(--white);
    border-radius: var(--radius);
    padding: 14px 18px 20px;
    position: relative;
    transition: background 0.2s, transform 0.2s;
    min-height: 80px;
}

.portfolio-card:hover {
    background: #3a1a8a;
    transform: translateY(-2px);
}

.card-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.card-tag {
    background: var(--pink);
    color: var(--white);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
}

/* =====================================================
   GRID MŘÍŽKA
   ===================================================== */
.portfolio-grid {
    display: grid;
    gap: 14px;
}

.portfolio-grid--2col { grid-template-columns: repeat(2, 1fr); }
.portfolio-grid--3col { grid-template-columns: repeat(3, 1fr); }

/* =====================================================
   NADPISY SEKCÍ
   ===================================================== */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-icon { opacity: 0.7; font-weight: 400; }

/* =====================================================
   HOMEPAGE – HERO
   ===================================================== */
.hero {
    position: relative;
    min-height: 75vh;
    background: #080e2e;
    display: flex;
    flex-direction: column;
    padding-top: var(--nav-h);
    overflow: hidden;
}

/* SVG vlnové pozadí */
.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.hero-inner,
.hero-zigzag {
    position: relative;
    z-index: 1;
}

.hero-inner {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 60px;
    padding: 48px 24px 40px;
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
}

.hero-content {
    flex: 1;
    min-width: 0;
}

/* Foto placeholder vpravo */
.hero-visual {
    flex: 0 0 420px;
}

.hero-photo-placeholder {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #888;
    border-radius: var(--radius);
}

.hero-name {
    color: #5ce8e8;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-wave { color: #5ce8e8; opacity: 0.7; letter-spacing: -2px; }

.hero-title {
    color: var(--white);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero-text {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 16px;
}
.hero-text:last-of-type { margin-bottom: 28px; }

.hero-checks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 24px;
}

.hero-checks li {
    color: var(--text-light);
    font-size: 0.9rem;
    padding-left: 24px;
    position: relative;
}

.hero-checks li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    width: 13px;
    height: 13px;
    background: var(--green);
    border-radius: 50%;
}

/* hero-zigzag nahrazen PHP SVG */

/* =====================================================
   HOMEPAGE – SEKCE PORTFOLIA
   ===================================================== */
.section-portfolio {
    padding: 60px 0;
    background: var(--light-bg);
}

.section-cta {
    margin-top: 32px;
    text-align: center;
}

/* =====================================================
   HOMEPAGE – SEKCE ZAJIŠŤUJI
   ===================================================== */
.section-services {
    background: var(--navy);
    color: var(--white);
    padding: 60px 0;
    position: relative;
}

/* section-services__zigzag-top nahrazen PHP SVG */

.section-services .section-title { color: var(--white); text-align: center; justify-content: center; }

.services-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 48px;
    max-width: 960px;
    margin: 0 auto;
}

.services-list li {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    cursor: default;
    transition: transform 0.2s;
}

.services-list li:hover { transform: translateY(-3px); }

.service-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s;
}

.services-list li:hover .service-icon {
    background: rgba(141, 219, 0, 0.18);
}

.service-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--white);
    transition: stroke 0.25s;
}

.services-list li:hover .service-icon svg {
    stroke: var(--green);
}

.services-list strong {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
    color: var(--white);
}

.services-list p {
    color: var(--text-light);
    font-size: 0.88rem;
    line-height: 1.6;
}

/* =====================================================
   ARCHIV – LAYOUT
   ===================================================== */
.archive-wrap {
    display: flex;
    gap: 40px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 24px;
    align-items: flex-start;
}

.archive-sidebar {
    flex-shrink: 0;
    width: 220px;
    position: sticky;
    top: calc(var(--nav-h) + 20px);
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-filter { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }

.category-filter label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    cursor: pointer;
    user-select: none;
}

.category-filter input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--purple);
    cursor: pointer;
}

.filter-reset { margin-top: 4px; font-size: 0.88rem; }

.archive-main { flex: 1; }

/* Skryté karty při filtrování */
.portfolio-card.is-hidden { display: none; }

/* =====================================================
   DETAIL PROJEKTU – SINGLE
   ===================================================== */
.single-wrap {
    display: flex;
    height: calc(100vh - var(--nav-h) - 60px); /* 60px = výška page-headeru */
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
    gap: 48px;
    align-items: flex-start;
}

/* Screenshot vlevo */
.single-screenshot {
    flex: 0 0 55%;
}

.screenshot-viewport {
    height: calc(100vh - var(--nav-h) - 140px);
    overflow: hidden;
    border-radius: var(--radius);
    background: #111;
    cursor: zoom-in;
}

.screenshot-img {
    width: 100%;
    height: auto;
    display: block;
    transform: translateY(0);
    transition: transform 7s ease-in-out;
    will-change: transform;
}

/* Na hover obrázek pomalu scrolluje na konec */
.screenshot-viewport:hover .screenshot-img {
    transform: translateY(calc(-100% + calc(100vh - var(--nav-h) - 140px)));
}

.screenshot-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.4);
    font-size: 0.9rem;
}

/* Info vpravo */
.single-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow-y: auto;
    max-height: calc(100vh - var(--nav-h) - 140px);
    padding-right: 4px;
}

.single-title {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1.2;
}

.info-box {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.info-row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.info-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-icon svg { width: 20px; height: 20px; stroke: var(--purple); }

.info-row p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #333;
}

.btn--visit {
    align-self: flex-start;
    font-size: 0.95rem;
}

/* Prev / Next navigace */
.single-nav {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 8px;
}

.btn--nav-prev { margin-right: auto; }
.btn--nav-next { margin-left: auto; }

/* =====================================================
   RESPONZIVITA
   ===================================================== */
@media (max-width: 900px) {
    .portfolio-grid--3col { grid-template-columns: repeat(2, 1fr); }

    .single-wrap {
        flex-direction: column;
        height: auto;
    }
    .single-screenshot { flex: none; width: 100%; }
    .screenshot-viewport { height: 50vw; }
    .single-info { max-height: none; }

    .archive-wrap { flex-direction: column; }
    .archive-sidebar { width: 100%; position: static; }
}

@media (max-width: 600px) {
    .portfolio-grid--2col,
    .portfolio-grid--3col { grid-template-columns: 1fr; }

    .hero-checks { grid-template-columns: 1fr; }

    .footer-contact { flex-direction: column; gap: 12px; }

    .single-nav { flex-direction: column; }
    .btn--nav-prev, .btn--nav-next { margin: 0; }
}
