:root {
    --primary-teal: #43A5A1;
    --primary-orange: #F48020;
    --dark-text: #333333;
    --light-bg: #f8f9fa;
}

html, body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--dark-text);
    background-color: var(--light-bg);
    max-width: 100%;
    overflow-x: hidden !important;
    position: relative;
}

/* Navbar Styling */
.navbar {
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary-teal) !important;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand span {
    color: var(--primary-orange);
}

.nav-link {
    font-weight: 500;
    color: var(--dark-text) !important;
    padding: 0.5rem 1rem !important;
    transition: color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: x-small !important;
}

.nav-link:hover,
.nav-link:focus,
.nav-item.active .nav-link {
    color: var(--primary-orange) !important;
}

/* Dropdown Mega Menu (Simplified for Bootstrap) */
.dropdown-menu {
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 1rem 0;
    margin-top: 15px;
}

.dropdown-item {
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: rgba(67, 165, 161, 0.1);
    color: var(--primary-teal);
    padding-left: 2rem;
    /* micro animation */
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 80vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
    background-color: #1f2937;
    isolation: isolate;
}

#heroCarousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#heroCarousel .carousel-inner,
#heroCarousel .carousel-item {
    width: 100%;
    height: 100%;
}

#heroCarousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

#heroCarousel .carousel-control-prev,
#heroCarousel .carousel-control-next,
#heroCarousel .carousel-indicators {
    z-index: 3;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.65));
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content .hero-subtitle {
    font-size: 0.875rem;
    letter-spacing: 2px;
}

.hero-content h1 {
    font-size: clamp(2rem, 5vw + 1rem, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: clamp(1rem, 1.5vw + 0.8rem, 1.25rem);
    margin-bottom: 2rem;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Buttons */
.btn-primary-custom {
    background-color: var(--primary-orange);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(244, 128, 32, 0.3);
}

.btn-primary-custom:hover {
    background-color: #d96f18;
    /* Darker orange */
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 128, 32, 0.4);
}

/* Footer */
footer {
    background: linear-gradient(rgba(17, 24, 39, 0.9), rgba(17, 24, 39, 0.95)), url('../images/hero_sri_lanka_1782612061563.png') center/cover no-repeat;
    color: #ddd;
    padding: 4rem 0;
    margin-top: 5rem;
    position: relative;
    border-top: 4px solid var(--primary-teal);
}

footer a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-orange);
}

.font-playfair {
    font-family: 'Playfair Display', serif;
}

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

/* Split Hero Section for Tour Details */
.tour-hero-split {
    min-height: 520px;
}
.tour-hero-image-col {
    min-height: 520px;
    height: 100%;
}
.tour-hero-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 520px;
    background: #ffffff;
    overflow: hidden;
    border-radius: 0 50% 50% 0 / 0 50% 50% 0;
}
.tour-hero-image-el {
    width: 100%;
    height: 100%;
    min-height: 520px;
    object-fit: cover;
    display: block;
}

