/* ========================================
   ZÁKLADNÍ NASTAVENÍ A PROMĚNNÉ
   ======================================== */

:root {
    /* Barvy podle zadání */
    --bg-primary: #f8f9fb;
    --bg-white: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --shadow: rgba(0, 0, 0, 0.08);
    --shadow-hover: rgba(0, 0, 0, 0.12);
    
    /* Další barvy */
    --border: #e5e7eb;
    --success: #10b981;
    --error: #ef4444;
    
    /* Přechody */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Zaoblení */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    /* Stíny */
    --shadow-sm: 0 2px 8px var(--shadow);
    --shadow-md: 0 4px 16px var(--shadow);
    --shadow-lg: 0 8px 32px var(--shadow-hover);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* ========================================
   NAVIGACE
   ======================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition-normal);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.logo:hover {
    color: var(--accent);
}

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

.nav-link {
    display: block;
    padding: 10px 18px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent);
    background: rgba(37, 99, 235, 0.08);
}

/* Mobilní menu tlačítko */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-fast);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================
   HERO SEKCE
   ======================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 0 80px;
    background: linear-gradient(135deg, var(--bg-primary) 0%, #eef2ff 100%);
    text-align: center;
}

.hero-content {
    max-width: 700px;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    line-height: 1.2;
}

.hero-text {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.8;
}

/* ========================================
   TLAČÍTKA
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-normal);
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

/* ========================================
   SEKCE - OBECNÉ
   ======================================== */

section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 48px;
}

/* ========================================
   SEKCE PROJEKTY
   ======================================== */

.projects-section {
    background: var(--bg-white);
}

/* Filtry */
.projects-filters {
    margin-bottom: 40px;
}

.search-box {
    position: relative;
    max-width: 400px;
    margin: 0 auto 24px;
}

.search-box input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-white);
    transition: var(--transition-fast);
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.filter-tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-primary);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-btn:hover {
    background: var(--border);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--accent);
    color: white;
}

/* Grid s projekty */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* Karta projektu */
.project-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition-normal);
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.project-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

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

.project-image-placeholder {
    color: var(--accent);
    opacity: 0.5;
}

.project-tags {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.project-tag {
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-content {
    padding: 24px;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.project-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition-fast);
}

.project-link:hover {
    color: var(--accent-hover);
    gap: 10px;
}

.project-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Detail projektu */
.project-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow);
    background: var(--bg-primary);
}

.project-detail.open {
    max-height: 500px;
}

.project-detail-content {
    padding: 24px;
}

.project-detail h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.project-detail p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.7;
}

.project-detail-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.project-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.project-detail-item span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.project-detail-item strong {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

.project-detail-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-small {
    padding: 10px 20px;
    font-size: 0.9rem;
}

/* Tlačítko Načíst další */
.load-more-wrapper {
    text-align: center;
}

/* ========================================
   SEKCE O MNĚ
   ======================================== */

.about-section {
    background: var(--bg-primary);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-content .section-title {
    text-align: left;
    margin-bottom: 24px;
}

.about-text {
    margin-bottom: 32px;
}

.about-text p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-skills h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.about-skills ul {
    list-style: none;
}

.about-skills li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.about-skills li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

.about-image {
    display: flex;
    justify-content: center;
}

.image-placeholder {
    width: 280px;
    height: 280px;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    box-shadow: var(--shadow-md);
}

/* ========================================
   SEKCE KONTAKT
   ======================================== */

.contact-section {
    background: var(--bg-white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}

.contact-details h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.contact-details a {
    font-size: 1rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
}

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

/* Kontaktní formulář */
.contact-form {
    background: var(--bg-primary);
    padding: 32px;
    border-radius: var(--radius-lg);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    font-family: inherit;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-white);
    transition: var(--transition-fast);
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    background: var(--text-primary);
    color: var(--text-secondary);
    padding: 24px 0;
    text-align: center;
}

.footer p {
    font-size: 0.9rem;
}

/* ========================================
   TLAČÍTKO ZPĚT NAHORU
   ======================================== */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition-normal);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent-hover);
    transform: translateY(-4px);
}

/* ========================================
   ANIMACE
   ======================================== */

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.3s; }

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

/* Scroll animace */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   RESPONZIVITA
   ======================================== */

@media (max-width: 992px) {
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-content .section-title {
        text-align: center;
    }
    
    .about-image {
        order: -1;
    }
    
    .image-placeholder {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--bg-white);
        flex-direction: column;
        padding: 20px;
        gap: 8px;
        box-shadow: var(--shadow-md);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition-normal);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-link {
        padding: 14px 20px;
    }
    
    .hero {
        padding: 120px 0 60px;
    }
    
    section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .filter-tags {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
    
    .contact-form {
        padding: 24px;
    }
    
    .back-to-top {
        width: 44px;
        height: 44px;
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 0.95rem;
    }
    
    .project-content {
        padding: 20px;
    }
    
    .contact-form {
        padding: 20px;
    }
}

/* ========================================
   SKRYTÉ ELEMENTY
   ======================================== */

.hidden {
    display: none !important;
}

/* Načítání */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Zpráva o prázdném stavu */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.95rem;
}
