/*
Theme Name: Jakeschova na míru
Author: Radim Jakesch
Description: Prémiová šablona pro létající pořizovatelku
Version: 1.0
*/

/* ============================================================
   ZÁKLADNÍ PROMĚNNÉ A NASTAVENÍ DOKUMENTU (VARIABLES & BASE)
   ============================================================ */
:root {
    --primary-color: #1a3c5e; 
    --secondary-color: #d4a373; 
    --bg-light: #f9f9f9;
    --text-dark: #333;
    --text-light: #666;
    --white: #ffffff;

    --pattern-blueprint-light: url("data:image/svg+xml,%3Csvg width='200' height='200' viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%231a3c5e' stroke-opacity='0.15'%3E%3Cpath d='M0 40 Q 50 10, 100 40 T 200 40 M0 160 Q 50 130, 100 160 T 200 160' stroke-width='1'/%3E%3Cpath d='M0,0 l200,200 M100,0 l100,100 M0,100 l100,100' stroke-width='0.5' stroke-dasharray='2,4'/%3E%3Cpath d='M40 0 Q 10 50, 40 100 T 40 200' stroke-width='0.8'/%3E%3C/g%3E%3C/svg%3E");
    --pattern-blueprint-dark: url("data:image/svg+xml,%3Csvg width='200' height='200' viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.12'%3E%3Cpath d='M0 40 Q 50 10, 100 40 T 200 40 M0 160 Q 50 130, 100 160 T 200 160' stroke-width='1'/%3E%3Cpath d='M0,0 l200,200 M100,0 l100,100 M0,100 l100,100' stroke-width='0.5' stroke-dasharray='2,4'/%3E%3Cpath d='M40 0 Q 10 50, 40 100 T 40 200' stroke-width='0.8'/%3E%3C/g%3E%3C/svg%3E");
}

html { 
    scroll-behavior: smooth; 
    /* Odsazení horního okraje pro kompenzaci fixní hlavičky */
    scroll-padding-top: 130px; 
}

/* Specifické odsazení pro kotevní bod sekce kontakt */
#kontakt {
    scroll-margin-top: 130px;
}

body {
    font-family: 'Open Sans', sans-serif;
    margin: 0; 
    padding: 0;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    background-image: var(--pattern-blueprint-light);
    background-attachment: fixed; 
    background-size: 400px 400px; 
}

h1, h2, h3 { 
    font-family: 'Merriweather', serif; 
    color: var(--primary-color); 
    margin-bottom: 20px; 
}

a { 
    text-decoration: none; 
    color: inherit; 
}

.container { 
    max-width: 1100px; 
    margin: 0 auto; 
    padding: 0 20px; 
}

/* Základní typografie a limitování délky řádku */
.hero-text-box p, 
.obsah-clanku p, 
.obsah-stranky p {
    line-height: 1.75;
    margin-bottom: 1.5rem;
    max-width: 75ch;
}

/* ============================================================
   HLAVNÍ NAVIGACE A HLAVIČKA (HEADER & NAV)
   ============================================================ */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    padding: 15px 0;
}

.header-content { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.logo { 
    font-size: 1.2rem; 
    font-weight: bold; 
    color: var(--primary-color); 
    font-family: 'Merriweather', serif; 
}

.hamburger { 
    display: none; 
    font-size: 2rem; 
    background: none; 
    border: none; 
    color: var(--primary-color); 
    cursor: pointer; 
}

nav { 
    display: flex; 
    align-items: center; 
}

nav a { 
    margin-left: 40px; 
    font-size: 1rem; 
    color: var(--text-dark); 
    font-weight: 600; 
    transition: color 0.3s; 
}

nav a:hover { 
    color: var(--primary-color); 
}

.btn-contact { 
    background-color: var(--primary-color); 
    color: #ffffff !important; 
    padding: 10px 20px; 
    border-radius: 5px; 
}

.btn-contact:hover { 
    background-color: #132c45; 
}

/* ============================================================
   ÚVODNÍ SEKCE A EFEKT ODHALENÍ (HERO & CURTAIN REVEAL)
   ============================================================ */
.hero {
    box-sizing: border-box; 
    min-height: calc(100vh - 65px); 
    display: flex; 
    flex-direction: column; 
    padding: 40px 0 0 0; 
    text-align: center;
    border-bottom: 5px solid var(--secondary-color);
    position: relative;
    transition: min-height 1.5s cubic-bezier(0.22, 1, 0.36, 1), 
                padding 1.5s cubic-bezier(0.22, 1, 0.36, 1), 
                border-color 1s ease;
}

.hero .container { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    flex-grow: 1; 
    width: 100%; 
}

.hero h1 { 
    font-size: 2.5rem; 
    margin-bottom: 10px; 
    margin-top: 4vh; 
}

.hero-subtitle { 
    font-size: 1.2rem; 
    color: var(--text-light); 
    margin-bottom: 40px; 
}

.hero-text-box {
    max-width: 800px; 
    background: var(--white); 
    padding: 30px;
    border-left: 5px solid var(--primary-color); 
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: left; 
    margin: 0 auto;
    transition: all 1.5s cubic-bezier(0.22, 1, 0.36, 1) 0.1s;
}

/* Interaktivní prvky a tlačítka */
.btn-main {
    display: inline-block; 
    background-color: transparent; 
    border: 2px solid var(--primary-color);
    color: var(--primary-color); 
    padding: 12px 30px; 
    font-weight: bold; 
    border-radius: 5px;
    transition: all 0.3s; 
    margin-top: auto; 
    margin-bottom: 15px; 
}

.btn-main:hover { 
    background-color: var(--primary-color); 
    color: #ffffff; 
    transform: translateY(-3px); 
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); 
}

/* Indikátor pro scrollování (Šipka) */
.scroll-arrow {
    display: block; 
    width: 20px; 
    height: 20px;
    border-bottom: 4px solid var(--primary-color); 
    border-right: 4px solid var(--primary-color);
    transform: rotate(45deg); 
    margin: auto auto 80px auto; 
    animation: bounce 2s infinite; 
    cursor: pointer; 
    backface-visibility: hidden; 
    outline: 1px solid transparent; 
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1); 
    opacity: 1;
}

