/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Prevent text selection */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* Prevent drag */
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    /* Prevent right-click context menu */
    -webkit-touch-callout: none;
    /* Disable highlighting */
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* RTL Support */
html[dir="rtl"] body { 
    direction: rtl; 
    text-align: right; 
}

html[dir="rtl"] .faq-question h3,
html[dir="rtl"] .contact-form label { 
    text-align: right; 
}

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(47, 128, 237, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.header nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.2rem;
    color: #2F80ED;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: #2F80ED;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #2F80ED;
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.language-switcher {
    display: flex;
    gap: 0.5rem;
}

.language-switcher a {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: #666;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.language-switcher a.active,
.language-switcher a:hover {
    background: #2F80ED;
    color: white;
}

.cta-button {
    background: linear-gradient(135deg, #2F80ED, #1565C0);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(47, 128, 237, 0.3);
}

.cta-button.white {
    background: white;
    color: #2F80ED;
}

.cta-button.white:hover {
    background: #f8f9fa;
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #2F80ED, #1565C0);
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(47, 128, 237, 0.3);
    z-index: 1001;
}

.mobile-menu:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(47, 128, 237, 0.4);
}

.mobile-menu .hamburger {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 16px;
}

.mobile-menu .hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: white;
    border-radius: 1px;
    position: absolute;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu .hamburger span:nth-child(1) { top: 0; }
.mobile-menu .hamburger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.mobile-menu .hamburger span:nth-child(3) { bottom: 0; }

.mobile-menu.active .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu.active .hamburger span:nth-child(2) {
    opacity: 0;
    transform: translateY(-50%) translateX(20px);
}

.mobile-menu.active .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Navigation Drawer */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 998;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 255, 0.98) 100%);
    backdrop-filter: blur(25px);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    overflow-y: auto;
}

.mobile-nav-drawer.active {
    right: 0;
}

html[dir="rtl"] .mobile-nav-drawer {
    right: auto;
    left: -100%;
}

html[dir="rtl"] .mobile-nav-drawer.active {
    left: 0;
}

.drawer-header {
    padding: 2rem 1.5rem 1rem;
    border-bottom: 1px solid rgba(47, 128, 237, 0.1);
    background: linear-gradient(135deg, #2F80ED, #1565C0);
    color: white;
    position: relative;
    overflow: hidden;
}

.drawer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    position: relative;
    z-index: 2;
}

.drawer-logo img {
    width: 45px;
    height: 45px;
    border-radius: 10px;
}

.drawer-nav {
    padding: 2rem 0;
}

.drawer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.drawer-nav li {
    margin: 0;
    opacity: 0;
    transform: translateX(30px);
    animation: slideInNavItem 0.5s ease-out forwards;
}

.drawer-nav li:nth-child(1) { animation-delay: 0.1s; }
.drawer-nav li:nth-child(2) { animation-delay: 0.2s; }
.drawer-nav li:nth-child(3) { animation-delay: 0.3s; }
.drawer-nav li:nth-child(4) { animation-delay: 0.4s; }
.drawer-nav li:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideInNavItem {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

html[dir="rtl"] .drawer-nav li {
    transform: translateX(-30px);
}

.drawer-nav a {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 1.1rem;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 25px 25px 0;
    margin-right: 1rem;
}

html[dir="rtl"] .drawer-nav a {
    border-radius: 25px 0 0 25px;
    margin-right: 0;
    margin-left: 1rem;
}

.drawer-nav a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(135deg, #2F80ED, #1565C0);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

html[dir="rtl"] .drawer-nav a::before {
    left: auto;
    right: 0;
}

.drawer-nav a:hover {
    background: linear-gradient(135deg, rgba(47, 128, 237, 0.05), rgba(21, 101, 192, 0.05));
    color: #2F80ED;
    transform: translateX(10px);
}

html[dir="rtl"] .drawer-nav a:hover {
    transform: translateX(-10px);
}

.drawer-nav a:hover::before,
.drawer-nav a.active::before {
    transform: scaleY(1);
}

.drawer-nav a.active {
    background: linear-gradient(135deg, rgba(47, 128, 237, 0.1), rgba(21, 101, 192, 0.1));
    color: #2F80ED;
    font-weight: 600;
}

/* Contact Hero Section */
.contact-hero {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 50%, #2980b9 100%);
    color: white;
    padding: 140px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contact-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.8) 0%, rgba(52, 152, 219, 0.6) 50%, rgba(41, 128, 185, 0.8) 100%);
    z-index: 1;
}

