/* ==========================================================================
   Passikudah Beach Boat Ride - Luxury Tourism Website Theme
   ========================================================================== */

:root {
    /* Color Palette */
    --color-primary: #0A4D68;
    /* Ocean Blue */
    --color-secondary: #1FB6FF;
    /* Turquoise */
    --color-accent: #F4C430;
    /* Golden Sand */
    --color-text-dark: #1F2937;
    /* Dark Slate */
    --color-text-light: #6B7280;
    /* Gray text */
    --color-bg-light: #F9FAFB;
    /* Soft background */
    --color-white: #FFFFFF;

    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Layout */
    --border-radius-lg: 20px;
    --border-radius-md: 12px;
    --border-radius-pill: 50px;

    /* Effects */
    --shadow-soft: 0 10px 30px rgba(10, 77, 104, 0.08);
    --shadow-hover: 0 20px 40px rgba(10, 77, 104, 0.15);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.4);

    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: all 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    max-width: 100%;
}

/* Base Styles */
body {
    font-family: var(--font-body);
    color: var(--color-text-dark);
    line-height: 1.6;
    background-color: var(--color-white);
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

/* Universal: Nothing ever wider than viewport */
*,
*::before,
*::after {
    box-sizing: border-box;
    max-width: 100%;
}

/* Images always fit */
img,
video,
iframe {
    max-width: 100%;
    height: auto;
    display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-primary);
}

.font-poppins {
    font-family: var(--font-heading);
}

a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

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

.page-section {
    padding: 4rem 0;
    /* Reduced padding for mobile */
}

@media (min-width: 992px) {
    .page-section {
        padding: 8rem 0;
        /* Original padding for desktop */
    }
}

.bg-light {
    background-color: var(--color-bg-light) !important;
}

/* Custom Buttons */
.btn-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(10, 77, 104, 0.2);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-primary);
    box-shadow: 0 8px 25px rgba(244, 196, 48, 0.3);
    transform: translateY(-2px);
}

.btn-outline-primary {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline-primary:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-accent {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-primary);
    font-weight: 600;
}

.btn-accent:hover {
    background-color: #E5B420;
    /* Darker accent */
    color: var(--color-primary);
    transform: translateY(-2px);
}

.btn-xl {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* Form Controls */
.premium-input {
    background-color: var(--color-bg-light);
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    transition: var(--transition-smooth);
    font-size: 0.95rem;
}

.premium-input:focus {
    background-color: var(--color-white);
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 4px rgba(10, 77, 104, 0.1) !important;
    transform: translateY(-2px);
}

.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(10, 77, 104, 0.25);
    border-color: var(--color-primary);
}

/* Navigation */
#mainNav {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    background-color: transparent;
    transition: var(--transition-smooth);
    z-index: 1030 !important;
}

/* Fix mobile nav button styling */
#mainNav .navbar-toggler {
    border: none;
    color: white;
    padding: 0.5rem;
}

#mainNav .navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

#mainNav.navbar-shrink .navbar-toggler {
    color: var(--color-primary);
}

#mainNav.navbar-shrink {
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
    background-color: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-soft);
    border-bottom: 1px solid var(--glass-border);
}

#mainNav .navbar-brand {
    color: var(--color-white);
    font-family: var(--font-heading);
}

#mainNav.navbar-shrink .navbar-brand {
    color: var(--color-primary);
}

#mainNav .nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 1rem !important;
    margin: 0 0.2rem;
    transition: var(--transition-smooth);
}

#mainNav .nav-link.active,
#mainNav .nav-link:hover {
    color: var(--color-accent);
}

#mainNav.navbar-shrink .nav-link {
    color: var(--color-text-dark);
}

#mainNav.navbar-shrink .nav-link:hover,
#mainNav.navbar-shrink .nav-link.active {
    color: var(--color-primary);
    font-weight: 600;
}

/* Global Helpers */
.py-6 {
    padding-top: 6rem !important;
    padding-bottom: 6rem !important;
}

.py-7 {
    padding-top: 8rem !important;
    padding-bottom: 8rem !important;
}

.text-shadow-lg {
    color: #F9FAFB;
}

.text-shadow-sm {
    text-shadow: 1px 2px 6px rgba(0, 0, 0, 0.4);
}

/* Hero Section */
header.masthead {
    position: relative;
    height: 100vh;
    min-height: 600px;
    background: url(../img/1300x820.webp) center center no-repeat scroll;
    background-size: cover;
}

header.masthead .hero-overlay-dark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0.6) 100%);
}