.scroll-arrow:hover { 
    border-color: var(--secondary-color); 
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) rotate(45deg); }
    40% { transform: translateY(-15px) rotate(45deg); }
    60% { transform: translateY(-7px) rotate(45deg); }
}

/* Zobrazený stav po interakci uživatele (Revealed state) */
.hero.hero-revealed { 
    min-height: 25vh; 
    border-bottom-color: transparent; 
    padding-bottom: 0; 
}

.hero.hero-revealed .scroll-arrow { 
    opacity: 0; 
    margin: 0; 
    height: 0; 
    border-width: 0; 
    pointer-events: none; 
}

.hero.hero-revealed .hero-text-box {
    box-shadow: 0 10px 30px rgba(0,0,0,0.03); 
    max-width: 1000px;
    border-left: 0; 
    border-top: 5px solid var(--secondary-color);
    background-color: rgba(255, 255, 255, 0.98); 
    margin-bottom: -1px;
    transform: translateY(30px); 
    z-index: 10; 
    position: relative; 
    border-radius: 12px 12px 0 0;
}

/* ============================================================
   SEKCE SLUŽBY A MŘÍŽKA KARET (SERVICES & CARDS)
   ============================================================ */
.services { 
    padding: 80px 0; 
    background-color: rgba(255, 255, 255, 0.75); 
    transition: transform 1.5s cubic-bezier(0.22, 1, 0.36, 1) 0.1s; 
}

.services h2 { 
    text-align: center; 
    margin-bottom: 50px; 
}

.section-subtitle { 
    text-align: center; 
    color: var(--text-light); 
    margin-bottom: 50px; 
    font-size: 1.1rem; 
    max-width: 600px; 
    margin-left: auto; 
    margin-right: auto; 
}

.services-grid-interactive { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 30px; 
}

.card-interactive {
    background: var(--bg-light); 
    padding: 40px; 
    border-radius: 8px; 
    border-top: 3px solid var(--secondary-color);
    display: flex; 
    flex-direction: column; 
    text-align: left; 
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
    cursor: pointer; 
    text-decoration: none; 
    min-height: 200px; 
}

.card-interactive h3 { 
    font-size: 1.4rem; 
    margin-bottom: 15px; 
    margin-top: 0; 
    transition: color 0.3s ease; 
    color: var(--primary-color); 
}

.card-interactive p { 
    font-size: 1rem; 
    color: var(--text-dark); 
    flex-grow: 1; 
    margin: 0; 
}

.card-more { 
    font-size: 0.95rem; 
    font-weight: bold; 
    color: var(--secondary-color); 
    margin-top: 25px; 
    display: inline-block; 
    transition: color 0.3s ease, transform 0.3s ease; 
}

.card-interactive:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 15px 35px rgba(26, 60, 94, 0.15); 
    border-top: 3px solid var(--primary-color); 
    background: var(--white); 
}

.card-interactive:hover h3 { 
    color: var(--secondary-color); 
}

.card-interactive:hover .card-more { 
    color: var(--primary-color); 
    transform: translateX(5px); 
}

/* ============================================================
   MODÁLNÍ OKNA - CSS IMPLEMENTACE (MODALS)
   ============================================================ */
.modal-overlay {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0, 0, 0, 0.7); 
    z-index: 2000;
    display: flex; 
    justify-content: center; 
    align-items: center;
    opacity: 0; 
    visibility: hidden; 
    transition: opacity 0.4s, visibility 0.4s; 
    color: var(--text-dark); 
}

.modal-overlay:target { 
    opacity: 1; 
    visibility: visible; 
}

.modal-content {
    background: var(--white); 
    padding: 50px; 
    border-radius: 10px;
    max-width: 700px; 
    width: 90%; 
    max-height: 80vh; 
    overflow-y: auto;
    position: relative; 
    border-left: 5px solid var(--secondary-color);
    transform: scale(0.5); 
    transition: transform 0.4s ease-out; 
}

.modal-overlay:target .modal-content { 
    transform: scale(1); 
}

.modal-header { 
    display: flex; 
    align-items: center; 
    border-bottom: 2px solid var(--bg-light); 
    padding-bottom: 20px; 
    margin-bottom: 30px; 
}

.modal-number { 
    font-size: 2rem; 
    font-weight: bold; 
    color: var(--white); 
    background-color: var(--secondary-color); 
    width: 60px; 
    height: 60px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    border-radius: 50%; 
    font-family: 'Merriweather', serif; 
    margin-right: 20px; 
}

.modal-header h3 { 
    margin: 0; 
    font-size: 1.6rem; 
}

.modal-body ul { 
    list-style-type: none; 
    padding-left: 0; 
    margin-bottom: 30px; 
}

.modal-body ul li { 
    padding-left: 25px; 
    position: relative; 
    margin-bottom: 12px; 
}

.modal-body ul li:before { 
    content: "✓"; 
    position: absolute; 
    left: 0; 
    color: var(--secondary-color); 
    font-weight: bold; 
}

.modal-body h4 { 
    color: var(--primary-color); 
    margin-top: 25px; 
    margin-bottom: 15px; 
}

.modal-steps { 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
    margin-bottom: 30px; 
}

.step { 
    background: var(--bg-light); 
    padding: 15px; 
    border-radius: 5px; 
}

.modal-footer { 
    border-top: 1px solid rgba(0,0,0,0.1); 
    padding-top: 30px; 
    text-align: center; 
}

/* ============================================================
   SEKCE O MNĚ A REFERENCE (ABOUT & REFERENCES)
   ============================================================ */
.about { 
    padding: 80px 0; 
    background-color: rgba(255, 255, 255, 0.75); 
}

.about-content { 
    display: flex; 
    flex-wrap: wrap; 
    align-items: flex-start; 
    gap: 40px; 
}

