/* --- CORE VARIABLES --- */
:root {
    --bg-dark: #030712;
    --accent-primary: #2dd4bf; /* Teal neon */
    --accent-secondary: #a855f7; /* Electric Purple */
    --accent-glow: #f59e0b; /* Amber */
    --text-main: #ffffff;
    --text-muted: #9ca3af;
    --glass-panel: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --blur: 20px;
}

/* --- RESET & BASE --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
}

h1, h2, h3, h4 { font-family: 'Space Grotesk', sans-serif; letter-spacing: -0.03em; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* --- BACKGROUND FX --- */
.ambient-bg {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1;
    background: var(--bg-dark); overflow: hidden;
}
.orb {
    position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.4;
    animation: floatOrb 10s infinite alternate;
}
.orb-1 { width: 50vw; height: 50vw; background: var(--accent-primary); top: -10%; left: -10%; animation-duration: 20s; }
.orb-2 { width: 40vw; height: 40vw; background: var(--accent-secondary); bottom: -10%; right: -10%; animation-duration: 25s; }

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

.noise-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMDAiIGhlaWdodD0iMjAwIj48ZmlsdGVyIGlkPSJnoiPjxmZVR1cmJ1bGVuY2UgdHlwZT0iZnJhY3RhbE5vaXNlIiBiYXNlRnJlcXVlbmN5PSIwLjY1IiBudW1PY3RhdmVzPSIzIiBzdGl0Y2hUaWxlcz0ic3RpdGNoIi8+PC9maWx0ZXI+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsdGVyPSJ1cmwoI2cpIiBvcGFjaXR5PSIwLjA1Ii8+PC9zdmc+');
    pointer-events: none; z-index: 9999;
}

/* --- COMPONENTS --- */
.container { max-width: 1400px; margin: 0 auto; padding: 0 2rem; }