.contact-hero .container {
    position: relative;
    z-index: 2;
}

.contact-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.contact-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Contact Main Section */
.contact-main {
    padding: 80px 0;
    background: #f8f9fa;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-form,
.contact-info {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.contact-form:hover,
.contact-info:hover {
    transform: translateY(-5px);
}

.contact-form h2,
.contact-info h2 {
    color: #2c3e50;
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 600;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
    font-weight: 500;
    font-size: 1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2F80ED;
    box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.info-item:hover {
    background: #e3f2fd;
    transform: translateY(-2px);
}

.info-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #2F80ED, #1565C0);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
    flex-shrink: 0;
    font-size: 1.2rem;
}

html[dir="rtl"] .info-icon {
    margin-right: 0;
    margin-left: 1.5rem;
}

.info-content h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.info-content p {
    color: #666;
    margin: 0;
    line-height: 1.6;
}

/* Success/Error Messages */
.success-message,
.error-message {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.error-list {
    margin: 0.5rem 0 0 1rem;
    padding: 0;
}

.field-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.char-count {
    font-size: 0.875rem;
    color: #666;
    text-align: right;
    margin-top: 0.25rem;
}

/* FAQ Section */
.faq-section {
    padding: 80px 0;
    background: white;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 700;
}

.section-title p {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: #f8f9fa;
    border-radius: 15px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.faq-question {
    padding: 1.5rem 2rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    transition: all 0.3s ease;
}

html[dir="rtl"] .faq-question {
    text-align: right;
}

.faq-question:hover {
    background: #e9ecef;
}

.faq-question h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    flex: 1;
    padding-right: 1rem;
}

html[dir="rtl"] .faq-question h3 {
    padding-right: 0;
    padding-left: 1rem;
}

.faq-question i {
    color: #2F80ED;
    transition: transform 0.3s ease;
}

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

.faq-answer {
    display: none;
    padding: 0 2rem 1.5rem;
    background: white;
}

.faq-answer p {
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 50%, #2980b9 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.8) 0%, rgba(52, 152, 219, 0.6) 50%, rgba(41, 128, 185, 0.8) 100%);
    z-index: 1;
}

.cta .container {
    position: relative;
    z-index: 2;
}

.cta h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-column h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: white;
}

.footer-column p {
    color: #bdc3c7;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #3498db;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: #34495e;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: #3498db;
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: #bdc3c7;
    margin: 0;
}

/* Mobile Responsive Styles */
@media (max-width: 1024px) {
    .nav-links,
    .header-actions .language-switcher,
    .header-actions .cta-button {
        display: none;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .contact-hero {
        padding: 120px 0 60px;
    }
    
    .contact-hero h1 {
        font-size: 2.2rem;
    }
    
    .contact-hero p {
        font-size: 1rem;
    }
    
    .contact-main {
        padding: 60px 0;
    }
    
    .contact-form,
    .contact-info {
        padding: 2rem;
        border-radius: 15px;
    }
    
    .contact-form h2,
    .contact-info h2 {
        font-size: 1.5rem;
    }
    
    .info-item {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
    }
    
    .info-icon {
        margin-right: 0;
        margin-bottom: 1rem;
        margin-left: 0;
    }
    
    .faq-section {
        padding: 60px 0;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .faq-question {
        padding: 1.2rem 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .faq-question h3 {
        padding-right: 0;
        padding-left: 0;
    }
    
    .faq-question i {
        align-self: flex-end;
    }
    
    .faq-answer {
        padding: 0 1.5rem 1.2rem;
    }
    
    .cta {
        padding: 60px 0;
    }
    
    .cta h2 {
        font-size: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .contact-hero h1 {
        font-size: 1.8rem;
    }
    
    .contact-form,
    .contact-info {
        padding: 1.5rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .cta-button {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .info-item {
        padding: 0.8rem;
    }
    
    .info-icon {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    .mobile-nav-drawer {
        width: 280px;
    }
}

/* Animation for mobile cards */
@media (max-width: 768px) {
    .contact-form,
    .contact-info,
    .info-item {
        animation: slideUpMobile 0.6s ease-out;
    }
    
    .contact-form {
        animation-delay: 0.1s;
    }
    
    .contact-info {
        animation-delay: 0.2s;
    }
    
    .info-item:nth-child(1) { animation-delay: 0.3s; }
    .info-item:nth-child(2) { animation-delay: 0.4s; }
    .info-item:nth-child(3) { animation-delay: 0.5s; }
    .info-item:nth-child(4) { animation-delay: 0.6s; }
}

@keyframes slideUpMobile {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Creative mobile touch interactions */
@media (hover: none) and (pointer: coarse) {
    .contact-form,
    .contact-info,
    .info-item {
        transition: all 0.2s ease;
    }
    
    .contact-form:active,
    .contact-info:active {
        transform: scale(0.98);
    }
    
    .info-item:active {
        transform: scale(0.95);
        background: #2F80ED;
        color: white;
    }
    
    .info-item:active .info-content h3,
    .info-item:active .info-content p {
        color: white;
    }
    
    .cta-button:active {
        transform: scale(0.95);
    }
}

/* Loading states for mobile */
.btn-loading {
    display: none;
}

.cta-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.cta-button:disabled .btn-text {
    display: none;
}

.cta-button:disabled .btn-loading {
    display: inline-block;
}

@media (max-width: 768px) {
    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        transform: scale(1.02);
        border-color: #2F80ED;
        box-shadow: 0 0 0 4px rgba(47, 128, 237, 0.15);
    }
}

.back_to_setting {
    position: fixed;
    top: 2rem;
    left: 2rem;
    z-index: 1000;
    background: linear-gradient(135deg, #2F80ED, #1565C0);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(47, 128, 237, 0.3);
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.3px;
    direction: ltr; /* Always LTR for proper icon alignment */
}

/* English text */
html[lang="en"] .back_to_setting::before {
    content: "Back to Settings";
}

/* Arabic text */
html[lang="ar"] .back_to_setting::before {
    content: "العودة إلى الإعدادات";
    font-family: 'Cairo', 'Tajawal', sans-serif;
    letter-spacing: normal;
}

.back_to_setting:hover {
    background: linear-gradient(135deg, #1565C0, #0d47a1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(47, 128, 237, 0.4);
    color: white;
    text-decoration: none;
}

.back_to_setting:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(47, 128, 237, 0.3);
}

.back_to_setting i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.back_to_setting:hover i {
    transform: translateX(-2px);
}

/* RTL Support for Arabic */
html[dir="rtl"] .back_to_setting {
    left: auto;
    right: 2rem;
    flex-direction: row-reverse;
}

html[dir="rtl"] .back_to_setting i {
    transform: scaleX(-1); /* Flip arrow for RTL */
}

html[dir="rtl"] .back_to_setting:hover i {
    transform: scaleX(-1) translateX(2px);
}

/* Icon positioning and animation */
.back_to_setting i {
    order: 2; /* Place icon after text */
    margin-left: 0.3rem;
}

html[dir="rtl"] .back_to_setting i {
    order: -1; /* Place icon before text in RTL */
    margin-left: 0;
    margin-right: 0.3rem;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .back_to_setting {
        top: 1rem;
        left: 1rem;
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
    }
    
    html[dir="rtl"] .back_to_setting {
        left: auto;
        right: 1rem;
    }
}