@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    position: relative;
}

body {
    font-family: 'Roboto', sans-serif;
}

#cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid #E5E7EB;
    color: var(--text-main);
    padding: 1.5rem 2rem;
    z-index: 10000;
    text-align: center;
    box-shadow: var(--shadow-lg);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-family: 'Outfit', sans-serif;
}

#cookie-consent-banner p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    max-width: 800px;
    color: var(--text-main);
}

#cookie-consent-banner span {
    color: var(--text-muted) !important;
}

#cookie-consent-banner .cookie-buttons {
    display: flex;
    gap: 1rem;
}

/* --- Global Toast Notifications --- */
#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 380px;
    width: 90%;
}

.toast-message {
    background: #fff;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));
    border: 1px solid rgba(0, 0, 0, 0.04);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.75rem;
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    position: relative;
    overflow: hidden;
    font-family: 'Outfit', sans-serif;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.toast-message.closing {
    animation: toastSlideOut 0.25s ease forwards;
}

@keyframes toastSlideOut {
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

.toast-message::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
}

.toast-message.toast-success::before { background: #10b981; }
.toast-message.toast-error::before { background: #ef4444; }
.toast-message.toast-warning::before { background: #f59e0b; }
.toast-message.toast-info::before { background: #3b82f6; }

.toast-icon {
    font-size: 1.15rem;
    display: flex;
    align-items: center;
}

.toast-success .toast-icon { color: #10b981; }
.toast-error .toast-icon { color: #ef4444; }
.toast-warning .toast-icon { color: #f59e0b; }
.toast-info .toast-icon { color: #3b82f6; }

.toast-content {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1e293b;
    line-height: 1.4;
    text-align: left;
}

html[lang="ar"] .toast-content {
    text-align: right;
}

.toast-close {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    color: #94a3b8;
    padding: 0;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}

.toast-close:hover {
    color: #475569;
}

/* --- Global Footer Modals --- */
.global-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.global-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.global-modal {
    background: #fff;
    padding: 2.5rem;
    border-radius: 20px;
    width: 90%;
    max-width: 550px;
    position: relative;
    transform: scale(0.95) translateY(15px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    max-height: 85vh;
    overflow-y: auto;
    font-family: 'Outfit', sans-serif;
    color: var(--text-main, #1F2937);
}

.global-modal-overlay.active .global-modal {
    transform: scale(1) translateY(0);
}

.global-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #94a3b8;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.global-modal-close:hover {
    color: #475569;
}

html[lang="ar"] .global-modal-close {
    right: auto;
    left: 1.5rem;
}

.global-modal-title {
    margin: 0 0 1.5rem;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-color, #4F46E5);
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 0.75rem;
}

/* Modals Bilingual Layout Utilities */
html[lang="ar"] .lang-en-modal { display: none !important; }
html[lang="en"] .lang-ar-modal { display: none !important; }

/* FAQ Accordion Styling */
.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
}

html[lang="ar"] .faq-accordion {
    text-align: right;
}

.faq-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.faq-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.faq-question {
    font-weight: 700;
    font-size: 1.05rem;
    color: #1e293b;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin: 0;
}

.faq-question i {
    color: var(--primary-color, #4F46E5);
    transition: transform 0.3s ease;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, margin-top 0.3s ease;
    color: #475569;
    font-size: 0.925rem;
    line-height: 1.6;
    margin: 0;
}

.faq-item.active {
    border-color: var(--primary-light, #818CF8);
    background: #fff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.faq-item.active .faq-answer {
    max-height: 150px;
    margin-top: 0.75rem;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

/* Contact Form Styling */
.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    text-align: left;
}

html[lang="ar"] .modal-form {
    text-align: right;
}

.modal-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0;
}

.modal-form label {
    font-weight: 700;
    font-size: 0.9rem;
    color: #334155;
}

.modal-form input,
.modal-form textarea {
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #f8fafc;
    font-family: inherit;
    transition: all 0.25s;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

.modal-form input:focus,
.modal-form textarea:focus {
    border-color: var(--primary-color, #4F46E5);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.modal-form button[type="submit"] {
    background: var(--primary-color, #4F46E5);
    color: #fff;
    padding: 0.85rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}

.modal-form button[type="submit"]:hover {
    background: var(--primary-dark, #3730A3);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px -1px rgba(79, 70, 229, 0.3);
}