:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

/* Полное переопределение Bootstrap для исправления верстки */
* {
    box-sizing: border-box !important;
}

.container {
    width: 100% !important;
    max-width: 1470px !important;
    margin: 0 auto !important;
    padding: 0 15px !important;
}

@media (min-width: 1200px) {
    .container {
        max-width: 1470px !important;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .container {
        max-width: 960px !important;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .container {
        max-width: 720px !important;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .container {
        max-width: 540px !important;
    }
}

@media (max-width: 575px) {
    .container {
        max-width: 100% !important;
        padding: 0 10px !important;
    }
}

/* Header */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

#logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

#logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

#logo svg {
    margin-right: 12px;
    flex-shrink: 0;
}

.header-logo__text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.header-logo__text-head {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.header-logo__text-bottom {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-light);
    margin-top: -2px;
}

.nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.btn-auth {
    background: var(--primary-color);
    border: none;
    color: var(--white);
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-auth:hover {
    background: var(--primary-hover);
    color: var(--white);
    text-decoration: none;
    transform: translateY(-1px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--light-bg) 0%, var(--white) 100%);
    padding: 4rem 0;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* Region List */
.region-section {
    padding: 4rem 0;
    background: var(--white);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 3rem;
    text-align: center;
}

.region-list {
    margin-top: 2rem;
}

.region-card {
    margin-bottom: 0.5rem;
    transition: transform 0.2s ease;
}

.region-card:hover {
    transform: translateY(-1px);
}

.region-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--white);
    border-radius: 0.5rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
    position: relative;
    font-size: 0.95rem;
    white-space: nowrap;
}

.region-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color);
    border-radius: 0.5rem 0 0 0.5rem;
}

.region-link:hover {
    color: var(--primary-color);
    text-decoration: none;
    box-shadow: var(--shadow-lg);
}

.region-link.bold {
    font-weight: 600;
    background: var(--white);
    color: var(--text-dark);
    font-size: 1rem;
    padding: 1rem;
}

.region-link.bold::before {
    width: 6px;
}

.region-link.bold:hover {
    color: var(--primary-color);
}

.region-link .region-note {
    font-size: 0.8em;
    color: var(--text-light);
    font-weight: 400;
}

/* Articles Section */
.articles-section {
    padding: 4rem 0;
    background: var(--light-bg);
}

.article-card {
    background: var(--white);
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
    height: 100%;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.article-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.article-excerpt {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.article-meta {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 3rem 0 2rem;
}

.footer h5 {
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: var(--white);
}

.privacy-link {
    color: #ff6b35 !important;
    text-decoration: underline !important;
}

.privacy-link:hover {
    color: #ff6b35 !important;
    text-decoration: underline !important;
}

/* Region Page Styles */
.breadcrumbs-section {
    background: var(--light-bg);
    padding: 1rem 0;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 0;
}

.hero-stats {
    text-align: center;
    padding: 2rem;
    background: var(--white);
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--text-light);
}

.region-header {
    padding: 3rem 0;
    background: var(--white);
}

.region-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.region-description {
    font-size: 1.125rem;
    color: var(--text-light);
    margin: 0;
}

.premium-section {
    padding: 2rem 0;
    background: var(--light-bg);
}

.premium-section h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}


.premium-placeholder {
    background: var(--white);
    border: 2px dashed var(--border-color);
    border-radius: 0.75rem;
    padding: 3rem;
    text-align: center;
    color: var(--text-light);
}

.catalog-section {
    padding: 3rem 0;
    background: var(--white);
}

.catalog-header {
    margin-bottom: 2rem;
}

.catalog-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.catalog-header p {
    color: var(--text-light);
    margin: 0;
}

.fulfillments-grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.fulfillment-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
    margin-bottom: 1.5rem;
}


.fulfillment-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.card-title a {
    color: var(--text-dark);
    text-decoration: none;
}

.card-title a:hover {
    color: var(--primary-color);
}

