:root {
    --primary-color: #495057;
    --primary-light: #6c757d;
    --secondary-color: #6c757d;
    --accent-color: #007bff;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
    --text-muted: #6c757d;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.16);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

h1 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 2rem;
}

h2 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

h3 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1.25rem;
}

h4 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero-section h1,
.hero-section h2,
.hero-section h3,
.hero-section h4,
.hero-section h5,
.hero-section h6,
.software-hero h1,
.software-hero h2,
.software-hero h3,
.software-hero h4,
.software-hero h5,
.software-hero h6 {
    color: white;
}

.btn-primary {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline-primary,
.btn-primary,
.competency-block .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-outline-secondary {
    color: var(--secondary-color);
    border-color: var(--secondary-color);
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-outline-secondary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline-light {
    color: white;
    border-color: white;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-outline-light:hover {
    background-color: white;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.navbar {
    box-shadow: var(--shadow-sm);
    background-color: var(--primary-color) !important;
    padding: 0.5rem 0;
}

.navbar-brand {
    font-weight: 700;
    padding: 0.5rem 0;
}

.navbar-brand img {
    max-height: 50px !important;
    filter: brightness(1.1) contrast(1.1);
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    transition: var(--transition);
    border-radius: 5px;
    margin: 0 0.25rem;
    padding: 0.5rem 1rem !important;
    font-weight: 500;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.15);
}

.card {
    transition: var(--transition);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.logo-image {
    max-height: 6vh;
    width: auto;
    object-fit: contain;
}

footer a {
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.competency-block {
    background-color: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: var(--transition);
    height: 100%;
    text-align: left;
    padding: 2.5rem 2rem;
}

.competency-block:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
    background-color: white;
}

.competency-block i {
    margin-bottom: 1rem;
    color: var(--accent-color);
    font-size: 2.5rem;
}

.competency-block .d-flex,
.contact-item .d-flex,
.benefit-item .d-flex,
.d-flex.align-items-center {
    align-items: center;
    justify-content: flex-start;
}

.competency-block .d-flex h1,
.competency-block .d-flex h2,
.competency-block .d-flex h3,
.competency-block .d-flex h4,
.competency-block .d-flex h5,
.competency-block .d-flex h6,
.contact-item .d-flex span,
.contact-item .d-flex a,
.contact-item .d-flex p,
.benefit-item .d-flex h6,
.benefit-item .d-flex p {
    align-self: center;
    margin-bottom: 0;
}

.d-flex.align-items-center i,
.d-flex.align-items-center span,
.d-flex.align-items-center a,
.d-flex.align-items-center p,
.d-flex.align-items-center h1,
.d-flex.align-items-center h2,
.d-flex.align-items-center h3,
.d-flex.align-items-center h4,
.d-flex.align-items-center h5,
.d-flex.align-items-center h6 {
    align-self: center;
}

.competency-block .text-center i {
    margin-bottom: 1rem;
}

.competency-block .d-flex i,
.contact-item .d-flex i,
.benefit-item .d-flex i,
.d-flex.align-items-center i {
    align-self: center;
    flex-shrink: 0;
}

.competency-block h4,
.competency-block h3,
.competency-block h2,
.competency-block h5 {
    text-align: left;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.competency-block .text-center h2,
.competency-block .text-center h3,
.competency-block .text-center h4,
.competency-block .text-center h5 {
    text-align: center;
}

.case-card {
    transition: var(--transition);
    border-radius: 10px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.case-img-container {
    height: 200px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 50%, #ddeeff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d0e0ff;
}

.case-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.5s ease;
}

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

.card-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    color: var(--primary-color);
    font-weight: 600;
}

.solution-section {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.solution-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.solution-section h6 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.card-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 0;
}

.hero-section {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
    color: white;
    padding: 100px 0 80px 0;
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M1200 120L0 16.48 0 0 1200 0 1200 120z" fill="%23ffffff"/></svg>');
    background-size: cover;
}

.software-hero {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
    color: white;
    padding: 80px 0;
    margin-bottom: 3rem;
    border-radius: 10px;
}

.software-hero .col-lg-8 {
    padding-left: 2rem;
}

.software-hero::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M1200 120L0 16.48 0 0 1200 0 1200 120z" fill="%23ffffff"/></svg>');
    background-size: cover;
}

.document-card {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: var(--transition);
    height: 100%;
    background: white;
    text-decoration: none;
    color: inherit;
}

.document-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
    border-color: var(--primary-color);
    text-decoration: none;
    color: inherit;
}

.document-card h5 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0;
}

.document-card i {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-list li {
    margin-bottom: 10px;
    padding-left: 10px;
}

.benefit-item {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.benefit-item i {
    margin-top: 0.25rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.text-accent {
    font-weight: 600;
    color: var(--primary-color);
}

.status-workflow {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.status-arrow {
    text-align: center;
    margin: 10px 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.5rem;
}

.card-text-soft {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

section {
    margin-bottom: 4rem;
}

section:last-child {
    margin-bottom: 0;
}

.bg-light {
    background-color: #ffffff !important;
}

.bg-dark {
    background-color: var(--primary-color) !important;
}

.bg-section-light {
    background-color: #ffffff;
}

.tech-stack {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 1rem;
}

.tech-stack p {
    margin-bottom: 0.5rem;
}

.tech-stack ul {
    margin-bottom: 0;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin: 0 auto;
}

.contact-item {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.contact-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.table-sm td {
    padding: 0.3rem 0.5rem;
}

ul {
    padding-left: 20px;
}

li {
    margin-bottom: 8px;
}

.list-unstyled li {
    margin-bottom: 0.5rem;
    padding-left: 0;
}

.testimonial-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 2rem;
    margin: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.client-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: contain;
    border: 3px solid var(--primary-color);
    margin: 0 auto 1rem auto;
    display: block;
    background-color: white;
    padding: 5px;
}

.stars {
    color: #ffc107;
    margin-bottom: 1rem;
    text-align: center;
}

.client-name {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    text-align: center;
}

.client-position {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.testimonial-text {
    font-style: italic;
    color: var(--text-muted);
    line-height: 1.6;
    padding: 1.5rem 2rem;
    flex-grow: 1;
    text-align: center;
    position: relative;
    margin: 0 0 1.5rem 0;
}

.testimonial-text::before {
    content: "❝";
    font-size: 2rem;
    color: var(--primary-color);
    opacity: 0.3;
    position: absolute;
    left: 0;
    top: 0;
}

.stat-card {
    background: linear-gradient(135deg, var(--accent-color) 0%, #0056b3 100%);
    color: white;
    border-radius: 10px;
    padding: 2rem 1rem;
    text-align: center;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

.client-logo {
    height: 60px;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: var(--transition);
    margin: 0 auto;
    display: block;
    max-width: 150px;
    object-fit: contain;
    padding: 5px;
    background-color: white;
    border-radius: 5px;
}

.client-logo:hover {
    filter: grayscale(0);
    opacity: 1;
    transform: scale(1.05);
}

.section-title {
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--primary-color);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, var(--accent-color), #0056b3);
}

.cta-section {
    background: linear-gradient(135deg, var(--light-bg) 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 3rem;
    margin-top: 2rem;
}

.alert {
    border: none;
    border-radius: 10px;
    padding: 1rem 1.5rem;
}

.alert-info {
    background-color: #e3f2fd;
    color: #0d47a1;
    border-left: 4px solid var(--accent-color);
}

/* Карточки для реестра - выравнивание по высоте */
.registry-info .card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.registry-info .card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.registry-info .card-body i {
    margin-bottom: 1rem;
    align-self: center;
}

.registry-info .card-body h5 {
    margin-bottom: 0.5rem;
    align-self: center;
}

.registry-info .card-body p {
    margin-bottom: 0;
}

.registry-info .card-body .d-flex {
    align-items: center;
}

.registry-info .card-body .btn {
    align-self: flex-start;
}

.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background-color: rgba(73, 80, 87, 0.8);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
    transition: var(--transition);
    z-index: 10;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background-color: var(--primary-color);
    opacity: 1;
}

.carousel-control-prev {
    left: 15px;
}

.carousel-control-next {
    right: 15px;
}

.carousel-indicators {
    position: relative;
    margin-top: 2rem;
    margin-bottom: 0;
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #adb5bd;
    margin: 0 6px;
    border: none;
    opacity: 0.6;
    transition: var(--transition);
}

.carousel-indicators .active {
    background-color: var(--accent-color);
    opacity: 1;
    transform: scale(1.2);
}

/* Стили для карусели изображений */
.carousel-image {
    width: 100%;
    height: auto;
    min-height: 300px;
    max-height: 60vh;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    cursor: pointer;
    transition: transform 0.3s ease;
    border-radius: 8px;
}

.carousel-image:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.carousel-image:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

/* Фиксированная высота для карусели */
#softwareCarousel {
    max-width: 100%;
    margin: 0 auto;
}

/* Модальное окно для изображений */
#imageModal .modal-dialog {
    max-width: 95vw;
    max-height: 95vh;
}

#imageModal .modal-content {
    height: 100%;
}

#imageModal .modal-body {
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

#modalImage {
    max-height: 90vh;
    max-width: 95vw;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

/* Адаптивность для карусели изображений */
@media (max-width: 768px) {
    .carousel-image {
        height: 280px;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 45px;
        height: 45px;
    }

    .carousel-control-prev {
        left: 10px;
    }

    .carousel-control-next {
        right: 10px;
    }
}

@media (max-width: 576px) {
    .carousel-image {
        height: 220px;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 40px;
        height: 40px;
    }

    .carousel-control-prev {
        left: 5px;
    }

    .carousel-control-next {
        right: 5px;
    }
}

    #imageModal .modal-dialog {
        max-width: 95vw;
    }

    #modalImage {
        max-height: 70vh;
    }
}

@media (max-width: 576px) {
    .carousel-image {
        height: 200px;
    }

    #imageModal .modal-dialog {
        max-width: 98vw;
    }

    #modalImage {
        max-height: 60vh;
    }
}

