/* =============================================
   Smart Tourism KSA - Main Stylesheet
   Color Palette (from presentation):
   - Primary Green: #2d5016 / #1a5c2e
   - Light Green: #c5d5b5 / #d4e4c4
   - Background Sage: #d5dece / #e8ede3
   - Coral/Pink accent: #e8b4a0 / #d4a088
   - White: #ffffff
   - Dark text: #333333
   ============================================= */

/* ---- CSS Variables ---- */
:root {
    --primary: #1a5c2e;
    --primary-dark: #0e3d1c;
    --primary-light: #2d7a3e;
    --secondary: #d4a088;
    --secondary-light: #e8c4b4;
    --accent: #c5975a;
    --bg-main: #e8ede3;
    --bg-card: #ffffff;
    --bg-light: #f0f4ec;
    --bg-dark: #1a3a2a;
    --text-dark: #2c3e2d;
    --text-light: #6b7c6b;
    --text-white: #ffffff;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
    --font-main: 'Poppins', sans-serif;
    --font-display: 'Playfair Display', serif;
}

/* ---- Reset & Base ---- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--bg-main);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-light);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---- Typography ---- */
h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-display);
    color: var(--primary-dark);
    line-height: 1.3;
}

.section-title {
    text-align: center;
    margin-bottom: 10px;
    font-size: 2rem;
    color: var(--primary-dark);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-family: var(--font-display);
    font-style: italic;
    margin-bottom: 40px;
    font-size: 1.1rem;
}

/* ---- Navbar ---- */
.navbar {
    background: var(--bg-card);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    flex-wrap: nowrap;
    gap: 6px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-dark);
    font-family: var(--font-display);
    flex-shrink: 0;
    white-space: nowrap;
}

.nav-logo i {
    color: var(--secondary);
    font-size: 1.5rem;
}

.logo-highlight {
    color: var(--secondary);
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2px;
    flex-wrap: nowrap;
    flex: 1 1 auto;
    justify-content: flex-end;
    min-width: 0;
}

.nav-link {
    color: var(--text-dark);
    padding: 6px 10px;
    font-size: 0.82rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    position: relative;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background: var(--bg-light);
}

.nav-btn {
    background: var(--primary) !important;
    color: var(--text-white) !important;
    padding: 8px 20px !important;
    border-radius: 25px !important;
}

.nav-btn:hover {
    background: var(--primary-dark) !important;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-dark);
    cursor: pointer;
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-card);
    min-width: 220px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    list-style: none;
    padding: 8px 0;
    z-index: 100;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 10px 20px;
    color: var(--text-dark);
    font-size: 0.88rem;
}

.dropdown-menu li a:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.dropdown-menu li a i {
    margin-right: 8px;
    width: 16px;
}

/* ---- Hero Section ---- */
.hero {
    position: relative;
    height: 500px;
    overflow: hidden;
}

.hero-slider {
    position: relative;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
    background-size: cover;
    background-position: center;
}

.hero-slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(26, 60, 42, 0.4), rgba(26, 60, 42, 0.7));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    color: var(--text-white);
    margin-bottom: 15px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-content .btn {
    font-size: 1rem;
    padding: 14px 35px;
}

/* ---- Page Banner ---- */
.page-banner {
    height: 250px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-banner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(26, 60, 42, 0.3), rgba(26, 60, 42, 0.6));
}

.page-banner h1 {
    position: relative;
    z-index: 1;
    color: var(--text-white);
    font-size: 2.5rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}
.page-banner p {
    position: relative;
    z-index: 1;
    color: var(--text-white);
    font-size: 2rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

/* ---- Buttons ---- */
.btn {
    display: inline-block;
    padding: 10px 25px;
    border: none;
    border-radius: 25px;
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: var(--text-white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--text-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--text-white);
}

.btn-secondary:hover {
    background: var(--secondary-light);
    color: var(--text-dark);
    transform: translateY(-2px);
}

.btn-danger {
    background: #c0392b;
    color: var(--text-white);
}

.btn-danger:hover {
    background: #a93226;
    color: var(--text-white);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--text-white);
}

.btn-sm {
    padding: 6px 16px;
    font-size: 0.82rem;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ---- Cards ---- */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 1.15rem;
    margin-bottom: 8px;
    color: var(--primary-dark);
}

