/* ========== RESET & BASE STYLES ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.5;
    color: white;
    background-color: #0d2b10;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ========== BACKGROUND ========== */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.desktop-bg {
    display: block;
    filter: blur(1px) brightness(0.7);
}

.mobile-bg {
    display: none;
    filter: blur(2px) brightness(0.6);
}

/* ========== CONTAINER ========== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== HERO SECTION ========== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
    position: relative;
}

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

/* Заголовок */
h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: white;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    line-height: 1.2;
}

/* Подзаголовок */
.tagline {
    font-size: 1.3rem;
    margin: 0 auto 70px;
    max-width: 600px;
    color: #e8f5e8;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.6;
}

/* ========== BUTTONS ========== */
.call-button {
    margin-bottom: 70px;
}

/* Основная кнопка */
.btn-call {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px 45px;
    border-radius: 50px;
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    min-width: 300px;
}

.btn-call:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(76, 175, 80, 0.4);
    background: linear-gradient(135deg, #5DC960 0%, #388E3C 100%);
}

.btn-call:active {
    transform: translateY(-1px);
}

.btn-call:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.5);
}

.btn-call i {
    font-size: 1.3rem;
}

/* Социальные кнопки */
.social-buttons {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 30px;
}

.btn-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.6rem;
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.btn-social:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.btn-social:active {
    transform: translateY(-1px);
}

.btn-social:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.5);
}

.btn-telegram {
    background-color: rgba(0, 136, 204, 0.9);
}

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

.btn-whatsapp {
    background-color: rgba(37, 211, 102, 0.9);
}

.btn-whatsapp:hover {
    background-color: rgba(37, 211, 102, 1);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

.btn-email {
    background-color: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-email:hover {
    background-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.2);
}

/* ========== FOOTER ========== */
footer {
    text-align: center;
    padding: 25px 20px;
    background-color: rgba(46, 125, 50, 0.9);
    backdrop-filter: blur(10px);
    margin-top: 40px;
}

.footer-text {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ========== MODAL ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: white;
    padding: 35px 30px;
    border-radius: 15px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-title {
    color: #2E7D32;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: center;
}

/* Форма */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #4CAF50;
}

.phone-input-group {
    display: flex;
    gap: 10px;
}

.country-select {
    flex: 0 0 100px;
}

.country-select select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 1rem;
}

.phone-input {
    flex: 1;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.btn-submit {
    flex: 1;
    background: #4CAF50;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-submit:hover {
    background: #2E7D32;
}

.btn-cancel {
    flex: 0 0 80px;
    background: #f5f5f5;
    color: #666;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-cancel:hover {
    background: #e0e0e0;
}

.optional {
    color: #888;
    font-size: 0.9em;
    font-weight: normal;
}

.error-message {
    color: #f44336;
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}

/* ========== RESPONSIVE DESIGN ========== */

/* Планшеты и мобильные (до 768px) */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    .container {
        padding: 0 20px;
    }
    
    .hero {
        padding: 30px 15px;
        min-height: 100vh;
    }
    
    h1 {
        font-size: 2.2rem;
        margin-bottom: 20px;
        padding: 0 10px;
    }
    
    .tagline {
        font-size: 1.1rem;
        margin-bottom: 50px;
        padding: 0 15px;
    }
    
    .call-button {
        margin-bottom: 50px;
    }
    
    .btn-call {
        padding: 18px 35px;
        font-size: 1.2rem;
        min-width: 280px;
    }
    
    .social-buttons {
        gap: 20px;
        margin-top: 25px;
    }
    
    .btn-social {
        width: 55px;
        height: 55px;
        font-size: 1.5rem;
    }
    
    /* Переключаем фон */
    .desktop-bg {
        display: none;
    }
    
    .mobile-bg {
        display: block;
    }
    
    .modal-content {
        padding: 25px 20px;
        margin: 0 15px;
    }
    
    footer {
        padding: 20px 15px;
        margin-top: 30px;
    }
}

/* Маленькие телефоны (до 480px) */
@media (max-width: 480px) {
    .hero {
        padding: 25px 10px;
    }
    
    h1 {
        font-size: 1.9rem;
        padding: 0 5px;
    }
    
    .tagline {
        font-size: 1rem;
        margin-bottom: 40px;
        padding: 0 10px;
    }
    
    .btn-call {
        padding: 16px 30px;
        font-size: 1.1rem;
        min-width: 260px;
    }
    
    .social-buttons {
        gap: 15px;
    }
    
    .btn-social {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }
    
    .phone-input-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .country-select {
        flex: 1;
        width: 100%;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-cancel {
        flex: 1;
    }
    
    .modal-content {
        padding: 20px 18px;
    }
}

/* Очень маленькие телефоны (до 360px) */
@media (max-width: 360px) {
    h1 {
        font-size: 1.7rem;
    }
    
    .tagline {
        font-size: 0.95rem;
    }
    
    .btn-call {
        min-width: 240px;
        padding: 14px 25px;
        font-size: 1rem;
    }
    
    .btn-call i {
        font-size: 1.1rem;
    }
    
    .social-buttons {
        gap: 12px;
    }
    
    .btn-social {
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }
    
    .container {
        padding: 0 15px;
    }
}

/* Ландшафтная ориентация на мобильных */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 20px 15px;
        min-height: auto;
    }
    
    h1 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .tagline {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    
    .call-button {
        margin-bottom: 30px;
    }
    
    .btn-call {
        padding: 14px 25px;
        font-size: 1.1rem;
        min-width: 250px;
    }
    
    .social-buttons {
        margin-top: 20px;
    }
    
    .mobile-bg {
        filter: blur(1px) brightness(0.7);
    }
}

/* Высокие экраны */
@media (min-height: 800px) {
    .hero {
        padding: 50px 20px;
    }
    
    h1 {
        margin-bottom: 30px;
    }
    
    .tagline {
        margin-bottom: 80px;
    }
    
    .call-button {
        margin-bottom: 80px;
    }
}

/* Большие экраны (от 1200px) */
@media (min-width: 1200px) {
    h1 {
        font-size: 3rem;
    }
    
    .tagline {
        font-size: 1.4rem;
        margin-bottom: 80px;
    }
    
    .btn-call {
        padding: 22px 50px;
        font-size: 1.4rem;
        min-width: 350px;
    }
    
    .btn-call:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 30px rgba(76, 175, 80, 0.4);
    }
    
    .btn-social:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    }
}

/* Анимации */
@media (prefers-reduced-motion: no-preference) {
    .hero h1 {
        animation: fadeInUp 0.6s ease-out 0.2s both;
    }
    
    .hero .tagline {
        animation: fadeInUp 0.6s ease-out 0.4s both;
    }
    
    .hero .call-button {
        animation: fadeInUp 0.6s ease-out 0.6s both;
    }
    
    .hero .social-buttons {
        animation: fadeInUp 0.6s ease-out 0.8s both;
    }
    
    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}