:root {
    --primary: #0f172a;
    --secondary: #3b82f6;
    --accent: #f59e0b;
    --whatsapp: #25d366;
    --background: #f1f5f9;
    --surface: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --white: #ffffff;
    --shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --glass: rgba(255, 255, 255, 0.1);
    --radius: 20px;
    --radius-sm: 12px;
}

[data-theme="dark"] {
    --primary: #f8fafc;
    --background: #0f172a;
    --surface: #1e293b;
    --text: #f8fafc;
    --text-light: #94a3b8;
    --shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    --glass: rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--background);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.5;
    transition: background-color 0.3s, color 0.3s;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.animate-fade {
    animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Nav Contained */
#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: transparent;
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid transparent;
}

#main-nav.scrolled {
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] #main-nav.scrolled {
    border-bottom-color: rgba(255, 255, 255, 0.05);
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(10px);
}

.nav-logo {
    color: var(--text);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -1px;
}

.lang-selector {
    display: flex;
    gap: 0.5rem;
    background: var(--background);
    padding: 5px 12px;
    border-radius: 20px;
    align-items: center;
}

.lang-link {
    color: var(--text);
    font-weight: 700;
    font-size: 0.75rem;
    transition: opacity 0.3s;
}

.nav-link {
    color: var(--text) !important;
    font-weight: 700;
    font-size: 0.95rem;
    opacity: 0.7;
    transition: all 0.3s ease;
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
}

.nav-link:hover,
.nav-link.active {
    opacity: 1;
    color: var(--secondary) !important;
}

.nav-link.active {
    background: rgba(59, 130, 246, 0.1);
}

[data-theme="dark"] .nav-link.active {
    background: rgba(59, 130, 246, 0.2);
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.theme-toggle {
    background: var(--background);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

[data-theme="dark"] .theme-toggle {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Main Slider */
.slider-container {
    padding-top: 80px;
}

@media (max-width: 1024px) {
    .slider-container {
        padding-top: 90px;
    }
}

.slider-container .container {
    padding-left: 4rem;
    padding-right: 4rem;
    /* More space for arrows outside */
    max-width: 1300px;
    position: relative;
}

.main-slider {
    height: 60vh;
    border-radius: var(--radius);
    overflow: visible;
    /* Allow arrows to be seen if they clip */
    position: relative;
    width: 100%;
    margin-bottom: 2rem;
}

/* Rounded container for slides since main-slider is now overflow:visible */
.main-slider .swiper-wrapper {
    border-radius: var(--radius);
    overflow: hidden;
}

.swiper-button-next,
.swiper-button-prev {
    color: var(--text);
    background: var(--surface);
    width: 55px;
    height: 55px;
    border-radius: 50%;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.slider-container .swiper-button-next {
    right: -45px !important;
}

.slider-container .swiper-button-prev {
    left: -45px !important;
}

@media (max-width: 1024px) {
    .slider-container .swiper-button-next {
        right: 10px !important;
    }

    .slider-container .swiper-button-prev {
        left: 10px !important;
    }
}

@media (max-width: 768px) {

    .swiper-button-next,
    .swiper-button-prev {
        display: none !important;
    }
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: var(--secondary);
    color: white;
    transform: translateY(-50%);
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 1.2rem;
    font-weight: 800;
}

.slide-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    color: white;
    max-width: 800px;
    width: 90%;
    text-align: center;
    transition: all 0.8s ease;
}

.slide-content h2 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: white;
}

.slide-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .slide-content h2 {
        font-size: 2rem;
    }

    .slide-content p {
        font-size: 1rem;
    }
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Slider Buttons Glass/Gradient */
.slide-content .btn {
    padding: 14px 30px;
    border-radius: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.slide-content .btn-primary {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.85) 0%, rgba(29, 78, 216, 0.95) 100%);
    color: white;
}

.slide-content .btn-whatsapp {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.85) 0%, rgba(22, 163, 74, 0.95) 100%);
    color: white;
}

.slide-content .btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

