/* Base styles */
:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #3f37c9;
    --text: #2b2d42;
    --text-light: #8d99ae;
    --background: #ffffff;
    --light-gray: #f8f9fa;
    --gray: #e9ecef;
    --dark-gray: #dee2e6;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text);
    background-color: var(--background);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

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

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn--primary {
    background-color: var(--primary);
    color: white;
}

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

.btn--outline {
    background-color: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

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

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 60px;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary);
    border-radius: 2px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
}

.logo span {
    color: var(--primary);
}

.nav {
    display: flex;
    gap: 30px;
}

.nav__link {
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

.nav__link:hover::after {
    width: 100%;
}

.header__phone {
    margin-left: 30px;
}

.phone-link {
    font-weight: 600;
    color: var(--primary);
    transition: var(--transition);
}

.phone-link:hover {
    color: var(--primary-dark);
}

.burger {
    display: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    flex-direction: column;
    justify-content: space-between;
}

.burger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text);
    transition: var(--transition);
}

/* Hero section */
.hero {
    padding: 180px 0 100px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.hero__content {
    flex: 1;
}

.hero__title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
}

.hero__subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 30px;
    max-width: 500px;
}

.hero__buttons {
    display: flex;
    gap: 20px;
}

.hero__image {
    flex: 1;
    position: relative;
}

.hero-img {
    border-radius: 10px;
    box-shadow: var(--shadow);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* Services section */
.services {
    padding: 100px 0;
    background-color: var(--light-gray);
}

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

.service-card {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background-color: rgba(67, 97, 238, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 2rem;
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-light);
}

/* Advantages section */
.advantages {
    padding: 100px 0;
}

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

.advantage-card {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    transition: var(--transition);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.advantage-card:hover {
    transform: translateY(-5px);
}

.advantage-number {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 3rem;
    font-weight: 700;
    color: rgba(67, 97, 238, 0.05);
    line-height: 1;
}

.advantage-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.advantage-card p {
    color: var(--text-light);
    position: relative;
    z-index: 1;
}

/* Works section */
.works {
    padding: 100px 0;
    background-color: var(--light-gray);
}

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

.work-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    height: 250px;
}

.work-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.work-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 20px;
    transform: translateY(100%);
    transition: var(--transition);
}

.work-card:hover .work-overlay {
    transform: translateY(0);
}

.work-overlay h3 {
    margin-bottom: 5px;
}

/* CTA section */
.cta {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    text-align: center;
}

.cta__content {
    max-width: 800px;
    margin: 0 auto;
}

.cta h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Reviews section */
.reviews {
    padding: 100px 0;
}

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

.review-card {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.review-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.review-avatar {
    width: 50px;
    height: 50px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 15px;
    font-size: 1.2rem;
}

.review-author h4 {
    margin-bottom: 5px;
}

.review-stars {
    color: #ffc107;
}

.review-text {
    font-style: italic;
    color: var(--text-light);
}

/* Contacts section */
.contacts {
    padding: 100px 0;
    background-color: var(--light-gray);
}

.contacts__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contacts__info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
}

.contact-item i {
    width: 50px;
    height: 50px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.contacts__form {
    background-color: white;
    border-radius: 10px;
    padding: 40px;
    box-shadow: var(--shadow);
}

.contacts__form h3 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    text-align: center;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--gray);
    border-radius: 5px;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* Footer */
.footer {
    background-color: var(--text);
    color: white;
    padding: 60px 0 20px;
}

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

.footer__logo .logo {
    color: white;
    margin-bottom: 15px;
}

.footer__logo p {
    opacity: 0.7;
}

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

.footer__nav a {
    opacity: 0.7;
    transition: var(--transition);
}

.footer__nav a:hover {
    opacity: 1;
    color: white;
}

.footer__contacts {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-phone {
    font-size: 1.2rem;
    font-weight: 600;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.footer-social a:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
}

.footer__copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

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

.modal__content {
    background-color: white;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    position: relative;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: var(--transition);
}

.modal.active .modal__content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text);
}

.modal-icon {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.modal h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.modal p {
    margin-bottom: 25px;
    color: var(--text-light);
}

/* Floating button */
.floating-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 5px 20px rgba(67, 97, 238, 0.4);
    z-index: 100;
    transition: var(--transition);
}

.floating-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.5);
}

/* Responsive styles */
@media (max-width: 992px) {
    .hero .container {
        flex-direction: column;
        text-align: center;
    }

    .hero__buttons {
        justify-content: center;
    }

    .hero__subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .contacts__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
        margin-bottom: 40px;
    }

    .nav {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: white;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        gap: 20px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        transform: translateY(-150%);
        transition: var(--transition);
        z-index: 999;
    }

    .nav.active {
        transform: translateY(0);
    }

    .burger {
        display: flex;
    }

    .burger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .burger.active span:nth-child(2) {
        opacity: 0;
    }

    .burger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .header__phone {
        display: none;
    }

    .hero {
        padding: 150px 0 80px;
    }

    .hero__title {
        font-size: 2.2rem;
    }

    .hero__buttons {
        flex-direction: column;
        gap: 15px;
    }

    .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 1.8rem;
    }

    .hero__title {
        font-size: 1.8rem;
    }

    .hero__subtitle {
        font-size: 1rem;
    }

    .services__grid,
    .advantages__grid,
    .works__grid {
        grid-template-columns: 1fr;
    }

    .contacts__form {
        padding: 30px 20px;
    }
}