:root {
    --primary-color: #0a2540;
    --secondary-color: #f7f9fc;
    --accent-color: #63e2b7;
    --text-color: #333;
    --light-text-color: #fff;
    --bg-color: #ffffff;
}

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

html {
    scroll-behavior: smooth;
}

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

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

h1, h2, h3 {
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--accent-color);
    text-decoration: none;
}

section {
    padding: 60px 0;
}

/* Header */
.header {
    background: var(--bg-color);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: background 0.3s;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.main-nav ul {
    display: flex;
    list-style: none;
}

.main-nav li {
    margin-left: 25px;
}

.main-nav a {
    color: var(--primary-color);
    font-weight: 500;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: var(--accent-color);
}

.phone-number {
    font-weight: 500;
    color: var(--primary-color);
}

.lang-switcher {
    margin-left: 20px;
}

.lang-switcher .lang-link {
    font-weight: 700;
    color: var(--primary-color);
    opacity: 0.6;
    transition: opacity 0.3s;
}

.lang-switcher .lang-link.active {
    opacity: 1;
    color: var(--accent-color);
}

.lang-switcher .lang-link:hover {
    opacity: 1;
}

.lang-switcher span {
    color: var(--primary-color);
    margin: 0 5px;
    opacity: 0.4;
}

.burger-menu {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    background-color: var(--secondary-color);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px; /* Header height */
}

.hero-section h1 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

.cta-button {
    display: inline-block;
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    transition: transform 0.3s, box-shadow 0.3s;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}


/* About Section */
.about-section {
    text-align: center;
}
.about-section p {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Services Section */
.services-section {
    background: var(--secondary-color);
    text-align: center;
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 40px;
    max-width: 1200px; /* обмеження загальної ширини */
    margin-left: auto;
    margin-right: auto;
}

/* Планшети */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Мобільні */
@media (max-width: 600px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}
}
.service-card {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}
.service-card:hover {
    transform: translateY(-10px);
}
.service-card i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

/* Process Section */
.process-section {
    text-align: center;
}
.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* завжди 4 колонки на широких екранах */
    gap: 30px;
    margin-top: 40px;
    counter-reset: process-counter;
    position: relative;
}

/* коли екран менше 1200px — 3 колонки */
@media (max-width: 1200px) {
    .process-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* коли екран менше 900px — 2 колонки */
@media (max-width: 900px) {
    .process-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* коли екран менше 600px — 1 колонка */
@media (max-width: 600px) {
    .process-grid {
        grid-template-columns: 1fr;
    }
}
.process-step {
    background: var(--secondary-color);
    padding: 30px;
    border-radius: 10px;
    position: relative;
    border-top: 4px solid var(--accent-color);
}
.process-step-number {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-color);
    color: var(--primary-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    border: 3px solid #fff;
}
.process-step i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    margin-top: 20px;
}


/* Portfolio Section */
.portfolio-section {
    text-align: center;
}
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 40px;
}
.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
}
.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s;
}
.portfolio-item:hover img {
    transform: scale(1.1);
}
.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(10, 37, 64, 0.9), transparent);
    color: #fff;
    padding: 40px 20px 20px;
    opacity: 1;
    transition: opacity 0.4s;
}
.portfolio-overlay h3 {
    color: var(--light-text-color);
}


/* Why Us Section */
.why-us-section {
    background: var(--secondary-color);
    text-align: center;
}
.why-us-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}
.why-us-card {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}
.why-us-card:hover {
    transform: translateY(-10px);
}
.why-us-card i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: var(--light-text-color);
    text-align: center;
    padding: 60px 0 20px;
}
.footer h2, .footer p {
    color: var(--light-text-color);
}
.contact-info {
    margin: 20px 0;
}
.contact-link {
    color: var(--light-text-color);
    margin: 0 15px;
    font-size: 1.1rem;
    transition: color 0.3s;
}
.contact-link:hover {
    color: var(--accent-color);
}
.telegram-button {
    display: inline-flex;
    align-items: center;
    background: #0088cc;
    color: #fff;
    padding: 12px 25px;
    border-radius: 50px;
    margin: 20px 0;
    font-weight: 500;
    transition: background 0.3s;
}
.telegram-button:hover {
    background: #0099e6;
}
.telegram-button i {
    margin-right: 10px;
    font-size: 1.2rem;
}
.copyright {
    margin-top: 30px;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* FAQ Section */
.faq-section {
    text-align: center;
    background: var(--secondary-color);
}
.faq-container {
    max-width: 800px;
    margin: 40px auto 0;
    text-align: left;
}
.faq-item {
    border-bottom: 1px solid #ddd;
    padding-bottom: 15px;
    margin-bottom: 15px;
}
.faq-question {
    width: 100%;
    background: none;
    border: none;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--primary-color);
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}
.faq-question i {
    color: var(--accent-color);
    transition: transform 0.3s ease-in-out;
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, padding 0.4s ease-in-out;
    padding-left: 10px;
    padding-right: 10px;
}
.faq-answer p {
    margin: 0;
    padding-top: 10px;
}
.faq-item.active .faq-answer {
    max-height: 200px; /* Adjust if answers are longer */
}
.faq-item.active .faq-question i {
    transform: rotate(45deg);
}

