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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
    min-height: 70px;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.navbar.scrolled .nav-brand .logo {
    color: #2c3e50;
}

.navbar.scrolled .nav-menu a {
    color: #2c3e50;
}

.navbar.scrolled .nav-menu a:hover {
    color: #ff6b6b;
}

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

.nav-brand .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: black;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-menu a {
    color: black;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #ff6b6b;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    padding-top: 120px; /* Увеличен отступ для решения проблемы наезжания */
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
}

/* Hero Content */
.hero-content {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 8rem 0 6rem 0; /* Увеличены отступы */
}

.hero-content .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text {
    color: white;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    margin-top: 0; /* Убираем верхний отступ */
}

.highlight {
    background: linear-gradient(45deg, #ff6b6b, #ffd93d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: #ffd93d;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}



.hero-cta {
    display: flex;
    gap: 1rem;
    margin-bottom: 4rem; /* Увеличен отступ снизу для решения проблемы обрезания кнопок */
    margin-top: 2rem;
}

.cta-primary, .cta-secondary {
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.cta-primary {
    background: #ff6b6b;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

.cta-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.cta-secondary:hover {
    background: white;
    color: #667eea;
}

/* Code Window */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.code-window {
    background: #1e1e1e;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
    animation: float 6s ease-in-out infinite;
}

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

.window-header {
    background: #2d2d2d;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.window-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.btn.red { background: #ff5f56; }
.btn.yellow { background: #ffbd2e; }
.btn.green { background: #27ca3f; }

.window-title {
    color: #ccc;
    font-size: 0.9rem;
}

.code-content {
    padding: 1.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.code-line {
    margin-bottom: 0.5rem;
}

.keyword { color: #569cd6; }
.module { color: #4ec9b0; }
.function { color: #dcdcaa; }
.variable { color: #9cdcfe; }
.string { color: #ce9178; }
.comment { color: #6a9955; }

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 3rem; /* Увеличен отступ снизу */
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

.scroll-arrow {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Sections */
section {
    padding: 4rem 0;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: #2c3e50;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.service-card {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: white;
}

.service-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.service-description {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex: 1;
}

.service-features {
    list-style: none;
    margin: 1rem 0;
    padding: 0;
}

.service-features li {
    padding: 0.3rem 0;
    color: #666;
    position: relative;
    padding-left: 1.2rem;
}

.service-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

.service-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.price-tag {
    font-size: 1.2rem;
    font-weight: bold;
    color: #28a745;
}

.service-duration {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.portfolio-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.portfolio-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.portfolio-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
}

.portfolio-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.portfolio-category {
    font-size: 0.9rem;
    opacity: 0.9;
}

.portfolio-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.complexity-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    width: fit-content;
    margin-bottom: 0.5rem;
}

.complexity-basic {
    background: #d4edda;
    color: #155724;
}

.complexity-medium {
    background: #fff3cd;
    color: #856404;
}

.complexity-advanced {
    background: #f8d7da;
    color: #721c24;
}

.portfolio-description {
    color: #666;
    line-height: 1.6;
    font-size: 0.95rem;
    flex: 1;
    margin-bottom: 1rem;
}

.portfolio-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1rem;
    padding: 0;
}

.tech-tag {
    background: #f1f3f4;
    color: #5f6368;
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #e8eaed;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.tech-tag:hover {
    background: #e8f0fe;
    color: #1a73e8;
    border-color: #dadce0;
}

.portfolio-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    margin-top: auto;
}

.portfolio-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #28a745;
    display: flex;
    align-items: center;
}

.portfolio-duration {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
    background: #e9ecef;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
}

/* Stats Section */
.stats-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
}

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

.stat-card {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-card .stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: #ffd93d;
    margin-bottom: 0.5rem;
}

.stat-card .stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* Testimonials */
.testimonials {
    background: #f8f9fa;
}

.testimonial {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.testimonial-author {
    font-weight: bold;
    color: #667eea;
}

/* Contact Section */
.contact-info {
    background: #34495e;
    padding: 3rem 0;
    text-align: center;
    color: white;
}

.contact-info h2 {
    color: white;
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-item strong {
    color: #3498db;
}

/* Contact Buttons */
.whatsapp-btn, .telegram-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: white;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.telegram-btn {
    background: linear-gradient(135deg, #0088cc 0%, #005577 100%);
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.3);
}

.whatsapp-btn:hover, .telegram-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

.telegram-btn:hover {
    box-shadow: 0 8px 25px rgba(0, 136, 204, 0.4);
}

.whatsapp-icon, .telegram-icon {
    font-size: 1.5rem;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .navbar {
        min-height: 60px;
    }

    .nav-menu {
        display: none;
    }

    .hero-section {
        padding-top: 80px; /* Уменьшенный отступ для мобильных */
    }

    .hero-content {
        padding: 4rem 0 3rem 0;
    }

    .hero-content .container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem;
        margin-top: 10px;
    }

    .hero-stats {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .stat-item {
        min-width: 120px;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        margin-bottom: 5rem; /* Увеличен отступ для мобильных */
    }

    .cta-primary, .cta-secondary {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }

    .hero-image {
        display: none;
    }

    .scroll-indicator {
        display: none; /* Скрыт на мобильных устройствах */
    }

    .contact-details {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .whatsapp-btn, .telegram-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .portfolio-card {
        margin-bottom: 1rem;
    }

    .portfolio-header {
        padding: 1.2rem;
    }

    .portfolio-title {
        font-size: 1.2rem;
    }

    .portfolio-content {
        padding: 1.2rem;
    }

    .portfolio-footer {
        padding: 1rem 1.2rem;
        flex-direction: column;
        gap: 0.8rem;
        text-align: center;
    }

    .portfolio-price {
        font-size: 1.4rem;
    }

    .portfolio-duration {
        font-size: 0.85rem;
    }

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

    .stat-card {
        padding: 1.5rem;
    }

    .stat-card .stat-number {
        font-size: 2rem;
    }

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

    .service-card {
        padding: 2rem;
    }

    h2 {
        font-size: 2rem;
    }

    section {
        padding: 3rem 0;
    }
}

@media (max-width: 480px) {
    .hero-cta {
        margin-bottom: 6rem; /* Еще больший отступ для маленьких экранов */
    }

    .hero-content {
        padding: 3rem 0 2rem 0;
    }

    .hero-title {
        font-size: 2rem;
        line-height: 1.1;
        margin-top: 10px;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-top: 1rem;
    }

    .hero-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        justify-items: center;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }


    .cta-primary, .cta-secondary {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .portfolio-header {
        padding: 1rem;
    }

    .portfolio-title {
        font-size: 1.1rem;
    }

    .portfolio-content {
        padding: 1rem;
        gap: 0.8rem;
    }

    .portfolio-tech {
        gap: 0.4rem;
    }

    .tech-tag {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }

    .portfolio-footer {
        padding: 0.8rem 1rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    .service-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .service-card h3 {
        font-size: 1.2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-card .stat-number {
        font-size: 1.8rem;
    }

    .stat-card .stat-label {
        font-size: 0.9rem;
    }

    h2 {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

    section {
        padding: 2rem 0;
    }

    .container {
        padding: 0 15px;
    }

    .testimonial {
        padding: 1.5rem;
    }

    .testimonial-text {
        font-size: 1rem;
    }

    .navbar .container {
        padding: 0 15px;
    }

    .nav-brand .logo {
        font-size: 1.3rem;
    }

    .whatsapp-btn, .telegram-btn {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }

    .whatsapp-icon, .telegram-icon {
        font-size: 1.3rem;
    }

    .scroll-indicator {
        display: none; /* Полностью скрыт на мобильных */
    }
}