header.masthead h1 {
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

header.masthead p {
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
}

.pb-badges .badge {
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
    overflow: hidden;
}

.glass-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

/* Hover Lift Effect for Cards */
.hover-lift {
    transition: var(--transition-smooth);
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover) !important;
}

/* Section Headings */
.section-heading {
    text-align: center;
    margin-bottom: 4rem;
}

.section-heading h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-heading p {
    color: var(--color-text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.section-heading::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--color-accent);
    margin: 1.5rem auto 0;
    border-radius: 2px;
}

/* Custom Nav Pills */
.custom-pills .nav-link {
    color: var(--color-text-dark);
    font-weight: 600;
    background-color: var(--color-white);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: var(--transition-smooth);
}

.custom-pills .nav-link:hover {
    color: var(--color-primary);
}

.custom-pills .nav-link.active {
    background-color: var(--color-primary);
    color: var(--color-white);
    box-shadow: 0 10px 15px -3px rgba(10, 77, 104, 0.3);
}

/* Package Typography */
.package-card {
    transition: var(--transition-smooth);
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.package-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(10, 77, 104, 0.25) !important;
    border-color: rgba(10, 77, 104, 0.1) !important;
}

/* Blog Hover Image Zoom */
.blog-card .hover-zoom {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card:hover .hover-zoom {
    transform: scale(1.08);
}

/* Footer Hover */
.hover-white {
    transition: color 0.3s ease;
}

.hover-white:hover {
    color: var(--color-white) !important;
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: var(--transition-slow);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Initial hero animations */
.fade-up-anim {
    animation: fadeUpAnim 1.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.fade-up-anim-delay {
    opacity: 0;
    animation: fadeUpAnim 1.5s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}

.fade-up-anim-delay-2 {
    opacity: 0;
    animation: fadeUpAnim 1.5s cubic-bezier(0.22, 1, 0.36, 1) 0.6s forwards;
}

.fade-up-anim-delay-3 {
    opacity: 0;
    animation: fadeUpAnim 1.5s cubic-bezier(0.22, 1, 0.36, 1) 0.9s forwards;
}

.zoom-in {
    opacity: 0;
    transform: scale(0.95);
    transition: var(--transition-slow);
}

.zoom-in.visible {
    opacity: 1;
    transform: scale(1);
}

.fade-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: var(--transition-slow);
}

.fade-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-right {
    opacity: 0;
    transform: translateX(40px);
    transition: var(--transition-slow);
}

.fade-right.visible {
    opacity: 1;
    transform: translateX(0);
}

@keyframes fadeUpAnim {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Banner Dividers */
.banner-divider {
    position: relative;
    padding: 10rem 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 77, 104, 0.4);
}

/* Floating Buttons */
.floating-buttons {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 999;
}

.float-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: white;
    transition: var(--transition-smooth);
    text-decoration: none;
}

.float-whatsapp {
    background-color: #25D366;
}

.float-whatsapp:hover {
    background-color: #128C7E;
    color: white;
    transform: scale(1.1);
}

.float-call {
    background-color: var(--color-primary);
}

.float-call:hover {
    background-color: var(--color-secondary);
    color: white;
    transform: scale(1.1);
}

/* --- UX Refinements & Utilities --- */
.hover-lift {
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.1) !important;
}

.hover-zoom {
    overflow: hidden;
}

.hover-zoom>img,
.hover-zoom .bg-image {
    transition: transform 0.6s ease;
}

.hover-zoom:hover>img,
.hover-zoom:hover .bg-image {
    transform: scale(1.05);
}

.py-7 {
    padding-top: 6rem !important;
    padding-bottom: 6rem !important;
}

@media (min-width: 992px) {
    .pb-lg-6 {
        padding-bottom: 5rem !important;
    }
}

/* Custom Nav Pills */
.custom-pills .nav-link {
    color: var(--color-primary);
    font-weight: 500;
    border: 1px solid rgba(10, 77, 104, 0.2);
    transition: all 0.3s ease;
    background: transparent;
}

.custom-pills .nav-link:hover {
    background-color: rgba(10, 77, 104, 0.05);
}

.custom-pills .nav-link.active {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(10, 77, 104, 0.2);
}

/* Slider Overrides */
.testimonialSwiper {
    padding-bottom: 4rem !important;
}

.testimonialSwiper .swiper-slide {
    height: auto;
}

.testimonial-prev,
.testimonial-next {
    transition: all 0.3s ease;
}

