:root {
    --nx-primary: #0f766e;
    --nx-primary-dark: #115e59;
    --nx-primary-light: #14b8a6;
    --nx-text: #0f172a;
    --nx-muted: #64748b;
    --nx-border: #e2e8f0;
    --nx-bg: #ffffff;
    --nx-bg-soft: #f8fafc;
    --nx-radius: 16px;
    --nx-radius-lg: 24px;
    --nx-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    --nx-transition: all 0.25s ease;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--nx-text);
    background-color: var(--nx-bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img,
video {
    max-width: 100%;
    height: auto;
}

.nx-section-title,
.nx-hero-title,
.nx-card-title {
    overflow-wrap: break-word;
    word-break: break-word;
}

h1, h2, h3, h4, h5, h6, .nx-brand {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.nx-brand {
    font-weight: 700;
    font-family: 'Plus Jakarta Sans', sans-serif;
    letter-spacing: -0.03em;
}

.nx-navbar .nav-link {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    font-size: 0.92rem;
    position: relative;
}

.nx-btn-primary,
.nx-btn-outline {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    letter-spacing: 0;
}

.nx-text-primary { color: var(--nx-primary) !important; }
.nx-muted { color: var(--nx-muted); }
.nx-bg-soft { background-color: var(--nx-bg-soft); }

.lead {
    font-weight: 400;
    font-size: 1.15rem;
    line-height: 1.7;
}

.breadcrumb {
    font-size: 0.9rem;
    font-weight: 500;
}

.breadcrumb a {
    color: var(--nx-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.breadcrumb-item.active {
    color: var(--nx-text);
    font-weight: 600;
}

/* Buttons */
.nx-btn-primary {
    background-color: var(--nx-primary);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 0.75rem 1.75rem;
    font-weight: 600;
    transition: var(--nx-transition);
}

.nx-btn-primary:hover {
    background-color: var(--nx-primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(15, 118, 110, 0.2);
}

.nx-btn-outline {
    background-color: transparent;
    color: var(--nx-primary);
    border: 1.5px solid var(--nx-primary);
    border-radius: 999px;
    padding: 0.75rem 1.75rem;
    font-weight: 600;
    transition: var(--nx-transition);
}

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

/* Navbar */
.nx-navbar {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
}

.nx-brand {
    color: var(--nx-primary);
    font-size: 1.35rem;
    text-decoration: none;
}

.nx-brand-text {
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -0.02em;
    transition: color 0.3s ease;
}

.nx-brand-mark {
    display: inline-flex;
    align-items: center;
}

.nx-brand-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.nx-logo-light { display: none; }
.nx-logo-dark { display: block; }

.nx-brand:hover { color: var(--nx-primary-dark); }

.nx-brand:hover .nx-brand-logo {
    transform: scale(1.05);
}

/* Navbar toggler (hamburger) */
.nx-toggler {
    border: none;
    background: transparent;
    font-size: 1.9rem;
    line-height: 1;
    color: var(--nx-text);
    padding: 0.25rem 0.5rem;
    transition: color 0.3s ease;
}

.nx-toggler:focus {
    box-shadow: none;
}

/* Transparent navbar over the hero */
.nx-navbar-overlay {
    background-color: transparent;
    border-bottom-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* Dark scrim so the white text stays readable over bright hero areas */
.nx-navbar-overlay:not(.scrolled) {
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.55) 0%, rgba(15, 23, 42, 0.25) 65%, rgba(15, 23, 42, 0) 100%);
}

.nx-navbar-overlay:not(.scrolled) .nx-brand-text {
    color: #fff;
}

.nx-navbar-overlay:not(.scrolled) .nx-logo-dark { display: none; }
.nx-navbar-overlay:not(.scrolled) .nx-logo-light { display: block; }

.nx-navbar-overlay:not(.scrolled) .nx-toggler {
    color: #fff;
}

.nx-navbar-overlay:not(.scrolled) .nav-link {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.nx-navbar-overlay:not(.scrolled) .nav-link:hover,
.nx-navbar-overlay:not(.scrolled) .nav-link.active {
    color: #fff;
}

.nx-navbar-overlay:not(.scrolled) .nav-link::after {
    background-color: #fff;
}

.nx-navbar-overlay:not(.scrolled) .nx-brand-text {
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.nx-navbar-overlay.scrolled {
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom-color: rgba(226, 232, 240, 0.8);
}

/* Navbar CTA button */
.nx-btn-cta {
    box-shadow: 0 6px 16px rgba(15, 118, 110, 0.22);
    white-space: nowrap;
}

.nx-btn-cta:hover {
    box-shadow: 0 10px 26px rgba(15, 118, 110, 0.32);
}

.nx-navbar .nav-link:hover,
.nx-navbar .nav-link.active {
    color: var(--nx-primary);
}

/* Hero */
.nx-hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
}

.nx-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.nx-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    animation: nx-hero-kenburns 20s ease-out forwards;
    will-change: transform;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

@keyframes nx-hero-kenburns {
    from { transform: scale(1.0); }
    to { transform: scale(1.05); }
}

.nx-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.45) 0%, rgba(15, 23, 42, 0.25) 50%, rgba(15, 23, 42, 0.55) 100%);
    z-index: -1;
}

.nx-hero-title {
    font-size: clamp(2.6rem, 7vw, 5.2rem);
    font-weight: 600;
    line-height: 1.05;
    margin-bottom: 1.25rem;
}

.nx-hero-subtitle {
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
    opacity: 0.95;
    font-weight: 500;
}

/* Cards */
.nx-card {
    background: var(--nx-bg);
    border: 1px solid var(--nx-border);
    border-radius: var(--nx-radius);
    overflow: hidden;
    transition: var(--nx-transition);
}

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

.nx-card-img {
    aspect-ratio: 16 / 10;
    object-fit: cover;
    width: 100%;
    background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
}

.nx-card-body {
    padding: 1.5rem;
}

.nx-card-title {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.nx-card-meta {
    font-size: 0.875rem;
    color: var(--nx-muted);
}

.nx-card-price {
    color: var(--nx-primary);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Sections */
.nx-section {
    padding: 5rem 0;
}

.nx-section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 0.75rem;
}

.nx-section-subtitle {
    color: var(--nx-muted);
    max-width: 600px;
}

/* WhatsApp float */
.nx-whatsapp-float {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 56px;
    height: 56px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
    z-index: 1030;
    transition: var(--nx-transition);
}

.nx-whatsapp-float:hover {
    transform: scale(1.05);
    color: #fff;
}

/* Footer */
.nx-footer {
    background-color: var(--nx-bg-soft);
    border-top: 1px solid var(--nx-border);
}

.nx-footer-title {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.nx-footer-text {
    color: var(--nx-muted);
    font-size: 0.95rem;
}

.nx-footer-links a {
    color: var(--nx-muted);
    text-decoration: none;
    display: inline-block;
    margin-bottom: 0.5rem;
    transition: var(--nx-transition);
}

.nx-footer-links a:hover {
    color: var(--nx-primary);
}

.nx-footer-divider {
    border-color: var(--nx-border);
}

.nx-social-links a {
    color: var(--nx-muted);
    font-size: 1.1rem;
    margin-left: 1rem;
    transition: var(--nx-transition);
}

.nx-social-links a:hover {
    color: var(--nx-primary);
}

/* Forms */
.nx-form-control {
    border: 1px solid var(--nx-border);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

.nx-form-control:focus {
    border-color: var(--nx-primary);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

/* Itinerary timeline */
.nx-timeline {
    position: relative;
    padding-left: 2rem;
}

.nx-timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    background-color: var(--nx-border);
}

.nx-timeline-item {
    position: relative;
    padding-bottom: 1.75rem;
}

.nx-timeline-item::before {
    content: '';
    position: absolute;
    left: -1.75rem;
    top: 0.35rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--nx-primary);
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--nx-primary);
}

.nx-timeline-time {
    font-weight: 600;
    color: var(--nx-primary);
    font-size: 0.875rem;
}

/* Image placeholder */
.nx-img-placeholder {
    background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--nx-muted);
    min-height: 200px;
}

/* Responsive tweaks */
@media (max-width: 991.98px) {
    .nx-hero { min-height: 80vh; }
    .nx-section { padding: 3.5rem 0; }
}

@media (max-width: 575.98px) {
    .nx-btn-primary,
    .nx-btn-outline {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }

    .nx-whatsapp-float {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
        bottom: 1rem;
        right: 1rem;
    }
}

/* Animations */
@keyframes nx-fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes nx-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
    }
    70% {
        box-shadow: 0 0 0 18px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.nx-hero-title {
    animation: nx-fade-in-up 0.9s ease-out both;
}

.nx-hero-subtitle {
    animation: nx-fade-in-up 0.9s ease-out 0.2s both;
}

.nx-hero .btn {
    animation: nx-fade-in-up 0.9s ease-out 0.4s both;
}

.nx-whatsapp-float {
    animation: nx-pulse 2.5s infinite;
}

/* Scroll reveal */
.nx-animate {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nx-animate.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.nx-animate-delay-1 { transition-delay: 0.1s; }
.nx-animate-delay-2 { transition-delay: 0.2s; }
.nx-animate-delay-3 { transition-delay: 0.3s; }
.nx-animate-delay-4 { transition-delay: 0.4s; }
.nx-animate-delay-5 { transition-delay: 0.5s; }
.nx-animate-delay-6 { transition-delay: 0.6s; }

/* Hover motion */
.nx-card-img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nx-card:hover .nx-card-img {
    transform: scale(1.08);
}

.nx-card {
    transform: translateY(0);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.nx-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
}

.nx-btn-primary .bi,
.nx-btn-outline .bi {
    transition: transform 0.25s ease;
}

.nx-btn-primary:hover .bi,
.nx-btn-outline:hover .bi {
    transform: translateX(3px);
}

.nx-btn-primary:hover,
.nx-btn-outline:hover {
    transform: translateY(-2px);
}

/* Navbar scroll state */
.nx-navbar {
    transition: padding 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.nx-navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
}

/* Desktop nav link underline */
@media (min-width: 992px) {
    .nx-navbar .nav-link::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: 2px;
        width: 0;
        height: 2px;
        background-color: var(--nx-primary);
        transition: width 0.25s ease;
        border-radius: 2px;
    }

    .nx-navbar .nav-link:hover::after,
    .nx-navbar .nav-link.active::after {
        width: 100%;
    }
}

/* Mobile nav styling */
#nxMobileNav .nav-link {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    color: var(--nx-text);
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--nx-border);
    transition: color 0.2s ease, padding-left 0.2s ease;
}

