/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    line-height: 1.6;
    color: #333;
    background: white;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Шапка */
.header {
    background: #2c3e50;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo h2 {
    color: white;
    font-size: 1.8rem;
}

.nav a {
    margin-left: 30px;
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: color 0.3s;
}

.nav a:hover {
    color: #3498db;
}

.btn-header {
    background: #e74c3c;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s;
    border: 2px solid #e74c3c;
}

.btn-header:hover {
    background: #c0392b;
    border-color: #c0392b;
}

/* Главный экран */
.hero {
    background: #2c3e50;
    color: white;
    padding: 180px 0 100px;
    text-align: center;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 25px;
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 30px;
    line-height: 1.8;
}

.btn {
    display: inline-block;
    background: #e74c3c;
    color: white;
    padding: 15px 35px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    margin-bottom: 20px;
    border: 2px solid #e74c3c;
}

.btn:hover {
    background: #c0392b;
    border-color: #c0392b;
    transform: translateY(-2px);
}

/* Секции */
section {
    padding: 80px 0;
}

h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
    color: #2c3e50;
}

/* О нас */
.about {
    background: white;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: stretch;
}

.about-item {
    text-align: center;
    padding: 30px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 2px solid #2c3e50;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 280px;
}

.about-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.about-item h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 600;
    flex-shrink: 0;
}

.about-item p {
    line-height: 1.6;
    font-size: 0.95rem;
    color: #666;
    flex-grow: 1;
}

/* Портфолио */
.portfolio {
    background: #f8f9fa;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: stretch;
}

.portfolio-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 2px solid #2c3e50;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 280px;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.portfolio-icon {
    background: #2c3e50;
    color: white;
    padding: 25px 15px;
    font-size: 2.5rem;
    flex-shrink: 0;
}

.portfolio-item h3 {
    color: #2c3e50;
    margin: 20px 0 12px;
    padding: 0 15px;
    font-size: 1.3rem;
    font-weight: 600;
    flex-shrink: 0;
    line-height: 1.3;
}

.portfolio-item p {
    color: #666;
    margin-bottom: 20px;
    padding: 0 15px;
    line-height: 1.5;
    font-size: 0.95rem;
    flex-grow: 1;
}

.portfolio-link {
    display: inline-block;
    background: #2c3e50;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    margin: 0 15px 20px;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
    border: 2px solid #2c3e50;
}

.portfolio-link:hover {
    background: white;
    color: #2c3e50;
    transform: translateY(-2px);
}

/* Услуги */
.services {
    background: white;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: stretch;
}

.service-card {
    background: #f8f9fa;
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 2px solid #2c3e50;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 280px;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.service-card h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 600;
    flex-shrink: 0;
}

.service-card p {
    line-height: 1.6;
    font-size: 0.95rem;
    color: #666;
    flex-grow: 1;
}

/* Призыв к действию */
.cta {
    background: #2c3e50;
    color: white;
    text-align: center;
}

.cta h2 {
    color: white;
}

.cta p {
    max-width: 800px;
    margin: 0 auto 30px;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Контакты */
.contact {
    background: #f8f9fa;
}

.contact-info {
    text-align: center;
    font-size: 1.2rem;
}

.contact-info p {
    margin-bottom: 15px;
    color: #2c3e50;
    font-weight: 500;
}

/* Подвал */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 30px 0;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 40px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: modalAppear 0.3s ease;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #2c3e50;
    transition: color 0.3s;
}

.close:hover {
    color: #e74c3c;
}

.modal-content h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

.modal-content p {
    text-align: center;
    margin-bottom: 30px;
    color: #666;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-form input {
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.modal-form input:focus {
    outline: none;
    border-color: #3498db;
}

.modal-form button {
    background: #e74c3c;
    color: white;
    padding: 15px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    border: 2px solid #e74c3c;
}

.modal-form button:hover {
    background: #c0392b;
    border-color: #c0392b;
}

/* Стили для модального окна уведомлений */
.alert-content {
    text-align: center;
    max-width: 400px;
}

.alert-content h2 {
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.alert-content p {
    margin-bottom: 30px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.close-alert {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #2c3e50;
    transition: color 0.3s;
}

.close-alert:hover {
    color: #e74c3c;
}

#alert-ok {
    background: #3498db;
    padding: 12px 30px;
    font-size: 1rem;
    border: 2px solid #3498db;
}

#alert-ok:hover {
    background: #2980b9;
    border-color: #2980b9;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .about-grid,
    .portfolio-grid,
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
        max-width: 800px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero {
        padding: 140px 0 70px;
    }
    
    .about-grid,
    .portfolio-grid,
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .about-item,
    .portfolio-item,
    .service-card {
        min-height: 240px;
        margin: 0;
    }
    
    .portfolio-icon {
        padding: 20px 15px;
        font-size: 2.2rem;
    }
    
    .portfolio-item h3,
    .about-item h3,
    .service-card h3 {
        font-size: 1.2rem;
        margin: 15px 0 10px;
    }
    
    .portfolio-item p,
    .about-item p,
    .service-card p {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }
    
    .btn-header {
        display: none;
    }
    
    section {
        padding: 60px 0;
    }
    
    .modal-content {
        margin: 15% auto;
        padding: 30px 25px;
    }
    
    .alert-content {
        margin: 15% auto;
        padding: 30px 25px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: 25px;
    }
    
    .btn {
        padding: 12px 25px;
        font-size: 1rem;
        margin-bottom: 15px;
    }
    
    h2 {
        font-size: 1.8rem;
        margin-bottom: 40px;
    }
    
    .about-item,
    .portfolio-item,
    .service-card {
        min-height: 220px;
        border-radius: 10px;
        padding: 25px 15px;
    }
    
    .portfolio-icon {
        padding: 18px 12px;
        font-size: 2rem;
    }
    
    .portfolio-item h3,
    .about-item h3,
    .service-card h3 {
        font-size: 1.1rem;
        margin: 12px 0 8px;
    }
    
    .portfolio-item p,
    .about-item p,
    .service-card p {
        font-size: 0.85rem;
        margin-bottom: 15px;
        line-height: 1.4;
    }
    
    .portfolio-link {
        padding: 8px 16px;
        font-size: 0.85rem;
        margin: 0 12px 15px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 25px 20px;
    }
    
    .alert-content {
        margin: 10% auto;
        width: 95%;
        padding: 25px 20px;
    }
}