:root {
    --primary-color: #0A66C2;
    --primary-dark: #004182;
    --accent-color: #00D1FF;
    --bg-color: #F3F6F8;
    --text-color: #1D2226;
    --text-muted: #666666;
    --white: #FFFFFF;
    --error: #D11124;
    --success: #057642;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --header-height: 80px;
    --transition: all 0.3s ease;
}

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

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

ul {
    list-style: none;
}

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

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

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 800;
    line-height: 1.2;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(10, 102, 194, 0.3);
}

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

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

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

.btn-sm {
    padding: 8px 18px;
    font-size: 0.9rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Header */
.header {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.nav {
    margin-left: auto;
}

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

.nav-link {
    font-weight: 600;
    color: var(--text-color);
    transition: var(--transition);
}

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

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

.burger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
}

.burger span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: var(--transition);
}

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

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

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

/* Hero Section */
.hero {
    padding-top: calc(var(--header-height) + 60px);
    padding-bottom: 80px;
    background: linear-gradient(135deg, #f8faff 0%, #eef3ff 100%);
    overflow: hidden;
}

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

.badge {
    display: inline-block;
    background: rgba(10, 102, 194, 0.1);
    color: var(--primary-color);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 25px;
    color: var(--primary-dark);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 35px;
    max-width: 500px;
}

.hero-btns {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.hero-info {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-info i {
    color: var(--success);
}

.hero-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Sections Common */
section {
    padding: 100px 0;
}

.section-head {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    text-align: center;
}

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

.feature-icon {
    width: 70px;
    height: 70px;
    background: rgba(0, 209, 255, 0.1);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    font-size: 2rem;
    margin: 0 auto 25px;
}

.feature-card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 280px);
    gap: 24px;
}

.service-item {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: var(--bg-color);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.service-item.item-main {
    grid-column: span 2;
    grid-row: span 2;
}

.service-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    padding: 32px;
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 1;
    transition: var(--transition);
}

.service-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    transform: translateY(0);
    transition: transform 0.4s ease;
}

.service-overlay p {
    font-size: 1rem;
    margin-bottom: 24px;
    opacity: 0.9;
    line-height: 1.4;
    max-width: 90%;
    transform: translateY(0);
    transition: transform 0.4s ease;
}

.service-overlay .btn {
    align-self: flex-start;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

/* Hover effects */
.service-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.service-item:hover img {
    transform: scale(1.08);
}

.service-item:hover .service-overlay .btn {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Grid */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
        grid-auto-rows: 280px;
    }

    .service-item.item-main {
        grid-row: span 1;
    }
}

@media (max-width: 600px) {
    .services-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 320px;
    }

    .service-item.item-main {
        grid-column: span 1;
    }

    .service-overlay {
        padding: 24px;
    }

    .service-overlay .btn {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reviews */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.review-card {
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
}

.review-user {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.review-user img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.review-user h4 {
    font-size: 1.1rem;
}

.review-user span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Contacts */
.contacts {
    background-color: var(--bg-color);
}

.contacts-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: flex-start;
}

.contacts-info {
    padding-top: 40px;
}

.contacts-list {
    margin-top: 30px;
}

.contacts-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    font-weight: 600;
}

.contacts-list i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.contacts-form-box {
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
}

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

.form-group input {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.form-group input:focus {
    border-color: var(--primary-color);
}

.captcha-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.captcha-group span {
    font-weight: 800;
    color: var(--primary-color);
}

.captcha-group input {
    width: 80px;
}

.form-status {
    margin-top: 20px;
    text-align: center;
    font-weight: 600;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Footer */
.footer {
    padding: 80px 0 30px;
    background-color: #1D2226;
    color: var(--white);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h4 {
    margin-bottom: 25px;
    font-size: 1.25rem;
}

.footer-links li {
    margin-bottom: 12px;
}

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

.footer-links a:hover {
    opacity: 1;
    color: var(--accent-color);
}

.footer-contacts li {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    opacity: 0.8;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.6;
}

/* Cookie Popup */
.cookie-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    max-width: 400px;
    background: var(--white);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    display: none;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-content p {
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.cookie-btns {
    display: flex;
    gap: 10px;
}

/* Основний контейнер затемнення */
.modal-overlay {
    display: none;
    /* Приховано за замовчуванням */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    /* Темний напівпрозорий фон */
    z-index: 1000;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    /* Дозволяє скрол, якщо екран малий */
    padding: 20px;
    box-sizing: border-box;
}

/* Активний стан (коли відкрито) */
.modal-overlay.active {
    display: flex;
}

/* Саме вікно */
.modal {
    background: #fff;
    width: 100%;
    max-width: 800px;
    /* Максимальна ширина */
    border-radius: 8px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    max-height: 90vh;
    /* Щоб не вилазило за екран */
    display: flex;
    flex-direction: column;
}

/* Кнопка закриття */
.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #333;
    z-index: 10;
}

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

/* Контент всередині (з прокруткою) */
.modal-content {
    padding: 40px;
    overflow-y: auto;
    /* Скрол тільки всередині контенту */
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Стилізація тексту документів */
.modal-content h1 {
    font-size: 24px;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.modal-content h2 {
    font-size: 18px;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #444;
}

.modal-content ul,
.modal-content ol {
    margin-bottom: 15px;
    padding-left: 20px;
}

.modal-content li {
    margin-bottom: 5px;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.8rem;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 768px) {
    .burger {
        display: flex;
    }

    .nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 30px;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.05);
        transform: translateY(-150%);
        transition: var(--transition);
    }

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

    .nav-list {
        flex-direction: column;
        align-items: center;
    }

    .hero-container,
    .contacts-wrap {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        order: 2;
    }

    .hero-image {
        order: 1;
    }

    .hero-btns,
    .hero-info {
        justify-content: center;
    }

    .hero-subtitle {
        margin: 0 auto 35px;
    }

    .features-grid,
    .reviews-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2.2rem;
    }
}