/* Mobile Responsive & Overflow Prevention */
@media (max-width: 991.98px) {
    html, body {
        width: 100%;
        overflow-x: hidden !important;
    }
    .tour-hero-split, .tour-hero-image-col {
        min-height: auto;
    }
    .tour-hero-image-wrapper {
        border-radius: 0 0 50% 50% / 0 0 25% 25%;
        min-height: 380px;
    }
    .tour-hero-image-el {
        min-height: 380px;
    }
    .navbar {
        max-height: none !important;
        padding: 0.75rem 0;
    }
    .navbar-collapse {
        background: #ffffff;
        padding: 1rem 0;
        max-height: 80vh;
        overflow-y: auto;
        overflow-x: hidden;
    }
    .container, .container-fluid {
        max-width: 100% !important;
        overflow-x: hidden;
    }
    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    img, video {
        max-width: 100% !important;
        height: auto;
    }
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Mobile Hero & Header Adjustments */
@media (max-width: 767.98px) {
    .hero-section {
        height: auto;
        min-height: 400px;
        padding: 3rem 1.25rem;
    }
    .hero-content {
        padding: 0 0.5rem;
    }
    .hero-content .hero-subtitle {
        font-size: clamp(0.62rem, 2.7vw, 0.8rem) !important;
        letter-spacing: clamp(0.2px, 0.6vw, 1.5px) !important;
        white-space: normal !important;
        word-break: break-word;
    }
    .hero-content h1 {
        font-size: 2.1rem !important;
        line-height: 1.25;
        margin-bottom: 0.85rem;
    }
    .hero-content p {
        font-size: 1rem !important;
        line-height: 1.6;
        margin-bottom: 1.5rem;
    }
    h2, .h2, h2[style*="color: var(--primary-teal)"], h2.mb-4, .display-3, .display-4, .display-5, .display-6, .fs-1 {
        font-size: clamp(1.1rem, 4.2vw, 1.45rem) !important;
        line-height: 1.3 !important;
        letter-spacing: -0.3px !important;
        white-space: normal !important;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    .our-story-title {
        font-size: clamp(1.45rem, 5.5vw, 1.85rem) !important;
        line-height: 1.3 !important;
    }
    /* Comprehensive Mobile Gap & Padding Reduction */
    section {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    .py-5 {
        padding-top: 1.75rem !important;
        padding-bottom: 1.75rem !important;
    }
    .my-5 {
        margin-top: 1.75rem !important;
        margin-bottom: 1.75rem !important;
    }
    section.py-5.my-5, .container.py-5.my-5, section.my-5, .container.my-5 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
        margin-top: 1rem !important;
        margin-bottom: 1rem !important;
    }
    .py-4 {
        padding-top: 1.25rem !important;
        padding-bottom: 1.25rem !important;
    }
    .my-4 {
        margin-top: 1.25rem !important;
        margin-bottom: 1.25rem !important;
    }
    .mb-5 {
        margin-bottom: 1.5rem !important;
    }
    .mt-5 {
        margin-top: 1.5rem !important;
    }
    .mb-4 {
        margin-bottom: 1rem !important;
    }
    .p-5 {
        padding: 1.5rem !important;
    }
    .p-4 {
        padding: 1.25rem !important;
    }
    .row.g-5, .row.gy-5 {
        --bs-gutter-y: 1.5rem !important;
    }
    .row.g-4, .row.gy-4 {
        --bs-gutter-y: 1.25rem !important;
    }
    /* Inner Page Header Banners Gap Reduction */
    div[style*="min-height: 380px"], div[style*="min-height: 400px"], div[style*="min-height: 450px"] {
        min-height: 240px !important;
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

@media (max-width: 575.98px) {
    .hero-section {
        min-height: 350px;
        padding: 2.5rem 1rem;
    }
    .hero-content .hero-subtitle {
        font-size: clamp(0.55rem, 2.5vw, 0.75rem) !important;
        letter-spacing: clamp(0.1px, 0.4vw, 1px) !important;
        white-space: normal !important;
        word-break: break-word;
    }
    .hero-content h1 {
        font-size: 1.75rem !important;
        line-height: 1.25;
        margin-bottom: 0.85rem;
    }
    .hero-content p {
        font-size: 0.95rem !important;
        line-height: 1.5;
    }
    h2, .h2, h2[style*="color: var(--primary-teal)"], h2.mb-4, .display-3, .display-4, .display-5, .display-6, .fs-1 {
        font-size: clamp(0.88rem, 3.9vw, 1.2rem) !important;
        line-height: 1.3 !important;
        letter-spacing: -0.4px !important;
        white-space: normal !important;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    .our-story-title {
        font-size: clamp(1.35rem, 6vw, 1.65rem) !important;
        line-height: 1.3 !important;
    }
    /* Comprehensive Small Mobile Gap & Padding Reduction */
    section {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    .py-5 {
        padding-top: 1.35rem !important;
        padding-bottom: 1.35rem !important;
    }
    .my-5 {
        margin-top: 1.25rem !important;
        margin-bottom: 1.25rem !important;
    }
    section.py-5.my-5, .container.py-5.my-5, section.my-5, .container.my-5 {
        padding-top: 1.25rem !important;
        padding-bottom: 1.25rem !important;
        margin-top: 0.75rem !important;
        margin-bottom: 0.75rem !important;
    }
    .py-4 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
    .my-4 {
        margin-top: 1rem !important;
        margin-bottom: 1rem !important;
    }
    .mb-5 {
        margin-bottom: 1.25rem !important;
    }
    .mt-5 {
        margin-top: 1.25rem !important;
    }
    .mb-4 {
        margin-bottom: 0.85rem !important;
    }
    .p-5 {
        padding: 1.25rem !important;
    }
    .p-4 {
        padding: 1rem !important;
    }
    .row.g-5, .row.gy-5 {
        --bs-gutter-y: 1.25rem !important;
    }
    .row.g-4, .row.gy-4 {
        --bs-gutter-y: 1rem !important;
    }
    /* Inner Page Header Banners Gap Reduction */
    div[style*="min-height: 380px"], div[style*="min-height: 400px"], div[style*="min-height: 450px"] {
        min-height: 200px !important;
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
}

/* Fleet Horizontal Swipe Container */
.fleet-swipe-container {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    gap: 1.5rem;
    padding: 0.5rem 0.25rem 1.75rem 0.25rem;
    scrollbar-width: none; /* Firefox */
}

.fleet-swipe-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
}

.fleet-swipe-item {
    flex: 0 0 auto;
    width: 360px;
    max-width: 86vw;
    scroll-snap-align: start;
}

/* Preserve exact line breaks, spaces, and indentation from Admin text areas */
.textarea-formatted, .formatted-text, .overview-text, .content-text, .itinerary-text, .highlights-text, .inclusions-text, .blog-content, .features-text {
    white-space: pre-wrap !important;
    word-break: break-word;
}