/* Arabic font and RTL support */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@200;300;400;500;700;800;900&display=swap');

* {
    font-family: 'Tajawal', sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding-bottom: 80px; /* Space for mobile bottom nav */
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    body {
        padding-bottom: 100px;
    }
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .navbar-brand h4 {
        font-size: 1.1rem !important;
        line-height: 1.2;
        margin-bottom: 2px !important;
    }
    
    .navbar-brand small {
        font-size: 0.7rem;
        display: block;
    }
    
    .navbar-brand .logo {
        width: 35px;
        height: 35px;
    }
    
    .navbar-nav {
        display: none;
    }
    
    .navbar-toggler {
        display: block;
        border: none;
        background: rgba(255,255,255,0.2);
        color: white;
        padding: 8px 12px;
        border-radius: 8px;
    }
    
    .navbar-toggler:focus {
        box-shadow: none;
    }
    
    .hero-section h1 {
        font-size: 1.8rem !important;
    }
    
    .hero-section p {
        font-size: 1rem !important;
    }
}

/* Features Section */
.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f0f0;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.feature-icon i {
    font-size: 2rem;
    color: white;
}

.feature-card h4 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-weight: 600;
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* About Section */
.about-stat h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.about-stat p {
    color: var(--text-muted);
    margin: 0;
}

.about-image .gradient-bg {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.section-title {
    color: var(--text-dark);
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 50%, #1e40af 100%);
    box-shadow: 0 -5px 20px rgba(0,0,0,0.3);
    z-index: 1000;
    display: none;
    padding: 10px 0;
}

.bottom-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: rgba(255,255,255,0.8);
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 8px;
    min-width: 60px;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
    color: white;
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.bottom-nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

.bottom-nav-item span {
    font-size: 11px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: block;
    }
    
    .navbar-collapse {
        background: rgba(0,0,0,0.9);
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 2000;
        padding: 20px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .navbar-collapse.show {
        transform: translateX(0);
    }
    
    .navbar-collapse .navbar-nav {
        display: flex;
        flex-direction: column;
        gap: 20px;
        margin-top: 60px;
    }
    
    .navbar-collapse .nav-link {
        color: white;
        font-size: 18px;
        padding: 15px 20px;
        border-radius: 10px;
        background: rgba(255,255,255,0.1);
        text-align: center;
    }
}

/* Registration Modal Styles */
.registration-modal .modal-dialog {
    max-width: 800px;
    margin: 1rem auto;
}

.registration-modal .modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.registration-modal .modal-header {
    background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
    color: white;
    border-radius: 15px 15px 0 0;
    border-bottom: none;
}

.registration-modal .modal-title {
    font-weight: 700;
    font-size: 1.5rem;
}

.registration-modal .btn-close {
    filter: brightness(0) invert(1);
}

.registration-modal .modal-body {
    padding: 2rem;
    max-height: 70vh;
    overflow-y: auto;
}

.registration-modal .form-control,
.registration-modal .form-select {
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    padding: 12px 16px;
    transition: all 0.3s ease;
}

.registration-modal .form-control:focus,
.registration-modal .form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

@media (max-width: 768px) {
    .registration-modal .modal-dialog {
        margin: 0;
        max-width: 100%;
        height: 100vh;
    }
    
    .registration-modal .modal-content {
        height: 100vh;
        border-radius: 0;
    }
    
    .registration-modal .modal-header {
        border-radius: 0;
    }
    
    .registration-modal .modal-body {
        max-height: calc(100vh - 120px);
    }
}

/* Logo */
.logo {
    height: 80px;
    width: auto;
    filter: brightness(1.1) drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

/* Modern Header */
.modern-header {
    background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 50%, #1e40af 100%);
    box-shadow: 0 15px 35px rgba(14, 165, 233, 0.4);
    position: relative;
    overflow: hidden;
    padding: 1rem 0;
}

.modern-header::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 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.15"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.navbar-brand h4 {
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.header-actions .btn {
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.header-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255,255,255,0.3);
}

/* Legacy header fallback */
header {
    background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 50%, #1e40af 100%) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

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

/* Event Cards */
.event-card {
    border: 2px solid transparent;
    transition: all 0.3s ease;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0ea5e9, #3b82f6, #1e40af);
}

.event-card:hover {
    border-color: #3b82f6;
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.15);
}

.event-card .card-img-top {
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 0;
}

/* Mobile responsive event cards */
@media (max-width: 768px) {
    .event-card .card-img-top {
        height: 200px;
    }
    
    .event-card {
        margin-bottom: 20px;
    }
    
    .event-meta {
        gap: 10px;
        margin: 10px 0;
        font-size: 0.8rem;
    }
}

.event-card:hover .card-img-top {
    transform: scale(1.08);
}

.event-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 15px 0;
    font-size: 0.9rem;
    color: #6b7280;
}

.event-meta .badge {
    background: linear-gradient(45deg, #0ea5e9, #3b82f6);
    border-radius: 20px;
    padding: 5px 12px;
    font-weight: 500;
}

.event-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e40af;
}

.stat-label {
    font-size: 0.8rem;
    color: #6b7280;
}

.event-info {
    padding: 10px 0;
    border-top: 1px solid #eee;
    margin-top: 10px;
}

/* Form Styles */
.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    transform: translateY(-2px);
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

/* Buttons */
.btn {
    border-radius: 10px;
    padding: 12px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #4e9a2a 0%, #95d3b8 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(86, 171, 47, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    opacity: 0.7;
}

.btn-secondary:hover {
    opacity: 1;
    transform: translateY(-2px);
}

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

.card {
    animation: fadeInUp 0.6s ease-out;
}

.card:nth-child(2) {
    animation-delay: 0.1s;
}

.card:nth-child(3) {
    animation-delay: 0.2s;
}

.card:nth-child(4) {
    animation-delay: 0.3s;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Alert Styles */
.alert {
    border-radius: 15px;
    border: none;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.alert-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* File Upload */
.form-control[type="file"] {
    padding: 8px 15px;
}

.form-text {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 5px;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
}

/* Modal */
.modal-content {
    border-radius: 15px;
    border: none;
    overflow: hidden;
}

.modal-header {
    border: none;
    padding: 20px;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    border: none;
    padding: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .logo {
        max-height: 40px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .btn {
        padding: 10px 20px;
    }
}

/* Custom checkbox and radio */
.form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

/* Select styling */
select.form-control {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: left 0.75rem center;
    background-repeat: no-repeat;
    background-size: 16px 12px;
    padding-left: 2.5rem;
}

/* Progress indicator */
.progress {
    height: 8px;
    border-radius: 10px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Tooltip styling */
.tooltip {
    font-size: 0.875rem;
}

.tooltip-inner {
    background-color: #495057;
    border-radius: 8px;
    padding: 8px 12px;
}

/* Focus states */
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Error states */
.is-invalid {
    border-color: #dc3545;
}

.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

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

/* Success states */
.is-valid {
    border-color: #28a745;
}

.is-valid:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.valid-feedback {
    color: #28a745;
    font-size: 0.875rem;
    margin-top: 5px;
}
