@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;600;800&display=swap');

:root {
    --primary: #f99c31;
    --dark: #0f172a;
    --light: #f8fafc;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; 
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--light);
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body.modal-open {
    position: fixed;
    width: 100%;
    overflow-y: scroll; 
}

/* --- Layout & Components --- */
.nav-glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.gradient-text {
    background: linear-gradient(90deg, #f99c31, #ff5f00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.trek-card {
    border-radius: 1.5rem;
    overflow: hidden;
    transition: 0.3s;
    border: 1px solid #e2e8f0;
}

.trek-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }

.trek-image-container { height: 250px; position: relative; }
.trek-image-container img { width: 100%; height: 100%; object-fit: cover; }

.badge {
    position: absolute; top: 1rem; left: 1rem;
    background: white; padding: 4px 12px; border-radius: 20px;
    font-size: 12px; font-weight: bold; color: #f99c31;
}

/* --- Modals & Forms --- */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6);
    display: none; align-items: center; justify-content: center; z-index: 1000;
    padding: 1rem;
}

.modal-content {
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: thin;
}

#dynamicTimeline { border-left: 2px solid #fed7aa; }

.btn-primary {
    background: #f99c31; color: white; padding: 10px 20px;
    border-radius: 12px; font-weight: bold; transition: 0.3s;
}

.btn-primary:hover { background: #ff5f00; }

.form-input {
    width: 100%; padding: 12px; border: 1px solid #e2e8f0; border-radius: 12px; outline: none;
}

/* --- Navigation & UI --- */
.mobile-menu {
    display: none; position: absolute; top: 100%; left: 0; width: 100%;
    background: white; padding: 2rem; flex-direction: column; gap: 1rem;
    box-shadow: 0 10px 10px rgba(0,0,0,0.05);
}

.mobile-menu.active { display: flex; }

.whatsapp-float {
    position: fixed; bottom: 2rem; right: 2rem; background: #25d366;
    color: white; width: 60px; height: 60px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; z-index: 90;
    bottom: calc(2rem + env(safe-area-inset-bottom));
}

.back-to-top-btn {
    position: fixed; bottom: 6.5rem; right: 2rem; background: #000;
    color: white; width: 50px; height: 50px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: 0.3s;
}

.back-to-top-btn.show { opacity: 1; visibility: visible; }

/* --- Itinerary Accordion --- */
.itinerary-item { border-bottom: 1px solid #f1f5f9; padding: 10px 0; }
.itinerary-day-btn {
    width: 100%; display: flex; justify-content: space-between; align-items: center;
    padding: 8px 12px; background: #fff; border-radius: 12px; cursor: pointer;
}
.itinerary-day-btn.active { background: #ffedd5; color: #c2410c; }
.itinerary-content {
    max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out; padding: 0 12px;
}
.itinerary-content.show { max-height: 1000px; padding: 12px; }
.chevron-icon { transition: transform 0.3s ease; }
.active .chevron-icon { transform: rotate(180deg); }

/* --- Gallery & Testimonials --- */
.testimonial-card {
    position: relative;
    padding-top: 3rem; /* Space for the quote icon */
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 20px;
    font-size: 5rem;
    color: #fed7aa; /* Light orange */
    font-family: serif;
    line-height: 1;
    opacity: 0.5;
}

.quote-text {
    flex-grow: 1; font-size: 0.95rem; color: #475569; line-height: 1.6; margin-bottom: 1.5rem;
}

.star-rating {
    display: flex; flex-direction: row; gap: 4px; align-items: center; margin-bottom: 1.25rem;
}

.user-avatar { height: 40px; width: 40px; border-radius: 50%; object-fit: cover; }

.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 250px; gap: 1.5rem; }
.gallery-item { position: relative; border-radius: 1.5rem; overflow: hidden; }
.gallery-item.large { grid-column: span 2; grid-row: span 2; }
.gallery-item.tall { grid-row: span 2; }

/* --- Animations --- */
@keyframes scroll-dot {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(15px); opacity: 0; }
}
.animate-scroll-dot { animation: scroll-dot 2s infinite cubic-bezier(0.65, 0.05, 0.36, 1); }

@keyframes bounce-horizontal {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}
.animate-bounce-horizontal {
    animation: bounce-horizontal 2s infinite;
}

/* Style for the "Last Minute" card to make it stand out */
.border-2.border-orange-200 {
    background: linear-gradient(to right, #fffaf5, #ffffff);
}

#timerDisplay {
    font-variant-numeric: tabular-nums; /* Prevents numbers from shifting width */
    letter-spacing: -1px;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .5; }
}

/* --- Footer --- */
footer h4::after {
    content: ''; position: absolute; left: 0; bottom: -8px; width: 30px; height: 2px; background: var(--primary);
}

/* --- MEDIA QUERIES --- */

/* Tablet View */
@media (max-width: 1024px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile Standard */
@media (max-width: 768px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
}

/* Small Mobile / Card Scroll Logic */
@media (max-width: 640px) {
    .grid-3 {
        display: flex; overflow-x: auto; scroll-snap-type: x mandatory; 
        gap: 1rem; padding-bottom: 20px; margin-left: -1rem; margin-right: -1rem;
        padding-left: 1rem; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    }
    .grid-3::-webkit-scrollbar { display: none; }
    .trek-card { min-width: 75%; scroll-snap-align: center; flex-shrink: 0; }
    .trek-image-container { height: 180px; }
    .trek-card .p-6 { padding: 1rem !important; }
    .trek-card h3 { font-size: 1.1rem; line-height: 1.2; }
    .modal-content { padding: 1.5rem !important; }
    .absolute.bottom-10 { display: none; }
    .trek-image-container::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(to top, rgba(15, 23, 42, 0.6) 0%, transparent 40%);
    }
}

/* Extreme Mobile (Single Column Gallery) */
@media (max-width: 480px) {
    .gallery-grid { grid-template-columns: 1fr; }
    .gallery-item.large, .gallery-item.tall { grid-column: span 1; grid-row: span 1; }
}

/* Scroll Reveal Animation Styles */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delay for gallery items (optional but looks great) */
.gallery-item:nth-child(1) { transition-delay: 0.1s; }
.gallery-item:nth-child(2) { transition-delay: 0.2s; }
.gallery-item:nth-child(3) { transition-delay: 0.3s; }
.gallery-item:nth-child(4) { transition-delay: 0.4s; }