.about-text { 
    flex: 2; 
    min-width: 300px; 
}

.about-image { 
    flex: 1; 
    min-width: 250px; 
    text-align: center; 
}

.about-image img { 
    width: 100%; 
    max-width: 350px; 
    border-radius: 10px; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.15); 
    border: 5px solid var(--white); 
}

.references-wrapper { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 20px; 
    width: 100%; 
}

.references { 
    flex: 1; 
    min-width: 250px; 
    margin-top: 30px; 
    background: var(--white); 
    padding: 25px; 
    border-left: 4px solid var(--secondary-color); 
    border-radius: 0 8px 8px 0; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); 
}

.ref-document-preview:hover .hover-overlay { 
    opacity: 1 !important; 
}

.ref-document-preview:hover img { 
    transform: scale(1.05); 
}

/* ============================================================
   SEKCE KONTAKT (CONTACT)
   ============================================================ */
.contact { 
    padding: 80px 0 40px 0; 
    background-color: var(--primary-color); 
    color: var(--white); 
    text-align: center; 
}

.contact h2 { 
    color: var(--white); 
}

.contact-intro { 
    margin-bottom: 50px; 
    font-size: 1.1rem; 
    opacity: 0.9; 
}

/* Grid layout pro kontaktní karty */
.contact-cards { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 30px; 
    margin: 0 auto 60px auto;
    max-width: 1000px;
    width: 100%;
}

.card { 
    background: rgba(255,255,255,0.1); 
    padding: 30px; 
    border-radius: 8px; 
    
    /* Vynucení fixního poměru stran 1:1 */
    aspect-ratio: 1 / 1;
    
    /* Centrování obsahu pomocí Flexboxu */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
}

.card h3 { 
    color: var(--secondary-color); 
    font-size: 1.2rem; 
    margin-bottom: 15px; 
}

.card p { 
    margin: 0; 
    line-height: 1.6; 
}

.card a { 
    color: var(--white); 
    font-weight: bold; 
    text-decoration: underline; 
}

/* Kontaktní formulář */
.contact-form-container { 
    background: var(--white); 
    color: var(--text-dark); 
    max-width: 650px; 
    margin: 40px auto 60px auto; 
    padding: 40px; 
    border-radius: 8px; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.15); 
    text-align: left; 
}

.contact-form-container h3 { 
    margin-top: 0; 
    text-align: center; 
    color: var(--primary-color); 
    margin-bottom: 30px; 
}

.form-group { 
    margin-bottom: 20px; 
}

.form-group label { 
    display: block; 
    margin-bottom: 8px; 
    font-weight: 600; 
    font-size: 0.95rem; 
    color: var(--primary-color); 
}

.contact-form input, 
.contact-form select, 
.contact-form textarea { 
    width: 100%; 
    padding: 12px; 
    border: 1px solid #ccc; 
    border-radius: 5px; 
    font-family: inherit; 
    font-size: 1rem; 
    box-sizing: border-box; 
    background-color: #fcfcfc; 
}

.contact-form input:focus, 
.contact-form select:focus, 
.contact-form textarea:focus { 
    outline: none; 
    border-color: var(--secondary-color); 
    box-shadow: 0 0 5px rgba(212, 163, 115, 0.5); 
    background-color: var(--white); 
}

.btn-submit { 
    background-color: var(--secondary-color); 
    color: var(--white); 
    border: none; 
    padding: 15px 20px; 
    width: 100%; 
    font-size: 1.1rem; 
    font-weight: bold; 
    border-radius: 5px; 
    cursor: pointer; 
    transition: background 0.3s; 
    margin-top: 10px; 
}

.btn-submit:hover { 
    background-color: #b88a5d; 
}

/* ============================================================
   ROZLOŽENÍ BLOGU (BLOG LAYOUT)
   ============================================================ */
.blog-section { 
    padding: 60px 0 100px 0; 
}

.blog-container { 
    display: flex; 
    gap: 40px; 
    align-items: flex-start; 
}

.blog-sidebar { 
    flex: 0 0 260px; 
    position: sticky; 
    top: 100px; 
    background-color: rgba(255, 255, 255, 0.75); 
    padding: 30px; 
    border-radius: 8px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); 
    border-left: 4px solid var(--secondary-color); 
}

.blog-sidebar h3 { 
    margin-top: 0; 
    margin-bottom: 20px; 
    font-size: 1.3rem; 
}

.category-list { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
}

.category-list li { 
    margin-bottom: 8px; 
}

.category-list a { 
    display: block; 
    padding: 10px 15px; 
    color: var(--text-dark); 
    border-radius: 5px; 
    transition: all 0.3s ease; 
    text-decoration: none; 
}

.category-list a:hover, 
.category-list a.active { 
    background-color: rgba(26, 60, 94, 0.1); 
    color: var(--primary-color); 
    font-weight: bold; 
    transform: translateX(5px); 
}

.blog-main { 
    flex: 1; 
}

.blog-pagination { 
    margin-top: 50px; 
    margin-bottom: 20px; 
    text-align: center; 
    width: 100%; 
}

.blog-pagination .nav-links { 
    display: inline-flex; 
    flex-wrap: wrap; 
    gap: 10px; 
    justify-content: center; 
    align-items: center; 
}

.blog-pagination .page-numbers { 
    display: inline-block; 
    padding: 10px 18px; 
    background-color: var(--white); 
    color: var(--primary-color); 
    border: 2px solid var(--primary-color); 
    border-radius: 5px; 
    text-decoration: none; 
    font-weight: bold; 
    transition: all 0.3s ease; 
}

.blog-pagination .page-numbers:hover { 
    background-color: var(--primary-color); 
    color: var(--white); 
    transform: translateY(-2px); 
}

.blog-pagination .page-numbers.current { 
    background-color: var(--secondary-color); 
    border-color: var(--secondary-color); 
    color: var(--white); 
    cursor: default; 
    transform: none; 
}

#blog-intro-section { 
    overflow: hidden; 
    max-height: 1000px; 
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1); 
}

