/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', sans-serif;
    line-height: 1.6;
    color: #1b1b68;
    background-color: #f8f9fa;
    direction: rtl;
    text-align: right;
}

/* Colors */
:root {
    --primary-color: #1b1b68;
    --secondary-color: #c1beb4;
    --gold-color: #c1beb4;
    --dark-color: #1f2937;
    --light-color: #f8fafc;
    --white: #ffffff;
    --gray: #6b7280;
    --light-gray: #e5e7eb;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Text colors for different backgrounds */
.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark h4, .bg-dark h5, .bg-dark h6,
.hero-section h1, .hero-section h2, .hero-section h3, .hero-section h4, .hero-section h5, .hero-section h6,
.page-header h1, .page-header h2, .page-header h3, .page-header h4, .page-header h5, .page-header h6,
.cta-section h1, .cta-section h2, .cta-section h3, .cta-section h4, .cta-section h5, .cta-section h6,
.navbar h1, .navbar h2, .navbar h3, .navbar h4, .navbar h5, .navbar h6 {
    color: #c1beb4 !important;
}

.bg-dark p, .bg-dark span, .bg-dark div,
.hero-section p, .hero-section span, .hero-section div,
.page-header p, .page-header span, .page-header div,
.cta-section p, .cta-section span, .cta-section div {
    color: #c1beb4 !important;
}

.text-gold {
    color: var(--gold-color) !important;
}

.bg-gold {
    background-color: var(--gold-color) !important;
}

.btn-gold {
    background-color: var(--gold-color);
    border-color: var(--gold-color);
    color: white;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 30px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 20;
    pointer-events: auto;
    text-decoration: none;
}

.btn-gold:hover {
    background-color: #a8a598;
    border-color: #a8a598;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(193, 190, 180, 0.3);
    text-decoration: none;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2a2a80 100%);
    padding: 1.5rem 0;
    box-shadow: 0 2px 20px rgba(27, 27, 104, 0.1);
    transition: all 0.3s ease;
}

.navbar-scrolled {
    background: rgba(27, 27, 104, 0.95);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: white !important;
}

.navbar-brand img {
    height: clamp(90px, 12vw, 120px);
    width: auto;
    max-width: clamp(350px, 50vw, 600px);
    transition: all 0.3s ease;
    object-fit: contain;
    aspect-ratio: auto;
}

.brand-text {
    font-size: 1.2rem;
}

.navbar-nav .nav-link {
    color: #c1beb4 !important;
    font-weight: 500;
    margin: 0 10px;
    padding: 8px 16px !important;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #c1beb4 !important;
    background-color: rgba(193, 190, 180, 0.2);
    transform: translateY(-1px);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2a2a80 100%);
    color: #c1beb4;
    padding: 100px 0 50px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 30% 40%, rgba(193, 190, 180, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 60%, rgba(193, 190, 180, 0.08) 0%, transparent 55%),
        radial-gradient(circle at 50% 20%, rgba(27, 27, 104, 0.05) 0%, transparent 40%),
        linear-gradient(135deg, rgba(193, 190, 180, 0.04) 0%, transparent 100%);
    z-index: 1;
    animation: backgroundFloat 8s ease-in-out infinite;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(45deg, transparent 30%, rgba(193, 190, 180, 0.02) 50%, transparent 70%),
        radial-gradient(circle at 90% 10%, rgba(193, 190, 180, 0.06) 0%, transparent 30%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    color: #c1beb4;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-description {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: #c1beb4;
    opacity: 0.95;
}

.hero-logo {
    max-width: clamp(500px, 70vw, 900px);
    height: auto;
    filter: drop-shadow(0 8px 25px rgba(193, 190, 180, 0.4));
    transition: all 0.3s ease;
    object-fit: contain;
    aspect-ratio: auto;
    margin: 2rem 0;
    position: relative;
    z-index: 3;
    opacity: 0.98;
    mix-blend-mode: normal;
    animation: logoFloat 6s ease-in-out infinite;
}

.hero-image {
    position: relative;
    z-index: 3;
}

/* Sections */
.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 50%;
    transform: translateX(50%);
    width: 60px;
    height: 4px;
    background: var(--gold-color);
    border-radius: 2px;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2a2a80 100%);
    margin-top: 76px;
}