.card-text {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.82rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

.card-meta i {
    color: var(--secondary);
}

.card-footer {
    padding: 12px 20px;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Grid Layouts */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

/* ---- Dashboard Cards ---- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    padding: 30px 0;
}

.dash-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: var(--text-dark);
}

.dash-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    color: var(--text-dark);
}

.dash-card-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 2rem;
    color: var(--primary);
    transition: var(--transition);
}

.dash-card:hover .dash-card-icon {
    background: var(--primary);
    color: var(--text-white);
}

.dash-card h3 {
    font-size: 1rem;
    font-family: var(--font-main);
    font-weight: 600;
    color: var(--primary-dark);
}

/* ---- Category Carousel ---- */
.categories-section {
    padding: 60px 0;
}

.category-grid {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 15px;
    scroll-snap-type: x mandatory;
}

.category-card {
    min-width: 200px;
    flex-shrink: 0;
    scroll-snap-align: start;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 25px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 12px;
    display: block;
}

.category-card h4 {
    font-size: 0.95rem;
    font-family: var(--font-main);
    font-weight: 600;
    color: var(--text-dark);
}

/* ---- Forms ---- */
.form-section {
    padding: 50px 0;
}

.form-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px;
}

.form-container.wide {
    max-width: 800px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e8d8;
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 0.9rem;
    color: var(--text-dark);
    background: var(--bg-light);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(26, 92, 46, 0.1);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231a5c2e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 2px solid #e0e8d8;
}

.form-tab {
    padding: 12px 30px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-light);
    border-bottom: 3px solid transparent;
    transition: var(--transition);
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: var(--font-main);
    font-size: 0.95rem;
}

.form-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.form-tab:hover {
    color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ---- Flash Messages ---- */
.flash-message {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin: 15px 0;
    font-size: 0.9rem;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

.flash-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- User Card (Tour Guides / Tourists) ---- */
.user-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 25px;
    text-align: center;
    transition: var(--transition);
}

.user-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.user-card-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid var(--bg-light);
}

