/* ===== Базовые стили ===== */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
    line-height: 1.6;
}

/* ===== Старые стили (сохранены для обратной совместимости) ===== */
.btk-default {
    background-color: transparent;
    color: #dd4b39;
    border: 1px solid #dd4b39;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btk-default:hover {
    background-color: #dd4b39;
    color: #ffffff;
}

.card-mb {
    margin-bottom: 55px;
}

.card-action {
    margin-top: 15px;
    min-width: 100%;
    text-align: center;
}

.tmiddle {
    text-align: center;
}

.tcard-img {
    width: 100% !important;
    height: 300px !important;
    object-fit: contain;
}

.card-title {
    height: 11%;
    padding-bottom: 0px !important;
}

.card-desc {
    height: 215px;
}

.font-ul-sp {
    font-size: 21px;
    font-weight: bold;
}

.dspace {
    height: 280px;
}

.dspace-site {
    height: 700px;
}

.tariff-card {
    background-color: #e47364;
    color: white;
    font-weight: 600;
    padding: 45px;
    border: 15px solid white;
}

.btn-card {
    background-color: transparent;
    color: #ffffff;
    border: 1px solid #ffffff;
    font-weight: bold;
}

.btn-card:hover {
    background-color: #e7e7e7;
    color: #000000;
}

.sp-card-color {
    background-color: #f5f5f5;
    padding: 15px;
}

.sp-card-img {
    width: 26%;
}

/* ===== Новые стили для обновлённой главной ===== */

/* Герой-секция */
.hero-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 30px;
}

.hero-section h1 {
    font-weight: 700;
    color: #2c3e50;
}

.hero-section .lead {
    font-size: 1.25rem;
    color: #555;
}

/* Заголовки разделов */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #7f8c8d;
    max-width: 700px;
    margin: 0 auto;
}

/* Современные карточки компаний */
.company-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.company-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.company-card-image {
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.company-card-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.company-card:hover .company-card-image img {
    transform: scale(1.05);
}

.company-card:hover .company-card-image img {
    transform: scale(1.05);
}

.company-card-body {
    padding: 1.25rem;
    flex: 1;
}

.company-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #2c3e50;
}

.company-card-excerpt {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.company-card-address,
.company-card-phone {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: #555;
}

.company-card-address i,
.company-card-phone i {
    width: 20px;
    color: #e74c3c;
}

.company-card-phone a {
    color: #2c3e50;
    text-decoration: none;
}

.company-card-phone a:hover {
    color: #e74c3c;
}

.company-card-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #ecf0f1;
    background: #fafbfc;
}

/* Современные кнопки */
.btn-outline-primary {
    background: transparent;
    border: 1px solid #e74c3c;
    color: #e74c3c;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.btn-outline-primary:hover {
    background: #e74c3c;
    border-color: #e74c3c;
    color: #fff;
    text-decoration: none;
}

.btn-primary {
    background: #e74c3c;
    border: 1px solid #e74c3c;
    color: #fff;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.btn-primary:hover {
    background: #c0392b;
    border-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
    text-decoration: none;
    color: #fff;
}

/* ===== Адаптивность для мобильных ===== */
@media (max-width: 768px) {
    .hero-section {
        padding: 20px;
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .company-card-image {
        height: 180px;
    }
    
    .btn-primary,
    .btn-outline-primary,
    .btk-default {
        display: block;
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }
    
    .card-mb {
        margin-bottom: 30px;
    }
    
    .tcard-img {
        height: 200px !important;
    }
    
    .card-desc {
        height: auto;
        min-height: 150px;
    }
}

/* ===== Стили для single-company.php ===== */

/* Хлебные крошки */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.breadcrumb-item a {
    color: #e74c3c;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #7f8c8d;
}

/* Логотип компании */
.company-logo-wrapper {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    border: 1px solid #ecf0f1;
}

.company-logo {
    max-width: 100%;
    max-height: 300px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Заголовок компании */
.company-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.company-excerpt {
    font-size: 1.1rem;
    color: #7f8c8d;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #ecf0f1;
}

/* Бейджи рубрик */
.company-categories {
    margin-top: 1rem;
}

.category-badge {
    display: inline-block;
    background: #e74c3c;
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    text-decoration: none;
    margin-right: 8px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.category-badge:hover {
    background: #c0392b;
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
}

/* Карточка контактов */
.contact-card {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    height: 100%;
}

.contact-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e74c3c;
    display: inline-block;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.contact-icon {
    width: 45px;
    height: 45px;
    background: #fef2f0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.contact-icon i {
    font-size: 1.25rem;
    color: #e74c3c;
}

.contact-content {
    flex: 1;
}

.contact-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #95a5a6;
    margin-bottom: 0.25rem;
}

.contact-value {
    font-size: 1rem;
    color: #2c3e50;
    text-decoration: none;
    word-break: break-all;
}

.contact-value a {
    color: #2c3e50;
    text-decoration: none;
}

.contact-value a:hover {
    color: #e74c3c;
}

/* Карточка информации */
.info-card {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    height: 100%;
}

.info-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e74c3c;
    display: inline-block;
}

.company-description {
    color: #555;
    line-height: 1.8;
}

.company-description p {
    margin-bottom: 1rem;
}

/* Адаптивность */
@media (max-width: 768px) {
    .company-title {
        font-size: 1.75rem;
        margin-top: 1rem;
    }
    
    .contact-card,
    .info-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .company-logo-wrapper {
        padding: 20px;
    }
    
    .company-logo {
        max-height: 200px;
    }
    
    .contact-item {
        margin-bottom: 1rem;
    }
    
    .contact-icon {
        width: 40px;
        height: 40px;
    }
}

/* ===== Стили для результатов поиска ===== */

.search-result-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    gap: 1rem;
    border: 1px solid #ecf0f1;
}

