/* --- General Styles & Variables --- */
:root {
    --primary-color: #C13660; /* rose-red */
    --primary-hover: #BF466A; /* fuchsia-rose */
    --top-bar-bg: #0F364C;    /* prussian-blue */
    --top-bar-text: #e2e8f0;
    --top-bar-text-hover: #ffffff;
    --card-bg: rgba(15, 54, 76, 0.7); /* Semi-transparent prussian-blue for frosted glass effect */
    --text-dark: #FFFFFF;     /* White text for better contrast */
    --text-light: #e2e8f0;   /* Light grey for subtitles */
    --border-color: rgba(255, 255, 255, 0.3);
    --error-color: #FF0000;   /* red */
    --success-color: #28a745; /* Green for success messages */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    color: var(--text-dark);
    padding-top: 70px; /* Space for the fixed top bar */
    position: relative;
    min-height: 100vh;
    background-color: var(--top-bar-bg); /* Fallback color */
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('https://images.pexels.com/photos/3938022/pexels-photo-3938022.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    filter: blur(8px);
    transform: scale(1.1);
    z-index: -1;
}

/* --- Top Bar Styles --- */
.top-bar {
    background-color: var(--top-bar-bg);
    color: var(--top-bar-text);
    padding: 0 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    width: 40px;
    height: auto;
    margin-right: 15px;
}

.top-bar h3 {
    color: var(--top-bar-text-hover);
    margin: 0;
    font-size: 1.2rem;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

.nav-links li a {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: var(--top-bar-text);
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    border-radius: 5px;
}

.nav-links li a:hover, .nav-links li a.active {
    background-color: var(--primary-color);
    color: var(--top-bar-text-hover);
}

.nav-links li a i {
    margin-right: 8px;
}

#language-switcher {
    padding: 8px 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-family: 'Amiri', serif;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

#language-switcher:hover {
    background-color: var(--primary-hover);
}

.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--top-bar-text);
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- RTL Styles --- */
html[dir="rtl"] { font-family: 'Amiri', serif; }
html[dir="rtl"] .logo { margin-right: 0; margin-left: 15px; }
html[dir="rtl"] .nav-links li a i { margin-right: 0; margin-left: 8px; }
html[dir="rtl"] h3, html[dir="rtl"] .service-card, html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] p, html[dir="rtl"] .form-group label, html[dir="rtl"] .contact-info { text-align: right; }
html[dir="rtl"] .contact-info i { margin-right: 0; margin-left: 10px; }
html[dir="rtl"] .form-grid { direction: rtl; }

/* --- PAGE SECTIONS & CONTENT (Universal) --- */
.main-content { padding: 20px; }
.page { display: none; }
.page.active { display: block; }

.hero-section, .about-section, .services-section, .booking-section, .contact-section, .tracking-section {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(5px);
}

h1, h2 { text-align: center; }
h1 { font-size: 2rem; color: var(--text-dark); }
h2 { font-size: 1.8rem; margin-bottom: 30px; color: var(--primary-color); }

.hero-section p, .about-section p, .booking-section p, .tracking-section p {
    color: var(--text-light);
}

.about-section p {
    text-align: justify;
    line-height: 1.6;
}

#booking-form, #tracking-form { max-width: 800px; margin: auto; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.form-group.full-width { grid-column: 1 / -1; }
label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--text-dark); }
input, select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 16px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-dark);
}
select[disabled] { background-color: rgba(233, 236, 239, 0.2); }
input::placeholder { color: var(--text-light); opacity: 0.7; }
select { color: var(--text-dark); }

.loader { border: 4px solid #f3f3f3; border-radius: 50%; border-top: 4px solid var(--primary-color); width: 20px; height: 20px; animation: spin 1s linear infinite; margin-top: 10px; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
button[type="submit"] { width: 100%; padding: 15px; background-color: var(--primary-color); color: white; border: none; border-radius: 6px; font-size: 18px; font-weight: bold; cursor: pointer; transition: background-color 0.3s ease; margin-top: 10px; }
button[type="submit"]:hover { background-color: var(--primary-hover); }
.error { color: var(--error-color); text-align: center; margin-top: 15px; background-color: rgba(255, 0, 0, 0.1); padding: 10px; border-radius: 5px; font-weight: bold; }
.error:empty { display: none; }

/* --- Services Section --- */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; text-align: center; }
.service-card {
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-dark);
}
.service-card h3, .service-card p { color: var(--text-dark); }
.service-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* --- Tracking Section --- */
#result-status-container {
    margin-top: 20px;
    padding: 20px;
    border-radius: 6px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    background-color: rgba(40, 167, 69, 0.2);
    border: 1px solid var(--success-color);
    color: var(--text-dark);
}

/* --- Contact Section --- */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 30px; }
.contact-info p { display: flex; align-items: center; margin-bottom: 15px; color: var(--text-light); }
.contact-info strong { color: var(--text-dark); }
.contact-info i { width: 25px; margin-right: 10px; color: var(--primary-color); }
.contact-map iframe { border-radius: 8px; width: 100%; }

/* --- FORM GRID on medium screens --- */
@media (min-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* --- Responsive Top Bar --- */
@media (max-width: 850px) {
    .top-nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--top-bar-bg);
        flex-direction: column;
        padding: 10px 0;
    }
    .top-nav.open { display: flex; }
    .nav-links { flex-direction: column; width: 100%; }
    .nav-links li a { padding: 15px 20px; justify-content: center; }
    .mobile-nav-toggle { display: block; }
}

/* --- DESKTOP LAYOUT OVERRIDES --- */
@media (min-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
}