.user-card h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.user-card .user-info {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.user-card .user-languages {
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 15px;
}

/* ---- Chat ---- */
.chat-container {
    max-width: 800px;
    margin: 30px auto;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.chat-header {
    background: var(--primary);
    color: var(--text-white);
    padding: 15px 20px;
    font-weight: 600;
}

.chat-messages {
    padding: 20px;
    height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-bubble {
    max-width: 70%;
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 0.9rem;
    position: relative;
}

.chat-bubble.sent {
    background: var(--bg-light);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-bubble.received {
    background: #e8f0e4;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-bubble .bubble-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 4px;
}

.chat-bubble .bubble-time {
    font-size: 0.72rem;
    color: var(--text-light);
    margin-top: 4px;
    text-align: right;
}

.chat-input {
    display: flex;
    padding: 15px 20px;
    border-top: 1px solid #eee;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e8d8;
    border-radius: 25px;
    font-family: var(--font-main);
    font-size: 0.9rem;
}

.chat-input input:focus {
    outline: none;
    border-color: var(--primary);
}

.chat-input button {
    background: var(--primary);
    color: var(--text-white);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
}

.chat-input button:hover {
    background: var(--primary-dark);
}

/* ---- Trip Plan ---- */
.plan-header {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 25px;
}

.plan-action {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 500;
    cursor: pointer;
    font-size: 0.95rem;
}

.plan-action i {
    font-size: 1.2rem;
}

.plan-total {
    text-align: right;
    padding: 20px;
    font-size: 1.1rem;
    font-weight: 600;
}

.plan-total span {
    color: var(--primary);
    font-size: 1.3rem;
}

/* ---- Trip Card ---- */
.trip-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    overflow: hidden;
    margin-bottom: 20px;
    transition: var(--transition);
}

.trip-card:hover {
    box-shadow: var(--shadow-lg);
}

.trip-card-img {
    width: 200px;
    min-height: 180px;
    object-fit: cover;
}

.trip-card-body {
    flex: 1;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.trip-card-info h4 {
    margin-bottom: 8px;
}

.trip-card-info p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 4px;
}

.trip-card-info p span {
    color: var(--primary);
    font-weight: 500;
}

.trip-card-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ---- Request Card ---- */
.request-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.request-card:hover {
    box-shadow: var(--shadow-lg);
}

.request-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.request-card-body {
    padding: 15px;
}

.request-card-body h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.request-card-body .request-date {
    font-size: 0.82rem;
    color: var(--text-light);
}

.request-card-body .request-city {
    font-weight: 600;
    margin: 8px 0;
}

.request-card-actions {
    display: flex;
    gap: 8px;
    padding: 12px 15px;
    border-top: 1px solid #eee;
}

/* ---- Gallery ---- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 30px 0;
}

.gallery-item {
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item .gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 20px 15px 15px;
    color: white;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* ---- Section Spacing ---- */
.section {
    padding: 60px 0;
}

.section-alt {
    background: var(--bg-light);
}

/* ---- Footer ---- */
.footer {
    background: var(--bg-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 50px 0 0;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 30px;
    padding-bottom: 30px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-white);
    font-family: var(--font-display);
    margin-bottom: 15px;
}

.footer-logo i {
    color: var(--secondary);
}

.footer-brand p {
    font-size: 0.88rem;
    line-height: 1.7;
    opacity: 0.8;
}

.footer-links h4 {
    color: var(--text-white);
    font-family: var(--font-main);
    font-size: 1rem;
    margin-bottom: 15px;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 10px;
    font-size: 0.88rem;
}

.footer-links ul li a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links ul li a:hover {
    color: var(--secondary);
}

.footer-links ul li i {
    margin-right: 8px;
    color: var(--secondary);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ---- Responsive ---- */
@media (max-width: 992px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 80%;
        height: calc(100vh - 70px);
        background: var(--bg-card);
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        padding: 12px 15px;
        width: 100%;
    }

    .nav-dropdown .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 20px;
        display: none;
    }

    .nav-dropdown:hover .dropdown-menu,
    .nav-dropdown.open .dropdown-menu {
        display: block;
    }

    .grid-3,
    .grid-4,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        height: 350px;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .trip-card {
        flex-direction: column;
    }

    .trip-card-img {
        width: 100%;
        height: 180px;
    }

    .trip-card-body {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .form-container {
        padding: 25px;
    }

    .section-title {
        font-size: 1.5rem;
    }
}

/* ---- Image Placeholder ---- */
.img-placeholder {
    background: linear-gradient(135deg, var(--bg-light), #d4dece);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 2rem;
}

/* ---- Misc Utilities ---- */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-30 {
    margin-top: 30px;
}

.mb-30 {
    margin-bottom: 30px;
}

.p-20 {
    padding: 20px;
}

.d-flex {
    display: flex;
}

.align-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-10 {
    gap: 10px;
}

.gap-20 {
    gap: 20px;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.1rem;
}

/* =============================================
   Multi-Language Support — RTL & Switcher
   ============================================= */

/* ---- Arabic Font Override ---- */
[lang="ar"] body,
[lang="ar"] h1,
[lang="ar"] h2,
[lang="ar"] h3,
[lang="ar"] h4,
[lang="ar"] h5,
[lang="ar"] p,
[lang="ar"] a,
[lang="ar"] label,
[lang="ar"] input,
[lang="ar"] textarea,
[lang="ar"] select,
[lang="ar"] button {
    font-family: 'Tajawal', sans-serif;
}

/* ---- RTL Base Overrides ---- */
html[dir="rtl"] body {
    text-align: right;
}

html[dir="rtl"] .nav-container {
    flex-direction: row-reverse !important;
}

html[dir="rtl"] .nav-menu {
    flex-direction: row-reverse !important;
}

html[dir="rtl"] .nav-dropdown .dropdown-menu {
    left: auto !important;
    right: 0 !important;
}

html[dir="rtl"] .nav-logo {
    flex-direction: row-reverse !important;
}

html[dir="rtl"] .nav-logo i {
    margin-left: 8px;
    margin-right: 0;
}

html[dir="rtl"] .card-meta {
    flex-direction: row-reverse;
}

html[dir="rtl"] .card-footer {
    flex-direction: row-reverse;
}

html[dir="rtl"] .footer-content {
    direction: rtl;
}

html[dir="rtl"] .footer-links ul {
    text-align: right;
}

html[dir="rtl"] .footer-bottom {
    text-align: center;
}

html[dir="rtl"] .hero-content {
    text-align: center;
}

html[dir="rtl"] .section-title,
html[dir="rtl"] .section-subtitle {
    text-align: center;
}

html[dir="rtl"] .form-group label {
    text-align: right;
}

html[dir="rtl"] .form-control {
    text-align: right;
    direction: rtl;
}

html[dir="rtl"] select.form-control {
    background-position: left 12px center;
    padding-right: 16px;
    padding-left: 36px;
}

html[dir="rtl"] .btn-group {
    flex-direction: row-reverse;
}

html[dir="rtl"] .grid-2,
html[dir="rtl"] .grid-3,
html[dir="rtl"] .grid-4 {
    direction: rtl;
}

html[dir="rtl"] .dashboard-grid {
    direction: rtl;
}

html[dir="rtl"] .category-grid {
    direction: rtl;
}

html[dir="rtl"] .flash-message {
    text-align: right;
}

html[dir="rtl"] .dropdown-menu li a i {
    margin-right: 0;
    margin-left: 8px;
}

/* ---- Language Switcher ---- */
.lang-switcher .lang-toggle {
    font-size: 1.1rem;
    padding: 8px 12px !important;
    color: var(--primary) !important;
    transition: var(--transition);
}

.lang-switcher .lang-toggle:hover {
    color: var(--primary-dark) !important;
    background: var(--bg-light);
}

.lang-switcher .lang-toggle i {
    font-size: 1.15rem;
}

.dropdown-menu-lang {
    min-width: 150px !important;
    right: 0;
    left: auto !important;
}

.dropdown-menu-lang li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
    transition: var(--transition);
}

.dropdown-menu-lang li a:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.dropdown-menu-lang li a.lang-active {
    color: var(--primary);
    font-weight: 700;
    background: var(--bg-light);
}

/* RTL adjustment for lang switcher dropdown */
[dir="rtl"] .dropdown-menu-lang {
    right: auto;
    left: 0 !important;
}

/* =============================================
   Multi-Currency Switcher
   ============================================= */

/* ---- Toggle Button ---- */
.currency-switcher .currency-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 7px 12px !important;
    color: var(--primary) !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    letter-spacing: 0.02em;
}

.currency-switcher .currency-toggle:hover {
    color: var(--primary-dark) !important;
    background: var(--bg-light);
}

.currency-switcher .currency-toggle i {
    font-size: 1rem;
}

.currency-switcher .currency-label {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

/* ---- Dropdown Panel ---- */
.dropdown-menu-currency {
    min-width: 210px !important;
    right: 0;
    left: auto !important;
    padding: 8px 0 !important;
    border-radius: var(--radius) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06) !important;

    /* Override generic dropdown defaults so we control animation ourselves */
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
    pointer-events: none;
}

/* Show on .open class toggled by JS */
.currency-switcher.open .dropdown-menu-currency {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* ---- Dropdown Items ---- */
.dropdown-menu-currency li a.currency-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 0.88rem;
    color: var(--text-dark);
    transition: background 0.15s ease, color 0.15s ease;
    cursor: pointer;
    text-decoration: none;
}

.dropdown-menu-currency li a.currency-option:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.dropdown-menu-currency li a.currency-option.currency-active {
    color: var(--primary);
    font-weight: 700;
    background: linear-gradient(90deg, rgba(26, 92, 46, 0.06), transparent);
}

.dropdown-menu-currency li a.currency-option.currency-active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}

.dropdown-menu-currency li {
    position: relative;
}

/* ---- Flag Icon ---- */
.currency-flag {
    width: 22px !important;
    height: 16px !important;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
    flex-shrink: 0;
}

/* ---- Currency Name + Code ---- */
.currency-name {
    flex: 1;
    font-size: 0.86rem;
}

.currency-code {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
    background: rgba(26, 92, 46, 0.08);
    padding: 2px 7px;
    border-radius: 10px;
    letter-spacing: 0.04em;
}

/* ---- Price span utility ---- */
.price {
    font-weight: 600;
    color: var(--primary-dark);
    transition: opacity 0.25s ease;
}

.price.updating {
    opacity: 0.45;
}

/* ---- RTL adjustments ---- */
[dir="rtl"] .dropdown-menu-currency {
    right: auto;
    left: 0 !important;
}

[dir="rtl"] .dropdown-menu-currency li a.currency-option.currency-active::before {
    left: auto;
    right: 0;
    border-radius: 3px 0 0 3px;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .dropdown-menu-currency {
        position: static;
        opacity: 1 !important;
        visibility: hidden;
        transform: none !important;
        box-shadow: none !important;
        padding-left: 20px;
        display: none;
        pointer-events: auto;
    }

    .currency-switcher.open .dropdown-menu-currency {
        display: block;
        visibility: visible;
    }
}

/* ---- Navbar guide avatar ---- */
.nav-avatar,
nav .nav-avatar,
.navbar .nav-avatar,
.nav-menu .nav-avatar {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 2px solid var(--primary) !important;
    vertical-align: middle !important;
    margin-right: 6px !important;
    flex-shrink: 0 !important;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.7);
    transition: box-shadow 0.2s;
    display: inline-block !important;
}
.nav-user-toggle:hover .nav-avatar {
    box-shadow: 0 0 0 3px var(--primary);
}

/* ---- Home: Place Mini Cards ---- */
.place-mini-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .07);
    transition: box-shadow .25s, transform .25s;
}

.place-mini-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, .13);
    transform: translateY(-3px);
}

.place-mini-img-wrap {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.place-mini-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s;
}

.place-mini-card:hover .place-mini-img-wrap img {
    transform: scale(1.05);
}

.place-mini-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 2.5rem;
}

.place-mini-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    transition: opacity .25s;
}

.place-mini-card:hover .place-mini-overlay {
    opacity: 1;
}

.place-mini-overlay a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, .92);
    color: #1a202c;
    padding: 9px 20px;
    border-radius: 50px;
    font-size: .85rem;
    font-weight: 700;
    text-decoration: none;
    backdrop-filter: blur(4px);
    transition: background .15s;
}

.place-mini-overlay a:hover {
    background: #fff;
}

.place-mini-name {
    padding: 14px 16px;
    font-weight: 700;
    font-size: .98rem;
    color: var(--primary-dark, #1a3c2f);
}
