:root {
    --primary-color: #2e7d32;
    /* Berber Green */
    --accent-color: #d84315;
    /* Ocre/Terra Cotta */
    --text-color: #333;
    --light-grey: #f5f5f5;
    --border-color: #ddd;
    --font-heading: 'Outfit', sans-serif;
}

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

body {
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
    overflow-x: hidden;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

@media screen and (max-width: 600px) {
    .container {
        padding: 0 15px;
    }

    .main-title {
        font-size: 1.5rem;
    }
}

/* Navigation */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.nav-logo {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-menu a.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 8px;
    margin-left: auto;
    margin-right: 20px;
}

.lang-btn {
    background: transparent;
    border: 2px solid var(--primary-color);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    line-height: 1;
}

.lang-btn:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

.lang-btn.active {
    background: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media screen and (max-width: 768px) {
    .language-switcher {
        margin-right: 15px;
        gap: 5px;
    }

    .lang-btn {
        padding: 4px 8px;
        font-size: 1rem;
    }
}

/* RTL Support for Arabic */
html[dir="rtl"] {
    direction: rtl;
}

/* Better Arabic typography */
html[dir="rtl"] body {
    font-family: system-ui, -apple-system, "Segoe UI", Tahoma, Arial, "Noto Naskh Arabic", "Noto Kufi Arabic", sans-serif;
}

html[dir="rtl"] .nav {
    flex-direction: row-reverse;
}

html[dir="rtl"] .nav-menu {
    flex-direction: row-reverse;
}

html[dir="rtl"] .language-switcher {
    margin-left: 20px;
    margin-right: auto;
}

html[dir="rtl"] .voyage-item {
    flex-direction: row-reverse;
}

html[dir="rtl"] .voyage-content {
    text-align: right;
}

html[dir="rtl"] .voyage-price {
    direction: rtl;
    unicode-bidi: plaintext;
}

@media screen and (max-width: 768px) {
    html[dir="rtl"] .voyage-item h4 {
        line-height: 1.35;
        word-break: break-word;
    }

    html[dir="rtl"] .voyage-price {
        line-height: 1.5;
    }
}

html[dir="rtl"] .why-grid,
html[dir="rtl"] .testimonials-grid {
    direction: rtl;
}

html[dir="rtl"] .credentials {
    flex-direction: row-reverse;
}

@media screen and (max-width: 768px) {
    html[dir="rtl"] .language-switcher {
        margin-left: 15px;
    }
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    z-index: 1001;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Responsive Navigation */
@media screen and (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        /* Use logical properties so it works in both LTR and RTL */
        inset-inline-start: 100%;
        inset-inline-end: auto;
        top: 0;
        flex-direction: column;
        background-color: #fff;
        width: 100%;
        height: 100vh;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        justify-content: center;
        z-index: 1000;
        gap: 30px;
    }

    .nav-menu.active {
        inset-inline-start: 0;
    }

    .nav-menu a {
        font-size: 1.5rem;
    }

    .nav-menu a.active {
        border-bottom: none;
        color: var(--accent-color);
    }

    /* RTL mobile nav: make the list read naturally and slide from the right */
    html[dir="rtl"] .nav-menu {
        inset-inline-start: auto;
        inset-inline-end: 100%;
        text-align: right;
        padding: 90px 24px 28px;
        justify-content: flex-start;
        gap: 16px;
    }

    html[dir="rtl"] .nav-menu.active {
        inset-inline-end: 0;
    }

    html[dir="rtl"] .nav-menu li {
        width: 100%;
    }

    html[dir="rtl"] .nav-menu a {
        display: block;
        width: 100%;
        text-align: right;
        padding: 10px 0;
        line-height: 1.35;
    }

    /* Hamburger Animation */
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
}

/* Extra small screens: make Arabic voyage text more stable */
@media screen and (max-width: 480px) {
    html[dir="rtl"] .voyage-item h4 {
        font-size: 1.2rem;
    }

    html[dir="rtl"] .voyage-teaser {
        font-size: 0.98rem;
        line-height: 1.75;
    }
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    text-align: center;
}

.main-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

/* Filter Section */
.filter-section {
    padding: 30px 0;
    text-align: center;
}

.filter-controls {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    padding: 10px 20px;
    border: 1px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: #fff;
}

/* Hero */
.hero {
    height: 60vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    margin-bottom: 40px;
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

@media screen and (max-width: 600px) {
    .hero-content h2 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 1rem;
    }
}

/* About Section */
.about-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 80px 0;
    margin-bottom: 60px;
}

.about-section h2 {
    text-align: center;
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 40px;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text {
    background: #fff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.about-intro {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-text p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.credentials {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.credential-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--light-grey);
    padding: 12px 20px;
    border-radius: 8px;
    flex: 1;
    min-width: 200px;
}

.credential-icon {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: bold;
}

@media screen and (max-width: 600px) {
    .about-section {
        padding: 50px 0;
    }

    .about-section h2 {
        font-size: 1.8rem;
    }

    .about-text {
        padding: 25px;
    }

    .credentials {
        flex-direction: column;
    }

    .credential-item {
        min-width: 100%;
    }
}

/* Why Choose Us Section */
.why-choose-section {
    padding: 80px 0;
    background: #fff;
}

.why-choose-section h2 {
    text-align: center;
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 50px;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.why-item {
    background: var(--light-grey);
    padding: 35px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.why-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.why-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.why-item h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.why-item p {
    line-height: 1.7;
    color: #555;
}

@media screen and (max-width: 768px) {
    .why-choose-section {
        padding: 50px 0;
    }

    .why-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .why-item {
        padding: 25px;
    }
}

/* Testimonials Section */
.testimonials-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.testimonials-section h2 {
    text-align: center;
    font-size: 2.2rem;
    color: #fff;
    margin-bottom: 50px;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    color: var(--text-color);
}

.testimonial-stars {
    color: #ffc107;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.testimonial-text {
    font-style: italic;
    line-height: 1.7;
    margin-bottom: 20px;
    color: #333;
}

.testimonial-author {
    font-weight: 600;
    color: var(--primary-color);
    text-align: right;
}

@media screen and (max-width: 900px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media screen and (max-width: 600px) {
    .testimonials-section {
        padding: 50px 0;
    }

    .testimonials-section h2 {
        font-size: 1.8rem;
    }

    .testimonial-card {
        padding: 20px;
    }
}

/* Voyages List */
.voyages-list {
    margin-bottom: 60px;
}

.voyage-item {
    display: flex;
    gap: 30px;
    padding: 40px 0;
    border-bottom: 1px dotted var(--border-color);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Safety: never fully hide content if JS animation classes fail to apply */
.voyage-item {
    opacity: 1;
    transform: none;
}

@media screen and (max-width: 768px) {
    .voyage-item {
        flex-direction: column;
        gap: 20px;
        padding: 30px 0;
    }

    .voyage-image {
        flex: 0 0 250px;
        width: 100%;
    }

    /* RTL on mobile should still stack image above text */
    html[dir="rtl"] .voyage-item {
        flex-direction: column;
    }
}


.js-enabled .voyage-item {
    opacity: 1;
    transform: translateY(0);
}

.voyage-image {
    flex: 0 0 300px;
    height: 200px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.voyage-content {
    flex: 1;
    min-width: 0;
}

.voyage-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.voyage-item:hover {
    transform: scale(1.02);
}

.voyage-item h4 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.voyage-price {
    font-size: 1rem;
    margin-bottom: 12px;
}

.voyage-price strong {
    color: #000;
}

.voyage-teaser {
    font-style: italic;
    color: #555;
    max-width: 700px;
    margin-bottom: 20px;
    overflow-wrap: anywhere;
}

@media screen and (max-width: 768px) {
    html[dir="rtl"] .voyage-content,
    html[dir="rtl"] .voyage-item h4,
    html[dir="rtl"] .voyage-teaser,
    html[dir="rtl"] .voyage-price {
        color: var(--text-color);
        visibility: visible;
        opacity: 1;
    }
}

.book-btn {
    background-color: #25d366;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
    font-family: inherit;
    font-size: 0.9rem;
}

.book-btn:hover {
    background-color: #128c7e;
    transform: scale(1.05);
}

.book-btn:active {
    transform: scale(0.95);
}

/* Useful Info */
.useful-info {
    background-color: var(--light-grey);
    padding: 60px 0;
    margin: 0 -20px;
    padding-left: 20px;
    padding-right: 20px;
    border-radius: 8px;
}

.useful-info h3 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.8rem;
    color: #000;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

@media screen and (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
}

.info-item {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.info-item h5 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 600;
}

.info-item a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

/* News */
.news-section {
    padding: 60px 0;
}

.news-section h3 {
    margin-bottom: 30px;
    font-size: 1.5rem;
}

.news-list {
    list-style: none;
}

.news-list li {
    margin-bottom: 15px;
    position: relative;
    padding-left: 20px;
}

.news-list li::before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Footer */
.footer {
    background-color: #263238;
    color: #cfd8dc;
    padding: 60px 0;
    text-align: center;
}

.footer-links {
    list-style: none;
    margin: 20px 0;
}

.footer-links li {
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.copyright {
    margin-top: 30px;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Gallery Grid */
.gallery-intro {
    text-align: center;
    padding: 60px 0 40px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 60px;
}

@media screen and (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media screen and (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

.gallery-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.js-enabled .gallery-item {
    opacity: 0;
    transform: translateY(20px);
}

/* Safety: if IntersectionObserver doesn't run, keep images visible */
.gallery-item {
    opacity: 1;
    transform: none;
}

.gallery-item.visible {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Floating WhatsApp */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

.whatsapp-float img {
    width: 35px;
    height: 35px;
}

/* Responsive */
@media (max-width: 768px) {
    .main-title {
        font-size: 1.4rem;
    }

    .hero-content h2 {
        font-size: 1.8rem;
    }

    .hero {
        height: 40vh;
    }

    .voyage-item {
        flex-direction: column;
    }

    .voyage-image {
        flex: 0 0 auto;
        width: 100%;
    }

    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: block;
    opacity: 1;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    width: 90%;
    max-width: 800px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    color: #fff;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 3001;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.close-modal:hover {
    color: var(--accent-color);
}

.modal-header-img {
    width: 100%;
    height: 350px;
    background-size: cover;
    background-position: center;
}

.modal-content-details {
    padding: 40px;
}

.modal-content-details h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.modal-price {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 25px;
}

.modal-description {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: 35px;
}

.modal-footer {
    text-align: center;
}

.book-btn-large {
    background-color: #25d366;
    color: #fff;
    border: none;
    padding: 18px 40px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.2);
}

.book-btn-large:hover {
    background-color: #128c7e;
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.3);
}

/* Voyage Actions */
.voyage-actions {
    display: flex;
    gap: 12px;
}

.read-more-btn {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    background-color: var(--primary-color);
    color: #fff;
}

@media (max-width: 600px) {
    .modal-content {
        margin: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .modal-header-img {
        height: 250px;
    }

    .modal-content-details {
        padding: 25px;
    }

    .modal-content-details h3 {
        font-size: 1.6rem;
    }
}