/* --- Contact Section --- */
.contact-container {
    max-width: 1000px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    padding: 4rem;
    border-radius: 40px;
    box-shadow: 0 20px 60px -10px rgba(122, 88, 176, 0.15);
    border: 1px solid white;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 5rem;
    align-items: start;
}

.contact-form-wrapper h3 {
    margin-bottom: 2rem;
    color: var(--brand-dark);
    font-size: 1.8rem;
    position: relative;
    display: inline-block;
}

.contact-form-wrapper h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--brand-purple);
    border-radius: 2px;
}

.contact-info h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--brand-dark);
}

.contact-info p {
    margin-bottom: 2.5rem;
    color: #666;
    line-height: 1.7;
    font-size: 1.05rem;
}

.support-email-box {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    background: linear-gradient(135deg, #fff 0%, #fefefe 100%);
    padding: 2rem;
    border-radius: 24px;
    border: 1px solid rgba(122, 88, 176, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.support-email-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--brand-purple);
    opacity: 0.5;
    transition: 0.3s;
}

.support-email-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(122, 88, 176, 0.12);
    border-color: rgba(122, 88, 176, 0.3);
}

.support-email-box:hover::before {
    opacity: 1;
    width: 6px;
}

.email-icon-circle {
    width: 50px;
    height: 50px;
    background: rgba(122, 88, 176, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--brand-purple);
}

.support-email-box div {
    display: flex;
    flex-direction: column;
}

.support-email-box a {
    color: var(--brand-dark);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.15rem;
    transition: 0.3s;
}

.support-email-box:hover a {
    color: var(--brand-purple);
}

@media (max-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-container {
        padding: 1.5rem 1rem;
        /* More space for content, less horizontal padding */
        margin: 0 auto;
        width: 100%;
        /* Maximize width within section padding */
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Centering and Sizing for Mobile */
    .contact-form-wrapper,
    .contact-info {
        text-align: center;
        width: 100%;
    }

    .contact-form {
        width: 100%;
    }

    .form-group {
        width: 100%;
    }

    /* Force inputs to respect container width */
    .form-group input,
    .form-group textarea {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .contact-form-wrapper h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .form-group label {
        align-self: flex-start;
        /* Keep labels left aligned */
        margin-left: 2px;
    }

    .support-email-box {
        justify-content: center;
        text-align: left;
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        box-sizing: border-box;
    }

    .support-email-box div {
        align-items: center;
    }
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.form-group label {
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--brand-dark);
}

.form-group input,
.form-group textarea {
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid #E0E0E0;
    background: #FAFAFA;
    font-family: inherit;
    font-size: 1rem;
    transition: 0.3s;
    width: 100%;
    /* Fix width */
    max-width: 100%;
    /* Prevent overflow */
    box-sizing: border-box;
    /* Ensure padding is inside width */
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--brand-purple);
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(122, 88, 176, 0.1);
}

.form-message {
    margin-top: 1rem;
    text-align: center;
    font-weight: 600;
    min-height: 1.5em;
}

.form-message.success {
    color: #2ecc71;
}

.form-message.error {
    color: #e74c3c;
}

/* --- Modal --- */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(45, 27, 78, 0.6);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 3rem;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 32px;
    box-shadow: var(--shadow-md);
    position: relative;
    text-align: center;
    animation: slideUp 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 25px;
    top: 15px;
    cursor: pointer;
    transition: 0.3s;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--brand-purple);
    text-decoration: none;
    cursor: pointer;
}

.modal h2 {
    margin-bottom: 1rem;
    color: var(--brand-purple);
}

.modal p {
    color: #666;
    margin-bottom: 2rem;
}

.beta-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.beta-form input {
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid #E0E0E0;
    font-size: 1rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}