/* Taxonomy Header - Nekonečná animácia obrázka */

.taxonomy-header {
    --header-gap: 0;
    --content-max-width: 50%;
    --image-max-width: 50%;
    
    position: relative;
    margin-bottom: 2rem;
    contain: layout style paint;
}

.taxonomy-header__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--header-gap);
    align-items: stretch;
    height: 400px;
    max-height: 400px;
}

/* Content Column (Left) */
.taxonomy-header__content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
    justify-content: center;
    border-radius: 12px 0 0 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Title - Enhanced */
.taxonomy-header__title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 0.5rem 0;
    color: #1a1a1a;
    word-wrap: break-word;
    hyphens: auto;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Taxonomy Title nad motto */
.taxonomy-header__taxonomy-title {
    margin: 0.5rem 0 0.25rem 0;
}

.taxonomy-header__taxonomy-title h1 {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.3;
    color: #2c3e50;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

/* Breadcrumb */
.taxonomy-header__breadcrumb {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.taxonomy-header__breadcrumb a {
    color: #6c757d;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.taxonomy-header__breadcrumb a:hover {
    color: #495057;
    text-decoration: underline;
}

.taxonomy-header__breadcrumb .current {
    color: #333;
    font-weight: 600;
}

.yoast-breadcrumb,
.fallback-breadcrumb {
    font-size: inherit;
}

/* Country Flag - Now in image corner */
.taxonomy-header__flag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95);
    border: 3px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(8px);
}

.taxonomy-header__flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
}

.taxonomy-header__breadcrumb-text {
    flex: 1;
}

/* Motto text - Enhanced */
.taxonomy-header__motto {
    margin: 0.25rem 0 0 0;
}

.taxonomy-header__motto p {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #444;
    margin: 0;
    font-weight: 400;
    font-style: italic;
    opacity: 0.9;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Places count section */
.taxonomy-header__places-count {
    margin: 0;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(248, 249, 250, 0.7));
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.taxonomy-header__places-count p {
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    margin: 0;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.taxonomy-header__places-count .material-symbols-outlined {
    font-size: 1.125rem;
    color: #6c757d;
}

/* Meta Information */
.taxonomy-header__meta-modern {
    margin-top: 1rem;
}

.taxonomy-header__meta-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.taxonomy-header__meta-card {
    display: flex;
    flex-direction: column;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 249, 250, 0.9));
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    min-height: 60px;
    justify-content: center;
}

.taxonomy-header__meta-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.meta-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.meta-icon {
    font-size: 16px;
    flex-shrink: 0;
    color: #6c757d;
}

.meta-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
    color: #495057;
}

.meta-value {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
    color: #343a40;
}

/* Social Share Section */
.taxonomy-header__social-share {
    /*margin-top: 1.5rem;*/
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.taxonomy-header__social-icons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.taxonomy-header__social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: rgba(0, 0, 0, 0.05);
    color: #666;
}

.taxonomy-header__social-icon svg {
    width: 18px;
    height: 18px;
}

.taxonomy-header__social-icon:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Image Column (Right) - Jednoduchý obrázok bez animácie */
.taxonomy-header__image {
    position: relative;
    height: 100%;
    max-height: 400px;
    overflow: hidden;
    border-radius: 0 12px 12px 0;
    background: #f5f5f5;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.taxonomy-header__background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 0 12px 12px 0;
    content-visibility: auto;
}

/* Desktop optimalizácia - len pre 1024px+ */
@media (min-width: 1024px) {
    /* Žiadne špeciálne animácie */
}

/* Tablet - 1024px a menej */
@media (max-width: 1024px) {
    .taxonomy-header__container {
        gap: 0;
        height: 400px;
    }
    
    .taxonomy-header__content {
        padding: 1.5rem;
    }
    
    .taxonomy-header__title {
        font-size: clamp(1.25rem, 3.5vw, 2rem);
    }
    
    .taxonomy-header__taxonomy-title h1 {
        font-size: 1.125rem;
    }
    
    .taxonomy-header__flag {
        width: 40px;
        height: 40px;
        top: 0.75rem;
        right: 0.75rem;
    }
}

/* Mobile - 768px a menej */
@media (max-width: 768px) {
    .taxonomy-header__container {
        grid-template-columns: 1fr;
        gap: 0;
        height: auto;
        max-height: none;
    }
    
    .taxonomy-header__content {
        padding: 1.5rem;
        order: 2;
        border-radius: 0 0 0 0;
    }
    
    .taxonomy-header__image {
        order: 1;
        height: 250px;
        max-height: 250px;
        border-radius: 0 0 0 0;
    }
    
    .taxonomy-header__background-image {
        border-radius: 0 0 0 0;
    }
    
    .taxonomy-header__flag {
        top: 1rem;
        right: 1rem;
        width: 36px;
        height: 36px;
    }
    
    .taxonomy-header__taxonomy-title h1 {
        font-size: 1rem;
    }
}

/* Mobile - 480px a menej */
@media (max-width: 480px) {
    .taxonomy-header__content {
        padding: 1rem;
    }
    
    .taxonomy-header__title {
        font-size: clamp(1.125rem, 4vw, 1.5rem);
        margin-bottom: 0.75rem;
    }
    
    .taxonomy-header__taxonomy-title h1 {
        font-size: 0.9rem;
    }
    
    .taxonomy-header__image {
        height: 200px;
        max-height: 200px;
    }
    
    .taxonomy-header__flag {
        width: 32px;
        height: 32px;
        top: 0.75rem;
        right: 0.75rem;
    }
}

/* Performance optimalizácie */
.taxonomy-header * {
    box-sizing: border-box;
}

/* Accessibility - základné nastavenia */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .taxonomy-header__meta-card:hover {
        transform: none;
    }
    
    .taxonomy-header__social-icon:hover {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .taxonomy-header__title {
        color: #000;
        text-shadow: none;
    }
    
    .taxonomy-header__taxonomy-title h1 {
        color: #000;
    }
    
    .taxonomy-header__breadcrumb a {
        color: #0000EE;
    }
    
    .taxonomy-header__content {
        background: #fff !important;
        border: 2px solid #000;
        border-radius: 12px 0 0 12px;
    }
    
    .taxonomy-header__image {
        border: 2px solid #000;
        border-radius: 0 12px 12px 0;
    }
}