/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: white;
}

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    -webkit-text-size-adjust: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: #f8f9fa;
    padding: 10px 0;
    font-size: 14px;
}

.header-top-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.header-logo {
    display: flex;
    align-items: center;
}

.header-logo-img {
    height: 50px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.header-top-contacts {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-top a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.header-top a:hover {
    color: #000;
}

.header-main {
    padding: 15px 0;
}

.header-main-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo {
    font-size: 20px;
    font-weight: bold;
    color: #000;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 100px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    display: block;
}

.logo-text {
    display: none;
}

.nav {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #007bff;
}

.btn-consultation {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-consultation:hover {
    background: #0056b3;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 80px 0;
}

.hero-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    text-align: left;
}

.hero-title {
    font-size: 42px;
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.95;
}

.hero-image-block {
    text-align: center;
}

.hero-image.hero-image-bg {
    background: #fff;
    padding: 15px;
    border-radius: 10px;
    display: inline-block;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
}

.hero-caption {
    margin-top: 16px;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #fff !important;
    text-transform: uppercase;
}

.btn-primary {
    background: #fff;
    color: #667eea;
    border: none;
    padding: 16px 40px;
    border-radius: 5px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Shine animation for buttons */
.btn-primary.shine::before,
.btn-consultation.shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    transition: left 0.6s ease;
}

.btn-primary.shine:hover::before,
.btn-consultation.shine:hover::before {
    left: 100%;
}

/* Continuous shine glow on hover */
.btn-primary.shine:hover,
.btn-consultation.shine:hover {
    animation: shineGlow 2s infinite;
}

@keyframes shineGlow {
    0%, 100% {
        box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    }
    50% {
        box-shadow: 0 5px 25px rgba(255,255,255,0.6), 0 0 30px rgba(255,255,255,0.4);
    }
}

.btn-consultation {
    position: relative;
    overflow: hidden;
}

.hero-note {
    font-size: 14px;
    opacity: 0.9;
}

/* Services Section */
.services {
    padding: 80px 0;
    background: #f8f9fa;
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    color: #333;
}

/* Services as slider */
.services-slider-wrapper {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.services-slider {
    overflow: hidden;
    border-radius: 10px;
    width: 100%;
}

.services-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 400%;
}

.service-card {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    flex: 0 0 25%;
    width: 25%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.service-image {
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.service-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #333;
}

.service-card p {
    color: #666;
    line-height: 1.8;
    flex-grow: 1;
}

/* Stats Section */
.stats {
    padding: 60px 0;
    background: #fff;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.stat-item {
    padding: 20px;
}

.stat-number {
    font-size: 48px;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 16px;
    color: #666;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    overflow: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    font-weight: bold;
    color: #999;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #000;
}

.modal-content h2 {
    margin-bottom: 10px;
    color: #333;
}

.modal-subtitle {
    color: #666;
    margin-bottom: 20px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.form-group input:focus {
    outline: none;
    border-color: #007bff;
}

.radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 3px;
}

/* Quiz */
.quiz-modal {
    max-width: 600px;
}

.quiz-container {
    position: relative;
    min-height: 400px;
}

.quiz-step {
    display: none;
}

.quiz-step.active {
    display: block;
}

.quiz-step h2 {
    margin-bottom: 30px;
    color: #333;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.quiz-option {
    padding: 15px 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    text-align: left;
    transition: all 0.3s;
}

.quiz-option:hover {
    background: #e9ecef;
    border-color: #007bff;
}

.quiz-option.selected {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

.quiz-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.btn-back,
.btn-next {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-back {
    background: #f8f9fa;
    color: #333;
}

.btn-back:hover {
    background: #e9ecef;
}

.btn-next {
    background: #007bff;
    color: #fff;
}

.btn-next:hover {
    background: #0056b3;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: #fff;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-info h3 {
    margin-bottom: 20px;
    font-size: 24px;
}

.footer-info p {
    margin-bottom: 10px;
    line-height: 1.8;
}

.footer-legal {
    margin-top: 16px;
    font-size: 14px;
    opacity: 0.95;
}

.footer-info a {
    color: #fff;
    text-decoration: none;
}

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

.footer-phone {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
}

.footer-email {
    color: #fff;
    text-decoration: none;
}

.footer-email:hover {
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 30px;
    text-align: center;
    font-size: 14px;
    opacity: 0.8;
}

/* Responsive - mobile */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
        width: 100%;
        max-width: 100%;
    }

    /* Убираем большие пробелы между словами на мобильных */
    .hero-title,
    .hero-subtitle,
    .section-title,
    .help-text,
    .why-us-item h3,
    .why-us-item p,
    .service-card h3,
    .service-card p,
    .case-item h3,
    .case-item p {
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
        hyphens: auto;
    }

    .hero-wrapper {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .hero-content {
        text-align: center;
    }

    .hero-image-block {
        order: -1;
    }

    .hero-title {
        font-size: 22px;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 15px;
        line-height: 1.45;
    }

    .hero-caption {
        font-size: 20px;
    }

    .header-top-content {
        flex-wrap: wrap;
    }

    .header-logo-img {
        height: 30px;
    }

    .nav {
        display: none;
    }

    .header-main-content {
        justify-content: center;
    }

    .logo-img {
        height: 50px;
    }

    .modal-content {
        padding: 24px 16px;
    }

    /* Слайдеры: кнопки строго внутри экрана на мобильных */
    .why-us-slider-wrapper,
    .services-slider-wrapper,
    .cases-slider-wrapper {
        max-width: 100%;
        padding: 0 48px;
        overflow: visible;
    }

    .cases-slider-prev,
    .why-us-prev,
    .services-prev {
        left: 8px !important;
        right: auto !important;
        width: 40px;
        height: 40px;
        font-size: 24px;
        z-index: 15;
    }

    .cases-slider-next,
    .why-us-next,
    .services-next {
        left: auto !important;
        right: 8px !important;
        width: 40px;
        height: 40px;
        font-size: 24px;
        z-index: 15;
    }

    .section-title {
        font-size: 24px;
        margin-bottom: 24px;
    }

    .why-us-item,
    .service-card {
        padding: 24px 16px;
    }
}

/* Предотвращение горизонтальной прокрутки на всех устройствах */
@media (max-width: 480px) {
    html, body {
        min-width: 0;
    }

    .hero-title {
        font-size: 20px;
    }
}

/* Scroll to top button */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #007bff;
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s;
}

.scroll-top.visible {
    display: flex;
}

.scroll-top:hover {
    background: #0056b3;
    transform: translateY(-3px);
}

/* Help Section */
.help-section {
    padding: 80px 0;
    background: #fff;
    text-align: center;
}

.help-text {
    font-size: 20px;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
}

/* Why Us Section - slider */
.why-us {
    padding: 80px 0;
    background: #f8f9fa;
}

.why-us-slider-wrapper {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
}

.why-us-slider {
    overflow: hidden;
    border-radius: 10px;
    width: 100%;
}

.why-us-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 400%;
}

.why-us-item {
    text-align: center;
    padding: 30px;
    flex: 0 0 25%;
    width: 25%;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.why-us-item h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #333;
}

.why-us-item p {
    color: #666;
    line-height: 1.8;
}

/* Reviews Section */
.reviews {
    padding: 80px 0;
    background: #f8f9fa;
}

.reviews-slider {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.review-item {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.review-text {
    font-style: italic;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.8;
}

.review-author {
    font-weight: 600;
    color: #333;
}

.reviews-more {
    text-align: center;
}

.btn-secondary {
    background: #007bff;
    color: #fff;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #0056b3;
}

/* Cases Section */
.cases {
    padding: 80px 0;
    background: #fff;
}

.cases-slider-wrapper {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.cases-slider {
    overflow: hidden;
    border-radius: 10px;
    width: 100%;
}

.cases-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 700%;
}

.case-item {
    flex: 0 0 14.2857%;
    width: 14.2857%;
    background: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.case-image {
    width: 100%;
    min-height: 280px;
    height: 320px;
    overflow: hidden;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
}

.case-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
}

.case-content {
    padding: 30px;
    flex-grow: 1;
    border-left: 4px solid #007bff;
}

.case-item h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #333;
}

.case-item p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.8;
}

.case-status {
    display: inline-block;
    background: #28a745;
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

/* Generic slider buttons and dots */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 30px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-btn:hover {
    background: rgba(0,0,0,0.7);
}

.cases-slider-btn,
.cases-slider-prev,
.cases-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 30px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cases-slider-btn:hover,
.cases-slider-prev:hover,
.cases-slider-next:hover {
    background: rgba(0,0,0,0.7);
}

.cases-slider-prev { left: -70px; }
.cases-slider-next { right: -70px; }

.why-us-prev { left: -60px; }
.why-us-next { right: -60px; }
.services-prev { left: -60px; }
.services-next { right: -60px; }

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: background 0.3s;
}

.slider-dot.active {
    background: #007bff;
}

.cases-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.case-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: background 0.3s;
}

.case-dot.active {
    background: #007bff;
}

/* Useful Section */
.useful {
    padding: 80px 0;
    background: #f8f9fa;
}

.useful-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.useful-item {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.useful-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.useful-date {
    color: #999;
    font-size: 14px;
    margin-bottom: 10px;
}

.useful-item h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.useful-item p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.8;
}

.useful-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.useful-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* CTA Section */
.cta {
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-align: center;
}

.cta-content h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.95;
}

/* Form Success Message */
.form-success {
    animation: fadeIn 0.3s ease-in;
}

.form-success h3 {
    color: #28a745;
    margin-bottom: 15px;
    font-size: 24px;
}

.form-success p {
    color: #666;
    line-height: 1.8;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Loading state for buttons */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
