/* Contact Page Styling */

/* Hero Section */
.contact-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-hover) 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    margin-top: 60px;
}

.contact-hero-container {
    max-width: 1200px;
    margin: 0 auto;
}

.contact-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.contact-hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Contact Content Layout */
.contact-content-wrapper {
    display: flex;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
    gap: 2rem;
    justify-content: center;
    /* Center content on all screen sizes */
}

.contact-form-section {
    flex: 1 1 65%;
    min-width: 300px;
    max-width: 800px;
    /* Prevent form from becoming too wide */
}

/* FAQ Section Styling */
.faq-section {
    background-color: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 2rem;
}

.faq-container {
    margin-top: 1.5rem;
    /* Further reduced from 2rem */
}

/* Responsive Styles */
@media (max-width: 768px) {
    .contact-content-wrapper {
        padding: 0 1rem;
    }

    .contact-form-container,
    .faq-section,
    .help-sidebar-container {
        padding: 1.5rem;
        margin: 0 auto;
        /* Center containers on mobile */
        width: 100%;
        /* Full width on mobile */
        max-width: 500px;
        /* Limit maximum width on mobile */
    }

    .faq-section {
        margin-top: -1rem;
        /* Maintain reduced gap on mobile */
    }
}

.help-sidebar {
    flex: 1 1 25%;
    min-width: 250px;
}

/* Contact Form Styling */
.contact-form-container {
    background-color: #fff;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 2.5rem;
}

.contact-form-container h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(28, 60, 38, 0.1);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Form Field Styling */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    font-size: 1rem;
    color: #333;
}

.form-group .required {
    color: #d32f2f;
    margin-left: 0.25rem;
}

.form-group .optional {
    color: #757575;
    font-size: 0.9rem;
    font-weight: normal;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    padding: 0.9rem 1.2rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #f9f9f9;
    color: #333;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(28, 60, 38, 0.2);
    background-color: #fff;
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #d32f2f;
    background-color: #fff6f6;
}

.form-group input.error:focus,
.form-group select.error:focus,
.form-group textarea.error:focus {
    box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.2);
}

/* Error Message Styling */
.error-message {
    color: #d32f2f;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: none;
    transition: all 0.3s ease;
}

.error-message.visible {
    display: block;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Checkbox Styling */
.checkbox-group {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.75rem;
}

.checkbox-group input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #f9f9f9;
    cursor: pointer;
    position: relative;
    margin-top: 0.25rem;
}

.checkbox-group input[type="checkbox"]:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-group input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-group input[type="checkbox"].error {
    border-color: #d32f2f;
}

