/* =======================================
   LOGO & HEADER IMPROVEMENTS
   Улучшения лого и хедера
   ======================================= */

/* ===== LOGO STYLING ===== */
.logo h1 {
    color: white !important;
    font-weight: 700 !important;
    font-size: 24px;
    margin: 0;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.logo h1:hover {
    color: #ff6b35 !important;
    transform: scale(1.05);
}

/* Mobile logo */
@media (max-width: 768px) {
    .logo h1 {
        color: white !important;
        font-weight: 700 !important;
        font-size: 16px !important;
        text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    }
}

/* ===== LOGO CLICK ANIMATION ===== */
.logo a {
    text-decoration: none;
    display: inline-block;
}

.logo a:active h1 {
    transform: scale(0.95);
}

/* ===== LANGUAGE FLAGS STYLING ===== */
.lang-current span[style*="font-size: 24px"] {
    line-height: 1;
    display: inline-block;
}

.lang-option span[style*="font-size: 24px"] {
    line-height: 1;
    display: inline-block;
}

/* Mobile language flags */
@media (max-width: 768px) {
    .lang-current span[style*="font-size: 24px"] {
        font-size: 20px !important;
    }
}

/* ===== HEADER BACKGROUND ===== */
.header {
    background: linear-gradient(135deg, #1a2332 0%, #2c3e50 100%) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* ===== CONTACT FORM IMPROVEMENTS ===== */

/* Alert styles */
.alert {
    padding: 20px 25px;
    border-radius: 12px;
    margin: 20px 0;
    animation: slideDown 0.5s ease;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
}

.alert i {
    font-size: 28px;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
}

.alert-content strong {
    display: block;
    font-size: 18px;
    margin-bottom: 8px;
}

.alert-content p {
    margin: 0;
    line-height: 1.6;
}

/* Success alert */
.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 5px solid #28a745;
}

.alert-success i {
    color: #28a745;
}

/* Error alert */
.alert-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 5px solid #dc3545;
}

.alert-error i {
    color: #dc3545;
}

/* Contact links in error */
.alert-error a {
    color: #721c24;
    font-weight: 700;
    text-decoration: underline;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.alert-error a:hover {
    color: #dc3545;
    text-decoration: none;
}

/* WhatsApp link styling */
.whatsapp-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #25d366;
    color: white !important;
    border-radius: 25px;
    text-decoration: none !important;
    font-weight: 600;
    margin-top: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
}

.whatsapp-link:hover {
    background: #20ba5a;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.4);
}

.whatsapp-link i {
    font-size: 20px;
}

/* Phone link styling */
.phone-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #007bff;
    color: white !important;
    border-radius: 25px;
    text-decoration: none !important;
    font-weight: 600;
    margin-top: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}

.phone-link:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 123, 255, 0.4);
}

.phone-link i {
    font-size: 20px;
}

/* Slide down animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade out animation */
@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.alert.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

/* Form button loading state */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Form improvements */
.contact-form form {
    position: relative;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #ff6b35;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #999;
}

/* Submit button */
.btn-primary {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c5a 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ff8c5a 0%, #ff6b35 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .alert {
        padding: 15px 20px;
        flex-direction: column;
        gap: 10px;
    }
    
    .alert i {
        font-size: 24px;
    }
    
    .alert-content strong {
        font-size: 16px;
    }
    
    .alert-content p {
        font-size: 14px;
    }
    
    .whatsapp-link,
    .phone-link {
        padding: 12px 20px;
        font-size: 14px;
        width: 100%;
        justify-content: center;
        margin-top: 8px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .btn-primary {
        width: 100%;
        justify-content: center;
        padding: 14px 25px;
    }
}

/* Close button for alerts */
.alert-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    color: inherit;
    opacity: 0.5;
    cursor: pointer;
    transition: opacity 0.3s ease;
    padding: 5px 10px;
    line-height: 1;
}

.alert-close:hover {
    opacity: 1;
}

/* Scroll to form on error */
.scroll-to-form {
    scroll-margin-top: 100px;
}