/* Service Cards */
.service-card {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: all 0.3s ease;
    border-top: 4px solid var(--gold-color);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.service-card h4 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Service Detail Cards */
.service-detail-card {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-right: 5px solid var(--gold-color);
}

.service-detail-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.service-detail-icon {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.service-detail-title {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.service-features {
    list-style: none;
    padding: 0;
}

.service-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--light-gray);
    position: relative;
    padding-right: 25px;
}

.service-features li::before {
    content: '✓';
    position: absolute;
    right: 0;
    color: var(--gold-color);
    font-weight: bold;
}

.service-features li:last-child {
    border-bottom: none;
}

/* Feature Cards */
.feature-card {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.feature-icon {
    font-size: 3rem;
    color: var(--gold-color);
    margin-bottom: 1.5rem;
}

/* VMV Cards (Vision, Mission, Values) */
.vmv-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.vmv-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.vmv-icon {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.vmv-card h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

/* Team Cards */
.team-card {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.team-avatar {
    width: 100px;
    height: 100px;
    background: var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 3rem;
    color: var(--primary-color);
}

.team-role {
    color: var(--gold-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Achievement Cards */
.achievement-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.achievement-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.achievement-number {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Contact Form */
.contact-form-card {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
}

.form-control, .form-select {
    border: 2px solid var(--light-gray);
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    direction: rtl;
    text-align: right;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(30, 58, 138, 0.1);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Contact Info Cards */
.contact-info-card {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-align: center;
}

.contact-info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.contact-info-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

/* Working Hours */
.working-hours-card {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
}

.hours-list {
    border: 2px solid var(--light-gray);
    border-radius: 10px;
    padding: 1.5rem;
}

.hours-list .d-flex {
    border-bottom: 1px solid var(--light-gray);
    padding: 8px 0;
}

.hours-list .d-flex:last-child {
    border-bottom: none;
}

/* Admin Messages */
.message-item {
    transition: all 0.3s ease;
}

.message-item.unread .card {
    border-width: 2px;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
}

.message-item.read .card {
    opacity: 0.85;
}

.card {
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid var(--light-gray);
}

/* FAQ */
.accordion-button {
    font-weight: 600;
    font-size: 1.1rem;
    text-align: right;
    direction: rtl;
    background-color: #f8f9fa;
}

.accordion-button:not(.collapsed) {
    background-color: var(--primary-color);
    color: white;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(30, 58, 138, 0.25);
}

.accordion-item {
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2a2a80 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="rgba(255,255,255,0.05)"><polygon points="0,0 1000,100 0,100"/></svg>');
    background-size: cover;
    background-position: top;
    z-index: 1;
}

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

/* Footer */
.footer {
    background: var(--dark-color) !important;
}

.footer h5 {
    color: var(--gold-color);
}

.footer .text-muted {
    color: #9ca3af !important;
}

.footer a:hover {
    color: var(--gold-color) !important;
}

/* Form Validation */
.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

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

/* Loading States */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes backgroundFloat {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

@keyframes whatsappPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.6s ease-out;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    transition: all 0.3s ease;
}

.whatsapp-float-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #25d366;
    color: white;
    border-radius: 50%;
    font-size: 1.8rem;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    animation: whatsappPulse 2s infinite;
    transition: all 0.3s ease;
}

.whatsapp-float-btn:hover {
    background: #128c7e;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
}

.whatsapp-float.hide {
    opacity: 0;
    transform: translateY(100px);
}

/* WhatsApp Button Styles */
.whatsapp-btn {
    background: #25d366 !important;
    border: none;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
}

.whatsapp-btn:hover {
    background: #128c7e !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .service-card,
    .service-detail-card,
    .feature-card,
    .vmv-card,
    .team-card,
    .achievement-card,
    .contact-form-card,
    .contact-info-card,
    .working-hours-card {
        padding: 1.5rem;
    }
    
    .vmv-icon,
    .service-detail-icon {
        font-size: 2.5rem;
    }
    
    .service-icon,
    .feature-icon,
    .contact-info-icon {
        font-size: 2rem;
    }
    
    .navbar-nav .nav-link {
        margin: 5px 0;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .contact-form-card,
    .contact-info-card,
    .working-hours-card {
        padding: 1rem;
    }
    
    .btn-gold,
    .btn-primary,
    .btn-light {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #f3f4f6;
        --bg-color: #111827;
    }
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .cta-section {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .container {
        max-width: none;
    }
}

/* Responsive Logo Sizing */
@media (max-width: 576px) {
    .navbar-brand img {
        height: clamp(70px, 15vw, 90px);
        max-width: clamp(250px, 80vw, 400px);
    }
    
    .hero-logo {
        max-width: clamp(300px, 90vw, 500px);
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .navbar {
        padding: 1rem 0;
    }
}

@media (min-width: 577px) and (max-width: 992px) {
    .navbar-brand img {
        height: clamp(80px, 12vw, 100px);
        max-width: clamp(320px, 55vw, 500px);
    }
    
    .hero-logo {
        max-width: clamp(400px, 75vw, 650px);
    }
}

@media (min-width: 993px) and (max-width: 1400px) {
    .navbar-brand img {
        height: clamp(90px, 10vw, 115px);
        max-width: clamp(400px, 45vw, 600px);
    }
    
    .hero-logo {
        max-width: clamp(500px, 60vw, 800px);
    }
}

@media (min-width: 1401px) {
    .navbar-brand img {
        height: clamp(100px, 8vw, 130px);
        max-width: clamp(450px, 40vw, 700px);
    }
    
    .hero-logo {
        max-width: clamp(600px, 50vw, 1000px);
    }
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Focus styles for better accessibility */
button:focus,
.btn:focus,
input:focus,
textarea:focus,
select:focus,
a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .service-card,
    .feature-card,
    .vmv-card,
    .team-card,
    .achievement-card,
    .contact-form-card,
    .contact-info-card {
        border: 2px solid var(--dark-color);
    }
}