#blog-intro-section.zabalit-intro { 
    max-height: 0 !important; 
    padding-top: 0 !important; 
    padding-bottom: 0 !important; 
    border-width: 0 !important; 
    opacity: 0; 
}

/* ============================================================
   IKONY SOCIÁLNÍCH SÍTÍ (SOCIAL LINKS)
   ============================================================ */
.social-links-container { 
    display: flex; 
    flex-direction: row; 
    justify-content: center; 
    align-items: center; 
    gap: 20px; 
    margin-top: 15px; 
}

.social-link { 
    display: block; 
    width: 45px; 
    height: 45px; 
    text-indent: -9999px; 
    overflow: hidden; 
    color: transparent; 
    background-repeat: no-repeat; 
    background-size: auto 100%; 
    background-position: center center; 
    transition: transform 0.2s ease, opacity 0.3s ease; 
    cursor: pointer; 
    text-decoration: none; 
}

.social-link:hover { 
    opacity: 0.8; 
    transform: scale(1.1); 
}

.social-link.linkedin-link { 
    background-image: url('InBug-Black.png'); 
}

.social-link.instagram-link { 
    background-image: url('Instagram_Glyph_Black.png'); 
    background-size: contain; 
}

/* ============================================================
   TMAVÝ REŽIM DOKUMENTU (DARK MODE)
   ============================================================ */
.dark-mode-btn { 
    position: fixed; 
    bottom: 30px; 
    right: 30px; 
    background-color: var(--primary-color); 
    color: var(--white); 
    border: 2px solid var(--secondary-color); 
    border-radius: 50%; 
    width: 55px; 
    height: 55px; 
    font-size: 1.5rem; 
    cursor: pointer; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.3); 
    z-index: 9999; 
    transition: transform 0.3s ease, background-color 0.3s ease; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
}

.dark-mode-btn:hover { 
    transform: scale(1.1); 
    background-color: var(--secondary-color); 
}

body.dark-mode {
    --bg-light: #222222; 
    --white: #121212; 
    --text-dark: #f0f0f0; 
    --text-light: #aaaaaa; 
    --primary-color: #5a8ec2; 
    background-image: var(--pattern-blueprint-dark);
}

body.dark-mode .scroll-arrow { 
    border-color: var(--secondary-color); 
}

body.dark-mode .hero.hero-revealed .hero-text-box { 
    background-color: rgba(34, 34, 34, 0.98); 
    border-left: 0; 
    border-right: 1px solid #333; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); 
}

body.dark-mode .services, 
body.dark-mode .about { 
    background-color: rgba(34, 34, 34, 0.75); 
}

body.dark-mode .contact-form input, 
body.dark-mode .contact-form select, 
body.dark-mode .contact-form textarea { 
    background-color: #333333; 
    color: var(--text-dark); 
    border-color: #555555; 
}

body.dark-mode .card, 
body.dark-mode .card-interactive, 
body.dark-mode .modal-content, 
body.dark-mode .contact-form-container { 
    border: 1px solid #333; 
}

body.dark-mode .references { 
    border: 1px solid #333; 
    border-left: 4px solid var(--secondary-color); 
}

body.dark-mode .blog-sidebar { 
    background-color: rgba(34, 34, 34, 0.75); 
    border: 1px solid #333; 
    border-left: 4px solid var(--secondary-color); 
}

body.dark-mode .category-list a:hover, 
body.dark-mode .category-list a.active { 
    background-color: rgba(90, 142, 194, 0.2); 
    color: var(--primary-color); 
}

body.dark-mode .blog-pagination .page-numbers { 
    background-color: transparent; 
    border-color: var(--secondary-color); 
    color: var(--text-dark); 
}

body.dark-mode .blog-pagination .page-numbers:hover { 
    background-color: var(--secondary-color); 
    color: var(--white); 
}

body.dark-mode .blog-pagination .page-numbers.current { 
    background-color: var(--secondary-color); 
    color: var(--white); 
}

.dark-mode .social-link { 
    background-color: transparent !important; 
}

.dark-mode .social-link.linkedin-link { 
    background-image: url('InBug-White.png'); 
}

.dark-mode .social-link.instagram-link { 
    background-image: url('instagram_white.png'); 
    background-size: contain; 
}

.dark-mode .social-link:hover { 
    opacity: 0.7; 
}

/* ============================================================
   OPTIMALIZACE PRO MOBILNÍ ZAŘÍZENÍ (MOBILE OPTIMIZATION)
   ============================================================ */
@media (max-width: 900px) {
    .blog-container { 
        flex-direction: column; 
    }
    
    .blog-sidebar { 
        position: static; 
        width: 100%; 
        box-sizing: border-box; 
        margin-bottom: 30px; 
    }
}

@media (max-width: 768px) {
    .header-content { 
        flex-direction: row; 
        justify-content: space-between; 
        align-items: center; 
        padding: 15px 20px; 
        position: relative; 
    }
    
    .hamburger { 
        display: block; 
    }
    
    nav { 
        display: none; 
        flex-direction: column; 
        position: absolute; 
        top: 100%; 
        left: 0; 
        width: 100%; 
        background-color: var(--white); 
        box-shadow: 0 10px 15px rgba(0,0,0,0.1); 
        padding: 10px 0; 
        z-index: 1000; 
    }
    
    nav.active { 
        display: flex; 
    }
    
    nav a { 
        margin: 0; 
        padding: 15px 20px; 
        border-bottom: 1px solid rgba(0,0,0,0.05); 
        text-align: left; 
    }
    
    nav a:last-child { 
        border-bottom: none; 
    }
    
    body.dark-mode nav { 
        background-color: var(--bg-light); 
    }

    .hero h1 { 
        font-size: 2.2rem !important; 
        line-height: 1.2; 
        margin-top: 2vh; 
    }
    
    .hero-subtitle { 
        font-size: 1.1rem; 
    }
    
    .hero-text-box { 
        padding: 20px; 
        font-size: 0.95rem; 
        margin: 0 15px auto 15px; 
    }

    .container { 
        padding: 0 15px; 
        box-sizing: border-box; 
    }
    
    section { 
        padding: 60px 0; 
    }
    
    .services, 
    .about, 
    .contact, 
    .blog-section { 
        padding: 50px 0; 
    }
    
    .services-grid-interactive { 
        grid-template-columns: 1fr; 
        gap: 20px; 
    }
    
    .card-interactive { 
        padding: 30px; 
        text-align: center; 
    }

    .about-content { 
        flex-direction: column; 
        text-align: center; 
    }
    
    .about-image { 
        margin-top: 30px; 
        width: 100%; 
        max-width: 300px; 
        margin-left: auto; 
        margin-right: auto; 
    }

    .contact-cards { 
        flex-direction: column; 
        gap: 20px; 
    }
    
    .contact-cards .card { 
        width: 100%; 
        margin-bottom: 0; 
    }

    .modal-content { 
        width: 95%; 
        padding: 25px 20px; 
        margin: 10% auto; 
    }
    
    .dark-mode-btn { 
        bottom: 20px; 
        right: 20px; 
        width: 50px; 
        height: 50px; 
        font-size: 1.5rem; 
    }
}

