/* General Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(45deg, #f5f5f7, #e0e0e0);
    color: #1d1d1f;
    transition: background-color 0.3s, color 0.3s;
    padding: 20px; /* Add padding for smaller screens */
    box-sizing: border-box; /* Include padding in element's total width and height */
}

.language-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 5px;
}

.language-switcher button {
    background: none;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    transition: background-color 0.3s, color 0.3s;
}

.language-switcher button.active {
    background-color: #007aff;
    color: white;
}

.language-switcher button:hover:not(.active) {
    background-color: #e0e0e0;
}

.container {
    background-color: #ffffff;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 100%;
    max-width: 450px;
    animation: fadeIn 1s ease-in-out;
}

.top-main-logo-container {
    text-align: center;
    margin-bottom: 20px; /* Adjust margin as needed */
}

.top-main-logo {
    max-width: 300px; /* Even bigger size for desktop */
    height: auto;
    display: block;
    margin: 0 auto;
}

@media (max-width: 600px) {
    .top-main-logo {
        max-width: 200px; /* Even smaller size for mobile */
    }
}

.bottom-logos-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px; /* Space between the two smaller logos */
    margin-bottom: 40px; /* Space below the logos */
}

.bottom-logo {
    width: 80px; /* Fixed width for smaller logos */
    height: 80px; /* Fixed height for smaller logos */
    object-fit: contain; /* Ensures the entire image is visible */
    display: block;
}

@media (max-width: 600px) {
    .bottom-logo {
        width: 60px;
        height: 60px;
    }
}

h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 40px;
}

.form-group {
    margin-bottom: 25px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 15px;
    color: #555;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"] {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid #d2d2d7;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus {
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2);
    outline: none;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    accent-color: #007aff; /* Styles the checkbox itself */
}

.checkbox-group label {
    margin-bottom: 0; /* Override default label margin */
    font-size: 15px;
    color: #333;
}

button[type="submit"] {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    background-color: #007aff;
    color: #ffffff;
    transition: background-color 0.3s, transform 0.2s;
}

button[type="submit"]:hover {
    background-color: #0071e3;
    transform: scale(1.02);
}

#response {
    margin-top: 20px;
    font-size: 14px;
    font-weight: 500;
}

.error-message {
    color: #ff3b30;
}

.success-message {
    color: #34c759;
}

/* Dark Mode for General Styles */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(45deg, #1d1d1f, #111111);
        color: #f5f5f7;
    }

    .language-switcher {
        background-color: rgba(44, 44, 46, 0.8);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }

    .language-switcher button {
        color: #a0a0a5;
    }

    .language-switcher button.active {
        background-color: #0a84ff;
        color: white;
    }

    .language-switcher button:hover:not(.active) {
        background-color: #3a3a3c;
    }

    .container {
        background-color: #2c2c2e;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }

    .logo-placeholder {
        background-color: #3a3a3c;
        border: 2px solid #545458;
    }

    h1 {
        color: #f5f5f7;
    }

    .form-group label {
        color: #a0a0a5;
    }

    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="tel"] {
        background-color: #3a3a3c;
        border-color: #545458;
        color: #f5f5f7;
    }

    .form-group input[type="text"]:focus,
    .form-group input[type="email"]:focus,
    .form-group input[type="tel"]:focus {
        border-color: #0a84ff;
        box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.3);
    }

    .checkbox-group label {
        color: #f5f5f7;
    }

    button[type="submit"] {
        background-color: #0a84ff;
    }

    button[type="submit"]:hover {
        background-color: #007aff;
    }

    .error-message {
        color: #ff453a;
    }

    .success-message {
        color: #30d158;
    }
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    .language-switcher {
        top: 10px;
        right: 10px;
        padding: 3px;
    }

    .language-switcher button {
        font-size: 12px;
        padding: 6px 10px;
    }

    .container {
        padding: 30px 20px;
        border-radius: 15px;
    }

    .logo-container {
        gap: 10px;
        margin-bottom: 20px;
    }

    .logo-placeholder {
        width: 40px;
        height: 40px;
    }

    h1 {
        font-size: 24px;
        margin-bottom: 30px;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-group label {
        font-size: 13px;
        margin-bottom: 5px;
    }

    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="tel"] {
        padding: 12px;
        font-size: 14px;
    }

    .checkbox-group input[type="checkbox"] {
        width: 16px;
        height: 16px;
    }

    button {
        padding: 14px;
        font-size: 16px;
    }

    #response {
        font-size: 13px;
    }
}

/* Loading Spinner */
.loading-spinner {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.3s ease-in-out;
}

.loading-spinner.show {
    visibility: visible;
    opacity: 1;
}

.spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #007aff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.3s ease-in-out;
}

.modal.show {
    visibility: visible;
    opacity: 1;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    text-align: center;
    animation: zoomIn 0.3s ease-out;
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-button:hover,
.close-button:focus {
    color: #000;
    text-decoration: none;
}

.modal-content h2 {
    font-size: 28px;
    color: #007aff;
    margin-bottom: 15px;
}

.modal-content p {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 10px;
}

.modal-button {
    background-color: #007aff;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 20px;
    transition: background-color 0.3s, transform 0.2s;
}

.modal-button:hover {
    background-color: #005bb5;
    transform: scale(1.02);
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Dark Mode for Spinner and Modal */
@media (prefers-color-scheme: dark) {
    .loading-spinner {
        background-color: rgba(0, 0, 0, 0.7);
    }

    .spinner {
        border-top: 5px solid #0a84ff;
    }

    .modal-content {
        background-color: #2c2c2e;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    }

    .close-button {
        color: #8e8e93;
    }

    .close-button:hover,
    .close-button:focus {
        color: #f5f5f7;
    }

    .modal-content h2 {
        color: #0a84ff;
    }

    .modal-content p {
        color: #f5f5f7;
    }

    .modal-button {
        background-color: #0a84ff;
    }

    .modal-button:hover {
        background-color: #007aff;
    }
}

/* RTL for Modal */
[dir="rtl"] .close-button {
    left: 25px;
    right: auto;
}

/* Keyframe Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

