.company-page {
    font-family: 'Roboto', sans-serif;
    line-height: 1.7;
    color: #333;
    background-color: #f8fafd;
    min-height: 100vh;
}

.company-header {
    background: linear-gradient(135deg, #0c4da2 0%, #1e3c72 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-bottom: 2rem;
}

.company-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.company-header p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.9;
}

.company-sidebar {
    width: 200px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(12, 77, 162, 0.08);
    padding: 1rem;
    position: sticky;
    top: 100px;
    align-self: start;
    margin-right: 2rem;
    border: 1px solid #e8eef5;
    z-index: 10;
    flex-shrink: 0;
}

.company-nav ul {
    display: flex;
    flex-direction: column;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}

.company-nav li {
    margin: 0;
}

.company-nav a {
    color: #4a5568;
    text-decoration: none;
    padding: 0.85rem 1.25rem;
    border-radius: 10px;
    transition: all 0.25s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    position: relative;
    font-size: 1rem;
}

.company-nav a:hover {
    background: #f0f7ff;
    color: #0c4da2;
}

.company-nav a.active {
    background: #e6f0ff;
    color: #0c4da2;
    font-weight: 600;
    margin-left: 0;
}

main.company-page.container {
    display: flex;
    flex-wrap: nowrap;
    gap: 2rem;
    padding: 2rem 0;
    max-width: 1400px;
    margin: 0 auto;
}

/* Hide the banner on company page */
.page-banner {
    display: none;
}

.company-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.company-section {
    padding: 2rem 0;
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.company-section.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

.section-main-title {
    font-size: 2.5rem;
}

.section-intro-block {
    text-align: center;
    margin: 0 0 2rem 0;
    padding: 1.25rem 1.5rem;
    background: white;
    border-radius: 10px;
    border: 1px solid #eef2f7;
    box-shadow: 0 2px 8px rgba(12, 77, 162, 0.06);
}

.section-intro {
    text-align: center;
    font-size: 1.1rem;
    color: #4a5568;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
    font-weight: 400;
}

.about-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid #eef2f7;
}

.history-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.history-timeline {
    position: relative;
    max-width: 800px;
    margin: 2rem auto 0;
}

/* Линия времени */
.history-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #0c4da2;
    transform: translateX(-50%);
}

.history-item {
    position: relative;
    width: calc(50% - 40px);
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.history-item:nth-child(odd) {
    left: 0;
}

.history-item:nth-child(even) {
    left: calc(50% + 40px);
}

/* Круги на линии времени */
.history-item::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: #0c4da2;
    border-radius: 50%;
    top: 20px;
}

.history-item:nth-child(odd)::before {
    right: -50px;
}

.history-item:nth-child(even)::before {
    left: -50px;
}

.history-year {
    font-size: 1.5rem;
    font-weight: bold;
    color: #0c4da2;
    margin-bottom: 0.5rem;
}

.history-text {
    color: #666;
    line-height: 1.6;
}

.certificates-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.certificate-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.25s ease;
    background: #fff;
    box-shadow: 0 2px 8px rgba(12, 77, 162, 0.08);
    border: 1px solid #e8eef5;
    aspect-ratio: 3/4;
}

.certificate-item:hover {
    box-shadow: 0 8px 24px rgba(12, 77, 162, 0.15);
}

.certificate-img {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.certificate-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.certificate-item:hover .certificate-img img {
    transform: scale(1.03);
}

.certificate-overlay {
    position: absolute;
    inset: 0;
    background: rgba(12, 77, 162, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    padding: 12px;
    text-align: center;
}

.certificate-zoom-icon {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 8px;
}

.certificate-item:hover .certificate-overlay {
    opacity: 1;
}

.certificate-title {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.35;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.certificate-view-btn {
    background: #fff;
    color: #0c4da2;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.certificate-view-btn:hover {
    background: #f0f7ff;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: white;
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.modal-image-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafd;
    min-height: 500px;
    border-radius: 8px;
    padding: 20px;
}

#modalImage {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 15px;
    box-sizing: border-box;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: background 0.3s ease;
    backdrop-filter: blur(10px);
}

.modal-nav:hover {
    background: rgba(255, 255, 255, 0.95);
}

.modal-prev {
    left: 20px;
}

.modal-next {
    right: 20px;
}

.modal-zoom-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    border-radius: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.modal-zoom-btn {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    color: #0c4da2;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.modal-zoom-btn:hover {
    background: #e6f0ff;
    color: #083d87;
}

.modal-info {
    padding: 25px 30px;
    background: white;
    border-top: 1px solid #eaeaea;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0 0 12px 12px;
    flex-shrink: 0;
}

.modal-info h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
    flex: 1;
    text-align: center;
}

.modal-counter {
    font-size: 1rem;
    color: #666;
    margin-left: 1rem;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background 0.3s ease;
    backdrop-filter: blur(10px);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.95);
}

.partners-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.company-section .partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 0.5rem;
}

.company-section .partners-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1.5rem;
}

.company-section .partner-card {
    background: white;
    padding: 1.8rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eef2f7;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.company-section .partner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(12, 77, 162, 0.15);
    border-color: #0c4da2;
}

.company-section .partner-logo {
    width: 100%;
    height: 150px;
    margin: 0;
    background: #f8fafd;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    overflow: hidden;
    border: 1px solid #eef2f7;
    flex-shrink: 0;
}