.btn {
    padding: 1rem 2rem; border-radius: 8px; font-weight: 600; 
    transition: 0.3s; display: inline-flex; align-items: center; gap: 10px;
    backdrop-filter: blur(10px); border: 1px solid var(--glass-border); cursor: pointer;
}
.btn-glow {
    background: rgba(45, 212, 191, 0.1); color: var(--accent-primary); border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(45, 212, 191, 0.2);
}
.btn-glow:hover { background: var(--accent-primary); color: #000; box-shadow: 0 0 40px rgba(45, 212, 191, 0.5); }

/* --- NAV --- */
nav { 
    padding: 2rem 0; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    /* Přidáno pro z-index menu */
    position: relative;
    z-index: 2000;
}
.logo { font-size: 1.5rem; font-weight: 700; color: #fff; }
.logo span { color: var(--accent-primary); }

/* --- HERO --- */
.hero { min-height: 80vh; display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 4rem; position: relative; }
.hero-text h1 {
    font-size: 5rem; line-height: 0.95; margin-bottom: 2rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-text h1 span {
    display: block; font-family: 'Inter', sans-serif; font-weight: 300;
    font-size: 1.5rem; letter-spacing: 5px; text-transform: uppercase;
    margin-bottom: 1rem; 
    
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--accent-primary); 
}

.hero-visual { position: relative; height: 500px; display: flex; align-items: center; justify-content: center; }
.portal-window {
    width: 100%; height: 100%; border-radius: 40px;
    background: url('img/hero.jpg') center/cover;
    mask-image: linear-gradient(black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(black 80%, transparent 100%);
}

/* --- KATEGORIE GRID (BENTO/MASONRY FIX) --- */
.category-section { padding: 5rem 0; }
.section-title { font-size: 3rem; margin-bottom: 3rem; text-align: center; }
.section-title span { color: var(--accent-secondary); font-size: 1rem; display: block; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 0.5rem; }

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    grid-auto-rows: 250px;
    gap: 1.5rem;
    grid-auto-flow: dense; 
}

.bento-card {
    position: relative; border-radius: 24px; overflow: hidden;
    border: 1px solid var(--glass-border); transition: 0.4s;
    cursor: pointer;
}
.bento-card:hover { transform: translateY(-5px); border-color: var(--accent-primary); box-shadow: 0 10px 40px rgba(0,0,0,0.5); }

/* Grid Spans */
.span-2-2 { grid-column: span 2; grid-row: span 2; } 
.span-2-1 { grid-column: span 2; grid-row: span 1; }
.span-1-2 { grid-column: span 1; grid-row: span 2; } 
.span-1-1 { grid-column: span 1; grid-row: span 1; } 

.bento-card img {
    width: 100%; height: 100%; object-fit: cover;
    transition: 0.5s; filter: brightness(0.7);
}
.bento-card:hover img { transform: scale(1.1); filter: brightness(0.9); }

.card-label {
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 1.5rem;
    background: linear-gradient(to top, rgba(2,6,23,0.95), transparent);
}
.card-label h3 { font-size: 1.5rem; color: #fff; }

/* --- ARCHITEKTURA --- */
.architecture-section {
    padding: 5rem 0; margin: 3rem 0;
    background: linear-gradient(to right, rgba(255,255,255,0.02), transparent);
    border-top: 1px solid var(--glass-border); border-bottom: 1px solid var(--glass-border);
}
.arch-layout { display: flex; gap: 4rem; align-items: center; }
.arch-input-box {
    background: var(--glass-panel); padding: 2rem; border-radius: 20px;
    border: 1px solid var(--glass-border); margin-top: 2rem;
}
.prompt-input {
    width: 100%; background: rgba(0,0,0,0.3); border: 1px solid var(--glass-border);
    padding: 1rem; color: #fff; border-radius: 8px; margin-bottom: 1rem; font-family: 'Inter', sans-serif;
}
.prompt-input:focus { outline: none; border-color: var(--accent-secondary); }

/* --- AI PORADNA & CHAT (UPRAVENO: 2 Sloupce) --- */
.advisory-section { padding: 5rem 0; }

.chat-wrapper { 
    display: grid; 
    grid-template-columns: 0.8fr 1.2fr; /* Vlevo text, vpravo chat */
    gap: 4rem; 
    align-items: center; 
    max-width: 1200px; 
    margin: 0 auto;
}

.chat-info h3 { font-size: 2.5rem; margin-bottom: 1.5rem; color: #fff; }
.chat-info p { color: var(--text-muted); font-size: 1.1rem; line-height: 1.6; margin-bottom: 2rem; }
.chat-features li { margin-bottom: 1rem; display: flex; gap: 10px; align-items: center; color: var(--text-muted); }
.chat-features i { color: var(--accent-primary); }

.chat-container {
    background: rgba(10, 10, 15, 0.8); border: 1px solid var(--glass-border);
    border-radius: 24px; padding: 2rem; 
    height: 550px; /* Fixní výška */
    display: flex; flex-direction: column;
    box-shadow: 0 0 50px rgba(0,0,0,0.3);
}

.chat-chips {
    display: flex; gap: 10px; overflow-x: auto; padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--glass-border);
}
.chip {
    padding: 0.5rem 1.2rem; background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border);
    border-radius: 50px; white-space: nowrap; font-size: 0.85rem; cursor: pointer; transition: 0.3s;
    color: var(--text-muted);
}
.chip:hover, .chip.active { background: rgba(45, 212, 191, 0.15); color: var(--accent-primary); border-color: var(--accent-primary); }

.chat-window { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 1rem; }
.msg { padding: 1rem 1.5rem; border-radius: 15px; max-width: 80%; line-height: 1.5; font-size: 0.95rem; }
.msg-ai { background: rgba(45, 212, 191, 0.05); border: 1px solid rgba(45, 212, 191, 0.2); align-self: flex-start; color: #ccfbf1; }
.msg-user { background: #1e293b; align-self: flex-end; color: #fff; }

.chat-input-area { display: flex; gap: 1rem; padding-top: 1rem; border-top: 1px solid var(--glass-border); }
.chat-input { flex: 1; background: transparent; border: none; color: #fff; font-size: 1rem; padding: 0.5rem; }
.chat-input:focus { outline: none; }

/* --- MAGAZÍN --- */
.mag-section { padding: 5rem 0; }
.mag-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.mag-card {
    background: var(--glass-panel); border: 1px solid var(--glass-border);
    border-radius: 16px; overflow: hidden; transition: 0.3s;
}
.mag-card:hover { transform: translateY(-5px); border-color: rgba(255,255,255,0.2); }
.mag-img { height: 200px; width: 100%; object-fit: cover; }
.mag-content { padding: 1.5rem; }
.mag-title { font-size: 1.3rem; margin-bottom: 0.5rem; color: #fff; }
.mag-desc { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; line-height: 1.6; }
.mag-btn { color: var(--accent-primary); font-weight: 600; font-size: 0.9rem; }

/* --- FOOTER --- */
footer { border-top: 1px solid var(--glass-border); padding: 3rem 0; text-align: center; color: var(--text-muted); margin-top: 3rem; }

/* --- HAMBURGER MENU (OPRAVENO: MUSÍ BÝT VIDITELNÉ VŽDY PRO MOBIL) --- */
.hamburger {
    display: none; /* Defaultně skryté na PC */
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    z-index: 2005; /* Nad vším */
}

/* Plná obrazovka menu */
.mobile-menu {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: rgba(3, 7, 18, 0.98); 
    backdrop-filter: blur(20px);
    z-index: 2000;
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2rem;
    transform: translateY(-100%); transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-menu.active { transform: translateY(0); }
.mobile-menu a { font-size: 2rem; font-family: 'Space Grotesk', sans-serif; color: #fff; }

/* --- MODAL (OKNO PRO OBRÁZKY) --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(3, 7, 18, 0.95); backdrop-filter: blur(15px);
    z-index: 9999; display: none; justify-content: center; align-items: center; padding: 1rem;
}
.modal-overlay.active { display: flex; }
.modal-content {
    background: rgba(15, 23, 42, 0.9); border: 1px solid var(--accent-primary);
    border-radius: 20px; padding: 2rem; max-width: 800px; width: 100%; text-align: center; position: relative;
}
.modal-close {
    position: absolute; top: 1rem; right: 1rem; background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer;
}
.modal-image { width: 100%; border-radius: 10px; margin-top: 1rem; }

/* --- STYLY PRO CLÁNEK (clanek.php) --- */
.article-header { height: 60vh; position: relative; border-radius: 30px; overflow: hidden; margin-bottom: -100px; z-index: 1; border: 1px solid var(--glass-border); }
.article-header img { width: 100%; height: 100%; object-fit: cover; }
.article-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, transparent, var(--bg-dark)); }
.article-title-box { position: absolute; bottom: 120px; left: 5%; right: 5%; text-align: center; }
.article-title-box h1 { font-size: 4rem; text-shadow: 0 10px 30px rgba(0,0,0,0.8); margin-bottom: 1rem; }
.article-body { position: relative; z-index: 2; background: rgba(10, 15, 30, 0.85); backdrop-filter: blur(30px); border: 1px solid var(--glass-border); border-radius: 24px; padding: 4rem; max-width: 1000px; margin: 0 auto 5rem auto; box-shadow: 0 -20px 50px rgba(0,0,0,0.5); }
.article-text { font-size: 1.15rem; line-height: 1.8; color: #cbd5e1; }
.article-text h2 { color: var(--accent-primary); margin: 2rem 0 1rem 0; font-size: 2rem; }

/* ========================================================== */
/* !!! MOBILNÍ OPRAVY (<= 1024px) !!! */
/* ========================================================== */
@media (max-width: 1024px) {
    /* Kontejner */
    .container { padding: 0 1.5rem; width: 100%; overflow: hidden; }

    /* Navigace */
    nav .nav-links-desktop { display: none !important; }
    .hamburger { display: block; } /* Zviditelnění hamburgeru */
    
    /* Hero */
    .hero { display: flex; flex-direction: column; text-align: center; padding-top: 5rem; gap: 2rem; height: auto; }
    .hero-text h1 { font-size: 3rem; }
    .hero-visual { height: 300px; width: 100%; }
    
    /* Grid -> Sloupec */
    .bento-grid { display: flex; flex-direction: column; gap: 1.5rem; }
    .bento-card { height: 250px; width: 100%; }
    .span-2-2, .span-2-1, .span-1-2, .span-1-1 { grid-column: auto; grid-row: auto; }

    /* Architektura - pod sebe */
    .arch-layout { flex-direction: column; gap: 2rem; padding: 3rem 0; }
    .arch-input-box { width: 100%; margin: 0; }

    /* Chat - Rozdělení pod sebe (Fix Screen 1) */
    .chat-wrapper { display: flex; flex-direction: column; gap: 2rem; }
    .chat-info { text-align: center; order: 1; } /* Info první */
    .chat-container { height: 500px; width: 100%; margin: 0; order: 2; }
    
    /* Fix pro input chatu */
    .chat-input-area { width: 100%; }
    .chat-input { min-width: 10px; }

    /* Magazín */
    .mag-grid { grid-template-columns: 1fr; }
    
    /* Článek */
    .article-body { padding: 1.5rem; }
    .article-title-box h1 { font-size: 2.5rem; }
}
/* ========================================= */
/* 9. INZERCE & UŽIVATELSKÝ ÚČET */
/* ========================================= */

/* Filtrační lišta */
.market-filter {
    background: var(--glass-panel);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 3rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: end;
}

.filter-group { flex: 1; min-width: 200px; }
.filter-group label { display: block; color: var(--text-muted); margin-bottom: 0.5rem; font-size: 0.9rem; }
.filter-select, .filter-input {
    width: 100%; padding: 0.8rem;
    background: rgba(0,0,0,0.3); border: 1px solid var(--glass-border);
    color: #fff; border-radius: 8px; font-family: 'Inter', sans-serif;
}
.filter-select:focus, .filter-input:focus { outline: none; border-color: var(--accent-primary); }

/* Grid inzerátů */
.market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* Karta inzerátu */
.ad-card {
    background: var(--glass-panel);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    transition: 0.4s;
    position: relative;
    display: flex; flex-direction: column;
}
.ad-card:hover { transform: translateY(-5px); border-color: var(--accent-secondary); box-shadow: 0 10px 30px rgba(168, 85, 247, 0.2); }

.ad-image-box { height: 220px; width: 100%; position: relative; overflow: hidden; background: #000; }
.ad-image { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.ad-card:hover .ad-image { transform: scale(1.1); }

.ad-badge {
    position: absolute; top: 1rem; right: 1rem;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(5px);
    padding: 0.3rem 0.8rem; border-radius: 50px;
    font-size: 0.8rem; color: var(--accent-primary); border: 1px solid var(--accent-primary);
}

.ad-content { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.ad-meta { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.ad-title { font-size: 1.4rem; margin-bottom: 0.5rem; color: #fff; }
.ad-price { font-size: 1.5rem; font-weight: 700; color: var(--accent-primary); margin-top: auto; }
.ad-location { display: flex; align-items: center; gap: 5px; color: var(--text-muted); font-size: 0.9rem; margin-top: 1rem; }

/* Login / Register Formy */
.auth-box {
    max-width: 450px; margin: 5rem auto;
    background: rgba(15, 23, 42, 0.8); border: 1px solid var(--glass-border);
    padding: 3rem; border-radius: 24px; text-align: center;
}
.auth-box h2 { font-size: 2.5rem; margin-bottom: 2rem; }

/* Upload Preview */
.upload-preview { display: flex; gap: 10px; margin-top: 10px; }
.preview-img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; border: 1px solid var(--glass-border); }

/* Responsivita Inzerce */
@media (max-width: 768px) {
    .market-filter { flex-direction: column; }
    .filter-group { width: 100%; }
    .ad-image-box { height: 200px; }
}
/* ========================================= */
/* 10. SEKCE NEJNOVĚJŠÍ INZERCE (HOME) */
/* ========================================= */
.market-home-section {
    padding: 4rem 0;
    position: relative;
    border-top: 1px solid var(--glass-border);
}

.market-preview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 vedle sebe na PC */
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.market-mini-card {
    background: var(--glass-panel);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: 0.3s;
    text-decoration: none;
    display: flex;
    flex-direction: column;
}
.market-mini-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-secondary);
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.15);
}

.mini-card-img-box {
    height: 180px;
    width: 100%;
    overflow: hidden;
    position: relative;
}
.mini-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}
.market-mini-card:hover .mini-card-img { transform: scale(1.1); }

.mini-card-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.mini-card-title {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 0.5rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mini-card-price {
    color: var(--accent-primary);
    font-weight: bold;
    margin-top: auto;
}
.mini-card-loc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

/* Tlačítka pod inzercí */
.market-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}
.btn-outline {
    border: 1px solid rgba(255,255,255,0.2);
    background: transparent;
    color: #fff;
}
.btn-outline:hover {
    border-color: #fff;
    background: rgba(255,255,255,0.05);
}

/* MOBILNÍ OPTIMALIZACE */
@media (max-width: 1024px) {
    .market-preview-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 vedle sebe na tabletu/velkém mobilu */
    }
}

@media (max-width: 600px) {
    .market-preview-grid {
        grid-template-columns: 1fr; /* 1 pod sebou na malém mobilu */
        gap: 1rem;
    }
    .market-actions {
        flex-direction: column; /* Tlačítka pod sebe */
        gap: 1rem;
    }
    .btn {
        width: 100%; /* Tlačítka přes celou šířku */
        justify-content: center;
    }
}
/* ========================================= */
/* 11. FACEBOOK SEKCE */
/* ========================================= */
.facebook-section {
    padding: 4rem 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
}

.facebook-box {
    background: var(--glass-panel);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1rem;
    display: inline-flex; /* Zajistí vycentrování obsahu */
    justify-content: center;
    align-items: center;
    max-width: 550px;
    width: 100%; /* Na mobilu zabere celou šířku */
    box-shadow: 0 0 30px rgba(45, 212, 191, 0.1); /* Jemná záře */
}

/* Úprava samotného Facebook rámu pro mobily */
.facebook-box iframe {
    width: 100% !important; /* Vynutí pružnou šířku */
    max-width: 500px;
    border-radius: 12px;
}
/* ========================================= */
/* 11. FACEBOOK SEKCE (VLASTNÍ KARTA) */
/* ========================================= */
.facebook-section {
    padding: 4rem 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
}

.fb-invite-card {
    background: linear-gradient(145deg, rgba(24, 119, 242, 0.1), rgba(0,0,0,0.4)); /* Modrý nádech */
    border: 1px solid rgba(24, 119, 242, 0.3);
    border-radius: 24px;
    padding: 3rem 2rem;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.fb-invite-card:hover {
    box-shadow: 0 0 40px rgba(24, 119, 242, 0.2);
    border-color: #1877F2;
    transform: translateY(-5px);
}

.fb-icon-large {
    font-size: 4rem;
    color: #1877F2;
    margin-bottom: 0.5rem;
}

.fb-text h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.fb-text p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.btn-facebook {
    background: #1877F2;
    color: #fff;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: none;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(24, 119, 242, 0.3);
}

.btn-facebook:hover {
    background: #166fe5;
    box-shadow: 0 8px 25px rgba(24, 119, 242, 0.5);
    color: #fff;
}
/* ========================================= */
/* 11. FACEBOOK GROUP WIDGET (OPRAVENO PRO MOBIL) */
/* ========================================= */
.facebook-section {
    padding: 4rem 0;
    border-top: 1px solid var(--glass-border);
    text-align: center;
}

.fb-group-widget {
    background: rgba(30, 40, 50, 0.6); /* Tmavé pozadí */
    border: 1px solid #1877F2;
    border-radius: 16px;
    max-width: 600px;
    width: 100%; /* Důležité pro mobil */
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    text-align: left;
    box-shadow: 0 0 40px rgba(24, 119, 242, 0.15);
    display: flex;
    flex-direction: column;
}

.fb-cover-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 4px solid #1877F2;
}

.fb-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.fb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Aby se to na mobilu zalamovalo */
    gap: 1rem;
}

.fb-group-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    margin: 0;
    line-height: 1.2;
}

.fb-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
}

/* Facepile (kolečka) */
.fb-facepile {
    display: flex;
    align-items: center;
}
.face-circle {
    width: 35px; height: 35px;
    border-radius: 50%;
    border: 2px solid var(--bg-dark);
    background: #333;
    display: flex; justify-content: center; align-items: center;
    color: #fff; font-size: 0.8rem;
    margin-left: -10px;
}
.face-circle:first-child { margin-left: 0; }

.fb-desc {
    color: #ccc; 
    font-size: 0.95rem; 
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

/* Tlačítko - Opraveno pro mobil */
.btn-fb-join {
    background: #1877F2;
    color: #fff !important; /* Vynucení bílé */
    width: 100%;
    padding: 1rem;
    border-radius: 50px;
    text-align: center;
    font-weight: bold;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.btn-fb-join:hover { 
    background: #166fe5; 
    transform: translateY(-2px);
}

/* --- MOBILNÍ OPTIMALIZACE (DŮLEŽITÉ) --- */
@media (max-width: 600px) {
    .fb-cover-img {
        height: 120px; /* Menší obrázek na mobilu */
    }
    .fb-content {
        padding: 1rem;
    }
    .fb-header {
        flex-direction: column; /* Pod sebe */
        align-items: flex-start;
    }
    .fb-facepile {
        margin-top: 0.5rem;
    }
    .btn-fb-join {
        font-size: 1rem; /* Menší písmo tlačítka */
        padding: 0.8rem;
    }
}
/* ========================================= */
/* 12. VETERINÁŘI */
/* ========================================= */
.vet-hero {
    text-align: center;
    padding: 3rem 1rem;
    background: radial-gradient(circle at center, rgba(45, 212, 191, 0.15) 0%, transparent 70%);
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 2rem;
}

.vet-search-box {
    background: var(--glass-panel);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    margin-top: 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
}

.vet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.vet-card {
    background: var(--glass-panel);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.vet-card:hover { transform: translateY(-5px); border-color: var(--accent-secondary); }

/* Styl pro pohotovost */
.vet-card.emergency {
    border: 1px solid #ef4444;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.15);
}
.vet-card.emergency::before {
    content: "NONSTOP";
    position: absolute; top: 10px; right: -30px;
    background: #ef4444; color: #fff;
    padding: 5px 40px; transform: rotate(45deg);
    font-size: 0.7rem; font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.vet-header { display: flex; gap: 15px; margin-bottom: 1rem; }
.vet-icon-box {
    width: 60px; height: 60px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    display: flex; justify-content: center; align-items: center;
    font-size: 1.8rem; color: var(--accent-primary);
}
.vet-info h3 { margin: 0 0 5px 0; font-size: 1.2rem; color: #fff; }
.vet-badges { display: flex; gap: 5px; flex-wrap: wrap; }

.badge-spec { background: rgba(45, 212, 191, 0.2); color: var(--accent-primary); padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; }
.badge-loc { color: var(--text-muted); font-size: 0.9rem; display: flex; align-items: center; gap: 5px; }

.vet-body { flex: 1; margin-bottom: 1.5rem; color: #ccc; font-size: 0.95rem; line-height: 1.5; }

.vet-footer {
    display: flex; gap: 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
    margin-top: auto;
}

/* Sekce přidej veterináře */
.add-vet-cta {
    background: linear-gradient(90deg, rgba(168, 85, 247, 0.2), rgba(45, 212, 191, 0.2));
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    margin-top: 4rem;
    border: 1px solid var(--glass-border);
}

@media (max-width: 900px) {
    .vet-search-box { grid-template-columns: 1fr; }
}
/* ========================================= */
/* 13. ZOO BIG CARDS */
/* ========================================= */
.zoo-list {
    display: flex;
    flex-direction: column;
    gap: 3rem; /* Velká mezera mezi kartami */
}

.zoo-big-card {
    background: var(--glass-panel);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 350px 1fr; /* Levý panel fixní, pravý pružný */
    min-height: 400px;
    transition: transform 0.3s, box-shadow 0.3s;
}
.zoo-big-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    border-color: var(--accent-secondary);
}

/* LEVÁ STRANA (Vizual) */
.zoo-visual {
    background: rgba(0,0,0,0.3);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-right: 1px solid var(--glass-border);
    position: relative;
}
.zoo-img-box {
    width: 150px; height: 150px;
    background: #fff;
    border-radius: 50%;
    margin-bottom: 1.5rem;
    overflow: hidden;
    border: 4px solid var(--accent-secondary);
    display: flex; justify-content: center; align-items: center;
}
.zoo-img-box img { width: 100%; height: 100%; object-fit: cover; }

.zoo-type-badge {
    background: var(--accent-secondary);
    color: #000;
    padding: 5px 15px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

/* PRAVÁ STRANA (Obsah) */
.zoo-content {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
}

.zoo-header {
    border-bottom: 1px dashed rgba(255,255,255,0.2);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}
.zoo-header h2 { font-size: 2rem; margin: 0; color: #fff; }
.zoo-loc { color: var(--accent-primary); font-size: 1.1rem; margin-top: 5px; }

.zoo-desc { color: #ccc; line-height: 1.6; margin-bottom: 2rem; font-size: 1.05rem; }

/* INFO GRID (Otevíračka, Cena) */
.zoo-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
    background: rgba(255,255,255,0.03);
    padding: 1rem;
    border-radius: 12px;
}
.info-item h4 { color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; margin: 0 0 5px 0; }
.info-item p { color: #fff; font-weight: 600; font-size: 1rem; margin: 0; }

/* ZVÍŘATA (Tagy) */
.zoo-animals { margin-top: auto; }
.zoo-animals h4 { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 10px; }
.animal-tag {
    display: inline-block;
    background: rgba(255,255,255,0.1);
    color: #ddd;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    margin: 0 5px 5px 0;
    border: 1px solid rgba(255,255,255,0.1);
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .zoo-big-card { grid-template-columns: 1fr; }
    .zoo-visual { border-right: none; border-bottom: 1px solid var(--glass-border); flex-direction: row; justify-content: start; gap: 20px; padding: 1.5rem; text-align: left;}
    .zoo-img-box { margin-bottom: 0; width: 80px; height: 80px; }
    .zoo-info-grid { grid-template-columns: 1fr; }
}
/* ========================================================== */
/* !!! FINÁLNÍ MOBILNÍ OPRAVY (VLOŽIT NA KONEC) !!! */
/* ========================================================== */

@media (max-width: 768px) {
    
    /* 1. OPRAVA INZERCE (Grid byl moc široký) */
    .market-grid {
        /* Původně minmax(300px, 1fr) - to je na mobil moc. Změna na 100% šířky. */
        grid-template-columns: 1fr; 
        gap: 1.5rem;
    }

    /* 2. OPRAVA VETERINÁŘI (Grid 350px se nevešel na displej) */
    .vet-grid {
        /* Původně minmax(350px, 1fr). Změna na 1 sloupec. */
        grid-template-columns: 1fr;
    }
    
    /* Vyhledávací boxy - aby byly prvky pod sebou a nevedle sebe */
    .vet-search-box, 
    .market-filter {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Tlačítka a inputy na celou šířku */
    .vet-search-box .filter-group,
    .vet-search-box button,
    .market-filter .filter-group,
    .market-filter button {
        width: 100%;
    }
}

/* 3. OPRAVA ZOO KARET PRO MOBILY (do 600px) */
@media (max-width: 600px) {
    /* Vrátíme vizuální část (levý sloupec) zpět pod sebe */
    .zoo-visual {
        flex-direction: column !important; /* Důležité přebití tabletu */
        text-align: center !important;
        align-items: center !important;
        gap: 1rem;
    }

    .zoo-img-box {
        width: 120px; 
        height: 120px;
        margin-bottom: 1rem;
    }

    /* Tlačítka v ZOO kartě */
    .zoo-visual .btn {
        width: 100%;
        margin-top: 0.5rem;
    }

    /* Obsah ZOO karty */
    .zoo-content {
        padding: 1.5rem;
    }

    .zoo-header h2 {
        font-size: 1.5rem;
    }

    .zoo-info-grid {
        grid-template-columns: 1fr; /* Info pod sebou */
        gap: 1rem;
    }
}

/* 4. GLOBÁLNÍ OPRAVY PRO MALÉ DISPLEJE */
@media (max-width: 480px) {
    .section-title {
        font-size: 2rem; /* Menší nadpisy sekcí */
    }
    
    .hero-text h1 {
        font-size: 2.5rem; /* Menší hlavní nadpis */
    }

    /* Zajištění, aby nic nepřetékalo do boku */
    .container {
        padding: 0 1rem;
    }
}
/* ========================================= */
/* !!! FINÁLNÍ OPRAVA MEZERY (MOBIL) - VERZE 2 !!! */
/* Vložte toto úplně na konec style.css a přepište předchozí opravu */
/* ========================================= */

@media (max-width: 768px) {
    /* 1. Zmenšení hlavičky (loga a menu) */
    nav {
        padding: 1rem 0 !important; /* Původně bylo 2rem, zmenšeno na polovinu */
    }

    /* 2. Zrušení odsazení kontejneru */
    .container {
        padding-top: 0 !important; 
    }

    /* 3. Hero sekce - odstranění paddingu, aby se nalepila hned pod menu */
    .hero {
        padding-top: 0 !important; 
        min-height: auto !important;
        gap: 1.5rem !important;
        margin-top: 0 !important;
    }

    /* 4. Úprava hlavního nadpisu (H1) */
    .hero-text h1 {
        margin-top: 0 !important;
        line-height: 1.1;
    }

    /* 5. Úprava malého fialového textu "NOVÝ PORTÁL..." */
    /* ZDE BYL PROBLÉM: Bylo tam margin-top: 4rem, což dělalo tu díru */
    .hero-text h1 span {
        margin-bottom: 0.5rem !important;
        font-size: 0.9rem !important; 
        margin-top: 1.5rem !important; /* Změněno z 4rem na 0.5rem */
        display: block;
    }
    
    /* 6. Úprava tlačítka v Hero sekci, aby nebylo tak obří */
    .hero .btn-glow {
        width: 100%;
        justify-content: center;
        padding: 0.8rem;
    }
}
/* ========================================= */
/* !!! ABSOLUTNÍ FIX CHATU PRO MOBILY !!! */
/* Vložte úplně na konec style.css */
/* ========================================= */

@media only screen and (max-width: 900px) {
    
    /* 1. Oprava hlavního kontejneru - aby se nezhroutil */
    .chat-container {
        display: flex !important;
        flex-direction: column !important;
        height: 500px !important;
        min-height: 500px !important;
    }

    /* 2. Okno zpráv - musí scrollovat */
    .chat-window {
        flex: 1 1 auto !important;
        height: auto !important;
        min-height: 0 !important; /* Nutné pro scroll */
        display: block !important;
        overflow-y: auto !important;
    }

    /* 3. Spodní lišta - MUSÍ BÝT V ŘÁDKU */
    .chat-input-area {
        display: flex !important;
        flex-direction: row !important; /* Vedle sebe */
        flex-wrap: nowrap !important;   /* Nezalamovat */
        align-items: center !important;
        width: 100% !important;
        gap: 8px !important;
        padding: 10px 0 !important;
        min-height: 60px !important;
    }

    /* 4. Vstupní pole (Input) - Konkrétní zacílení přes ID */
    input#userMessage, 
    .chat-input {
        display: block !important;
        width: auto !important;
        flex-grow: 1 !important; /* Zabrat zbytek místa */
        flex-shrink: 1 !important;
        min-width: 0 !important;
        height: 45px !important;
        background: rgba(255,255,255,0.15) !important;
        border: 1px solid #555 !important;
        color: white !important;
        border-radius: 8px !important;
        padding: 0 10px !important;
    }

    /* 5. Tlačítko - Zacílení, aby nebylo 100% */
    .chat-input-area button,
    .chat-input-area .btn {
        width: 50px !important;
        max-width: 50px !important;
        height: 45px !important;
        flex-grow: 0 !important;
        flex-shrink: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        display: flex !important;
        justify-content: center;
        align-items: center;
    }
}
/* ========================================= */
/* 14. SPLIT SEKCE (FB + GENERÁTOR) */
/* ========================================= */

.community-split {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Dva sloupce vedle sebe */
    gap: 2rem;
    align-items: stretch; /* Stejná výška karet */
    text-align: left; /* Zarovnání obsahu vlevo */
    margin-top: 2rem;
}

/* Úprava existujícího FB widgetu pro nový grid */
.community-split .fb-group-widget {
    margin: 0; /* Zrušíme centrování, aby pasoval do sloupce */
    max-width: 100%;
    height: 100%; /* Roztáhneme na výšku */
}

/* Karta Generátoru Jmen */
.gen-promo-card {
    background: var(--glass-panel);
    border: 1px solid var(--glass-border);
    border-radius: 16px; /* Stejné zaoblení jako FB widget */
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
    transition: 0.3s;
    background: linear-gradient(145deg, rgba(255,255,255,0.03) 0%, rgba(168, 85, 247, 0.05) 100%);
}

.gen-promo-card:hover {
    border-color: var(--accent-secondary);
    box-shadow: 0 0 40px rgba(168, 85, 247, 0.15);
    transform: translateY(-5px);
}

.gen-badge {
    display: inline-block;
    background: rgba(168, 85, 247, 0.2);
    color: var(--accent-secondary);
    border: 1px solid rgba(168, 85, 247, 0.3);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.gen-promo-card h3 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #fff;
    line-height: 1.1;
}

.gen-promo-card p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 90%;
}

/* Dekorativní ikona na pozadí */
.gen-bg-icon {
    position: absolute;
    bottom: -30px;
    right: -30px;
    font-size: 12rem;
    color: rgba(255,255,255,0.02);
    transform: rotate(-20deg);
    pointer-events: none;
    transition: 0.5s;
}

.gen-promo-card:hover .gen-bg-icon {
    color: rgba(168, 85, 247, 0.05);
    transform: rotate(0deg) scale(1.1);
}

/* Tlačítko pro generátor (Fialové) */
.btn-gen {
    background: rgba(168, 85, 247, 0.1);
    color: var(--accent-secondary);
    border: 1px solid var(--accent-secondary);
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.btn-gen:hover {
    background: var(--accent-secondary);
    color: #fff;
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.4);
}

/* MOBILNÍ ZOBRAZENÍ - POD SEBE */
@media (max-width: 900px) {
    .community-split {
        grid-template-columns: 1fr; /* Jeden sloupec */
        gap: 3rem;
    }
    
    .gen-promo-card {
        padding: 2rem;
        align-items: center;
        text-align: center;
    }
    
    .gen-promo-card p {
        max-width: 100%;
    }
}