/* ==========================================================================
   Design System — michaela-nemcova.cz
   ========================================================================== */

:root {
    /* Primary backgrounds - soft whites and near-whites */
    --bg: #faf8f9;
    --bg-alt: #f5f0f4;

    /* Text colors */
    --text: #2a2529;
    --text-light: #6d5e68;

    /* Accent colors - orchid-inspired */
    --accent: #c44f88;
    --accent-hover: #a94274;
    --accent-secondary: #9b6ba8;
    --accent-light: #f0d5e3;

    /* Borders and dividers */
    --border: #e8dce5;

    /* Gradient backgrounds */
    --gradient-soft: linear-gradient(135deg, #faf8f9 0%, #f5ecf3 100%);
    --gradient-accent: linear-gradient(135deg, #c44f88 0%, #9b6ba8 100%);

    /* Font families */
    --font-heading: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'DM Sans', system-ui, sans-serif;

    --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Reset
   ========================================================================== */

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

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

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

/* ==========================================================================
   Base Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--accent);
    line-height: 1.2;
    margin-top: 0;
}

h1 { font-size: 2.8rem; font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: 2.1rem; font-weight: 500; letter-spacing: -0.005em; }
h3 { font-size: 1.5rem; font-weight: 500; }
h4 { font-size: 1.25rem; font-weight: 500; }

p {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--text-light);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
    text-decoration-color: var(--accent-light);
    text-underline-offset: 2px;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

ul {
    padding-left: 1.5rem;
}

blockquote {
    border-left: 3px solid transparent;
    border-image: var(--gradient-accent) 1;
    margin: 1.5rem 0;
    padding: 0.5rem 1rem;
    background: var(--bg-alt);
    border-radius: 0 4px 4px 0;
}

blockquote p {
    margin-bottom: 0;
}

code {
    font-size: 0.9em;
    background: var(--bg-alt);
    padding: 0.15em 0.4em;
    border-radius: 3px;
}

pre {
    background: var(--bg-alt);
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
}

pre code {
    background: none;
    padding: 0;
}

/* ==========================================================================
   Skip Link
   ========================================================================== */

.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: var(--accent);
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: 0 0 4px 4px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 200;
    transition: top 150ms ease;
}

.skip-link:focus {
    top: 0;
    outline: none;
}

/* ==========================================================================
   Floating image helper
   ========================================================================== */

.img-float-left {
    float: left;
    margin-right: 1.5em;
    margin-top: 1.5em;
}

.img-float-left img {
    border-radius: 4px;
}

/* ==========================================================================
   Site Header & Navigation
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(250, 248, 249, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(196, 79, 136, 0.06);
}

.site-nav {
    display: flex;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    gap: 2rem;
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-logo:hover {
    opacity: 0.85;
    text-decoration: none;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.25rem;
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: center;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    transition: color var(--transition);
}

.nav-links a:hover {
    color: var(--accent);
    text-decoration: none;
}

/* Hamburger button — hidden on desktop */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    gap: 5px;
    margin-left: auto;
    padding: 0.5rem;
}

.menu-toggle__bar {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition), background var(--transition);
}

/* Hamburger → X animation */
body.menu-open .menu-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
body.menu-open .menu-toggle__bar:nth-child(2) {
    opacity: 0;
}
body.menu-open .menu-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   Banner (Homepage Hero)
   ========================================================================== */

.banner {
    text-align: center;
    padding: 5rem 1.5rem 4rem;
    max-width: 720px;
    margin: 0 auto;
    position: relative;
}

/* Orchid background on banner */
.banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100%;
    background: url('/img/main-min.webp') no-repeat center center;
    background-size: cover;
    opacity: 0.05;
    filter: blur(3px);
    pointer-events: none;
    z-index: -1;
}

/* Decorative gradient circle */
.banner::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(196, 79, 136, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.banner h1 {
    font-size: 3.8rem;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

/* Fallback for browsers that don't support background-clip */
@supports not (background-clip: text) {
    .banner h1 {
        color: var(--accent);
    }
}

.banner__divider {
    width: 80px;
    height: 3px;
    background: var(--gradient-accent);
    margin: 0 auto 1.5rem;
    border-radius: 2px;
    position: relative;
    z-index: 1;
}

.banner__subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 560px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   Main Content
   ========================================================================== */

#main-content {
    position: relative;
}

/* Orchid background on main content */
#main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/img/main-min.webp') no-repeat center center;
    background-size: cover;
    opacity: 0.1;
    filter: blur(3px);
    pointer-events: none;
    z-index: -1;
}

