/* ===== ОБЩИЕ СТИЛИ МОДАЛЬНЫХ ОКОН ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    overflow: auto;
    animation: modalFadeIn 0.3s ease;
}

.modal.privacy-modal {
    z-index: 10002;
}

.modal-content {
    background-color: var(--white);
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: var(--modal-shadow);
    margin: 5% auto;
    animation: modalSlideIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--red-accent);
    padding-bottom: 15px;
}

.modal-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--red-accent);
    text-align: left;
    width: 100%;
}

.modal-subtitle {
    font-size: 16px;
    color: var(--gray-text);
    margin-bottom: 20px;
    text-align: left;
}

.close-button, .close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: var(--gray-text);
    transition: var(--transition);
    background: #f1f5f9;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.close-button:hover, .close-modal:hover {
    color: var(--red-accent);
    background: #ffe6e6;
    transform: rotate(90deg);
}

/* Анимации для модальных окон */
@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .modal-content {
        padding: 20px;
        margin: 10% auto;
        width: 95%;
    }
    
    .modal-title {
        font-size: 20px;
    }
    
    .close-button, .close-modal {
        top: 10px;
        right: 15px;
        width: 35px;
        height: 35px;
        font-size: 24px;
    }
}

/* Стили для формы контактов */
.contact-form {
    margin-top: 20px;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--black);
    font-size: 14px;
    text-align: left;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--input-border);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #f9f9f9;
    color: var(--black);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #aaaaaa;
    opacity: 1;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--red-accent);
    background-color: white;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 51, 51, 0.1);
}

.contact-form textarea {
    height: 120px;
    resize: vertical;
    font-family: Arial, sans-serif;
}

.contact-form .submit-button {
    background: linear-gradient(135deg, var(--red-accent) 0%, #e62e2e 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    margin-top: 10px;
}

.contact-form .submit-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 51, 51, 0.4);
}

.contact-form .submit-button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(255, 51, 51, 0.4);
}

.contact-form .submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.contact-form .submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transition: left 0.7s ease;
}

.contact-form .submit-button:hover::before {
    left: 100%;
}

/* Стили для модального окна политики конфиденциальности */
.privacy-modal-content {
    max-width: 1400px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    
}

.privacy-policy-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px 5px;
    line-height: 1.6;
    color: var(--gray-text);
    margin-bottom: 20px;
}

.privacy-section {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--light-gray);
}

.privacy-section:last-child {
    border-bottom: none;
}

.privacy-section-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--red-accent);
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--light-gray);
}

.privacy-subsection {
    margin-bottom: 15px;
    padding-left: 15px;
}

.privacy-subsection-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 8px;
}

.privacy-policy-content p {
    margin-bottom: 10px;
    text-align: justify;
}

.privacy-footer {
    display: flex;
    justify-content: center;
    padding-top: 20px;
    border-top: 2px solid var(--light-gray);
    margin-top: 10px;
}

.close-privacy-button {
    background: var(--red-accent);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.close-privacy-button:hover {
    background: #c62828;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(229, 57, 53, 0.3);
}

/* Полоса прокрутки для контента */
.privacy-policy-content::-webkit-scrollbar {
    width: 8px;
}

.privacy-policy-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.privacy-policy-content::-webkit-scrollbar-thumb {
    background: var(--red-accent);
    border-radius: 4px;
}

.privacy-policy-content::-webkit-scrollbar-thumb:hover {
    background: #c62828;
}

/* Адаптивность для политики конфиденциальности */
@media (max-width: 1400px) {
    .privacy-modal-content {
        width: 95%;
        margin: 2% auto;
    }
}

@media (max-width: 768px) {
    .privacy-modal-content {
        width: 98%;
        margin: 1% auto;
        padding: 15px;
    }
    
    .privacy-section-title {
        font-size: 18px;
    }
    
    .privacy-subsection-title {
        font-size: 15px;
    }
    
    .privacy-policy-content {
        font-size: 14px;
        padding: 5px 0;
    }
    
    .privacy-subsection {
        padding-left: 10px;
    }
    
    .close-privacy-button {
        padding: 10px 25px;
        font-size: 14px;
    }
}