/* --- 0. PROTECTION (OCHRANA) --- */
body {
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}
input, textarea, select {
    -webkit-user-select: text !important;
    user-select: text !important;
}

/* --- 1. CORE --- */
:root {
    --bg: #020202;
    --surface: #0f0f0f;
    --surface-hover: #1a1a1a;
    --text: #ffffff;
    --text-muted: #a1a1aa;
    --accent: #2563EB;
    --accent-dark: #1e40af;
    --border: rgba(255,255,255,0.08);
    --font-head: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }

.container { max-width: 1400px; margin: 0 auto; padding: 0 4%; }
.section-padding { padding: 8rem 0; }
.grid { display: grid; gap: 2rem; }
.text-center { text-align: center; }

h1, h2, h3, h4 { font-family: var(--font-head); text-transform: uppercase; font-weight: 700; color: white; }
.subtitle { color: var(--accent); letter-spacing: 2px; font-weight: 700; font-size: 0.8rem; text-transform: uppercase; display: block; margin-bottom: 0.5rem; }
p { color: var(--text-muted); }

/* BUTTONS */
.btn {
    padding: 1rem 2rem; background: white; color: black; border-radius: 50px;
    font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
    cursor: pointer; border: none; transition: 0.3s; display: inline-flex; gap: 10px; align-items: center; justify-content: center;
}
.btn:hover { background: var(--accent); color: white; transform: translateY(-3px); box-shadow: 0 10px 30px rgba(37,99,235,0.4); }
.btn-outline { background: transparent; border: 1px solid rgba(255,255,255,0.2); color: white; }
.btn-outline:hover { border-color: var(--accent); background: var(--accent); }
.btn-full { width: 100%; }
.btn-sm { padding: 0.5rem 1.5rem; font-size: 0.8rem; }

/* --- NOVÉ: AGENT ACTIONS (Tlačidlá) --- */
.agent-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
.btn-action {
    flex: 1;
    padding: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.3s;
    background: #111;
}
.btn-action:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* --- NOVÉ: KALENDÁR V MODALE --- */
.calendar-wrapper { margin-bottom: 25px; }
.cal-label { font-size: 0.8rem; color: #888; text-transform: uppercase; margin-bottom: 10px; display: block; }

.date-grid { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 15px; }
.date-card {
    min-width: 70px;
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 10px 5px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
}
.date-card:hover { border-color: var(--accent); }
.date-card.active { background: var(--accent); border-color: var(--accent); color: white; }
.date-day { font-size: 0.8rem; display: block; opacity: 0.7; }
.date-num { font-size: 1.2rem; font-weight: 700; display: block; }

.time-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.time-pill {
    padding: 8px 16px;
    background: #111;
    border: 1px solid #333;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.3s;
}
.time-pill:hover { border-color: white; }
.time-pill.active { background: white; color: black; border-color: white; font-weight: 600; }


/* FORMS & SEARCH */
.form-input, .form-select, .form-textarea {
    width: 100%; padding: 15px; background: #111; border: 1px solid #333; 
    color: white; border-radius: 8px; margin-bottom: 15px; font-family: var(--font-body);
    transition: 0.3s;
}
.form-input:focus, .form-textarea:focus { border-color: var(--accent); outline: none; background: #161616; }

.search-widget {
    background: rgba(20,20,20,0.8); backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1); padding: 15px;
    border-radius: 100px; display: flex; gap: 15px;
    max-width: 1100px; margin: 3rem 0; box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    flex-wrap: wrap; align-items: center;
}
.search-item { flex: 1; min-width: 160px; position: relative; }
.search-label { display: block; font-size: 0.7rem; color: #bbb; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px; margin-left: 10px; font-weight: bold; }
.search-select {
    width: 100%; background: #ffffff; color: #000000; border: 1px solid #ddd;
    padding: 12px 20px; border-radius: 50px; font-size: 0.95rem; font-weight: 600; 
    cursor: pointer; outline: none; appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23000000%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.8-9.2-5.4-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat; background-position: right 15px top 50%; background-size: 10px auto;
}
.search-btn {
    padding: 1rem 2.5rem; background: var(--accent); color: white; border-radius: 50px;
    border: none; font-weight: 600; text-transform: uppercase; cursor: pointer; transition: 0.3s; height: 100%;
}
.search-btn:hover { background: white; color: black; }

/* NAV & HEADER */
nav { padding: 1.5rem 5%; position: absolute; width: 100%; top: 0; z-index: 10; display:flex; justify-content:space-between; align-items: center; }
.nav-links { display: flex; gap: 30px; margin-right: 30px; }
.nav-links a { color: white; text-decoration: none; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 1px; font-weight: 500; transition: 0.3s; }
.nav-links a:hover { color: var(--accent); }
.nav-right { display: flex; gap: 15px; align-items: center; }
header { min-height: 100vh; display: flex; align-items: center; position: relative; padding-top: 80px; }
.hero-bg {
    position: absolute; top: 0; right: 0; width: 100%; height: 100%;
    object-fit: cover; opacity: 0.5; mask-image: linear-gradient(to bottom, transparent, black 10%, black 80%, var(--bg));
    z-index: -1; animation: zoom 20s infinite alternate;
}
@keyframes zoom { from {transform: scale(1);} to {transform: scale(1.1);} }

/* CARDS */
.prop-grid { grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); }
.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
    overflow: hidden; transition: 0.4s; cursor: pointer; position: relative;
}
.card:hover { transform: translateY(-10px); border-color: var(--accent); box-shadow: 0 20px 40px rgba(0,0,0,0.5); }
.card-img-wrap { height: 280px; position: relative; overflow: hidden; }
.card-img { width: 100%; height: 100%; object-fit: cover; transition: 0.6s; }
.card:hover .card-img { transform: scale(1.1); }
.card-badge {
    position: absolute; top: 15px; left: 15px; padding: 6px 14px;
    background: white; color: black; font-weight: 700; font-size: 0.7rem;
    text-transform: uppercase; border-radius: 50px; z-index: 2;
}
.card-body { padding: 1.5rem; }
.card-price { font-size: 1.5rem; color: var(--accent); font-weight: 700; display: block; margin-bottom: 0.5rem; }
.card-specs { display: flex; gap: 15px; color: #888; font-size: 0.85rem; border-top: 1px solid var(--border); margin-top: 1rem; padding-top: 1rem; }

/* SECTIONS */
.sell-wrapper {
    background: linear-gradient(135deg, #111 0%, #050505 100%);
    border: 1px solid var(--border); border-radius: 20px; padding: 4rem;
    display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}
.sell-features { list-style: none; margin-top: 2rem; }
.sell-features li { margin-bottom: 1rem; display: flex; gap: 15px; align-items: center; font-size: 1.1rem; }
.sell-features i { color: var(--accent); }

.agent-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin-top: 3rem; }
.agent-card {
    background: var(--surface); border-radius: 16px; overflow: hidden; text-align: center;
    border: 1px solid var(--border); transition: 0.3s;
}
.agent-card:hover { border-color: var(--accent); transform: translateY(-5px); }
.agent-img { width: 100%; height: 350px; object-fit: cover; filter: grayscale(100%); transition: 0.4s; }
.agent-card:hover .agent-img { filter: grayscale(0%); }
.agent-info { padding: 1.5rem; }
.agent-name { font-size: 1.2rem; font-weight: 700; color: white; margin-bottom: 5px; display: block; }
.agent-role { font-size: 0.8rem; text-transform: uppercase; color: var(--accent); letter-spacing: 1px; }

.job-card {
    display: flex; justify-content: space-between; align-items: center;
    padding: 2rem; border-bottom: 1px solid var(--border); transition: 0.3s;
}
.job-card:hover { background: var(--surface-hover); padding-left: 2.5rem; border-left: 4px solid var(--accent); }
.job-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; }
.job-tags { display: flex; gap: 10px; font-size: 0.8rem; text-transform: uppercase; color: #888; }
.job-tag { padding: 4px 10px; background: #222; border-radius: 4px; }

/* SLIDER */
.comparison-container { 
    position: relative; 
    height: 500px; 
    overflow: hidden; 
    border-radius: 12px; 
    border: 1px solid var(--border); 
    touch-action: none; 
    user-select: none;
    -webkit-user-select: none;
}
.img-comp-img { 
    position: absolute; 
    width: 100%; 
    height: 100%; 
    overflow: hidden; 
}
.img-comp-overlay {
    z-index: 2; 
    width: 50%; 
    border-right: 2px solid white; 
}
.img-comp-img img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block; 
}
.slider-bar {
    position: absolute; 
    z-index: 10; 
    width: 40px; 
    height: 40px; 
    background: var(--accent);
    border-radius: 50%; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%);
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: ew-resize; 
    border: 2px solid white;
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
    pointer-events: none; 
}