/* ==========================================================================
   Services Grid
   ========================================================================== */

.services {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
    position: relative;
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    display: block;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(196, 79, 136, 0.06);
    transition: all var(--transition);
    animation: fadeInUp 0.6s ease-out backwards;
    text-decoration: none;
    color: inherit;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(196, 79, 136, 0.15);
    border-color: var(--accent);
    text-decoration: none;
}

.service-card__image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    position: relative;
}

.service-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.service-card:hover .service-card__image img {
    transform: scale(1.03);
}

/* Subtle gradient overlay on images */
.service-card__image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(196, 79, 136, 0.05) 100%);
    pointer-events: none;
}

.service-card__body {
    padding: 1.25rem 1.5rem 1.5rem;
}

.service-card__body h3 {
    margin-bottom: 0.5rem;
    color: var(--accent);
}

.service-card__body p {
    font-size: 0.92rem;
    margin-bottom: 0;
}

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

.contact-section {
    background: var(--gradient-soft);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 3rem 1.5rem;
    position: relative;
}

.contact-section__inner {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    justify-content: center;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    min-width: 220px;
    transition: transform var(--transition);
}

.contact-item:hover {
    transform: translateY(-2px);
}

.contact-item__icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
    font-size: 1.2rem;
    transition: transform var(--transition);
}

.contact-item:hover .contact-item__icon {
    transform: scale(1.05);
}

.contact-item h3 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
    color: var(--text);
}

.contact-item a,
.contact-item span {
    font-size: 0.92rem;
    color: var(--text-light);
}

.contact-item a {
    transition: color var(--transition);
}

.contact-item a:hover {
    color: var(--accent);
}

/* ==========================================================================
   Content Page (single.html)
   ========================================================================== */

.content-page {
    max-width: 780px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
}

.content-page h1 {
    margin-bottom: 1.5rem;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Fallback for browsers that don't support background-clip */
@supports not (background-clip: text) {
    .content-page h1 {
        color: var(--accent);
    }
}

.content-page__image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 2rem;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(196, 79, 136, 0.08);
}

.content-page__image img {
    width: 100%;
    height: 320px;
    object-fit: cover;
}

/* Map container (kontakt page) */
#m {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-top: 2rem;
}

/* ==========================================================================
   Site Footer
   ========================================================================== */

.site-footer {
    text-align: center;
    padding: 2.5rem 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--gradient-soft);
}

.site-footer p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* ==========================================================================
   Table (Ceník)
   ========================================================================== */

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

thead {
    background: var(--accent);
    color: #fff;
}

thead th {
    color: #fff;
    padding: 0.75rem 1rem;
    text-align: left;
    font-family: var(--font-body);
    font-weight: 500;
}

tbody td {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

tbody tr:nth-child(even) {
    background: var(--bg-alt);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* ==========================================================================
   404 Page
   ========================================================================== */

.error-page {
    max-width: 680px;
    margin: 8rem auto;
    padding: 0 1.5rem;
    text-align: center;
}

.error-page h1 {
    font-size: 2.4rem;
}

.error-page p a {
    color: var(--accent);
    font-weight: 500;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered animation delays for service cards */
.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }
.service-card:nth-child(5) { animation-delay: 0.5s; }
.service-card:nth-child(6) { animation-delay: 0.6s; }
.service-card:nth-child(7) { animation-delay: 0.7s; }
.service-card:nth-child(8) { animation-delay: 0.8s; }
.service-card:nth-child(9) { animation-delay: 0.9s; }

/* ==========================================================================
   Mobile Overrides
   ========================================================================== */

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        padding: 1rem 1.5rem 1.5rem;
        gap: 0;
        box-shadow: 0 4px 12px rgba(44, 44, 44, 0.08);
    }

    .nav-links li {
        border-bottom: 1px solid var(--border);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links a {
        display: block;
        padding: 0.7rem 0;
        font-size: 1rem;
    }

    body.menu-open .nav-links {
        display: flex;
    }

    .banner h1 {
        font-size: 2.5rem;
    }

    .banner {
        padding: 3rem 1.5rem 2.5rem;
    }

    .services__grid {
        grid-template-columns: 1fr;
    }

    .content-page {
        padding: 2rem 1.5rem 3rem;
    }

    .content-page__image img {
        height: 220px;
    }

    #m {
        height: 300px;
    }

    h1 { font-size: 2.1rem; }
    h2 { font-size: 1.7rem; }
}

/* ==========================================================================
   Accessibility — reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition: none !important;
        animation: none !important;
    }
}