.checkbox-group label {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Submit Button */
.form-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

.submit-button {
    background-color: var(--primary-color);
    color: white;
    font-weight: 500;
    font-size: 1rem;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(28, 60, 38, 0.1);
    letter-spacing: 0.5px;
    min-width: 200px;
    position: relative;
}

.submit-button:hover {
    background-color: var(--primary-color-hover);
    box-shadow: 0 6px 12px rgba(28, 60, 38, 0.15);
}

.submit-button:active {
    box-shadow: 0 2px 4px rgba(28, 60, 38, 0.1);
    transform: translateY(1px);
}

.spinning {
    display: inline-block;
    animation: spin 1.2s linear infinite;
    opacity: 0.6;
    font-size: 1rem;
    /* smaller = more refined */
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* FAQ Section Styling */
.faq-section {
    max-width: 1200px;
    margin: 0.1rem auto;
    padding: 2rem;
}

.faq-container {
    margin-top: 3rem;
}

.faq-section h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(28, 60, 38, 0.1);
}


.faq-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.faq-question {
    font-size: 1.5rem;
    padding: 2rem;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #333;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    color: var(--primary-color);
}

.faq-question i {
    transition: transform 0.3s ease;
}

.faq-question.active i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 2rem;
    max-height: 0;
    overflow: hidden;
    line-height: 1.8;
    font-size: 1.1rem;
    color: #666;
    opacity: 0;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease-in-out, padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-answer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.faq-answer a:hover {
    color: var(--primary-color-hover);
}

.faq-answer.active {
    max-height: 1000px;
    opacity: 1;
    padding: 0 2rem 2rem;
    animation: faqBounce 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .faq-question:hover i {
        animation: wiggle 0.4s ease-in-out;
    }
}

@keyframes faqBounce {
    0% {
        transform: scaleY(0.6);
        opacity: 0;
    }

    50% {
        transform: scaleY(1.05);
        opacity: 1;
    }

    100% {
        transform: scaleY(1);
    }
}

@keyframes wiggle {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(10deg);
    }

    50% {
        transform: rotate(-10deg);
    }

    75% {
        transform: rotate(6deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

/* Responsive FAQ Styles */
@media (max-width: 1024px) {
    .faq-title {
        font-size: 1.8rem;
        padding-left: 1.5rem;
    }

    .faq-question {
        font-size: 1.3rem;
        padding: 1.5rem;
    }

    .faq-answer {
        font-size: 1rem;
        padding: 0 1.5rem;
    }

    .faq-answer.active {
        padding: 0 1.5rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .faq-section {
        padding: 1.5rem;
    }

    .faq-title {
        font-size: 1.5rem;
        padding-left: 1rem;
    }

    .faq-question {
        font-size: 1.2rem;
        padding: 1.2rem;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        flex-wrap: nowrap;
        word-break: break-word;
    }

    .faq-question i {
        flex-shrink: 0;
    }

    .faq-answer {
        font-size: 0.95rem;
        padding: 0 1rem;
    }

    .faq-answer.active {
        padding: 0 1rem 1rem;
    }
}

@media (max-width: 480px) {
    .faq-title {
        font-size: 1.3rem;
    }

    .faq-question {
        font-size: 1.1rem;
        padding: 1rem;
    }

    .faq-answer {
        font-size: 0.9rem;
        padding: 0 0.8rem;
    }

    .faq-answer.active {
        padding: 0 0.8rem 1rem;
    }
}

/* Help Sidebar Styling */
.help-sidebar-container {
    background-color: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 2rem;
}

.help-sidebar-container h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-top: 0.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(28, 60, 38, 0.1);
}

@media (min-width: 1550px) {
    .help-sidebar-container {
        width: 500px;
    }
}

.quick-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background-color: #f9f9f9;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
}

.quick-link:hover {
    background-color: rgba(46, 74, 125, 0.1);
    color: var(--primary-color-hover);
}

.quick-link i {
    color: var(--primary-color-hover);
    font-size: 1.1rem;
}

/* Security Reminder Section */
.security-reminder {
    background-color: #fff8e1;
    border-left: 4px solid #ffc107;
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 2rem;
}

.security-reminder h3 {
    font-weight: 600;
    font-size: 1.1rem;
    color: #795548;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.security-reminder h3 i {
    color: #ffc107;
}

.security-reminder p {
    color: #5d4037;
    line-height: 1.6;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.security-reminder p:last-child {
    margin-bottom: 0;
}

/* Contact Information */
.contact-info {
    margin-top: 2rem;
}

.contact-info h3 {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-info p {
    color: #555;
    line-height: 1.6;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.contact-info p i {
    color: var(--primary-color);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.contact-info a:hover {
    border-bottom-color: var(--primary-color-hover);
}

.contact-info .social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.contact-info .social-links a {
    color: var(--primary-color);
    font-size: 1.25rem;
    transition: all 0.3s ease;
    border-bottom: none;
}

.submit-button.loading {
    position: relative;
    color: transparent !important;
}

.submit-button.loading::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: button-spinner 0.8s linear infinite;
}

@keyframes button-spinner {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Confirmation Modal */
.submission-confirmation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.submission-confirmation.visible {
    opacity: 1;
    visibility: visible;
}

.confirmation-content {
    background-color: white;
    border-radius: 12px;
    padding: 3rem;
    max-width: 600px;
    width: 85%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.submission-confirmation.visible .confirmation-content {
    transform: translateY(0);
}

.confirmation-content h2 {
    color: var(--primary-color);
    margin-bottom: 1.2rem;
    font-size: 1.8rem;
}

.confirmation-content p {
    color: #555;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.close-button {
    background-color: var(--primary-color);
    color: white;
    font-size: 1.2rem;
    font-weight: 500;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.2rem;
}

.close-button:hover {
    background-color: var(--primary-color-hover);
}

/* iOS Select Styling Override */
.form-group select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231c3c26' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
    text-overflow: ellipsis;
}

/* Ensure consistent styling on iOS */
@supports (-webkit-touch-callout: none) {
    .form-group select {
        font-size: 16px;
        background-color: #f9f9f9;
        -webkit-appearance: none;
        border-radius: 8px;
        color: #333;
    }
}

/* Responsive Styles */
@media (max-width: 1150px) {
    .contact-content-wrapper {
        flex-direction: column;
    }

    .help-sidebar-container {
        position: static;
    }

    .contact-hero h1 {
        font-size: 2.5rem;
    }

    .contact-form-section {
        flex: 1;
        max-width: 100%;
        width: 100%;
    }

    .contact-form-container,
    .faq-section,
    .help-sidebar-container {
        max-width: none;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .contact-hero {
        padding: 3rem 1.5rem;
    }

    .contact-hero h1 {
        font-size: 2rem;
    }

    .contact-hero p {
        font-size: 1rem;
    }

    .contact-form-container,
    .faq-section,
    .help-sidebar-container {
        padding: 1.5rem;
    }

    .confirmation-content {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .contact-hero h1 {
        font-size: 1.8rem;
    }

    .contact-form-container h2,
    .faq-section h2,
    .help-sidebar-container h2 {
        font-size: 1.5rem;
    }

    .submit-button {
        width: 100%;
    }

    .confirmation-content {
        padding: 1.5rem;
    }

    .confirmation-icon {
        font-size: 2.5rem;
    }

    .confirmation-content h2 {
        font-size: 1.5rem;
    }
}

/* Privacy Policy and Terms Links */
.checkbox-group label a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.checkbox-group label a:hover {
    color: var(--primary-color-hover);
}