/* Reset a základní styly */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS proměnné pro barvy */
:root[data-theme="light"] {
    --bg-primary: #fff;
    --bg-secondary: #f9f9f9;
    --text-primary: #333;
    --text-secondary: #555;
    --accent-color: #667eea;
    --accent-color-2: #764ba2;
    --card-bg: white;
    --footer-bg: #333;
    --footer-text: white;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.15);
}

:root[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --accent-color: #667eea;
    --accent-color-2: #764ba2;
    --card-bg: #2d2d2d;
    --footer-bg: #0a0a0a;
    --footer-text: #e0e0e0;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(0, 0, 0, 0.5);
}

html {
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Navigační lišta */
.navbar {
    background: linear-gradient(90deg, #090038 0%, #090038 100%);
    padding: 0;
    position: sticky;
    top: 0;
    box-shadow: 0 2px 10px var(--shadow);
    z-index: 100;
    transition: background 0.3s ease;
    border-bottom: 4px solid #090038;
    position: relative;
}

:root[data-theme="dark"] .navbar {
    background: linear-gradient(90deg, #000 0%, #000 100%);
    border-bottom: 4px solid #090038;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 0.8;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    margin-left: auto;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    opacity: 0.8;
}

/* Tlačítko pro přepínání režimu */
.theme-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
}

:root[data-theme="light"] .theme-toggle {
    color: #fff;
}

:root[data-theme="dark"] .theme-toggle {
    color: #fff !important;
}

.theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Hlavní obsah */
main {
    flex: 1;
}

.section {
    padding: 4rem 2rem;
    background-color: var(--bg-secondary);
    transition: background-color 0.3s ease;
}

.section:nth-child(odd) {
    background-color: var(--bg-primary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
    transition: color 0.3s ease;
}

h3 {
    color: var(--accent-color-2);
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

/* About page - layout s obrázkem */
.about-content {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
    margin-top: 2rem;
}

.about-image {
    flex: 0 0 300px;
}

.about-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow);
    transition: transform 0.3s ease;
}

.about-image img:hover {
    transform: scale(1.05);
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: 1.8rem;
    color: var(--accent-color);
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
}

.about-text ul {
    margin-left: 2rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.about-text ul li {
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .about-content {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .about-image {
        flex: 0 0 auto;
    }
}

p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

/* Grid pro karty "Co dělám" */
.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.work-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.work-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px var(--shadow-hover);
}

.work-card h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.15rem;
    font-weight: bold;
    font-family: Arial, Helvetica, sans-serif;
    text-decoration: underline;
}

.work-card p {
    color: white;
    font-size: 0.95rem;
}

:root[data-theme="light"] .work-card h3 {
    color: #000;
}

:root[data-theme="light"] .work-card p {
    color: #333;
}

/* Footer */
.footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    text-align: center;
    padding: 1rem;
    margin-top: 0;
    font-size: 0.9rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.footer p {
    margin: 0;
}

/* Maintenance page */
.maintenance-page {
    background:
        radial-gradient(circle at top left, rgba(102, 126, 234, 0.18), transparent 32%),
        radial-gradient(circle at bottom right, rgba(118, 75, 162, 0.16), transparent 28%),
        var(--bg-primary);
}

.maintenance-hero {
    padding: 5rem 2rem 4rem;
}

.maintenance-copy {
    margin: 0 auto;
    width: min(100%, 760px);
    background: var(--card-bg);
    border-radius: 18px;
    padding: 2rem;
    box-shadow: 0 12px 30px var(--shadow);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.maintenance-copy h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.05;
    margin: 0 0 1rem;
}

.maintenance-copy p {
    max-width: 62ch;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.05rem;
}

:root[data-theme="light"] .maintenance-copy {
    border: 1px solid rgba(0, 0, 0, 0.06);
}

@media (max-width: 768px) {
    .maintenance-hero {
        padding: 3rem 1rem 2.5rem;
    }

    .maintenance-copy {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .work-grid {
        grid-template-columns: 1fr;
    }
}