/* ============================================================
   VSTUPNÍ DEFINICE EFEKTU GLASSMORPHISM
   ============================================================ */
body {
    /* Aplikace jemného překryvného filtru pozadí */
    background: linear-gradient(rgba(235, 235, 235, 0.85), rgba(235, 235, 235, 0.85)), 
                url('moje-pozadi.png') no-repeat center center !important;
    background-attachment: fixed !important; 
    background-size: cover !important; 
}

.services, 
.about, 
.contact, 
.blog-section { 
    background-color: transparent !important; 
}

header, 
.hero-text-box, 
.card-interactive, 
.blog-sidebar, 
.contact-form-container, 
.references, 
.card, 
.modal-content, 
.ref-card {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08), 0 5px 15px rgba(26, 60, 94, 0.05) !important;
    border: 1px solid rgba(26, 60, 94, 0.15) !important;
    position: relative; 
    z-index: 10;
}

header { 
    background: rgba(255, 255, 255, 0.85) !important; 
}

body.dark-mode {
    background: linear-gradient(rgba(30, 30, 30, 0.85), rgba(30, 30, 30, 0.85)), 
                url('moje-pozadi.png') no-repeat center center !important;
}

body.dark-mode header, 
body.dark-mode .hero-text-box, 
body.dark-mode .card-interactive, 
body.dark-mode .blog-sidebar, 
body.dark-mode .contact-form-container, 
body.dark-mode .references, 
body.dark-mode .card, 
body.dark-mode .modal-content, 
body.dark-mode .ref-card {
    background: rgba(40, 40, 40, 0.7) !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* ============================================================
   ANIMACE: SCROLL REVEAL (Přílet prvků)
   ============================================================ */
.reveal-left, 
.reveal-right, 
.reveal-bottom {
    opacity: 0;
    will-change: transform, opacity;
    transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1), 
                opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.reveal-left { transform: translateX(-150px); }
.reveal-right { transform: translateX(150px); }
.reveal-bottom { transform: translateY(100px) scale(0.92); }

.is-visible {
    opacity: 1 !important;
    /* Upozornění: Absence !important u transformace zajišťuje funkčnost 3D hover efektu */
    transform: translate(0, 0) scale(1); 
}

/* ============================================================
   STYLY: 3D TRANSFORMACE A HOVER EFEKTY KARET
   ============================================================ */
.card-interactive, 
.ref-card {
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

.card-interactive:hover, 
.ref-card:hover {
    background: rgba(255, 255, 255, 0.98) !important;
    border-color: var(--secondary-color) !important;
    box-shadow: 0 15px 35px rgba(212, 163, 115, 0.15) !important;
}

body.dark-mode .card-interactive:hover, 
body.dark-mode .ref-card:hover {
    background: rgba(50, 50, 50, 0.9) !important;
    box-shadow: 0 15px 35px rgba(212, 163, 115, 0.15) !important;
}

/* ============================================================
   KONTRAST A ČITELNOST BAREV V SEKCI KONTAKT
   ============================================================ */
.contact h2, 
.contact .contact-intro, 
.contact .card h3, 
.contact-form-container h3, 
.form-group label {
    color: var(--primary-color) !important;
}

.contact .card p, 
.contact .card a {
    color: var(--text-dark) !important; 
    text-decoration: none !important;
}

.contact .card a:hover {
    color: var(--secondary-color) !important; 
    text-decoration: underline !important;
}

body.dark-mode .contact h2, 
body.dark-mode .contact .contact-intro, 
body.dark-mode .card p, 
body.dark-mode .card a {
    color: var(--text-dark) !important; 
}

body.dark-mode .contact .card h3, 
body.dark-mode .contact-form-container h3 {
    color: var(--secondary-color) !important;
}

/* ============================================================
   ANIMACE: ZVÝRAZNĚNÍ NADPISŮ PŘI SCROLLOVÁNÍ
   ============================================================ */
.services h2, 
.about h2, 
.contact h2, 
.section-subtitle {
    position: relative; 
    display: inline-block; 
    padding: 10px 30px; 
    border-radius: 15px; 
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.services h2::after, 
.about h2::after, 
.contact h2::after {
    content: ''; 
    position: absolute; 
    bottom: 5px; 
    left: 50%; 
    width: 0; 
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1); 
    transform: translateX(-50%); 
    opacity: 0;
}

.ambient-highlight {
    transform: translateY(-3px) scale(1.02); 
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.6); 
    backdrop-filter: blur(8px); 
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 10px 30px rgba(212, 163, 115, 0.15); 
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: var(--primary-color) !important;
}

.ambient-highlight::after { 
    width: 70% !important; 
    opacity: 1 !important; 
}

body.dark-mode .ambient-highlight {
    background: rgba(30, 30, 30, 0.6); 
    box-shadow: 0 10px 30px rgba(212, 163, 115, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1); 
    color: var(--secondary-color) !important;
}

/* ============================================================
   STYLY: SEKCE O MNĚ (Kaskádové zobrazení odstavců)
   ============================================================ */
/* Aplikace pozadí s efektem rozostření */
.about-text {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid rgba(26, 60, 94, 0.15) !important;
    position: relative;
    z-index: 10;
}

body.dark-mode .about-text {
    background: rgba(40, 40, 40, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Výchozí stav pro animaci odstavců */
.about-text p {
    opacity: 0;
    transform: translateY(20px);
    filter: blur(5px); 
    color: var(--secondary-color); 
    /* Nastavení délky trvání animace na 0.5s */
    transition: opacity 0.5s ease, transform 0.5s ease, filter 0.5s ease, color 0.8s ease;
}

/* Zobrazený stav po animaci */
.about-text.is-visible p {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    color: var(--text-dark); 
}

/* Nastavení zpoždění pro kaskádový efekt (Staggering) */
.about-text.is-visible p:nth-child(1) { transition-delay: 0.15s; }
.about-text.is-visible p:nth-child(2) { transition-delay: 0.3s; }
.about-text.is-visible p:nth-child(3) { transition-delay: 0.45s; }

body.dark-mode .about-text.is-visible p {
    color: var(--text-dark); 
}

/* ============================================================
   KASKÁDOVÉ ANIMACE: POLOŽKY REFERENCÍ
   ============================================================ */
/* Výchozí stav bloku referencí */
.references {
    opacity: 0;
    transform: translateY(50px);
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform, opacity;
}

.references.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Výchozí stav pro položky seznamu */
.references li {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Konečný stav animace položek */
.references.is-visible li {
    opacity: 1;
    transform: translateX(0);
}

/* Zpoždění pro kaskádový efekt odrážek */
.references.is-visible li:nth-child(1) { transition-delay: 0.3s; }
.references.is-visible li:nth-child(2) { transition-delay: 0.4s; }
.references.is-visible li:nth-child(3) { transition-delay: 0.5s; }
.references.is-visible li:nth-child(4) { transition-delay: 0.6s; }
.references.is-visible li:nth-child(5) { transition-delay: 0.7s; }
.references.is-visible li:nth-child(6) { transition-delay: 0.8s; }
.references.is-visible li:nth-child(7) { transition-delay: 0.9s; }
.references.is-visible li:nth-child(8) { transition-delay: 1.0s; }
.references.is-visible li:nth-child(9) { transition-delay: 1.1s; }
.references.is-visible li:nth-child(10) { transition-delay: 1.2s; }

/* ============================================================
   STYLOVÁNÍ A ANIMACE: KONTAKTNÍ VÝZVA (CTA)
   ============================================================ */
.contact-intro {
    /* Omezení šířky a zaoblení (Pill shape) */
    display: inline-block;
    padding: 15px 35px;
    border-radius: 50px;
    margin-bottom: 50px;
    
    /* Efekt rozostření pozadí */
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    
    /* Barevné akcenty */
    border: 1px solid rgba(212, 163, 115, 0.5) !important;
    color: var(--primary-color) !important;
    font-weight: 600;
    font-size: 1.15rem;
    
    /* Přiřazení nekonečné pulzující animace */
    animation: pulse-contact 3s infinite alternate ease-in-out;
}

/* Definice pulzující animace */
@keyframes pulse-contact {
    0% { 
        transform: scale(1); 
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05), 0 0 10px rgba(212, 163, 115, 0.1) !important; 
    }
    100% { 
        transform: scale(1.03); 
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1), 0 0 25px rgba(212, 163, 115, 0.5) !important; 
        border-color: var(--secondary-color) !important; 
    }
}

body.dark-mode .contact-intro {
    background: rgba(40, 40, 40, 0.85) !important;
    color: #ffffff !important;
    border: 1px solid rgba(212, 163, 115, 0.3) !important;
}

/* ============================================================
   ROZLOŽENÍ A ANIMACE: BLOKOVÉ PODNADPISY
   ============================================================ */
/* Omezení šířky nadpisů pro zamezení překryvu */
.services h2,
.contact h2,
.about h2 {
    display: block !important;
    width: fit-content;
    width: -moz-fit-content; 
    margin: 0 auto 20px auto !important;
}

/* Omezení šířky a aplikace designu pilulky (Pill shape) */
.section-subtitle,
.contact-intro {
    display: block !important;
    width: fit-content;
    width: -moz-fit-content;
    margin: 0 auto 60px auto !important;
    
    padding: 12px 35px;
    border-radius: 50px !important;
    text-align: center;
    font-weight: 600;
    
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(212, 163, 115, 0.4) !important;
    color: var(--primary-color) !important;
    
    animation: levitate-glow 4s infinite ease-in-out;
}

@keyframes levitate-glow {
    0%, 100% {
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05), 0 0 10px rgba(212, 163, 115, 0.1) !important;
    }
    50% {
        box-shadow: 0 20px 35px rgba(0, 0, 0, 0.1), 0 0 25px rgba(212, 163, 115, 0.6) !important;
        border-color: var(--secondary-color) !important; 
    }
}

body.dark-mode .section-subtitle,
body.dark-mode .contact-intro {
    background: rgba(30, 30, 30, 0.9) !important;
    border: 1px solid rgba(212, 163, 115, 0.3) !important;
    color: #ffffff !important;
}

/* ============================================================
   ANIMACE NADPISU: REFERENČNÍ SEKCE
   ============================================================ */
.verified-references h3 {
    display: block !important;
    width: fit-content;
    width: -moz-fit-content;
    margin: 0 auto 50px auto !important; 
    padding: 15px 45px !important;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(212, 163, 115, 0.4) !important;
    
    /* Fáze 1: Skrytý výchozí stav */
    opacity: 0;
    transform: translateY(80px);
    transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1), transform 1s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

/* Fáze 2: Viditelný stav (třída přidána přes JS) */
.verified-references h3.is-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
    
    /* Fáze 3: Aktivace pulzující animace se zpožděním */
    animation: premium-glow 3.5s infinite alternate ease-in-out 1s;
}

