:root {
    --bg-color: #080808;
    --text-color: #f5f5f7;
    --accent-color: #007aff;
    --spacing: 2rem;
}

/* Plynulé scrollování */
html {
    scroll-behavior: smooth;
}

/* ===== ANIMACE ===== */

/* Keyframes animace */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Aplikace animací */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.slide-in-up {
    animation: slideInUp 0.8s ease-out forwards;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
}

.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Skrytí jen klíčových prvků před animací */
.project-card {
    opacity: 0;
}

/* Staggering pro více prvků */
.project-card:nth-child(1) {
    animation-delay: 0s;
}

.project-card:nth-child(2) {
    animation-delay: 0.2s;
}

.project-card:nth-child(3) {
    animation-delay: 0.4s;
}

.project-card:nth-child(4) {
    animation-delay: 0.6s;
}

form {
    animation-delay: 0.3s;
}

/* Základní nastavení pro celé tělo webu */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', -apple-system, sans-serif;
    
    /* Vytvoření jemného gradientu */
    background-image: 
        radial-gradient(at 0% 0%, rgba(0, 122, 255, 0.1) 0px, transparent 50%), 
        radial-gradient(at 100% 100%, rgba(175, 82, 222, 0.1) 0px, transparent 50%);
    background-attachment: fixed; /* Pozadí se nehýbe při scrollování */
    
    /* Vyhlazení písma pro tmavé pozadí */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Volitelné: Přidání jemného šumu pro texturu (grain) */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.03; /* Jen velmi decentní nádech */
    pointer-events: none; /* Aby šum neblokoval klikání */
    z-index: 1;
}

/* Aby obsah webu byl nad pozadím a šumem */
main, section, nav {
    position: relative;
    z-index: 2;
}

/* Header Top Navigation */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem var(--spacing);
    position: absolute;
    top: 0rem;
    left: var(--spacing);
    right: var(--spacing);
    z-index: 100;
    gap: 1rem;
    pointer-events: none;
}

/* Logo Box - Simple */
.header-top .logo {
    position: absolute;
    top: 1.5rem;
    left: var(--spacing);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.header-top .logo img {
    max-width: 50px;
    height: auto;
    transition: all 0.3s ease;
    padding-top: 10px;
}

.header-top .logo:hover img {
    transform: scale(1.05);
}

/* Navigation Box */
.header-nav {
    display: flex;
    align-items: center;
    padding: 0.5rem 1.2rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    margin-bottom: 0;
    z-index: 10;
    transition: all 0.3s ease;
    position: fixed;
    top: 1.5rem;
    right: var(--spacing);
    pointer-events: auto;
}

.header-nav:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(80px + 1rem) var(--spacing) var(--spacing);
    min-height: 80vh;
    position: relative;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    width: 100%;
    max-width: 1300px;
    z-index: 5;
    margin-top: -80px;
}

.hero-text {
    flex: 1;
    text-align: left;
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero-text h1 {
    margin: 0 0 1rem 0;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
}

.hero-description {
    margin: 0 0 2rem 0;
    font-size: 1.1rem;
    opacity: 0.8;
    line-height: 1.6;
}

.hero-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.8s ease-out forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    max-height: 600px;
}

nav {
    display: flex;
    gap: var(--spacing);
    margin-bottom: var(--spacing);
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: var(--spacing);
}

.header-nav ul {
    gap: 1.5rem;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing);
}

li ul {
    margin-top: var(--spacing);
    padding-left: var(--spacing);
}

/* Nav links styling */
nav a {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.header-nav a {
    font-size: 0.9rem;
    font-weight: 500;
}

nav a:visited {
    color: var(--text-color);
}

nav a:hover {
    color: #a6a6a6;
}

.hero-description {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.8;
}

/* Button styling */
.AboutMeButton {
    position: relative;
    margin-top: 2rem;
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    background-color: #3a3a3a;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 5;
}

.AboutMeButton:hover {
    background-color: #4a4a4a;
    box-shadow: 0 0 20px rgba(100, 100, 100, 0.3);
    transform: translateY(-2px);
}

.AboutMeButton:active {
    transform: translateY(0);
    box-shadow: 0 0 10px rgba(0, 122, 255, 0.3);
}

/* Sections styling */
section {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing) var(--spacing);
    scroll-margin-top: 80px;
}

