/**
 * Contact_Page.css
 * --------------
 * Styles for the contact form page including:
 * - Layout and responsive design
 * - Form styling and animations
 * - Error and success states
 * - Loading animations
 *
 * Author: Karin Hershko and Afik Dadon
 * Date: February 2025
 */

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    font-family: 'Heebo', sans-serif;
    direction: rtl;
}

.header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: rgba(220, 231, 232, 0.35);
    border-radius: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.title-container {
    flex: 1;
    text-align: center;
}

.title-container h1 {
    font-size: 2.7rem;
    color: #3F4D57;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 0;
}

.contact-image {
    max-width: 300px;
    height: auto;
    margin-right: 2rem;
}

.contact-box {
    background-color: white;
    border-radius: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 3rem;
    background: rgba(220, 231, 232, 0.35);
}

.form-group {
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.5s ease forwards;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }

.form-group label {
    display: block;
    color: #3F4D57;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.form-group label i {
    color: #4169e1;
    margin-left: 0.5rem;
}

input, textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 0.8rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: white;
    font-family: 'Heebo', sans-serif;
}

input:focus, textarea:focus {
    border-color: #4169e1;
    box-shadow: 0 0 0 3px rgba(65, 105, 225, 0.1);
    outline: none;
}

textarea {
    min-height: 150px;
    resize: vertical;
}

button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    background-color: #4169e1;
    color: white;
    border: none;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Heebo', sans-serif;
}

button:hover {
    background-color: #3F4D57;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(65, 105, 225, 0.2);
}

button i {
    font-size: 1.2rem;
}

.flash-message {
    padding: 1rem;
    border-radius: 0.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.1rem;
}

.flash-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    animation: success 0.5s ease-out forwards;
}

.flash-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

.error-message {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 0.3rem;
    animation: fadeIn 0.3s ease-in;
}

.loading-spinner {
    display: none;
}

.button-content {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.sending .button-content {
    display: none;
}

.sending .loading-spinner {
    display: inline-block;
}

button.sending {
    background-color: #3F4D57;
    pointer-events: none;
}

/* Animations */
@keyframes sendMessage {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.95); opacity: 0.5; }
    100% { transform: scale(0); opacity: 0; }
}

@keyframes success {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header-section {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1rem;
    }

    .contact-image {
        margin: 2rem 0 0 0;
        max-width: 250px;
    }

    .title-container h1 {
        font-size: 2.2rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .contact-box {
        padding: 2rem;
    }

    .contact-image {
        max-width: 200px;
    }

    button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}