/* 1. Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 2. Base styles */
body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    padding-top: 60px;
}

/* 3. Header & Nav */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #1f2937; /* чтобы не просвечивал */
    z-index: 9999; /* чтоб был поверх всего */
    padding: 1rem 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Logo */
nav h1 {
    font-size: 1.5rem;
    color: #fff
}

/* Burger button */
.burger {
    display: none;
    font-size: 2rem;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    margin-left: auto;
}

/* Nav links */
.nav-links {
    display: flex;
    gap: 1.2rem;
}

.nav-links li {
    list-style: none;
}

.nav-links li a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
}

.nav-links li a:hover {
    text-decoration: underline;
}

/* 4. Sections */
.hero {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    color: #fff;
    padding: 4rem 2rem;
    text-align: center;
}

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

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.btn {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.75rem 1.5rem;
    background-color: #fff;
    color: #3b82f6;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s ease;
}

.btn:hover {
    background-color: #e5e7eb;
}

.about-section,
.services-section,
.contact-section {
    max-width: 900px;
    margin: 3rem auto 5rem;
    padding: 2rem;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    font-size: 1.1rem;
    color: #333;
}

/* About */
.about-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
}

.about-photo {
    flex: 1 1 250px;
    max-width: 250px;
}

.about-photo img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    object-fit: cover;
}

.about-text {
    flex: 2 1 500px;
    line-height: 1.6;
}

.about-text h2 {
    color: #3b82f6;
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Services */
.services-section h2 {
    color: #3b82f6;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

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

.service-card h3 {
    font-size: 1.3rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.service-card p {
    font-size: 1rem;
    color: #4b5563;
    line-height: 1.5;
}

/* Portfolio */
.portfolio-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding-bottom: 10px;
}

.portfolio-card {
    flex: 0 0 30%;
    min-width: 280px;
    background-color: #fff;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

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

.portfolio-card img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 12px;
}

/* Contact */
.contact-section .contacts-list {
    list-style: none;
    margin-top: 1rem;
    padding-left: 0;
}

.contact-section .contacts-list li {
    margin-bottom: 1rem;
}

.contact-section .contacts-list a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

.contact-section .contacts-list a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    text-align: center;
    padding: 1rem;
    margin-top: 3rem;
    background-color: #1f2937;
    color: #fff;
}

/* 5. Utility */
.hidden {
    display: none;
}

/* 6. Responsive */
@media (max-width: 768px) {
    /* Keep nav items horizontally aligned, but collapse links */
    .burger {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        right: 1rem;
        background-color: #1f2937;
        padding: 1rem;
        box-shadow: 0 0 10px rgba(0,0,0,0.1);
        border-radius: 6px;
    }

    .nav-links.active {
        display: flex;
    }

    /* Sections stack vertically */
    .about-container {
        flex-direction: column;
        align-items: center;
    }

    .about-text,
    .portfolio-card {
        max-width: 100%;
    }

    .portfolio-card {
        width: 90%;
    }

    .hero h2,
    .hero p,
    h2, h3 {
        text-align: center;
    }

    .btn {
        display: block;
        margin: 1.5rem auto 0;
    }
}

.explain-btn{
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.3rem 0.3rem;
    background-color: #fff;
    color: #3b82f6;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    border: none;
}