section h2 {
    font-size: 2rem;
    margin-bottom: var(--spacing);
    font-weight: 700;
}

section p {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.8;
}

/* Projects section */
#projects {
    padding: calc(var(--spacing) * 2) var(--spacing);
}

.projects-container {
    width: 100%;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing);
    margin-top: var(--spacing);
}

.project-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.project-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: rgba(0, 122, 255, 0.05);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-card h3 {
    font-size: 1.3rem;
    padding: var(--spacing) var(--spacing) calc(var(--spacing) / 2) var(--spacing);
    margin: 0;
    font-weight: 600;
}

.project-card p {
    padding: 0 var(--spacing) var(--spacing) var(--spacing);
    margin: 0;
    flex-grow: 1;
}

.project-btn {
    margin: var(--spacing);
    padding: 10px 20px;
    background-color: #3a3a3a;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 6px;
    display: inline-block;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-btn:hover {
    background-color: #4a4a4a;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(100, 100, 100, 0.2);
}

/* About section */
#about {
    /* horní | pravá | dolní | levá */
    padding: calc(var(--spacing) * 2) var(--spacing) var(--spacing) var(--spacing);
}

.lead {
    font-size: 1.4rem;
    font-weight: bold;
    color: #fff;           /* Hlavní věta svítí víc */
    margin-bottom: 20px;
}

/* Contact section */
#contact {
    padding: calc(var(--spacing) * 2) var(--spacing);
    text-align: center;
}

/* Contact form styling */
.contact-form {
    max-width: 600px;
    margin: var(--spacing) auto 0;
    display: flex;
    flex-direction: column;
    gap: var(--spacing);
}

.form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.form-group label {
    font-weight: 600;
    margin-bottom: calc(var(--spacing) / 2);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    padding: 12px 16px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 10px rgba(0, 122, 255, 0.1);
}

.submit-btn {
    padding: 12px 32px;
    background-color: #3a3a3a;
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: calc(var(--spacing) / 2);
}

.submit-btn:hover {
    background-color: #4a4a4a;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(100, 100, 100, 0.2);
    transform: translateY(-2px);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Project page hero */
.hero-small {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing);
    min-height: 20vh;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-small .logo {
    position: absolute;
    left: var(--spacing);
    z-index: 10;
    align-items: center;
}

.hero-small .logo img {
    max-width: 50px;
    height: auto;
}

.hero-small .logo a {
    text-decoration: none;
}

.hero-small h1 {
    position: static;
    transform: none;
    font-size: 2rem;
    margin: 0;
    text-align: center;
}

.hero-small nav {
    position: absolute;
    right: var(--spacing);
    margin-bottom: 0;
    align-items: center;
}

/* Project detail section */
#project-detail {
    padding: calc(var(--spacing) * 3) var(--spacing);
}

.project-detail-container {
    max-width: 1000px;
    margin: 0 auto;
}

.project-detail-container h2 {
    font-size: 2.2rem;
    margin-bottom: calc(var(--spacing) * 2);
    text-align: center;
}

/* Gallery */
.project-gallery {
    margin-bottom: calc(var(--spacing) * 2);
}

.gallery-main {
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-bottom: var(--spacing);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-thumbnails {
    display: flex;
    gap: var(--spacing);
    justify-content: center;
    flex-wrap: wrap;
}

.gallery-thumbnails img {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.gallery-thumbnails img:hover {
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Project info */
.project-info {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: var(--spacing);
    margin-bottom: calc(var(--spacing) * 2);
}

.project-info h3 {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: var(--spacing);
    font-weight: 600;
}

.project-info p {
    line-height: 1.8;
    opacity: 0.9;
    margin-bottom: var(--spacing);
}

.service-list {
    list-style: none;
    padding: 0;
    margin: var(--spacing) 0;
}

.service-list li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    opacity: 0.85;
}

.service-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: rgba(255, 255, 255, 0.6);
    font-weight: bold;
}

/* Price section */
.project-price {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: var(--spacing);
    margin-top: var(--spacing);
    border-left: 3px solid rgba(255, 255, 255, 0.2);
}

.project-price h3 {
    margin-top: 0;
    margin-bottom: calc(var(--spacing) / 2);
}

.price {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 calc(var(--spacing) / 2) 0;
    color: #ffffff;
}

.price-note {
    font-size: 0.95rem;
    opacity: 0.75;
    margin: 0;
}

/* Project contact section */
#project-contact {
    padding: calc(var(--spacing) * 3) var(--spacing);
    background: rgba(255, 255, 255, 0.02);
    text-align: center;
}