/* MODALS */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95); z-index: 1000; display: flex;
    justify-content: center; align-items: center; opacity: 0; pointer-events: none;
    transition: 0.3s; backdrop-filter: blur(10px);
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal-window {
    width: 95%; max-width: 1400px; height: 90vh; background: #0a0a0a;
    border: 1px solid rgba(255,255,255,0.1); border-radius: 20px;
    display: grid; grid-template-columns: 1.5fr 1fr; overflow: hidden;
    box-shadow: 0 0 100px rgba(37,99,235,0.2); position: relative;
}
.modal-left { overflow-y: auto; border-right: 1px solid var(--border); background: #000; }
.modal-right { overflow-y: auto; padding: 3rem; background: var(--surface); }
.modal-window.small-modal { max-width: 600px; height: auto; display: block; padding: 2rem; }
.main-img { width: 100%; height: 500px; object-fit: cover; }
.close-modal {
    position: absolute; top: 20px; right: 20px; font-size: 2rem; color: white;
    cursor: pointer; z-index: 10; background: rgba(0,0,0,0.5); width: 50px; height: 50px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
}

/* PROMO & TOAST */
.promo-popup {
    position: fixed; bottom: 30px; right: 30px; width: 320px;
    background: rgba(20,20,20,0.95); backdrop-filter: blur(10px);
    border: 1px solid var(--accent); border-radius: 12px; padding: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    transform: translateX(150%); transition: 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    z-index: 1500;
}
.promo-popup.show { transform: translateX(0); }
.promo-popup h4 { color: var(--accent); font-size: 1.1rem; margin-bottom: 5px; }
.close-promo { position: absolute; top: 10px; right: 10px; cursor: pointer; color: #888; }
.close-promo:hover { color: white; }

.toast {
    position: fixed; top: 20px; right: 20px; background: #1a1a1a; border-left: 4px solid var(--accent);
    padding: 15px 25px; border-radius: 4px; box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transform: translateX(200%); transition: 0.5s; z-index: 2000; display: flex; align-items: center; gap: 15px;
}
.toast.show { transform: translateX(0); }

@media (max-width: 1000px) {
    .nav-links { display: none; }
    .modal-window { grid-template-columns: 1fr; }
    .modal-left { height: 300px; }
    .search-widget { flex-direction: column; background: rgba(20,20,20,0.9); }
    .search-item { width: 100%; }
    .sell-wrapper { grid-template-columns: 1fr; padding: 2rem; }
    .promo-popup { bottom: 10px; right: 10px; width: 300px; }
}