/* Definice pulzující animace nadpisu */
@keyframes premium-glow {
    0% { box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05), 0 0 0 rgba(212, 163, 115, 0); }
    100% { 
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1), 0 0 30px rgba(212, 163, 115, 0.5) !important;
        border-color: var(--secondary-color) !important; 
    }
}

body.dark-mode .verified-references h3 {
    background: rgba(30, 30, 30, 0.9) !important;
    color: var(--secondary-color) !important;
    border: 1px solid rgba(212, 163, 115, 0.3) !important;
}

/* ============================================================
   ANIMACE A STYLY: DETAIL ČLÁNKU
   ============================================================ */
/* Pozadí obsahu článku (Glassmorphism) */
.obsah-clanku {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    /* Vnitřní odsazení */
    padding: 50px 60px; 
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(26, 60, 94, 0.15);
    margin-top: 20px;
    max-width: 900px; 
    margin-left: auto;
    margin-right: auto;
}

body.dark-mode .obsah-clanku {
    background: rgba(30, 30, 30, 0.8) !important;
    border-color: rgba(255,255,255,0.1);
}

/* Výchozí stav odstavců v článku */
.text-hidden {
    opacity: 0;
    transform: translateY(10px) scale(0.99); 
    filter: blur(3px); 
    transition: opacity 0.4s ease-out, transform 0.4s ease-out, filter 0.4s ease-out;
    will-change: opacity, transform, filter;
}

