/* Custom enhancements preserving original Astra Child aesthetic */

/* UI Icon Base */
.ui-icon {
    display: inline-block;
    vertical-align: -0.15em;
    flex-shrink: 0;
    transition: transform 0.2s ease, stroke 0.2s ease;
}

/* Header & Nav */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid #edf2f7;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 24px;
    max-width: 1400px;
    margin: 0 auto;
    gap: 16px;
    flex-wrap: nowrap;
}

.site-branding {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.custom-logo {
    max-height: 38px;
    width: auto;
    max-width: 210px;
    display: block;
    object-fit: contain;
}

.site-navigation {
    display: flex;
    align-items: center;
}

.site-nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
    flex-wrap: nowrap;
    white-space: nowrap !important;
}

.site-nav-list > li {
    position: relative;
    white-space: nowrap !important;
    flex-shrink: 0;
}

.site-nav-list a {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    padding: 7px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap !important;
}

.site-nav-list a:hover {
    color: #b01217;
    background: rgba(176, 18, 23, 0.05);
}

.dropdown-trigger .nav-chevron {
    opacity: 0.6;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.has-dropdown:hover .dropdown-trigger .nav-chevron {
    transform: rotate(180deg);
    opacity: 1;
}

/* Dropdown */
.nav-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    min-width: 250px;
    padding: 8px 0;
    list-style: none;
    display: none;
    z-index: 100;
}

.nav-dropdown li {
    white-space: nowrap;
}

.nav-dropdown li a {
    display: block;
    padding: 9px 18px;
    font-size: 13.5px;
    font-weight: 500;
    color: #334155;
    border-radius: 0;
}

.nav-dropdown li a:hover {
    background: #f8fafc;
    color: #b01217;
}

.has-dropdown:hover .nav-dropdown {
    display: block;
}

/* Header Actions */
.site-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: nowrap;
    white-space: nowrap !important;
}

.header-search-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 13.5px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap !important;
    height: 36px;
}

.header-search-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #cbd5e1;
}

.header-search-btn .search-kbd {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 11px;
    font-family: inherit;
    color: #64748b;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.header-lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #334155;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    height: 36px;
    white-space: nowrap !important;
}

.header-lang-btn:hover {
    border-color: #08245c;
    color: #08245c;
    background: #f8fafc;
}

.btn-report-nav {
    background: #b01217;
    color: #ffffff !important;
    border-radius: 999px;
    padding: 7px 16px !important;
    font-size: 13.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    height: 36px;
    white-space: nowrap !important;
    box-shadow: 0 2px 8px rgba(176, 18, 23, 0.25);
}

.btn-report-nav:hover {
    background: #8b0d11;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(176, 18, 23, 0.35);
    transform: translateY(-1px);
}

.btn-contact-nav {
    background: #ffffff;
    color: #b01217 !important;
    border: 1px solid #b01217;
    border-radius: 999px;
    padding: 6px 14px !important;
    font-size: 13.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    height: 36px;
    white-space: nowrap !important;
    transition: all 0.2s ease;
}

.btn-contact-nav:hover {
    background: #b01217;
    color: #ffffff !important;
}

/* Breadcrumbs */
.breadcrumbs-bar {
    background: #f8fafc;
    border-bottom: 1px solid #edf2f7;
    padding: 10px 0;
    font-size: 13px;
}

.breadcrumbs-bar .container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

.breadcrumbs-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 6px;
    color: #64748b;
}

.breadcrumbs-list a {
    color: #64748b;
    text-decoration: none;
}

.breadcrumbs-list a:hover {
    color: #b01217;
}

.breadcrumbs-separator {
    color: #94a3b8;
}

.breadcrumbs-current {
    color: #0f172a;
    font-weight: 600;
}

/* AI Summary Block (SEO / LLM context) */
.ai-summary-block {
    background: #fff8f8;
    border: 1px solid #fecaca;
    border-left: 4px solid #dc2626;
    border-radius: 8px;
    padding: 16px 20px;
    margin: 20px 0 25px;
    font-size: 15px;
    line-height: 1.55;
    color: #374151;
}

.ai-summary-block strong {
    color: #991b1b;
}

/* Quick Share & Print Bar */
.profile-action-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    transition: all 0.2s;
}

.action-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.action-btn-tg {
    background: #229ed9;
    color: #ffffff;
    border-color: #229ed9;
}

.action-btn-tg:hover {
    background: #1d8bbf;
    color: #ffffff;
}

.action-btn-print {
    background: #08245c;
    color: #ffffff;
    border-color: #08245c;
}

.action-btn-print:hover {
    background: #0c3380;
    color: #ffffff;
}

/* GEO Map Container */
#geo-map {
    height: 480px;
    width: 100%;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    margin-bottom: 30px;
}

.geo-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.geo-stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
}

.geo-stat-card:hover {
    border-color: #b01217;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(176, 18, 23, 0.08);
}

.geo-stat-name {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.geo-stat-badge {
    background: #fee2e2;
    color: #991b1b;
    font-size: 13px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
}

/* Search Modal */
.search-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
}

.search-modal-backdrop.active {
    display: flex;
}

.search-modal {
    background: #ffffff;
    width: 100%;
    max-width: 640px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: modalSlide 0.2s ease-out;
}