.testimonial-prev:hover,
.testimonial-next:hover {
    transform: scale(1.1);
}

/* Mobile Nav Overrides */
@media (max-width: 991.98px) {
    #mainNav {
        background-color: transparent;
        padding: 0.8rem 0;
    }

    #mainNav .navbar-brand {
        color: var(--color-white) !important;
    }

    #mainNav .nav-link {
        color: var(--color-white) !important;
        padding: 0.8rem 1rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    #mainNav .nav-link:hover {
        color: var(--color-accent) !important;
    }

    #mainNav.navbar-shrink {
        background: linear-gradient(135deg, rgba(10, 77, 104, 0.7) 0%, rgba(31, 182, 255, 0.5) 100%) !important;
        /* Premium Water/Glassmorphism effect */
        backdrop-filter: blur(16px) saturate(180%);
        -webkit-backdrop-filter: blur(16px) saturate(180%);
        box-shadow: 0 8px 32px 0 rgba(10, 77, 104, 0.37);
        border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    }

    #mainNav.navbar-shrink .navbar-toggler {
        color: var(--color-white);
    }

    #mainNav .navbar-toggler-icon {
        filter: brightness(0) invert(1);
        /* Makes icon white on dark bg */
    }

    #mainNav .navbar-collapse {
        background-color: var(--color-primary);
        padding: 1rem;
        border-radius: 0 0 var(--border-radius-md) var(--border-radius-md);
        box-shadow: var(--shadow-soft);
    }

    header.masthead h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 576px) {
    .floating-buttons {
        bottom: 20px;
        right: 20px;
    }

    .float-btn {
        width: 50px;
        height: 50px;
        font-size: 25px;
    }
}

/* --- V7 UX Refinements --- */
.backdrop-blur {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.icon-circle {
    transition: all 0.3s ease;
}

.group:hover .icon-circle {
    transform: translateY(-5px) scale(1.1);
    background-color: white !important;
}

/* Ensure remnant classes don't hide items after custom observer removal */
.fade-up,
.fade-left,
.fade-right,
.zoom-in {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Responsive Image Utility */
.img-cover-res {
    width: 100%;
    object-fit: cover;
    border-radius: var(--border-radius-md);
}

@media (max-width: 991.98px) {
    .img-cover-res {
        height: 300px !important;
    }
}

/* ===============================================
   DEFINITIVE MOBILE OVERFLOW FIX (V13)
   Key insight: overflow-x:clip on sections BLOCKS
   iOS touch scrolling. Use html/body overflow guard only.
=============================================== */

/* Fix Bootstrap row negative margins on mobile */
@media (max-width: 991.98px) {
    .row {
        --bs-gutter-x: 1.5rem;
        margin-right: 0;
        margin-left: 0;
    }

    /* Preserve column padding */
    .row>* {
        padding-right: calc(var(--bs-gutter-x) * 0.5);
        padding-left: calc(var(--bs-gutter-x) * 0.5);
    }

    /* Disable AOS horizontal animations on mobile (JS also handles this) */
    [data-aos="fade-left"],
    [data-aos="fade-right"] {
        transform: none !important;
        opacity: 1 !important;
        transition: opacity 0.6s ease !important;
    }

    /* Ensure all images are responsive */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Reduce letter-spacing on small screens */
    .letter-spacing-2 {
        letter-spacing: 0.05em !important;
    }
}

@media (max-width: 576px) {
    .page-section {
        padding: 3rem 0 !important;
    }

    .py-7 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    .swiper {
        overflow: hidden !important;
    }

    #packageTabs {
        flex-wrap: wrap !important;
    }

    #packageTabs .nav-link {
        font-size: 0.85rem !important;
        padding: 0.4rem 0.8rem !important;
    }

    .pb-brand-text {
        font-size: 1rem !important;
    }
}

/* ==========================================================================
   Gallery Section Styling
   ========================================================================== */
.gallery-item {
    transition: var(--transition-smooth);
    cursor: pointer;
    background-color: var(--color-bg-light);
}

.gallery-item img {
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

.gallery-overlay {
    transition: var(--transition-smooth);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 2;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1 !important;
}

.transition-smooth {
    transition: var(--transition-smooth);
}

/* Gallery Slider Overrides */
.gallerySwiper {
    padding-bottom: 1rem !important;
}

.gallerySwiper .swiper-slide {
    height: auto;
}

.gallery-prev,
.gallery-next {
    transition: all 0.3s ease;
}

.gallery-prev:hover,
.gallery-next:hover {
    transform: scale(1.1);
}