.company-section .partner-logo img {
    width: auto;
    height: auto;
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.black-bg {
    background-color: #000 !important;
}

/* Стили для .partner-link и .partner-description определены ниже в разделе Partner info styles */

.features-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-item {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.feature-icon {
    font-size: 3rem;
    color: #0c4da2;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #0c4da2;
    margin-bottom: 1rem;
}

.feature-description {
    color: #666;
    line-height: 1.6;
}

/* Установим фиксированный размер для всех изображений в модальном окне */
#modalImage {
    width: 600px;
    height: 400px;
    object-fit: contain;
}

@media (max-width: 1024px) {
    main.company-page.container {
        flex-direction: column;
    }
    
    .company-sidebar {
        width: 100%;
        margin-right: 0;
        margin-bottom: 1.5rem;
        position: relative;
        top: 0;
    }
    
    .company-nav ul {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .company-nav li {
        margin: 0;
    }
    
    .company-nav a {
        padding: 0.65rem 1.2rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    .company-header h1 {
        font-size: 2rem;
    }
    
    .company-nav ul {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .company-nav li {
        margin: 0;
    }
    
    .section-main-title {
        font-size: 1.5rem;
        text-align: center;
    }
    
    /* Адаптивная линия времени */
    .history-timeline::before {
        left: 30px;
    }
    
    .history-item {
        width: calc(100% - 80px);
        margin-left: 60px;
        left: 0 !important;
    }
    
    .history-item::before {
        left: -70px;
    }
    
    .certificates-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .certificate-item {
        aspect-ratio: 3/4;
    }
    
    .modal-container {
        max-width: 95vw;
        max-height: 90vh;
    }
    
    .modal-image-container {
        min-height: 300px;
        padding: 10px;
    }
    
    .modal-info {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .modal-counter {
        margin-left: 0;
    }
    
    .partners-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .company-header {
        padding: 1.5rem 0;
    }
    
    .company-header h1 {
        font-size: 1.5rem;
    }
    
    .company-section {
        padding: 2rem 0;
    }
    
    .certificates-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .certificate-item {
        aspect-ratio: 3/4;
        max-width: 280px;
        margin: 0 auto;
    }
    
    .modal-container {
        transform: scale(0.8);
    }
    
    .modal-overlay.active .modal-container {
        transform: scale(0.9);
    }
    
    .modal-image-container {
        min-height: 250px;
        padding: 5px;
    }
    
    #modalImage {
        padding: 10px;
        width: 100%;
        height: 200px;
    }
    
    .modal-info {
        padding: 15px 20px;
    }
}

/* About section features */
.about-features {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 2rem 0;
}

.about-features .feature-item {
    flex: 1;
    min-width: 250px;
    background: #f8fafd;
    padding: 1.8rem;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #eef2f7;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-features .feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(12, 77, 162, 0.1);
}

.about-features .feature-item i {
    font-size: 2.2rem;
    color: #0c4da2;
    margin-bottom: 1rem;
    background: rgba(12, 77, 162, 0.1);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.about-features .feature-item p {
    margin: 0;
    color: #4a5568;
    line-height: 1.7;
}

/* Mission, Clients and Support blocks */
.mission-block, .clients-block, .support-block {
    background: #f8fafd;
    padding: 1.8rem;
    border-radius: 10px;
    margin: 1.5rem 0;
    border-left: 4px solid #0c4da2;
}

.mission-block h3, .clients-block h3, .support-block h3 {
    color: #0c4da2;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.mission-block h3 i, .clients-block h3 i, .support-block h3 i {
    font-size: 1.2rem;
}

.mission-block p, .clients-block p, .support-block p {
    color: #4a5568;
    line-height: 1.7;
    margin: 0.5rem 0;
}

.mission-block p:last-child, .clients-block p:last-child, .support-block p:last-child {
    margin-bottom: 0;
}

/* About text styles */
.about-text {
    color: #4a5568;
    line-height: 1.8;
    font-size: 1.05rem;
}

.about-text p {
    margin: 1rem 0;
    color: #4a5568;
    line-height: 1.8;
}

.about-text p:first-child {
    margin-top: 0;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-text .lead {
    font-size: 1.25rem;
    font-weight: 500;
    color: #0c4da2;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f0ff 100%);
    border-left: 4px solid #0c4da2;
    border-radius: 8px;
}

.about-text h3 {
    color: #0c4da2;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eef2f7;
}

.about-text h3:first-of-type {
    margin-top: 0;
}

.final-block {
    background: linear-gradient(135deg, #0c4da2 0%, #1e3c72 100%);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
    text-align: center;
    box-shadow: 0 5px 20px rgba(12, 77, 162, 0.2);
}

.final-block .final-statement,
.final-statement {
    color: #ffffff !important;
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.7;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* Partner info styles */
.partner-info {
    flex: 1;
    text-align: left;
}

.partner-info h3 {
    color: #0c4da2;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eef2f7;
}

.partner-info .partner-description {
    color: #4a5568;
    line-height: 1.7;
    margin: 0.75rem 0 1rem 0;
    font-size: 0.95rem;
    flex-grow: 1;
}

.partner-info .partner-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #0c4da2;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    margin-top: 0.5rem;
}

.partner-info .partner-link:hover {
    color: #083d87;
    text-decoration: underline;
}

.partner-info .partner-link i {
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .about-text .lead {
        font-size: 1.1rem;
        padding: 1.2rem;
    }
    
    .about-text h3 {
        font-size: 1.3rem;
    }
    
    .final-block {
        padding: 1.5rem;
    }
    
    .final-statement {
        font-size: 1.1rem;
    }
    
    .partners-list {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .partner-card {
        flex-direction: column;
    }
    
    .partner-info {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .about-text {
        font-size: 1rem;
    }
    
    .about-text .lead {
        font-size: 1rem;
        padding: 1rem;
    }
    
    .final-block {
        padding: 1.2rem;
    }
    
    .final-statement {
        font-size: 1rem;
    }
}