/* Scroll Animation */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* Responsive Design - Tablet */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2.2rem; }
    
    .services-grid,
    .process-grid,
    .why-us-grid {
        gap: 20px;
    }
}

/* Responsive Design - Mobile */
@media (max-width: 768px) {
    :root {
        --section-padding: 40px 0;
    }
    
    body {
        font-size: 16px;
    }
    
    h1 { 
        font-size: 2.2rem; 
        margin-bottom: 0.8rem;
    }
    h2 { 
        font-size: 1.8rem; 
        margin-bottom: 0.8rem;
    }
    h3 { font-size: 1.3rem; }
    
    section {
        padding: var(--section-padding);
    }
    
    .hero-section {
        min-height: 60vh;
        padding: 100px 0 60px;
    }
    
    .hero-section h1 {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    .hero-section p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .cta-button {
        padding: 12px 25px;
        font-size: 0.9rem;
    }
    
    .header .container {
        flex-wrap: wrap;
        padding: 10px 20px;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        flex-direction: column;
        text-align: center;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
    
    .main-nav.is-open {
        max-height: 400px;
    }

    .main-nav ul {
        flex-direction: column;
        padding: 20px 0;
    }

    .main-nav li {
        margin: 10px 0;
    }
    
    .lang-switcher {
        position: static;
        margin-left: auto;
        margin-right: 15px;
    }
    
    .burger-menu {
        display: block;
        font-size: 1.3rem;
    }
    
    /* Mobile grids */
    .services-grid,
    .process-grid,
    .portfolio-grid,
    .why-us-grid,
    .team-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 30px;
    }
    
    .service-card,
    .process-step,
    .why-us-card,
    .team-card {
        padding: 20px;
    }
    
    .service-card i,
    .why-us-card i {
        font-size: 2.5rem;
    }
    
    .process-step-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .process-step i {
        font-size: 2rem;
    }
    
    .portfolio-item {
        height: 200px;
    }
    
    .portfolio-overlay {
        padding: 30px 15px 15px;
    }
    
    .portfolio-overlay h3 {
        font-size: 1.1rem;
    }
    
    /* Footer mobile */
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer h2 {
        font-size: 1.6rem;
    }
    
    .contact-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .contact-link {
        margin: 5px 0;
        font-size: 1rem;
    }
    
    .telegram-button {
        padding: 10px 20px;
        font-size: 0.9rem;
        margin: 15px 0;
    }
    
    /* FAQ mobile improvements */
    .faq-container {
        margin-top: 30px;
    }
    
    .faq-question {
        font-size: 1rem;
        padding: 15px 0;
    }
    
    .faq-answer p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    /* Reduce animation on mobile */
    .animate-on-scroll {
        transition: none;
    }
    
    .animate-on-scroll.is-visible {
        opacity: 1;
        transform: none;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .hero-section {
        padding: 120px 0 50px;
    }
    
    .hero-section h1 {
        font-size: 1.8rem;
    }
    
    h1 { font-size: 1.9rem; }
    h2 { font-size: 1.6rem; }
    
    .container {
        padding: 0 10px;
    }
    
    .service-card,
    .process-step,
    .why-us-card {
        padding: 15px;
    }
    
    .cta-button {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
}

/* Landscape mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: 100vh;
        padding: 100px 0 50px;
    }
    
    .hero-section h1 {
        font-size: 1.8rem;
    }
    
    .services-grid,
    .process-grid,
    .why-us-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}