@keyframes modalSlide {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.search-modal-header {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid #e2e8f0;
}

.search-modal-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 18px;
    padding: 6px 10px;
    color: #0f172a;
}

.search-modal-close {
    background: transparent;
    border: none;
    font-size: 20px;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
}

.search-modal-results {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px 0;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f8fafc;
    transition: background 0.15s;
}

.search-result-item:hover {
    background: #f8fafc;
}

.search-result-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    background: #e2e8f0;
}

.search-result-info {
    flex: 1;
}

.search-result-title {
    font-weight: 700;
    font-size: 15px;
    color: #0f172a;
    margin-bottom: 2px;
}

.search-result-sub {
    font-size: 13px;
    color: #64748b;
}

/* Footer */
.site-footer {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 40px 0 24px;
    margin-top: 40px;
}

.site-footer-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 30px;
}

.footer-logo {
    max-width: 200px;
    margin-bottom: 12px;
}

.footer-desc {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    max-width: 420px;
}

.footer-col h4 {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 14px;
}

.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-col li {
    margin-bottom: 8px;
}

.footer-col a {
    color: #64748b;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.15s;
}

.footer-col a:hover {
    color: #b01217;
}

.footer-bottom {
    max-width: 1140px;
    margin: 30px auto 0;
    padding: 20px 20px 0;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: #94a3b8;
}

/* Print view for dossiers */
@media print {
    .site-header,
    .site-footer,
    .breadcrumbs-bar,
    .profile-action-bar,
    .players-pagination,
    .homepage-actions {
        display: none !important;
    }
    body, .player.player-hero, .player-information {
        background: #ffffff !important;
        color: #000000 !important;
        padding: 0 !important;
    }
    .player-hero-card {
        border: none !important;
        box-shadow: none !important;
    }
    .player-name {
        color: #000000 !important;
    }
}

/* Tablet & Compact Desktop Adaptations: 993px - 1240px */
@media (min-width: 993px) and (max-width: 1240px) {
    .site-header-inner {
        padding: 8px 16px;
        gap: 8px;
    }
    .custom-logo {
        max-height: 32px;
        max-width: 160px;
    }
    .site-nav-list {
        gap: 4px;
    }
    .site-nav-list a {
        font-size: 13px;
        padding: 6px 7px;
    }
    .header-search-btn {
        padding: 6px 10px;
        font-size: 12.5px;
    }
    .header-search-btn .search-kbd {
        display: none !important;
    }
    .btn-report-nav {
        padding: 6px 12px !important;
        font-size: 13px;
    }
    .btn-contact-nav {
        display: none !important;
    }
}

/* Mobile responsive menu */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    padding: 6px;
    color: #0f172a;
    cursor: pointer;
    line-height: 1;
}

.mobile-menu-toggle .ui-icon {
    width: 24px;
    height: 24px;
}

.mobile-only-nav-item {
    display: none;
}

@media (max-width: 992px) {
    .site-nav-list {
        display: none;
    }
    .site-nav-list.mobile-active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #ffffff;
        padding: 16px 20px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        border-bottom: 1px solid #e2e8f0;
        gap: 6px;
    }
    .site-nav-list.mobile-active a {
        padding: 10px 12px;
        width: 100%;
        justify-content: flex-start;
    }
    .mobile-menu-toggle {
        display: block;
    }
    .mobile-only-nav-item {
        display: block !important;
    }
    .site-footer-inner {
        grid-template-columns: 1fr;
    }
    .site-header-inner {
        padding: 10px 16px;
    }
    .custom-logo {
        max-height: 32px;
        max-width: 160px;
    }
    .btn-report-nav,
    .btn-contact-nav,
    .header-lang-btn {
        display: none !important;
    }
    .header-search-btn .search-kbd {
        display: none !important;
    }
    .header-search-btn {
        padding: 6px 12px;
        font-size: 13px;
        height: 34px;
    }
}

@media (max-width: 640px) {
    .homepage-features {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .homepage-feature:not(:last-child)::after {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .site-header-inner {
        padding: 8px 12px;
        gap: 6px;
    }
    .custom-logo {
        max-width: 130px;
    }
    .header-search-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
}

html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

@media (max-width: 480px) {
    .player-name {
        font-size: 26px !important;
        line-height: 1.25 !important;
        margin-bottom: 12px !important;
        letter-spacing: -0.3px !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
    }
    .player-meta-row {
        padding: 10px 0 !important;
    }
    .player-meta-value {
        font-size: 14px !important;
    }
    .player-meta-label {
        font-size: 11px !important;
    }
}

/* Удлиненное фото на карточках досье (вместо обрезки) */
.player-card-image img,
.player-card-image .img-fluid,
.player-card-image .wp-post-image {
    height: 380px !important;
    object-fit: cover;
    object-position: center center !important;
}

@media (max-width: 991px) {
    .player-card-image img,
    .player-card-image .img-fluid,
    .player-card-image .wp-post-image {
        height: 340px !important;
    }
}

@media (max-width: 576px) {
    .player-card-image img,
    .player-card-image .img-fluid,
    .player-card-image .wp-post-image {
        height: 320px !important;
    }
}
