/* ============================================================
   GOA TRIP — APP-LIKE FRONTEND EXPERIENCE (v4.0)
   3D effects, smooth transitions, app-style components
   ============================================================ */

/* ===== 3D Card System ===== */
.ota-card-3d {
    transition: transform .45s cubic-bezier(.23,1,.32,1), border-color .25s, box-shadow .45s;
    transform-style: preserve-3d;
    will-change: transform;
}

.ota-card-3d:hover {
    transform: perspective(900px) rotateX(-4deg) rotateY(5deg) scale(1.02) translateZ(8px);
    border-color: var(--ota-primary) !important;
    box-shadow: 0 20px 40px rgba(0, 102, 255, 0.12), 0 0 0 1px rgba(0, 102, 255, 0.08);
}

/* Float animation for hero/stats elements */
@keyframes ota-float {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-8px); }
}

.ota-float { animation: ota-float 5s ease-in-out infinite; }
.ota-float-2 { animation: ota-float 7s ease-in-out infinite; animation-delay: 1.5s; }
.ota-float-3 { animation: ota-float 6s ease-in-out infinite; animation-delay: 3s; }

/* Pulse animation for live indicators */
@keyframes ota-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .4; transform: scale(.8); }
}

@keyframes ota-pulse-ring {
    0%   { transform: scale(1); opacity: .8; }
    100% { transform: scale(2.5); opacity: 0; }
}

.ota-live-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--ota-warning);
    animation: ota-pulse 1.6s ease-in-out infinite;
    position: relative;
}

.ota-live-dot::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: var(--ota-warning);
    animation: ota-pulse-ring 1.6s ease-out infinite;
}

/* Count-up animation for social proof numbers */
@keyframes ota-count-up {
    from { transform: translateY(6px); opacity: 0; }
    to   { transform: translateY(0);   opacity: 1; }
}

.ota-sp-counter {
    animation: ota-count-up .4s ease;
    display: inline-block;
    color: var(--ota-warning);
    font-weight: 700;
    transition: transform .3s ease, opacity .3s ease;
}

/* ===== Page transitions ===== */
.ota-page-enter {
    animation: ota-page-in .3s cubic-bezier(.23,1,.32,1);
}

@keyframes ota-page-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== Social Proof Box ===== */
.ota-social-proof {
    background: linear-gradient(135deg, #FFF8EF 0%, #FFFBF5 100%);
    border: 1px solid #FFE0B2;
    border-radius: var(--ota-radius-lg);
    padding: var(--ota-space-4);
    margin-bottom: var(--ota-space-4);
    display: flex;
    flex-direction: column;
    gap: var(--ota-space-2);
}

.ota-sp-row {
    display: flex;
    align-items: center;
    gap: var(--ota-space-2);
    font-size: var(--ota-text-sm);
    color: var(--ota-gray-800);
    line-height: 1.4;
}

.ota-sp-row--live {
    font-weight: var(--ota-weight-medium);
}

.ota-sp-row--urgent {
    color: var(--ota-warning);
    font-weight: var(--ota-weight-semibold);
}

.ota-sp-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--ota-warning);
    flex-shrink: 0;
    animation: ota-pulse 1.6s ease-in-out infinite;
}

.ota-sp-dot--live {
    background: #E53935;
}

.ota-sp-icon {
    font-size: 14px;
    flex-shrink: 0;
}

/* ===== Gallery ===== */
.ota-gallery {
    border-radius: var(--ota-radius-xl) var(--ota-radius-xl) 0 0;
    overflow: hidden;
    position: relative;
    background: var(--ota-gray-100);
}

.ota-gallery-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    cursor: pointer;
}

.ota-gallery-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .4s ease;
}

.ota-gallery-slide.active { opacity: 1; }

.ota-gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Gallery nav buttons */
.ota-gallery-prev,
.ota-gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px; height: 40px;
    background: rgba(255,255,255,.9);
    border: none;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: all .2s;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    opacity: 0;
}

.ota-gallery-stage:hover .ota-gallery-prev,
.ota-gallery-stage:hover .ota-gallery-next {
    opacity: 1;
}

.ota-gallery-prev { left: 12px; }
.ota-gallery-next { right: 12px; }

.ota-gallery-prev:hover,
.ota-gallery-next:hover {
    background: white;
    transform: translateY(-50%) scale(1.08);
}

/* Dots */
.ota-gallery-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: var(--ota-space-3);
    background: white;
}

.ota-gallery-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--ota-gray-300);
    border: none;
    cursor: pointer;
    transition: all .2s;
    padding: 0;
}

.ota-gallery-dot.active {
    width: 18px;
    border-radius: 3px;
    background: var(--ota-primary);
}