.text-visible {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
    filter: blur(0) !important;
}

/* Fixní hlavička článku při scrollování */
.blog-dynamic-header {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(26, 60, 94, 0.15) !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08) !important;
    border-radius: 12px !important;
    max-width: 900px !important;
    margin: 0 auto 20px auto !important;
    padding: 30px 40px !important;
    
    position: relative;
    z-index: 100;
    
    animation: header-return 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes header-return {
    0% { opacity: 0; transform: translateY(-20px); }
    100% { opacity: 1; transform: translateY(0); }
}

body.dark-mode .blog-dynamic-header {
    background: rgba(30, 30, 30, 0.8) !important;
    border-color: rgba(255,255,255,0.1) !important;
}

/* Alternativní rozložení hlavičky (Sidebar mód) */
.blog-dynamic-header.uhni-na-bok {
    position: fixed !important;
    top: 100px !important; 
    left: 2vw !important;  
    max-width: 300px !important; 
    padding: 20px !important;
    margin: 0 !important; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.15) !important;
    transform-origin: center left;
    
    /* Animace příjezdu hlavičky ze strany */
    animation: prilet-zleva 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
}

@keyframes prilet-zleva {
    0% { 
        transform: translateX(-150%) scale(0.85); 
        opacity: 0; 
    }
    100% { 
        transform: translateX(0) scale(0.9); 
        opacity: 1; 
    }
}

.blog-dynamic-header.uhni-na-bok:hover {
    opacity: 1 !important;
    transform: scale(0.95) !important;
    transition: transform 0.3s ease !important; 
}

@media (max-width: 1300px) {
    .blog-dynamic-header.uhni-na-bok {
        position: relative !important; 
        top: auto !important; 
        left: auto !important;
        max-width: 100% !important; 
        transform: none !important;
        opacity: 1 !important; 
        margin: 0 auto 20px auto !important;
        animation: none !important;
    }
}

/* ============================================================
   ROZLOŽENÍ PATIČKY DOKUMENTU (FOOTER ALIGNMENT)
   ============================================================ */
/* Definice minimální výšky dokumentu pro uchycení patičky */
body {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
}

/* Přichycení patičky na spodní okraj obrazovky */
footer {
    margin-top: auto !important;
    width: 100% !important; 
    z-index: 100; 
}

/* ============================================================
   APLIKACE FILTRU POZADÍ PRO TMAVÝ REŽIM
   ============================================================ */
body.dark-mode {
    background-image: linear-gradient(rgba(30, 30, 30, 0.88), rgba(30, 30, 30, 0.88)), url('moje-pozadi.png') !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
    background-size: cover !important;
    background-color: #1e1e1e !important;
}

/* ============================================================
   PLOVOUCÍ BOČNÍ NAVIGACE (SIDE NAVIGATION)
   ============================================================ */
.floating-side-nav {
    position: fixed;
    top: 50%;
    right: 2vw;
    transform: translateY(-50%) translateX(50px);
    display: flex;
    flex-direction: column;
    gap: 15px; 
    z-index: 1500;
    opacity: 0;
    pointer-events: none;
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 25px 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid rgba(26, 60, 94, 0.15);
    align-items: flex-end; 
}

.floating-side-nav.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0);
}

.floating-side-nav .side-link {
    text-decoration: none;
}

.floating-side-nav .label {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-color);
    opacity: 0.5; 
    transition: all 0.3s ease;
    display: block;
}

.floating-side-nav .side-link:hover .label {
    opacity: 0.8;
    transform: scale(1.05);
    transform-origin: right center;
}

.floating-side-nav .side-link.active .label {
    opacity: 1 !important;
    color: var(--secondary-color) !important; 
    transform: scale(1.15); 
    transform-origin: right center;
    text-shadow: 0 0 15px rgba(212, 163, 115, 0.5); 
    font-weight: 800;
}

body.dark-mode .floating-side-nav {
    background: rgba(30, 30, 30, 0.8);
    border-color: rgba(255,255,255,0.1);
}

body.dark-mode .floating-side-nav .label { 
    color: #fff; 
}

body.dark-mode .floating-side-nav .side-link.active .label { 
    color: var(--secondary-color) !important; 
}

@media (max-width: 980px) {
    .floating-side-nav { 
        display: none !important; 
    }
}

/* ============================================================
   STYLOVÁNÍ: PODNADPIS HERO SEKCE
   ============================================================ */