#project-contact h2 {
    font-size: 2rem;
    margin-bottom: var(--spacing);
}

#project-contact p {
    margin-bottom: calc(var(--spacing) * 2);
    opacity: 0.8;
}

/* Footer */
footer {
    text-align: center;
    padding: var(--spacing);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.6;
    font-size: 0.9rem;
}

/* Globálně schovat - na počítači ho neuvidíš */
.menu-toggle {
    display: none;
}

/* ===== RESPONZIVNÍ DESIGN ===== */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    :root {
        --spacing: 1.5rem;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    h1 {
        font-size: 2rem;
    }

    section h2 {
        font-size: 1.6rem;
    }

    .hero-content {
        gap: 2rem;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-image img {
        max-height: 500px;
    }

    .header-top .logo img{
        max-width: 50px;
    }

    .hero-small {
        display: flex !important;
        flex-direction: column !important; /* Prvky pod sebou */
        align-items: center !important;    /* Vodorovné centrování */
        text-align: center !important;     /* Vycentrování textu */
        padding: 30px 15px !important;     /* Trochu méně místa na menších displejích */
        gap: 15px !important;              /* Mezera mezi logem, nadpisem a menu */
    }

    .hero-small h1 {
        font-size: 1.8rem !important;      /* Na menších displejích trochu menší písmo */
        margin: 0 !important;
    }

    .hero-small .logo img {
        max-width: 50px !important;
        height: auto !important;
    }

    /* Menu pod nadpisem */
    .hero-small .logo, 
    .hero-small nav {
        position: static !important; 
        left: auto !important;
        right: auto !important;
        margin: 0 auto !important;          /* Navigace zabere šířku pro snadné centrování */
    }

    .hero-small h1 {
        font-size: 1.8rem !important;
        margin: 0 !important;
        font-weight: 700 !important;
    }

    .hero-small nav ul {
        display: flex !important;
        flex-direction: row !important;    /* Odkazy v menu zůstanou vedle sebe... */
        flex-wrap: wrap !important;        /* ...ale na malém mobilu se zalomí */
        justify-content: center !important;/* Vycentruje odkazy v řadě */
        gap: 15px !important;
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
    }

    .hero-actions {
        display: flex;
        gap: 15px;
        margin-top: 20px;
    }
}

/* Tablet (do 768px) */
@media (max-width: 768px) {
    :root {
        --spacing: 1.5rem;
    }

    .header-top {
        padding: 0.75rem 1rem;
    }

    .header-top .logo img {
        max-width: 50px;
    }

    .header-nav ul {
        gap: 1.5rem;
    }

    .header-nav a {
        font-size: 0.9rem;
    }

    /* Hero sekce */
    .hero {
        flex-direction: column;
        padding: calc(100px + 1.5rem) 1rem 2rem;
        min-height: auto;
    }

    .hero-content {
        flex-direction: column;
        gap: 2rem;
        margin-top: 80px;
    }

    .hero-text {
        text-align: center;
    }

    .hero-text h1 {
        font-size: 1.8rem;
        line-height: 1.2;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .hero-image {
        width: 100%;
        justify-content: center;
    }

    .hero-image img {
        max-height: 400px;
    }

    .AboutMeButton {
        padding: 10px 24px;
        font-size: 0.9rem;
    }

    /* Sekce */
    section {
        padding: 1.5rem 1rem;
    }

    section h2 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }

    section p {
        font-size: 0.95rem;
    }

    h1 {
        font-size: 1.6rem;
    }

    /* Projekty */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .project-card {
        border-radius: 8px;
    }

    .project-image {
        height: 150px;
    }

    .project-card h3 {
        font-size: 1.1rem;
    }

    .project-card p {
        font-size: 0.9rem;
    }

    /* Hero-small (stránky služeb) */
    .hero-small h1 {
        font-size: 1.7rem !important; /* Mírně zmenšíme oproti tabletu */
    }

    .hero-small nav ul {
        gap: 1.2rem !important; /* Trochu smrskneme menu */
    }

    /* Projekt detail */
    #project-detail {
        padding: 2rem 1rem;
    }

    .project-detail-container {
        max-width: 100%;
    }

    .gallery-main {
        aspect-ratio: 16 / 10;
    }

    .gallery-thumbnails {
        gap: 0.5rem;
    }

    .gallery-thumbnails img {
        width: 80px;
        height: 60px;
    }

    .project-info h3 {
        font-size: 1.3rem;
    }

    .project-info p {
        font-size: 0.95rem;
    }

    .project-price {
        margin-top: 1.5rem;
    }

    .price {
        font-size: 1.4rem;
    }

    /* Formuláře */
    .contact-form {
        max-width: 100%;
        gap: 1rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 16px; /* Zabrání zoomování na iOS */
    }

    .form-group label {
        font-size: 0.9rem;
    }

    .submit-btn {
        padding: 10px 24px;
        font-size: 0.95rem;
    }

    /* Kontakt sekce */
    #project-contact {
        padding: 2rem 1rem;
    }

    #project-contact h2 {
        font-size: 1.4rem;
    }

    /* Footer */
    footer {
        padding: 1.5rem 1rem;
        font-size: 0.85rem;
    }

    .header-top .logo {
        max-width: 50px;
    }

    .header-top .logo img {
        max-width: 50px;
    }

    .hero-actions {
        flex-direction: column; /* Tlačítka budou pod sebou */
        gap: 10px;              /* Menší mezera mezi nimi */
        width: 100%;            /* Kontejner využije celou šířku */
    }

    .hero-actions .AboutMeButton {
        width: 100%;            /* Tlačítka budou stejně široká (přes celý displej) */
        margin: 0;              /* Odstraníme případné boční okraje */
        text-align: center;
    }
}