/* Counter overlay */
.ota-gallery-counter {
    position: absolute;
    bottom: 12px; right: 12px;
    background: rgba(0,0,0,.55);
    color: white;
    font-size: var(--ota-text-xs);
    padding: 4px 10px;
    border-radius: var(--ota-radius-full);
    z-index: 5;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* ===== Sticky booking panel ===== */
.ota-booking-sticky {
    position: sticky;
    top: 80px;
    align-self: flex-start;
    background: white;
    border: 1px solid var(--ota-gray-300);
    border-radius: var(--ota-radius-xl);
    box-shadow: 0 8px 32px rgba(0,0,0,.08);
    overflow: hidden;
    transition: box-shadow .3s;
}

.ota-booking-sticky:hover {
    box-shadow: 0 12px 40px rgba(0, 102, 255, 0.1);
}

/* ===== Mobile sticky bottom bar ===== */
.ota-bottom-cta {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: white;
    border-top: 1px solid var(--ota-gray-200);
    padding: var(--ota-space-3) var(--ota-space-4);
    z-index: 50;
    box-shadow: 0 -4px 16px rgba(0,0,0,.08);
}

.ota-bottom-cta-inner {
    max-width: var(--ota-container-xl);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ota-space-4);
}

.ota-mobile-price {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ota-mobile-price-label {
    font-size: var(--ota-text-xs);
    color: var(--ota-gray-600);
    text-transform: uppercase;
    letter-spacing: .05em;
}

.ota-mobile-price-amount {
    font-size: var(--ota-text-xl);
    font-weight: var(--ota-weight-bold);
    color: var(--ota-primary);
    line-height: 1;
}

/* ===== App-style bottom navigation ===== */
.ota-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: white;
    border-top: 1px solid var(--ota-gray-200);
    z-index: 60;
    box-shadow: 0 -2px 12px rgba(0,0,0,.06);
}

.ota-bottom-nav-inner {
    display: flex;
    max-width: 480px;
    margin: 0 auto;
}

.ota-bnav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 10px 4px 8px;
    font-size: 10px;
    color: var(--ota-gray-400);
    text-decoration: none;
    transition: color .15s;
    cursor: pointer;
    border: none;
    background: none;
}

.ota-bnav-item.active {
    color: var(--ota-primary);
}

.ota-bnav-icon {
    font-size: 22px;
    line-height: 1;
}

.ota-bnav-dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--ota-primary);
    opacity: 0;
    transition: opacity .2s;
}

.ota-bnav-item.active .ota-bnav-dot { opacity: 1; }

/* ===== Skeleton loading ===== */
@keyframes ota-skeleton {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.ota-skeleton {
    background: linear-gradient(90deg, var(--ota-gray-100) 25%, var(--ota-gray-50) 50%, var(--ota-gray-100) 75%);
    background-size: 200% 100%;
    animation: ota-skeleton 1.5s ease-in-out infinite;
    border-radius: var(--ota-radius-sm);
}

/* ===== Urgency badge (animated) ===== */
.ota-badge-urgent {
    background: var(--ota-warning-light) !important;
    color: var(--ota-warning) !important;
    animation: ota-urgent-pulse 2s ease-in-out infinite;
}

@keyframes ota-urgent-pulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.04); }
}

/* ===== Map container ===== */
.ota-map-container {
    height: 240px;
    border-radius: var(--ota-radius-lg);
    overflow: hidden;
    background: var(--ota-gray-100);
    border: 1px solid var(--ota-gray-200);
}

.ota-map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ===== Tab system (detail page) ===== */
.ota-detail-tabs {
    display: flex;
    border-bottom: 1px solid var(--ota-gray-200);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: white;
}

.ota-detail-tab {
    flex-shrink: 0;
    padding: var(--ota-space-3) var(--ota-space-5);
    font-size: var(--ota-text-sm);
    font-weight: var(--ota-weight-medium);
    color: var(--ota-gray-600);
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}

.ota-detail-tab.active {
    color: var(--ota-primary);
    border-bottom-color: var(--ota-primary);
}

.ota-detail-tab:hover:not(.active) {
    color: var(--ota-gray-800);
}

.ota-tab-panel { display: none; }
.ota-tab-panel.active { display: block; }

/* ===== Mobile body bottom padding ===== */
@media (max-width: 1023px) {
    body.single {
        padding-bottom: 76px;
    }
    
    .ota-bottom-cta,
    .ota-bottom-nav {
        display: block;
    }
    
    .ota-booking-sticky {
        display: none;
    }
}

/* ===== Smooth scrolling ===== */
html {
    scroll-behavior: smooth;
}

/* ===== Lazy-loaded images ===== */
img[loading="lazy"] {
    transition: opacity .4s ease;
}

img[loading="lazy"]:not([src]) {
    opacity: 0;
}

/* ===== Detail page layout ===== */
.ota-detail-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: var(--ota-space-8);
    align-items: start;
    max-width: var(--ota-container-xl);
    margin: 0 auto;
    padding: var(--ota-space-6) var(--ota-space-4);
}

@media (max-width: 1023px) {
    .ota-detail-layout {
        grid-template-columns: 1fr;
    }
}

/* ===== 3D floating stats (homepage) ===== */
.ota-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ota-space-3);
    margin-top: var(--ota-space-6);
}

.ota-hero-stat {
    display: flex;
    align-items: center;
    gap: var(--ota-space-2);
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--ota-radius-lg);
    padding: var(--ota-space-3) var(--ota-space-4);
    color: white;
    font-size: var(--ota-text-sm);
}

.ota-hero-stat-num {
    font-size: var(--ota-text-xl);
    font-weight: var(--ota-weight-bold);
    line-height: 1;
}
