/* Shared typography and form polish for One Stop Travels Solution */
:root {
    --site-font-body: 'Inter', Arial, sans-serif;
    --site-font-heading: 'Playfair Display', Georgia, serif;
    --site-text: #1f2937;
    --site-muted: #64748b;
    --site-accent: #f59e0b;
}

html {
    font-size: 15px;
}

body {
    font-family: var(--site-font-body);
    color: var(--site-text);
    line-height: 1.55;
    letter-spacing: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--site-font-heading);
    letter-spacing: 0;
}

nav a {
    font-family: var(--site-font-body);
    font-size: 1rem !important;
    line-height: 1.25;
}

footer,
footer a,
footer p,
footer li {
    font-size: 0.92rem;
}

input,
select,
textarea,
button {
    font-family: var(--site-font-body);
    letter-spacing: 0;
}

#contact-form {
    font-size: 0.95rem;
}

#contact-form label {
    font-size: 0.86rem;
    line-height: 1.25;
    margin-bottom: 0.4rem;
}

#contact-form input,
#contact-form select,
#contact-form textarea {
    min-height: 3.1rem;
    font-size: 0.95rem;
    line-height: 1.4;
    padding-left: 3.2rem !important;
}

#contact-form textarea {
    min-height: 9.5rem;
    padding-top: 1rem !important;
}

#contact-form .relative > span:first-child {
    left: 1.05rem !important;
    top: 50% !important;
    width: 1.25rem;
    height: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%) !important;
    color: #94a3b8 !important;
    font-size: 1rem !important;
    line-height: 1;
}

#contact-form .contact-field--textarea > span:first-child {
    top: 1.15rem !important;
    transform: none !important;
}

#contact-form select {
    color: #111827;
}

#contact-form button[type="submit"] {
    font-size: 1rem;
    min-height: 3.25rem;
}

@media (min-width: 768px) {
    html {
        font-size: 15.5px;
    }

    nav a {
        font-size: 0.95rem !important;
    }
}

@media (max-width: 767px) {
    nav a {
        font-size: 0.98rem !important;
    }

    #contact-form input,
    #contact-form select,
    #contact-form textarea {
        font-size: 0.92rem;
    }
}

/* Mobile drawer modal overlay - highest stacking layer */
#mobile-menu,
#sidebar {
    z-index: 99999 !important;
    pointer-events: auto !important;
}

#sidebar-overlay {
    z-index: 99998 !important;
}

nav {
    z-index: 9000 !important;
}

footer,
footer a,
#packages-grid a,
#packages-grid button,
.hero-section a,
.hero-section button,
.hero-section select {
    position: relative;
    z-index: 2;
    pointer-events: auto !important;
}

@media (max-width: 767px) {
    #globe-3d-canvas,
    #globe-3d-canvas canvas,
    #packages-wave-canvas,
    #packages-wave-canvas canvas,
    #category-compass-canvas,
    #category-compass-canvas canvas {
        pointer-events: none !important;
    }

    #itinerary-map-container,
    #itinerary-map-container * {
        pointer-events: auto !important;
    }

    .hero-section {
        min-height: auto;
    }
}
/* Homepage mobile fit and tap fixes */
@media (max-width: 767px) {
    .hero-section h1 {
        font-size: 2.15rem !important;
        line-height: 1.05 !important;
        margin-bottom: 0.8rem !important;
    }

    .hero-section p {
        font-size: 0.95rem !important;
        line-height: 1.45 !important;
    }

    .hero-section label {
        font-size: 0.82rem !important;
    }

    .hero-section select,
    .hero-section button {
        font-size: 1rem !important;
        min-height: 3.25rem;
    }

    .hero-section [href*="category.html?cat="] {
        font-size: 0.82rem !important;
        min-height: 2.35rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    #home-search-btn {
        touch-action: manipulation;
    }

    #contact-form button,
    #contact-form input,
    #contact-form select,
    #contact-form textarea,
    #contact-form a {
        pointer-events: auto !important;
        touch-action: manipulation;
    }
}
@media (max-width: 767px) {
    #home-search-btn,
    .home-hotspot-link,
    #home-destination-select,
    #home-duration-select {
        position: relative !important;
        z-index: 10020 !important;
        pointer-events: auto !important;
        touch-action: manipulation;
    }

    #globe-3d-canvas {
        z-index: 0 !important;
    }
}
@media (max-width: 767px) {
    .hero-section .lg\:col-span-5,
    .hero-section .lg\:col-span-5 * {
        pointer-events: none !important;
    }

    .hero-section .lg\:col-span-7,
    .hero-section .lg\:col-span-7 * {
        pointer-events: auto !important;
    }
}
/* Responsive navigation/search repairs */
html,
body {
    width: 100%;
    overflow-x: hidden;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

main,
section,
.container,
.max-w-6xl,
.max-w-7xl {
    max-width: 100%;
}

main a[href="packages.html"],
#error-container a,
#packages-grid a,
#packages-grid button {
    touch-action: manipulation;
}