/* Side Panel Menu for Mobile */
@media (max-width: 1024px) {
    .nav-links {
        display: flex;
        position: fixed;
        top: 0;
        left: -300px;
        width: 300px;
        height: 100vh;
        background: var(--surface);
        flex-direction: column;
        padding: 5rem 2rem;
        box-shadow: 5px 0 20px rgba(0, 0, 0, 0.1);
        z-index: 2000;
        transition: all 0.4s ease;
        border-right: 1px solid rgba(0, 0, 0, 0.05);
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links .nav-link {
        width: 100%;
        padding: 1rem 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .mobile-menu-btn {
        display: block;
        z-index: 2001;
    }

    .home-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .main-slider {
        height: 35vh;
    }

    .fancy-card {
        height: 220px !important;
        --r: 20px;
        /* Further reduced */
        padding: 1.2rem !important;
    }

    .fancy-card h3 {
        font-size: 1.2rem !important;
    }

    .icon-badge {
        width: 45px;
        /* Further reduced */
        height: 45px;
        font-size: 1.2rem;
        top: -6px;
        right: -6px;
    }

    .card-bg {
        /* Adjusted mask center: (45/2) - 6 = 16.5px */
        -webkit-mask: radial-gradient(circle at calc(100% - 16.5px) 16.5px, transparent var(--r), #000 calc(var(--r) + 0.5px));
        mask: radial-gradient(circle at calc(100% - 16.5px) 16.5px, transparent var(--r), #000 calc(var(--r) + 0.5px));
    }
}

@media (max-width: 640px) {
    .home-grid {
        gap: 1rem;
    }

    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

.mobile-padding {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (max-width: 640px) {
    .mobile-padding {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* Fancy Cards */
.fancy-card {
    height: 400px;
    border-radius: var(--radius);
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
    cursor: pointer;
    overflow: visible;
    /* Important for notch effects */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2.5rem;

    --r: 50px;
    /* Radius of the cut */
}

/* Pastel Colors for Icons */
.color-blue .icon-badge i {
    color: #60a5fa;
}

.color-teal .icon-badge i {
    color: #2dd4bf;
}

.color-orange .icon-badge i {
    color: #fb923c;
}

.color-red .icon-badge i {
    color: #f87171;
}

.card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius);
    z-index: 1;
    overflow: hidden;

    /* Concentric Notch Mask - matching badge (-10px pos + 40px rad = 30px center) */
    -webkit-mask: radial-gradient(circle at calc(100% - 30px) 30px, transparent var(--r), #000 calc(var(--r) + 0.5px));
    mask: radial-gradient(circle at calc(100% - 30px) 30px, transparent var(--r), #000 calc(var(--r) + 0.5px));
}

.card-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, transparent 100%);
    z-index: 2;
}

.icon-badge {
    position: absolute;
    top: -10px;
    /* Even closer to card */
    right: -10px;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    font-size: 2.2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1), inset 0 0 20px rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fancy-content {
    position: relative;
    z-index: 5;
}

.fancy-card:hover .icon-badge {
    transform: scale(1.1) rotate(10deg);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
}

.fancy-card:hover .card-bg {
    transform: scale(1.05);
}

.fancy-card h3 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.fancy-card p {
    opacity: 0.8;
    font-size: 1rem;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.btn-primary {
    background: var(--secondary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.btn-whatsapp {
    background: var(--whatsapp);
    color: white;
}

/* Tour Grids */
.tour-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.tour-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.tour-card:hover {
    transform: translateY(-10px);
}

.tour-image {
    height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.tour-content {
    padding: 1.5rem;
}

.tour-price-tag {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: var(--accent);
    color: #0f172a;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 800;
}

.tour-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 1.5rem;
}

/* Footer */
footer {
    background: var(--primary);
    color: var(--background);
    padding: 5rem 0 2rem;
    margin-top: 5rem;
}

[data-theme="dark"] footer {
    background: #020617;
    color: white;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-widget h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-widget h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--secondary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s;
}

.footer-links a:hover {
    color: var(--secondary);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 1.5rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--secondary);
    transform: translateY(-3px);
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem;
    }
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--whatsapp);
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    z-index: 5000;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.mobile-padding {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (max-width: 640px) {
    .mobile-padding {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

.whatsapp-float:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(37, 211, 102, 0.5);
}

.whatsapp-float i {
    font-size: 1.5rem;
}

@media (max-width: 640px) {
    .whatsapp-float span {
        display: none;
    }

    .whatsapp-float {
        padding: 15px;
        right: 1.5rem;
        bottom: 1.5rem;
    }
}

@media (max-width: 640px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

.mobile-contact-widget {
    margin-top: auto;
    padding-top: 2rem;
    display: none;
}

@media (max-width: 1024px) {
    .mobile-contact-widget {
        display: block;
    }
}

/* RTL Support */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .nav-logo {
    letter-spacing: 0;
}

[dir="rtl"] .nav-links {
    flex-direction: row-reverse;
}

[dir="rtl"] .icon-badge {
    right: auto;
    left: -10px;
}

[dir="rtl"] .card-bg {
    -webkit-mask: radial-gradient(circle at 30px 30px, transparent var(--r), #000 calc(var(--r) + 0.5px));
    mask: radial-gradient(circle at 30px 30px, transparent var(--r), #000 calc(var(--r) + 0.5px));
}

[dir="rtl"] .tour-price-tag {
    right: auto;
    left: 1rem;
}

[dir="rtl"] .whatsapp-float {
    right: auto;
    left: 2rem;
    flex-direction: row-reverse;
}

[dir="rtl"] .footer-widget h3::after {
    left: auto;
    right: 0;
}

[dir="rtl"] .footer-links a:hover {
    padding-left: 0;
    padding-right: 5px;
}

[dir="rtl"] .btn i {
    margin-left: 8px;
    margin-right: 0;
}

[dir="rtl"] .slide-content {
    left: auto;
    right: 50%;
    transform: translate(50%, -50%);
}

@media (max-width: 1024px) {
    [dir="rtl"] .nav-links {
        left: auto;
        right: -300px;
        flex-direction: column;
        border-right: none;
        border-left: 1px solid rgba(0, 0, 0, 0.05);
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    }

    [dir="rtl"] .nav-links.active {
        right: 0;
        left: auto;
    }

    [dir="rtl"] .icon-badge {
        right: auto;
        left: -6px;
    }

    [dir="rtl"] .card-bg {
        -webkit-mask: radial-gradient(circle at 16.5px 16.5px, transparent var(--r), #000 calc(var(--r) + 0.5px));
        mask: radial-gradient(circle at 16.5px 16.5px, transparent var(--r), #000 calc(var(--r) + 0.5px));
    }
}

@media (max-width: 640px) {
    [dir="rtl"] .whatsapp-float {
        right: auto;
        left: 1.5rem;
    }
}