.search-result-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.search-result-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: #fef2f0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-result-icon i {
    font-size: 1.5rem;
    color: #e74c3c;
}

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

.search-result-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.search-result-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.search-result-title a:hover {
    color: #e74c3c;
}

.search-result-excerpt {
    color: #7f8c8d;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.search-result-meta .badge {
    background: #ecf0f1;
    color: #7f8c8d;
    font-weight: normal;
    padding: 4px 10px;
}

/* Адаптивность для поиска */
@media (max-width: 768px) {
    .search-result-card {
        flex-direction: column;
        padding: 1rem;
    }
    
    .search-result-icon {
        width: 40px;
        height: 40px;
    }
    
    .search-result-icon i {
        font-size: 1.25rem;
    }
    
    .search-result-title {
        font-size: 1.1rem;
    }
}

/* ===== Улучшенная шапка ===== */

#main-navbar {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 0.75rem 0;
    transition: all 0.3s ease;
}

.navbar-logo {
    height: 45px;
    width: auto;
    transition: opacity 0.3s ease;
}

.navbar-logo:hover {
    opacity: 0.9;
}

/* Стили для меню */
#main-navbar .navbar-nav {
    gap: 0.25rem;
}

#main-navbar .nav-link {
    color: #2c3e50;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    border-radius: 6px;
}

#main-navbar .nav-link:hover,
#main-navbar .nav-link.active {
    color: #e74c3c;
    background: #fef2f0;
}

#main-navbar .dropdown-menu {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

#main-navbar .dropdown-item {
    color: #2c3e50;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

#main-navbar .dropdown-item:hover {
    background: #fef2f0;
    color: #e74c3c;
}

/* Стили для формы поиска */
.search-form {
    position: relative;
    margin-left: 1rem;
}

.search-input {
    padding-right: 45px;
    border-radius: 8px;
    border: 1px solid #ecf0f1;
    background: #f8f9fa;
    transition: all 0.3s ease;
    min-width: 250px;
}

.search-input:focus {
    background: #ffffff;
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
    outline: none;
}

.search-btn {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    background: transparent;
    border: none;
    color: #95a5a6;
    padding: 0 12px;
    transition: color 0.3s ease;
}

.search-btn:hover {
    color: #e74c3c;
}

/* Адаптивность шапки */
@media (max-width: 991px) {
    #main-navbar .navbar-collapse {
        padding-top: 1rem;
    }
    
    #main-navbar .navbar-nav {
        gap: 0;
        margin-bottom: 1rem !important;
    }
    
    .search-form {
        margin-left: 0;
        margin-top: 0.5rem;
    }
    
    .search-input {
        width: 100%;
    }
    
    #main-navbar .nav-link {
        padding: 0.75rem 1rem;
    }
    
    #main-navbar .dropdown-menu {
        border: none;
        box-shadow: none;
        padding-left: 1rem;
    }
}

@media (max-width: 768px) {
    .navbar-logo {
        height: 40px;
    }
    
    #main-navbar {
        padding: 0.5rem 0;
    }
}

/* ===== Современный подвал ===== */

.main-footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
    border-top: 4px solid #e74c3c;
}

.footer-widget {
    margin-bottom: 1.5rem;
}

.footer-logo img {
    max-height: 50px;
    width: auto;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.footer-description {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #bdc3c7;
    margin-bottom: 1rem;
}

.footer-phone {
    margin: 1rem 0;
}

.footer-phone i {
    color: #e74c3c;
    margin-right: 0.5rem;
}

.footer-phone a {
    color: #ecf0f1;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-phone a:hover {
    color: #e74c3c;
}

.footer-copyright {
    font-size: 0.8rem;
    color: #95a5a6;
    margin-top: 1rem;
}

.footer-widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e74c3c;
    display: inline-block;
    color: #ecf0f1;
}

.footer-categories-list,
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-categories-list li,
.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-categories-list a,
.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.footer-categories-list a:hover,
.footer-links a:hover {
    color: #e74c3c;
    padding-left: 5px;
}

.footer-metrics {
    padding-top: 1rem;
    border-top: 1px solid #34495e;
}

/* Адаптивность подвала */
@media (max-width: 768px) {
    .main-footer {
        padding: 2rem 0 1rem;
        text-align: center;
    }
    
    .footer-widget-title {
        display: block;
        text-align: center;
    }
    
    .footer-categories-list li,
    .footer-links li {
        display: inline-block;
        margin: 0 0.5rem;
    }
    
    .footer-categories-list a:hover,
    .footer-links a:hover {
        padding-left: 0;
    }
    
    .footer-phone {
        text-align: center;
    }
    
    .footer-description {
        text-align: center;
    }
}

/* ===== Стили для архива статей ===== */

.article-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.article-card-image {
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-card-image img {
    transform: scale(1.05);
}

.article-card-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
}

.article-card-image-placeholder i {
    font-size: 3rem;
    color: #e74c3c;
}

.article-card-body {
    padding: 1.25rem;
    flex: 1;
}

.article-card-meta {
    margin-bottom: 0.75rem;
}

.article-date {
    font-size: 0.8rem;
    color: #95a5a6;
}

.article-date i {
    margin-right: 4px;
}

.article-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.article-card-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-card-title a:hover {
    color: #e74c3c;
}

.article-card-excerpt {
    font-size: 0.9rem;
    color: #7f8c8d;
    line-height: 1.5;
    margin-bottom: 0;
}

.article-card-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #ecf0f1;
    background: #fafbfc;
}

/* Адаптивность для статей */
@media (max-width: 768px) {
    .article-card-image {
        height: 180px;
    }
    
    .article-card-title {
        font-size: 1.1rem;
    }
}