/* Malé mobily (do 480px) */
@media (max-width: 480px) {
    :root {
        --spacing: 0.75rem;
    }

    .header-top{
        padding: 0.5rem;
    }

    .header-top nav {
        margin-top: 20px;
    }

    .header-top .logo {
        max-width: 50px;
    }

    .header-top .logo img {
        max-width: 50px;
    }

    .header-nav ul {
        gap: 0.75rem;
    }

    .header-nav a {
        font-size: 0.75rem;
    }

    .hero {
        padding: calc(80px + 1rem) 0.75rem 1.5rem;
    }

    .hero-content {
        gap: 1rem;
        margin-top: 60px;    }

    .hero-text h1 {
        font-size: 1.4rem;
    }

    .hero-description {
        font-size: 0.85rem;
    }

    .hero-image img {
        max-height: 300px;
    }

    .AboutMeButton {
        padding: 8px 20px;
        font-size: 0.8rem;
    }

    .AboutMeButton {
        top: 60%;
        padding: 8px 20px;
        font-size: 0.8rem;
    }

    section h2 {
        font-size: 1.2rem;
    }

    h1 {
        font-size: 1.4rem;
    }

    .project-card h3 {
        font-size: 1rem;
        padding: 0.75rem 0.75rem 0.4rem 0.75rem;
    }

    .project-card p {
        padding: 0 0.75rem 0.75rem 0.75rem;
        font-size: 0.85rem;
    }

    .project-btn {
        margin: 0.75rem;
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    .project-info h3 {
        font-size: 1.1rem;
    }

    .price {
        font-size: 1.6rem;
    }

    .contact-form {
        gap: 0.75rem;
    }

    .hero-small {
        padding: 2rem 1rem 1.5rem !important;
        gap: 1.2rem !important;
    }

    .hero-small h1 {
        font-size: 1.5rem !important;
    }

    .hero-small nav ul {
        gap: 0.8rem !important; /* Aby se odkazy vešly vedle sebe i na úzkém displeji */
    }

    .hero-small nav a {
        font-size: 0.8rem !important;
    }

    /* Fix pro formulář, aby nebyl nalepený na okrajích */
    .contact-form {
        padding: 0 0.5rem;
    }
    
    .form-group input, .form-group textarea {
        font-size: 16px; /* Prevence zoomu na iPhonu */
    }
}