#nxMobileNav .nav-link:hover,
#nxMobileNav .nav-link.active {
    color: var(--nx-primary);
    padding-left: 0.5rem;
}

/* Section header reveal */
.nx-section-title,
.nx-section-subtitle {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.nx-section.is-visible .nx-section-title,
.nx-section.is-visible .nx-section-subtitle {
    opacity: 1;
    transform: translateY(0);
}

/* Icon hover bounce on cards */
.nx-card i.bi {
    transition: transform 0.3s ease;
}

.nx-card:hover i.bi {
    transform: scale(1.15) rotate(-3deg);
}

/* Staggered list items */
.nx-list-animate > li {
    opacity: 0;
    transform: translateX(-12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.nx-list-animate.is-visible > li {
    opacity: 1;
    transform: translateX(0);
}

/* Stat counter emphasis */
.nx-stat-number {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(2rem, 5vw, 2.75rem);
    transition: transform 0.4s ease;
}

.nx-card:hover .nx-stat-number {
    transform: scale(1.08);
}

/* Better responsive spacing & typography */
@media (max-width: 991.98px) {
    .nx-hero { min-height: 80vh; }
    .nx-section { padding: 3.5rem 0; }
    .nx-hero-title { font-size: clamp(2.25rem, 8vw, 3.5rem); }
    .nx-brand { font-size: 1.2rem; }
}

@media (max-width: 767.98px) {
    .nx-section-title { font-size: clamp(1.6rem, 6vw, 2rem); }
    .nx-hero-subtitle { font-size: 1rem; }

    .nx-footer [class*="col-"] {
        margin-bottom: 1.5rem;
    }

    .sticky-top {
        position: relative !important;
        top: auto !important;
    }
}

@media (max-width: 575.98px) {
    .nx-btn-primary,
    .nx-btn-outline {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }

    .nx-whatsapp-float {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
        bottom: 1rem;
        right: 1rem;
    }

    .nx-card-body {
        padding: 1.25rem;
    }

    .nx-card-title {
        font-size: 1.05rem;
    }

    .nx-card-price {
        font-size: 1rem;
    }
}

/* Gallery & filter responsiveness */
@media (max-width: 767.98px) {
    .nx-hero .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .nx-gallery .col-6 {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

.nx-section-detail .nx-hero-title,
.nx-section-detail .nx-hero-subtitle,
.nx-section-detail .nx-hero .btn {
    animation: none;
}

/* Detail page hero: crisp, no zoom blur */
.nx-detail-hero {
    position: relative;
    border-radius: var(--nx-radius);
    overflow: hidden;
}

.nx-detail-hero img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

/* Disable scroll-reveal on detail pages */
.nx-section-detail,
.nx-section-detail .nx-card,
.nx-section-detail .nx-list-animate,
.nx-section-detail .nx-section-title,
.nx-section-detail .nx-section-subtitle,
.nx-section-detail .nx-list-animate > li,
.nx-section-detail .nx-stat-number {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

/* Keep subtle hover lift on detail cards but no entrance animations */
.nx-section-detail .nx-card {
    transition: transform 0.35s ease, box-shadow 0.35s ease !important;
}

.nx-section-detail .nx-card-img {
    transition: transform 0.7s ease !important;
}

/* Thumbnail gallery on tour detail */
.nx-thumb-gallery img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--nx-radius);
    width: 100%;
}

/* Itinerary timeline responsive */
@media (max-width: 575.98px) {
    .nx-timeline {
        padding-left: 1.5rem;
    }

    .nx-timeline::before {
        left: 0.35rem;
    }

    .nx-timeline-item::before {
        left: -1.35rem;
        width: 10px;
        height: 10px;
    }
}

/* Detail page sidebar stays useful on tablet */
@media (max-width: 991.98px) {
    .nx-section-detail .sticky-top {
        position: relative !important;
        top: auto !important;
        margin-top: 2rem;
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