.icon-lg {
    font-size: 2.5rem;
}

.icon-xl {
    font-size: 8rem;
}

.icon-xl-muted {
    font-size: 8rem;
    color: var(--accent-color);
    opacity: 0.2;
}

.max-width-700 {
    max-width: 700px;
}

.max-width-600 {
    max-width: 600px;
}

.white-card {
    background: white;
    border-radius: 8px;
}

/* Специфические стили для блока реестра */
.software-page .registry-info .card-body {
    padding: 3rem;
}

.software-page .registry-info .row {
    margin-bottom: 2rem;
}

.software-page .card-body {
    padding: 3rem;
}

.software-page .row {
    margin-bottom: 1.5rem;
}



/* Специфические отступы для блока реестра */
.software-page .registry-info .card-body {
    padding: 4rem 4rem;
}

.software-page .registry-info .row {
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .img-container,
    .case-img-container {
        height: 180px;
    }
    
    .card-body {
        padding: 1.25rem;
    }
    
    .row > * {
        padding-right: 0;
    }
    
    .navbar-nav {
        padding-top: 1rem;
    }
    
    .hero-section,
    .software-hero {
        padding: 60px 0 40px 0;
        margin-bottom: 30px;
    }
    
    h1 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
    
    h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .competency-block {
        padding: 1.5rem 1rem;
    }
    
    .competency-block i {
        font-size: 2rem;
    }
    
    .btn-primary,
    .btn-outline-primary,
    .btn-outline-secondary,
    .btn-outline-light {
        padding: 0.5rem 1.5rem;
        font-size: 0.9rem;
    }

    .testimonial-text {
        padding: 0.5rem;
        font-size: 0.95rem;
    }
    
    .testimonial-text::before {
        font-size: 2rem;
    }
    
    .stat-card {
        padding: 1.5rem 0.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .cta-section {
        padding: 2rem 1rem;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 40px;
        height: 40px;
    }

    .carousel-control-prev {
        left: 10px;
    }

    .carousel-control-next {
        right: 10px;
    }

    #imageModal .modal-dialog {
        max-width: 98vw;
        max-height: 98vh;
    }

    #modalImage {
        max-height: 75vh;
        max-width: 95vw;
    }
}

@media (max-width: 576px) {
    .testimonial-card {
        padding: 1.5rem;
        margin: 0.5rem;
    }
    
    .client-avatar {
        width: 70px;
        height: 70px;
    }
    
    .testimonial-text::before {
        font-size: 1.8rem;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .competency-block {
        padding: 1rem 0.75rem;
        margin-bottom: 1rem;
    }

    .software-page .registry-info .card-body {
        padding: 1.5rem;
    }

    .software-page .registry-info .card-body {
        padding: 2rem 2rem;
    }



    .software-page .registry-info .card-body {
        padding: 2rem;
    }

    .software-page .registry-info .card-body {
        padding: 2.5rem 2.5rem;
    }

    .software-page main.container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }


    
    .step-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .icon-lg {
        font-size: 2rem;
    }
    
    .icon-xl {
        font-size: 6rem;
    }

    #imageModal .modal-dialog {
        max-width: 99vw;
        max-height: 99vh;
    }

    #modalImage {
        max-height: 65vh;
        max-width: 97vw;
    }
}