
:root {
    --primary-color: #0d47a1;
    --secondary-color: #1565c0;
    --accent-color: #f59e0b;
    --text-dark: #1f2937;
    --text-light: #4b5563;
    --background-light: #f8fafc;
    --white: #ffffff;
    --border-color: #e5e7eb;
}

/* Base Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--text-light);
    background-color: var(--white);
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

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

h1, h2, h3 {
    color: var(--text-dark);
    font-weight: 700;
    line-height: 1.3;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); text-align: center; margin-bottom: 2rem;}
h3 { font-size: clamp(1.2rem, 3vw, 1.5rem); }
h4 { font-size: 1.1rem; color: var(--text-dark); margin-bottom: 0.5rem; }

section {
    padding: 4rem 0;
}

section:nth-of-type(even) {
    background-color: var(--background-light);
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: none;
}

.btn-secondary {
    background: #e2e8f0;
    color: var(--text-dark);
}

.btn-secondary:hover {
    background: #cbd5e1;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(13, 71, 161, 0.8), rgba(21, 101, 192, 0.8)), url('https://smway.ru/wp-content/uploads/2025/09/ffffff.png') no-repeat center center/cover;
    color: var(--white);
    padding: 6rem 0;
    text-align: center;
}
.hero h1 {
    color: var(--white);
    margin-bottom: 1rem;
}
.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem auto;
    opacity: 0.9;
}
.hero .btn {
    font-size: 1.1rem;
    padding: 1rem 2.5rem;
}

/* Cases Section */
#cases .accordion-item {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    border-bottom: none;
}
#cases .accordion-header {
     border-radius: 8px;
}
#cases .accordion-item.active .accordion-header {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
#cases .accordion-content {
    background-color: var(--white);
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
     padding: 0 !important;
}
#cases .case-content {
    padding: 2rem;
}
#cases .case-card img {
    width: 100%;
    height: auto;
    display: block;
}

.case-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}
@media(min-width: 768px) {
    .case-details { grid-template-columns: 1fr 1fr; }
}
.case-details ul, .case-details ol {
    padding-left: 20px;
    margin: 0;
}
.case-details li { margin-bottom: 0.5rem; }
.case-meta {
    background-color: var(--background-light);
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* New Client Cards Section */
.clients-grid-new {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.client-card-new {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.client-card-new:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    border-color: var(--secondary-color);
}
.client-card-new h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-dark);
}

/* Team Section */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}
.team-member {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    text-align: center;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.team-member img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid var(--primary-color);
}
.team-member h3 {
    margin-bottom: 0.25rem;
}
.team-member p {
    margin-top: 0;
    font-style: italic;
    flex-grow: 1;
}
.team-member .btn {
    margin-top: 1rem;
}
.team-hint { text-align: center; color: var(--text-light); margin-top: 2rem; }

/* Modal Styles (for Team & Licenses & Reviews) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal-container {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    border: none;
    background: none;
    color: var(--text-light);
}
.modal-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}
.modal-header img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}
.modal-body ul {
    list-style-type: disc;
    padding-left: 20px;
}
.modal-body li {
    margin-bottom: 0.75rem;
}
.license-modal-content {
    padding: 1rem;
    max-width: 90vw;
    max-height: 90vh;
}
.license-modal-content img {
    max-width: 100%;
    max-height: calc(90vh - 4rem); /* accounting for padding */
    display: block;
    margin: auto;
}
#review-modal .modal-container {
    max-width: 900px;
}
#review-modal-content img {
    max-width: 100%;
    height: auto;
}

/* Licenses Section */
.licenses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    align-items: center;
}
.license-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s ease;
}
.license-item img:hover {
    transform: scale(1.05);
}

/* Reviews Section */
.review-tabs {
    text-align: center;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-color);
}
.tab-link {
    background: none;
    border: none;
    padding: 0.8rem 1.5rem;
    font-size: 1.1rem;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    color: var(--text-light);
    margin-bottom: -1px;
}
.tab-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 700;
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.review-card {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}
.review-card img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 1 / 1.41;
    object-fit: cover;
}
#yandex .review-card img {
     aspect-ratio: initial;
}

/* Form Section */
#main-form {
    background: var(--primary-color);
    color: var(--white);
    border-radius: 8px;
    padding: 3rem;
}
#main-form h2 {
    color: var(--white);
}
.form-container {
    max-width: 600px;
    margin: 0 auto;
}

/* Accordion */
.accordion-item {
    border-bottom: 1px solid var(--border-color);
}
.accordion-header {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 1.5rem 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-dark);
}
.accordion-header i {
    transition: transform 0.3s ease;
}
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}
.accordion-content .content-inner {
    padding: 0 1rem 1.5rem 1rem;
    margin: 0;
}
.accordion-item.active .accordion-header i {
    transform: rotate(180deg);
}

/* Services Section */
#services {
    background-color: var(--white);
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}
.service-card {
    background-color: var(--background-light);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}
.service-card h3 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.4rem;
}
.service-card h4 {
    margin-top: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-dark);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}
.service-card ul, .service-card ol {
    padding-left: 20px;
    margin-bottom: 1rem;
}
.service-card li {
    margin-bottom: 0.5rem;
}
.service-card .service-links {
    margin-top: auto;
    padding-top: 1.5rem;
    font-size: 0.9rem;
}
.service-card .service-links a {
    text-decoration: underline;
    color: var(--secondary-color);
}
.service-card a {
    color: var(--secondary-color);
}
.service-card a:hover {
    text-decoration: underline;
}


/* Video Section */
.video-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* Work Process Section */
#work-process {
    background-color: var(--background-light);
}
.process-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}
@media(min-width: 768px) {
    .process-grid::before {
        content: '';
        position: absolute;
        left: 24px;
        top: 2rem;
        bottom: 2rem;
        width: 4px;
        background-color: var(--border-color);
        border-radius: 2px;
    }
}
.process-step {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    position: relative;
}
.process-step__number {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 4px solid var(--background-light);
    z-index: 1;
}
@media(max-width: 767px) {
    .process-step__number {
        background: transparent;
        color: var(--primary-color);
        border: 4px solid var(--primary-color);
    }
}
.process-step__content h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

/* Guarantees Section */
.guarantees-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}
.guarantee-card {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}
.guarantee-card i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}
.guarantee-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

/* Comparison Table */
.comparison-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}
.comparison-table th, .comparison-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
.comparison-table th {
    color: var(--text-dark);
    background-color: var(--background-light);
}
.comparison-table td:nth-child(2) {
    font-weight: 600;
    color: var(--primary-color);
}
.comparison-table .icon-check { color: #16a34a; }
.comparison-table .icon-cross { color: #dc2626; }