@media (max-width: 767px) {
    .hero-section {
        min-height: auto;
        padding-top: 5.75rem !important;
        padding-bottom: 2rem !important;
        background-attachment: scroll !important;
    }

    .hero-section > .relative,
    .hero-section .max-w-6xl {
        width: 100%;
        max-width: 100%;
    }

    #home-search-btn,
    #home-destination-select,
    #home-duration-select {
        width: 100% !important;
        min-height: 3.35rem;
        touch-action: manipulation;
    }

    .home-hotspot-link {
        max-width: 100%;
        white-space: normal;
        text-align: center;
    }

    main {
        width: 100%;
        overflow-x: hidden;
    }

    main .container {
        width: 100% !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    #hero-banner {
        height: auto !important;
        min-height: 17rem;
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    #dest-title {
        font-size: 2rem !important;
        line-height: 1.12 !important;
        overflow-wrap: anywhere;
    }

    #dest-desc {
        font-size: 1rem !important;
        line-height: 1.45 !important;
    }

    #destination-hud {
        border-radius: 1.25rem !important;
        padding: 1rem !important;
        align-items: stretch !important;
    }

    main a[href="packages.html"] {
        width: 100%;
        justify-content: center;
        min-height: 2.75rem;
        padding: 0.5rem 0.75rem;
        border-radius: 0.75rem;
        background: #fff7ed;
    }
}

.destination-back-link {
    position: relative;
    z-index: 20;
    pointer-events: auto !important;
}

@media (max-width: 767px) {
    .destination-back-link {
        width: 100%;
        justify-content: center;
        min-height: 2.75rem;
        padding: 0.5rem 0.75rem;
        border-radius: 0.75rem;
        background: #fff7ed;
    }
}

/* Hard mobile search fix: keep animated globe out of the tap stack */
@media (max-width: 767px) {
    .hero-section .lg\:col-span-5 {
        display: none !important;
    }

    .hero-section .lg\:col-span-7 {
        position: relative !important;
        z-index: 10060 !important;
    }

    #home-search-btn {
        display: flex !important;
        position: relative !important;
        z-index: 10070 !important;
        pointer-events: auto !important;
        cursor: pointer !important;
        -webkit-tap-highlight-color: transparent;
    }
}

/* Mobile globe visible, search always above it */
@media (max-width: 767px) {
    .hero-section .lg\:col-span-5 {
        display: flex !important;
        height: 260px !important;
        min-height: 260px !important;
        margin-top: 1.25rem !important;
        position: relative !important;
        z-index: 1 !important;
        pointer-events: none !important;
    }

    .hero-section .lg\:col-span-5 > div:not(#globe-3d-canvas) {
        display: none !important;
    }

    #globe-3d-canvas {
        display: block !important;
        min-height: 240px !important;
        height: 260px !important;
        width: 100% !important;
        pointer-events: none !important;
    }

    #globe-3d-canvas canvas {
        display: block !important;
        width: 100% !important;
        height: 260px !important;
        pointer-events: none !important;
    }

    #home-search-form,
    #home-search-btn,
    #home-destination-select,
    #home-duration-select {
        position: relative !important;
        z-index: 10080 !important;
        pointer-events: auto !important;
    }
}