.card-content-row {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.fulfillment-logo {
    flex-shrink: 0;
}

.logo-placeholder {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.services-and-contacts {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.services {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.service-label {
    font-weight: 500;
    color: var(--text-dark);
}

.service-value {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.service-value.available {
    background: #d1fae5;
    color: #065f46;
}

.service-value.unavailable {
    background: #fee2e2;
    color: #991b1b;
}

.address {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.address i {
    color: var(--primary-color);
}

.contacts {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-item i {
    color: var(--primary-color);
    width: 16px;
}

.contact-item a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.9rem;
}

.contact-item a:hover {
    color: var(--primary-color);
}

.social-networks {
    margin-top: 0.5rem;
}

.social-networks a {
    display: inline-block;
    margin-right: 0.5rem;
    color: var(--primary-color);
    font-size: 1.25rem;
    transition: color 0.2s ease;
}

.social-networks a:hover {
    color: var(--primary-hover);
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 80px; /* Отступ сверху, чтобы не заезжал под шапку (высота шапки + небольшой отступ) */
    z-index: 999; /* Ниже шапки (z-index: 1000), но выше остального контента */
    max-height: calc(100vh - 100px); /* Ограничиваем высоту сайдбара */
    overflow-y: auto; /* Добавляем прокрутку, если контент не помещается */
}

.banner-desktop {
    margin-bottom: 2rem;
    position: relative; /* Для правильного позиционирования внутри sticky sidebar */
}

.banner-placeholder {
    background: var(--light-bg);
    border: 2px dashed var(--border-color);
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
}

.banner-desktop .banner-placeholder {
    width: 240px;
    height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.banner-desktop .banner-img {
    width: 240px;
    height: 400px;
    object-fit: contain;
    border-radius: 8px;
    display: block;
}

.banner-desktop a {
    display: block;
    text-decoration: none;
}

.banner-mobile {
    display: none;
    padding: 1rem 0;
    background: var(--light-bg);
}

.banner-mobile .banner-placeholder {
    width: 100%;
    max-width: 500px;
    height: 150px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.banner-mobile .banner-img {
    width: 100%;
    max-width: 500px;
    height: 150px;
    object-fit: contain;
    border-radius: 8px;
    margin: 0 auto;
    display: block;
}

.banner-mobile a {
    display: block;
    text-decoration: none;
    text-align: center;
}

/* Pagination */
.pagination {
    margin-top: 2rem;
}

.page-link {
    color: var(--primary-color);
    border-color: var(--border-color);
}

.page-link:hover {
    color: var(--primary-hover);
    background-color: var(--light-bg);
    border-color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1.125rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .region-link {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .region-header h1 {
        font-size: 2rem;
    }
    
    .card-content-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .services {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .banner-desktop {
        display: none;
    }
    
    .banner-mobile {
        display: block;
    }
    
    .sidebar {
        position: static;
    }
}

/* Fulfillment Detail Page Styles */
.fulfillment-detail-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.fulfillment-detail-card .card-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 2rem;
}

.fulfillment-logo-large {
    flex-shrink: 0;
}

.logo-placeholder-large {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.fulfillment-logo-large-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 10px;
}

.fulfillment-info {
    flex: 1;
}

.fulfillment-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.rating-widget {
    margin-top: 1rem;
}

.fulfillment-detail-card .card-body {
    padding: 2rem;
}

.services-section,
.stats-section,
.description-section,
.photo-slider-section {
    margin-bottom: 2rem;
}

.services-section h3,
.stats-section h3,
.description-section h3,
.photo-slider-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--light-bg);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.description-section p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-dark);
}

.photo-slider {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: var(--light-bg);
    border-radius: 0.5rem;
    overflow: hidden;
}

.photo-slider .carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.photo-slider .carousel-inner {
    height: 100%;
}

.photo-slider .carousel-item {
    height: 100%;
}

.slider-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--light-bg), #f8f9fa);
    color: var(--text-light);
    font-size: 1.5rem;
}

.slider-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.contact-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 2rem;
}

.contact-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.contact-card .contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--light-bg);
    border-radius: 0.5rem;
}

.contact-card .contact-item i {
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.contact-card .contact-item a {
    color: var(--text-dark);
    text-decoration: none;
}

.contact-card .contact-item a:hover {
    color: var(--primary-color);
}

.contact-card .social-networks {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.contact-card .social-networks h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

@media (max-width: 576px) {
    .hero {
        padding: 2rem 0;
    }
    
    .region-section,
    .articles-section {
        padding: 2rem 0;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .region-header {
        padding: 2rem 0;
    }
    
    .fulfillment-detail-card .card-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .fulfillment-title {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-card {
        position: static;
        margin-top: 2rem;
    }
    
    .region-header h1 {
        font-size: 1.75rem;
    }
    
    .fulfillment-card {
        padding: 1rem;
    }
}

/* Fulfillment Logo Styles */
.fulfillment-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
}

.logo-placeholder {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--text-light);
    transition: all 0.3s ease;
}

.logo-placeholder:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: var(--primary-color);
}

.logo-placeholder i {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

.logo-placeholder span {
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.logo-placeholder small {
    font-size: 0.75rem;
    opacity: 0.6;
}

/* Ссылка логотипа */
.fulfillment-logo-link {
    display: block;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.fulfillment-logo-link:hover {
    opacity: 0.8;
}

.fulfillment-logo-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Изображение логотипа */
.fulfillment-logo-img {
    width: 200px;
    height: 200px;
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 10px;
}

/* Responsive adjustments for logo */
@media (max-width: 768px) {
    .fulfillment-logo {
        margin-bottom: 1.5rem;
    }
    
    .fulfillment-logo-img {
        width: 100%;
        max-width: 150px;
        height: auto;
        max-height: 150px;
    }
    
    .logo-placeholder {
        width: 150px;
        height: 150px;
    }
    
    .logo-placeholder i {
        font-size: 2rem;
    }
    
    .logo-placeholder span {
        font-size: 0.875rem;
    }
    
    .logo-placeholder small {
        font-size: 0.625rem;
    }
    
    /* На мобильных устройствах логотип и контент в колонку */
    .fulfillment-card .col-md-3,
    .fulfillment-card .col-md-9 {
        padding: 0;
        margin-bottom: 1rem;
    }
    
    .fulfillment-card .col-md-3 {
        padding-right: 0;
        text-align: center;
    }
    
    .fulfillment-card .col-md-9 {
        padding-left: 0;
    }
}

/* Auth Button Styles */
.btn-auth {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-auth:hover {
    background: var(--primary-hover);
    color: var(--white);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-auth:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Минимальные переопределения Bootstrap для карточек фулфилментов */

/* Исправление Bootstrap Grid для карточек фулфилментов */
.fulfillment-card .row {
    margin: 0;
}

.fulfillment-card .col-md-3,
.fulfillment-card .col-md-9 {
    padding: 0;
}

.fulfillment-card .col-md-3 {
    padding-right: 1rem;
}

.fulfillment-card .col-md-9 {
    padding-left: 1rem;
}

/* Мобильная версия - все колонки 100% ширины по умолчанию */
@media (max-width: 767px) {
    .fulfillment-card .col-md-3,
    .fulfillment-card .col-md-9 {
        padding: 0;
        margin-bottom: 1rem;
    }
    
    .fulfillment-card .col-md-3 {
        text-align: center;
    }
}

/* Article Card Styles */
.article-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.article-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.article-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-title a:hover {
    color: #007bff;
}

.article-excerpt {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

.article-meta {
    color: #888;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}