.hero-subtitle {
    display: inline-block; 
    width: fit-content;
    width: -moz-fit-content;
    margin: 15px auto 40px auto !important;
    padding: 12px 35px;
    border-radius: 50px;
    
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    
    border: 1px solid rgba(212, 163, 115, 0.4) !important;
    color: var(--primary-color) !important;
    font-weight: 600;
    font-size: 1.25rem; 
    
    animation: hero-glow 3.5s infinite alternate ease-in-out;
}

@keyframes hero-glow {
    0% {
        transform: scale(1);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05), 0 0 0 rgba(212, 163, 115, 0);
    }
    100% {
        transform: scale(1.03); 
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1), 0 0 25px rgba(212, 163, 115, 0.5) !important;
        border-color: var(--secondary-color) !important; 
    }
}

body.dark-mode .hero-subtitle {
    background: rgba(30, 30, 30, 0.85) !important;
    color: #ffffff !important;
    border: 1px solid rgba(212, 163, 115, 0.3) !important;
}

/* ============================================================
   STYLOVÁNÍ: STICKY SIDEBAR BLOGU (KATEGORIE)
   ============================================================ */
@media (min-width: 980px) {
    .sticky-kategorie {
        position: sticky !important;
        position: -webkit-sticky !important; 
        top: 120px !important; 
        align-self: flex-start !important; 
        z-index: 50; 
        transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease !important;
    }

    .sticky-kategorie:hover {
        transform: translateY(-3px) scale(1.02) !important;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1) !important;
    }
}

/* ============================================================
   STYLOVÁNÍ: ZAVÍRACÍ TLAČÍTKO MODALU
   ============================================================ */
.close-modal {
    position: sticky;
    top: -20px; 
    float: right; 
    margin-right: -20px; 
    margin-bottom: 15px; 
    
    display: flex;
    justify-content: center;
    align-items: center;
    width: 45px; 
    height: 45px; 
    
    background-color: var(--bg-light);
    color: var(--primary-color);
    font-size: 2.2rem; 
    line-height: 1;
    text-decoration: none;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.close-modal:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: scale(1.15) rotate(90deg);
    box-shadow: 0 8px 25px rgba(26, 60, 94, 0.3);
}

body.dark-mode .close-modal {
    background-color: #333;
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

body.dark-mode .close-modal:hover {
    background-color: var(--secondary-color);
    color: #121212;
}

/* ============================================================
   MOBILNÍ OPTIMALIZACE: POZADÍ A ROZLOŽENÍ
   ============================================================ */
/* Odstranění pozadí body na mobilních zařízeních */
body {
    background-image: none !important;
    background-color: var(--bg-light) !important;
}

body.dark-mode {
    background-color: #1e1e1e !important;
}

/* Vytvoření fixní pseudo-vrstvy pro pozadí na mobilu */
body::before {
    content: '';
    position: fixed;
    top: -50px; 
    left: -50px; 
    right: -50px; 
    bottom: -50px;
    z-index: -10; 
    
    background: linear-gradient(rgba(235, 235, 235, 0.85), rgba(235, 235, 235, 0.85)), 
                url('moje-pozadi.png') no-repeat center center;
    background-size: cover;
    pointer-events: none; 
}

body.dark-mode::before {
    background: linear-gradient(rgba(30, 30, 30, 0.88), rgba(30, 30, 30, 0.88)), 
                url('moje-pozadi.png') no-repeat center center;
    background-size: cover;
}

header {
    position: sticky !important;
    position: -webkit-sticky !important; 
    top: 0 !important;
    z-index: 9999 !important; 
}

html, 
body {
    overflow-x: clip !important; 
}

@media (max-width: 768px) {
    nav.active {
        max-height: 80vh;
        overflow-y: auto;
        border-bottom: 3px solid var(--secondary-color);
    }
}

@media (max-width: 900px) {
    #blog-intro-section {
        position: fixed !important;
        top: 0; 
        left: 0;
        width: 100vw; 
        height: 100vh;
        z-index: 10001;
        background: var(--white) !important;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 30px !important;
        box-sizing: border-box;
    }

    .blog-sidebar {
        display: none; 
        position: fixed;
        top: 0; 
        left: 0;
        width: 100%; 
        height: 100%;
        background: white;
        z-index: 10002;
        padding: 60px 20px !important;
        overflow-y: auto;
    }
    
    .blog-sidebar.active {
        display: block !important;
        animation: fadeIn 0.3s ease;
    }

    .close-filter-btn {
        display: block !important;
        position: absolute;
        top: 20px; 
        right: 20px;
        font-size: 2.5rem;
        color: var(--primary-color);
        cursor: pointer;
    }
}

.mobile-filter-trigger {
    display: none;
    width: 100%;
    margin-bottom: 25px;
    background: var(--primary-color);
    color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

@media (max-width: 900px) {
    .mobile-filter-trigger { 
        display: block; 
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.mobile-category-header {
    display: none; 
    flex-direction: column;
    gap: 10px;
    margin-bottom: 25px;
}

.reset-filter-btn {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    text-decoration: none;
    border: 1px solid rgba(231, 76, 60, 0.3);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

@media (max-width: 900px) {
    .mobile-category-header { 
        display: flex; 
    }
    
    .mobile-category-header .mobile-filter-trigger { 
        margin-bottom: 0; 
        display: block; 
    }
}

/* ============================================================
   MEDIA QUERIES: CHOVÁNÍ HLAVIČKY A ODSKOČENÍ KOTVY
   ============================================================ */
@media (min-width: 769px) {
    header {
        position: relative !important; 
        top: auto !important;
    }
    
    html {
        scroll-padding-top: 40px !important;
    }
    
    #kontakt {
        scroll-margin-top: 40px !important;
    }
}

@media (max-width: 768px) {
    header {
        position: sticky !important;
        position: -webkit-sticky !important; 
        top: 0 !important;
    }
    
    html {
        scroll-padding-top: 100px !important;
    }
    
    #kontakt {
        scroll-margin-top: 100px !important;
    }
}