/* Cross-device responsive and interaction repairs */
html {
    scroll-behavior: smooth;
}

a,
button,
select,
input,
textarea {
    touch-action: manipulation;
}

a,
button {
    min-height: 44px;
    -webkit-tap-highlight-color: rgba(245, 158, 11, 0.18);
}

button {
    cursor: pointer;
}

img,
video,
canvas,
iframe,
table {
    max-width: 100%;
}

.prose,
.tab-panel,
#terms-html,
#price-html,
#inclusion-html {
    overflow-wrap: anywhere;
}

#terms-html,
#price-html,
#inclusion-html {
    overflow-x: auto;
}

nav button {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

nav .max-w-6xl {
    max-width: 100%;
}

@media (max-width: 1023px) {
    footer .grid {
        gap: 2rem !important;
    }
}

@media (max-width: 767px) {
    html {
        font-size: 14.5px;
    }

    body {
        min-width: 0;
    }

    section,
    main,
    footer,
    .max-w-6xl,
    .max-w-7xl,
    .container {
        width: 100%;
        max-width: 100%;
    }

    .px-6,
    nav .max-w-6xl {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .py-20 {
        padding-top: 3.5rem !important;
        padding-bottom: 3.5rem !important;
    }

    .py-24 {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }

    h1 {
        font-size: 2.15rem !important;
        line-height: 1.12 !important;
    }

    h2 {
        font-size: 1.8rem !important;
        line-height: 1.18 !important;
    }

    h3 {
        line-height: 1.22 !important;
    }

    p,
    li,
    a,
    button {
        overflow-wrap: anywhere;
    }

    #mobile-menu,
    #sidebar {
        width: min(18rem, 86vw) !important;
    }

    .hero-section {
        min-height: auto;
        padding-top: 5.75rem !important;
        padding-bottom: 2rem !important;
        background-attachment: scroll !important;
    }

    .hero-section.h-screen {
        height: auto !important;
        min-height: 100svh;
    }

    .hero-section .space-x-4 {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .hero-section .space-x-4 > :not([hidden]) ~ :not([hidden]) {
        margin-left: 0 !important;
    }

    .hero-section .space-x-4 button {
        width: 100%;
        white-space: normal;
    }

    #packages-container {
        padding-top: 3.5rem !important;
        padding-bottom: 3.5rem !important;
    }

    #package-filters {
        justify-content: stretch !important;
    }

    #package-filters button {
        flex: 1 1 calc(50% - 0.75rem);
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        white-space: normal;
    }

    #packages-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 1.25rem !important;
    }

    .package-card {
        transform: none !important;
    }

    #detail-container .mb-6.flex.justify-between {
        align-items: flex-start !important;
    }

    .tab-btn {
        flex: 0 0 auto;
        min-width: max-content;
    }

    .tab-panel table {
        min-width: 36rem;
    }

    #pdf-container,
    #packing-widget .flex.items-center.gap-3,
    #pdf-container .flex.items-center.space-x-4 {
        align-items: flex-start !important;
    }

    .hero {
        min-height: 28rem;
        height: auto !important;
        padding-top: 7rem !important;
        padding-bottom: 4rem !important;
    }

    .hero h1 {
        font-size: 2.2rem !important;
    }

    .hero p {
        font-size: 1rem !important;
        line-height: 1.45 !important;
    }

    .slider-container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .slider {
        gap: 1rem;
    }

    .scs {
        flex: 0 0 calc(100% - 1rem);
        min-width: calc(100% - 1rem) !important;
        height: 240px !important;
    }

    .arrow {
        width: 44px !important;
        height: 44px !important;
    }

    #travel-chatbot-container {
        right: 12px !important;
        bottom: 12px !important;
        left: 12px;
        align-items: flex-end !important;
    }

    #travel-chatbot-container .chat-window {
        width: 100% !important;
        max-width: none !important;
        height: min(520px, calc(100svh - 96px)) !important;
        border-radius: 16px !important;
    }

    footer .flex.space-x-6 {
        flex-wrap: wrap;
        gap: 0.75rem 1rem;
    }

    footer .flex.space-x-6 > :not([hidden]) ~ :not([hidden]) {
        margin-left: 0 !important;
    }
}

