/* ====================================
   Modern CSS for Nedomysleno ČR s.r.o.
   ==================================== */

/* ====================================
   CSS Reset & Base Styles
   ==================================== */

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

:root {
    /* Modern Color Palette */
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary-color: #0ea5e9;
    --accent-color: #06b6d4;

    /* Neutral Colors */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;

    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-accent: #f1f5f9;

    /* Border Colors */
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;

    /* Typography */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    overflow-x: hidden;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

h1 {
    font-size: clamp(2rem, 5vw, 2.5rem);
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
}

p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
}

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

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

/* ====================================
   Layout & Container
   ==================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--spacing-lg);
    }
}

/* ====================================
   Header
   ==================================== */

.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-content {
    padding: var(--spacing-md) 0;
}

.logo a {
    color: white;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    transition: transform var(--transition-base), opacity var(--transition-fast);
    display: inline-block;
}

.logo a:hover {
    transform: translateY(-2px);
    opacity: 0.9;
    color: white;
}

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

.main {
    min-height: calc(100vh - 200px);
    padding: var(--spacing-xl) 0;
}

/* ====================================
   Hero Section
   ==================================== */

.hero-section {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-2xl);
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hero-section:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

@media (min-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr 1fr;
    }
}

.hero-image {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform var(--transition-slow);
}

.hero-image:hover img {
    transform: scale(1.05);
}

.hero-text h2 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
    font-size: clamp(1.5rem, 4vw, 2rem);
}

.hero-text p {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* ====================================
   Documents Section
   ==================================== */

.documents-section {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
}

.section-title {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xl);
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    position: relative;
    padding-bottom: var(--spacing-sm);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.documents-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
}

@media (min-width: 1024px) {
    .documents-grid {
        grid-template-columns: 2fr 1fr;
    }
}

.document-category {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    border: 1px solid var(--border-light);
}

.document-category h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    font-size: 1.25rem;
    font-weight: 600;
}

.document-list {
    list-style: none;
}

.document-item {
    margin-bottom: var(--spacing-xs);
}

.document-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.document-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0.1;
    transition: width var(--transition-base);
}

.document-link:hover {
    border-color: var(--primary-color);
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.document-link:hover::before {
    width: 100%;
}

.document-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.document-name {
    flex: 1;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9375rem;
}

.document-arrow {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.25rem;
    transition: transform var(--transition-base);
    flex-shrink: 0;
}

.document-link:hover .document-arrow {
    transform: translateX(4px);
}

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

.footer {
    background: linear-gradient(135deg, var(--text-primary) 0%, #0f172a 100%);
    color: var(--bg-secondary);
    padding: var(--spacing-lg) 0;
    margin-top: var(--spacing-2xl);
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
}

.footer-text {
    text-align: center;
    color: var(--bg-secondary);
    opacity: 0.9;
    font-size: 0.9375rem;
    margin: 0;
}

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

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Page load animations */
body.loaded .header {
    animation: fadeIn 0.6s ease-out;
}

body.loaded .hero-section {
    animation: fadeIn 0.8s ease-out 0.2s backwards;
}

body.loaded .documents-section {
    animation: fadeIn 0.8s ease-out 0.4s backwards;
}

/* Document items staggered animation */
.document-item {
    opacity: 0;
    animation: slideInLeft 0.5s ease-out forwards;
}

.document-item:nth-child(1) { animation-delay: 0.1s; }
.document-item:nth-child(2) { animation-delay: 0.15s; }
.document-item:nth-child(3) { animation-delay: 0.2s; }
.document-item:nth-child(4) { animation-delay: 0.25s; }
.document-item:nth-child(5) { animation-delay: 0.3s; }
.document-item:nth-child(6) { animation-delay: 0.35s; }
.document-item:nth-child(7) { animation-delay: 0.4s; }
.document-item:nth-child(8) { animation-delay: 0.45s; }
.document-item:nth-child(9) { animation-delay: 0.5s; }
.document-item:nth-child(10) { animation-delay: 0.55s; }

/* ====================================
   Responsive Design
   ==================================== */

@media (max-width: 767px) {
    :root {
        --spacing-xl: 2rem;
        --spacing-2xl: 2.5rem;
    }

    .hero-section,
    .documents-section {
        padding: var(--spacing-md);
    }

    .document-link {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.875rem;
    }

    .document-icon {
        font-size: 1rem;
    }
}

/* ====================================
   Print Styles
   ==================================== */

@media print {
    .header {
        position: static;
        box-shadow: none;
    }

    .hero-section,
    .documents-section {
        box-shadow: none;
        page-break-inside: avoid;
    }

    .document-link {
        border: 1px solid #000;
        page-break-inside: avoid;
    }
}

/* ====================================
   Accessibility
   ==================================== */

/* Focus visible for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@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;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-light: #000;
        --border-medium: #000;
    }

    .document-link {
        border-width: 2px;
    }
}
