body { font-family: sans-serif; margin: 0; padding: 0; line-height: 1.6; color: #333; }
header { background: #333; color: #fff; padding: 1rem 0; text-align: center; }
nav { background: #444; padding: 0.5rem; text-align: center; position: relative; }
nav a { color: #fff; text-decoration: none; margin: 0 15px; font-weight: bold; }
nav a:hover { text-decoration: underline; }
.container { max-width: 960px; margin: 20px auto; padding: 0 20px; min-height: 60vh; }
footer { background: #eee; text-align: center; padding: 20px; margin-top: 40px; font-size: 0.8rem; }
footer a { color: #666; }

/* Karty koní */
.horse-list { display: flex; flex-wrap: wrap; gap: 20px; }
.horse-card { border: 1px solid #ddd; padding: 15px; width: calc(33% - 20px); box-shadow: 2px 2px 5px rgba(0,0,0,0.1); border-radius: 5px; transition: transform 0.2s, box-shadow 0.2s; }
.horse-card:hover { transform: translateY(-5px); box-shadow: 5px 5px 15px rgba(0,0,0,0.2); }
.horse-card a { text-decoration: none; color: inherit; }
.horse-card img { max-width: 100%; height: auto; display: block; margin-bottom: 10px; }
.horse-card .image-wrapper { position: relative; }
.status-badge {
    position: absolute;
    top: 10px;
    left: -5px;
    padding: 5px 10px;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
    z-index: 1; /* Zajistí, že bude štítek nad obrázkem */
}
.status-badge.prodano { background-color: #dc3545; }
.status-badge.rezervace { background-color: #ffc107; color: #333; }
.horse-card h3 { margin-top: 0; }
.btn { display: inline-block; background: #28a745; color: white; padding: 8px 15px; text-decoration: none; border-radius: 4px; margin-top: 10px; }
.price { font-weight: bold; color: #d9534f; }

/* Galerie koně - Image Viewer */
.image-viewer {
    margin-top: 20px;
}
.main-image-container {
    width: 100%;
    margin-bottom: 10px;
    background: #f9f9f9;
    border: 1px solid #eee;
    text-align: center;
    position: relative;
}
.main-image-container img {
    max-width: 100%;
    max-height: 600px; /* Omezíme maximální výšku */
    height: auto;
    object-fit: contain;
}
/* Šipky galerie */
.nav-arrow {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.3s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0,0,0,0.3);
}
.nav-arrow:hover { background-color: rgba(0,0,0,0.8); }
.nav-arrow.prev { left: 0; border-radius: 0 3px 3px 0; }
.nav-arrow.next { right: 0; border-radius: 3px 0 0 3px; }

.thumbnail-strip {
    display: flex;
    overflow-x: auto; /* Horizontální posuvník */
    overflow-y: hidden;
    gap: 10px;
    padding-bottom: 10px; /* Prostor pro posuvník */
    white-space: nowrap; /* Zabrání zalamování náhledů */
}
.thumbnail-strip .thumbnail {
    width: 120px;
    height: 80px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s;
    flex-shrink: 0; /* Zabrání zmenšování náhledů */
    position: relative;
}
.thumbnail-strip .thumbnail:hover {
    border-color: #aaa;
}
.thumbnail-strip .thumbnail.active {
    border-color: #28a745; /* Zvýraznění aktivního náhledu */
}
/* Ikona přehrávání na náhledu videa */
.thumbnail-strip .thumbnail.video {
    /* Můžeme přidat overlay nebo ikonku přes CSS, pro jednoduchost zatím jen border */
    border-bottom: 4px solid red;
}
.hidden-horse { opacity: 0.6; background: #fff3cd; border: 1px dashed #856404; }
.badge-hidden { background: #ffc107; color: #000; padding: 2px 5px; font-size: 0.7rem; border-radius: 3px; margin-left: 5px; }

/* Admin */
.admin-panel { background: #f9f9f9; padding: 20px; border: 1px solid #ddd; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; }
.form-group input, .form-group textarea { width: 100%; padding: 8px; box-sizing: border-box; }
table { width: 100%; border-collapse: collapse; margin-top: 20px; }
table th, table td { border: 1px solid #ddd; padding: 8px; text-align: left; }

/* Média */
.media-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}
.media-item {
    width: 150px;
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.05);
}
.media-item img {
    max-width: 100%;
    height: 100px;
    object-fit: cover;
    margin-bottom: 10px;
}
.media-item input {
    width: 100%;
    font-size: 0.75rem;
    margin-bottom: 5px;
    text-align: center;
}
.media-item a {
    color: #d9534f;
    font-size: 0.8rem;
}

/* Výběr obrázku pro koně */
.media-gallery-selector { display: flex; flex-wrap: wrap; gap: 10px; max-height: 300px; overflow-y: auto; border: 1px solid #eee; padding: 10px; }
.selectable-image { width: 120px; height: 90px; object-fit: cover; cursor: pointer; border: 2px solid transparent; }
.selectable-image:hover { border-color: #28a745; }
.selectable-item { position: relative; display: block; }
.selectable-item input[type="checkbox"] { position: absolute; top: 5px; left: 5px; transform: scale(1.5); z-index: 2; }

/* Admin galerie náhled */
.admin-gallery-preview { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 15px; }
.admin-gallery-item { position: relative; width: 100px; height: 80px; }
.admin-gallery-item img { width: 100%; height: 100%; object-fit: cover; border: 1px solid #ddd; }
.admin-gallery-item .delete-btn { position: absolute; top: -5px; right: -5px; background: red; color: white; border-radius: 50%; width: 20px; height: 20px; text-align: center; line-height: 20px; text-decoration: none; font-size: 12px; font-weight: bold; }

/* Drag & Drop zóna */
.drop-zone {
    border: 2px dashed #ccc;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    color: #888;
    margin-bottom: 20px;
    cursor: pointer;
    background: #fff;
    transition: all 0.3s;
}
.drop-zone:hover, .drop-zone.highlight {
    border-color: #28a745;
    background-color: #f0fff4;
    color: #28a745;
}
.drop-zone p { margin: 0; font-size: 1.1rem; font-weight: bold; }

/* Rodokmen */
.pedigree-table { width: 100%; border-collapse: collapse; margin-top: 30px; margin-bottom: 30px; font-size: 0.9rem; }
.pedigree-table td { border: 1px solid #ddd; padding: 10px; width: 33%; background: #fff; vertical-align: middle; }
.pedigree-table th { background: #f4f4f4; text-align: left; padding: 10px; border: 1px solid #ddd; }
.pedigree-label { font-size: 0.75rem; color: #888; display: block; margin-bottom: 2px; text-transform: uppercase; }
.pedigree-name { font-weight: bold; display: block; }

/* Mobilní menu */
.menu-toggle {
    display: none;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 20px;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    z-index: 100;
}
.menu-toggle .bar {
    height: 3px;
    width: 100%;
    background-color: #fff;
    border-radius: 3px;
}

@media (max-width: 768px) {
    nav { text-align: left; padding: 10px; min-height: 30px; }
    .nav-links { display: none; flex-direction: column; width: 100%; margin-top: 30px; }
    .nav-links.active { display: flex; }
    nav a {
        display: block;
        padding: 10px 0;
        margin: 0;
        border-top: 1px solid #555;
        text-align: center;
    }
    .menu-toggle { display: flex; }
}

/* Statistiky */
.stats-grid { display: flex; gap: 20px; margin-bottom: 30px; flex-wrap: wrap; }
.stat-box { flex: 1; min-width: 200px; background: #fff; padding: 20px; border: 1px solid #ddd; border-radius: 5px; text-align: center; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.stat-number { font-size: 2rem; font-weight: bold; color: #28a745; display: block; }
.stat-label { color: #666; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; }

.chart-container { height: 200px; display: flex; align-items: flex-end; gap: 10px; padding: 10px 10px 30px 10px; border-bottom: 1px solid #ccc; margin-bottom: 20px; background: #fff; border-radius: 5px; }
.chart-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; position: relative; }
.chart-bar { background: #17a2b8; width: 100%; min-width: 10px; transition: height 0.5s; border-radius: 3px 3px 0 0; position: relative; min-height: 1px; }
.chart-bar:hover { background: #138496; }
.chart-val { position: absolute; top: -20px; left: 0; right: 0; text-align: center; font-size: 0.75rem; font-weight: bold; }
.chart-label { position: absolute; bottom: -25px; left: 0; right: 0; text-align: center; font-size: 0.7rem; color: #666; overflow: hidden; white-space: nowrap; }