@media (max-width: 420px) {
    #package-filters button {
        flex-basis: 100%;
    }

    #home-search-form {
        padding: 1rem !important;
        border-radius: 1rem !important;
    }

    .chat-message {
        max-width: 92% !important;
    }
}

.scroll-top {
    display: none;
    position: fixed;
    right: 1.25rem;
    bottom: 6rem;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    box-shadow: 0 12px 28px rgba(239, 68, 68, 0.28);
    z-index: 8000;
}

.scroll-top:hover,
.scroll-top:focus-visible {
    outline: none;
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(239, 68, 68, 0.34);
}

@media (max-width: 767px) {
    .scroll-top {
        right: 1rem;
        bottom: 5.5rem;
        width: 44px;
        height: 44px;
    }
}

/* Keep destination back navigation above decorative/animated layers. */
.destination-back-link {
    position: relative !important;
    z-index: 30 !important;
    pointer-events: auto !important;
    display: inline-flex !important;
    align-items: center;
    min-height: 48px;
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    isolation: isolate;
}

.destination-back-link::after {
    display: none !important;
}

#category-compass-canvas,
#category-compass-canvas canvas,
#destination-hud {
    pointer-events: none;
}

#packages-grid,
#packages-grid * {
    pointer-events: auto;
}

/* Mobile tap reliability for homepage and package cards */
.glass-shine-hover::after,
.package-card::before,
.package-card::after {
    pointer-events: none !important;
}

#home-search-form,
#home-search-btn,
.home-hotspot-link,
.package-itinerary-link,
#packages-grid .package-card,
#packages-grid .package-card a {
    position: relative !important;
    pointer-events: auto !important;
}

#home-search-form {
    z-index: 30 !important;
}

#home-search-btn,
.home-hotspot-link {
    z-index: 35 !important;
}

.package-itinerary-link {
    z-index: 50 !important;
    min-height: 48px;
    text-decoration: none !important;
    -webkit-tap-highlight-color: rgba(245, 158, 11, 0.25);
}

#packages-grid .package-card img,
#packages-grid .package-card div:not(:has(.package-itinerary-link)) {
    pointer-events: none;
}

@media (max-width: 767px) {
    #home-search-btn,
    .home-hotspot-link,
    .package-itinerary-link {
        transform: none !important;
    }
}

/* Keep package card content tappable; only decorative/media layers ignore taps. */
#packages-grid .package-card,
#packages-grid .package-card div,
#packages-grid .package-card a,
#packages-grid .package-card button {
    pointer-events: auto !important;
}

#packages-grid .package-card img,
#packages-grid .package-card video,
.glass-shine-hover::after {
    pointer-events: none !important;
}

/* Universal Custom Select Dropdown Alignment Fix across Website */
select {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.85rem center !important;
    background-size: 1.1rem 1.1rem !important;
    padding-right: 2.5rem !important;
    line-height: 1.5 !important;
    vertical-align: middle !important;
}

/* Contact Form Light Select Dropdown Arrow */
#contact_destination {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-position: right 0.85rem center !important;
    background-size: 1.1rem 1.1rem !important;
    padding-right: 2.5rem !important;
}
