/* Custom CSS rules. This is for simple styles not handled by Tailwind. */
body {
    font-family: 'Tajawal', sans-serif;
    direction: rtl; /* Set text direction to right-to-left for Arabic */
    /* Fix mobile scrolling issues */
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
    /* Prevent horizontal scroll on mobile */
    overflow-x: hidden;
}

/* Hide scrollbars for overflow containers (mobile-friendly) */
.no-scrollbar::-webkit-scrollbar { 
    display: none; 
}
.no-scrollbar { 
    -ms-overflow-style: none; 
    scrollbar-width: none; 
}

/* Style for the map container */
#map {
    height: 600px;
    width: 100%;
    border-radius: 0.75rem; /* rounded-xl in Tailwind */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow-lg in Tailwind */
}

/* Responsive map height */
@media (max-width: 768px) {
    #map {
        height: 400px;
    }
}

/* Styling for video elements to make them responsive */
.responsive-video {
    width: 100%;
    height: auto;
    border-radius: 0.75rem;
}

/* Styling for the nav links to add the active state visual cue */
.nav-link.active {
    border-bottom: 2px solid #3B82F6; /* blue-500 */
}

/* Custom background colors extracted from inline styles */
.custom-bg-light-beige {
    background-color: #f0e3c5;
}

.custom-bg-orange {
    background-color: #d78525;
}

.custom-bg-dark-brown {
    background-color: #4d261a;
}

/* Info box styling */
.info-box {
    display: none;
}

.info-box.show {
    display: block;
}

/* Mobile menu animations */
#mobile-menu {
    transition: all 0.3s ease-in-out;
    transform: translateY(-100%);
}

#mobile-menu:not(.hidden) {
    transform: translateY(0);
}

/* Mobile touch improvements */
@media (max-width: 768px) {
    /* Larger touch targets */
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Better spacing for mobile */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Prevent zoom on input focus */
    input, textarea, select {
        font-size: 16px;
    }
    
    /* Better button sizing */
    button {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Search results styling */
#search-results {
    max-height: 300px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Form improvements */
input:focus, textarea:focus, select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Notification animations */
.notification-enter {
    opacity: 0;
    transform: translateX(100%);
}

.notification-enter-active {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.3s ease-in-out;
}

.notification-exit {
    opacity: 1;
    transform: translateX(0);
}

.notification-exit-active {
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease-in-out;
}

/* Visual Polish - Consistent Spacing and Typography */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Consistent heading hierarchy */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1.25rem;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 1rem;
}

h4 {
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

/* Consistent paragraph spacing */
p {
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* Consistent button styles */
button, .btn {
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    border-radius: 0.5rem;
}

button:hover, .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Consistent card styles */
.card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Consistent form styles */
input, textarea, select {
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

input:focus, textarea:focus, select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

/* Consistent spacing for sections */
.section {
    margin-bottom: 3rem;
}

.section:last-child {
    margin-bottom: 0;
}

/* Consistent image styles */
img {
    border-radius: 0.5rem;
}

/* Consistent link styles */
a {
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: #3b82f6;
}

/* Consistent list styles */
ul, ol {
    padding-right: 1.5rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Consistent table styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

th, td {
    padding: 0.75rem;
    text-align: right;
    border-bottom: 1px solid #e5e7eb;
}

th {
    background-color: #f9fafb;
    font-weight: 600;
}

/* Consistent spacing for grid layouts */
.grid {
    gap: 1.5rem;
}

/* Consistent spacing for flex layouts */
.flex {
    gap: 1rem;
}

/* Consistent spacing for text content */
.text-content {
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.text-content h1,
.text-content h2,
.text-content h3,
.text-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.text-content h1:first-child,
.text-content h2:first-child,
.text-content h3:first-child,
.text-content h4:first-child {
    margin-top: 0;
}

/* Specific image styling for the meeting image */
img[src="frontend/images/meeting 1.jpeg"] {
    width: 100%;
    height: 10rem; /* Adjusted height */
    object-fit: cover;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Flag image specific styling to ensure proper sizing */
img[src="frontend/images/Flag.jpeg"] {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    border-radius: 0 !important;
}