@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Luxury Palette */
  --primary: #007CEE; /* Traveloka Blue */
  --secondary: #2C3E50; /* Elegant Navy */
  --accent: #EAB308; /* Premium Gold */
  
  --bg-dark: #000814; /* Deep Ocean Black */
  --bg-card: rgba(15, 23, 42, 0.8);
  
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  
  --glass: rgba(255, 255, 255, 0.02);
  --glass-border: rgba(255, 255, 255, 0.08);
  
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', sans-serif;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Base Components */
.glass {
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.2rem 8%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  transition: var(--transition);
}

nav.scrolled {
  background: rgba(0, 8, 20, 0.9);
  padding: 1rem 8%;
  border-bottom: 1px solid var(--glass-border);
}

.nav-toggle {
    display: none;
    color: white;
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
  opacity: 0.8;
  transition: var(--transition);
}

.nav-links a:hover {
  opacity: 1;
  color: var(--primary);
}

.btn {
  padding: 0.7rem 1.8rem;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
}

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

.btn-primary:hover {
  background: #0069cc;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 124, 238, 0.2);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: white;
}

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

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 8%;
  background-size: cover;
  background-position: center;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0, 8, 20, 0.9), transparent);
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 700px;
}

.hero-content h1 {
  font-size: clamp(3rem, 7vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  font-weight: 800;
}

.hero-content p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 500px;
}

/* Search Widget */
.search-widget {
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 84%;
  padding: 2.5rem;
  border-radius: 24px;
  z-index: 20;
}

.search-form {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 1.5rem;
  align-items: end;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input, .form-group select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  padding: 1rem;
  border-radius: 12px;
  color: white;
  width: 100%;
}

/* Destinations */
.section {
  padding: 10rem 8% 5rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3.5rem;
}

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

.card {
  border-radius: 24px;
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-10px);
}

.card-img-wrapper {
  position: relative;
  height: 260px; /* Increased slightly for better presence */
  overflow: hidden;
  background: #0f172a; /* Fallback color */
}

.card-img-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.5));
  z-index: 4;
  pointer-events: none;
}

.card-badge {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  background: var(--primary);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 10;
}

/* Slideshow Styles */
.card-slider {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), transform 6s linear;
  object-fit: cover;
  object-position: center;
}

.slide.active {
  opacity: 1;
  transform: scale(1.05); /* Subtle Ken Burns effect */
}

/* Fix hover for slider cards */
.card:hover .slide.active {
  transform: scale(1.15);
}

.card-body {
  padding: 2rem;
}

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

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
}

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

.quote-glass {
    bottom: -30px;
    left: -30px;
    max-width: 400px;
}

@media (max-width: 768px) {
    .quote-glass {
        position: relative !important;
        bottom: 0 !important;
        left: 0 !important;
        margin-top: -40px;
        margin-left: 1rem;
        margin-right: 1rem;
        padding: 1.5rem !important;
        max-width: none;
    }
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1rem 2.5rem;
    border-radius: 16px;
    background: #0f172a;
    border: 1px solid var(--glass-border);
    color: #fff;
    z-index: 2000;
    transform: translateX(150%);
    transition: transform 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    box-shadow: var(--shadow);
}

.toast.show { transform: translateX(0); }
.toast.success { border-left: 4px solid #10b981; }
.toast.error { border-left: 4px solid #ef4444; }

/* --- Responsive Design --- */
@media (max-width: 1200px) {
    .section { padding: 8rem 5% 4rem; }
    nav { padding: 1.2rem 5%; }
}

@media (max-width: 1024px) {
    .search-form { grid-template-columns: repeat(2, 1fr); }
    .search-widget { bottom: -120px; width: 90%; }
    .section { padding-top: 14rem; }
    
    footer .grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    nav {
        background: rgba(0, 8, 20, 0.95);
        padding: 1rem 5%;
        backdrop-filter: blur(10px);
    }

    /* Hamburger Menu Button */
    .nav-toggle {
        display: block;
        font-size: 1.5rem;
        cursor: pointer;
        z-index: 1001;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: #000814;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        border-left: 1px solid var(--glass-border);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-auth {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: transparent;
        display: none; /* Hidden unless we want to stack it with links */
        flex-direction: column;
        justify-content: flex-end;
        align-items: center;
        padding-bottom: 5rem;
        transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        pointer-events: none;
    }
    
    /* Simplified mobile auth integration */
    .nav-links.active ~ .nav-auth {
        right: 0;
        display: flex;
        pointer-events: all;
    }

    .nav-auth .btn {
        width: 80%;
        margin: 0.5rem 0 !important;
    }

    .nav-auth-link {
        margin-right: 0 !important;
        margin-bottom: 1rem;
        font-size: 1.1rem;
    }

    /* Hero Section Mobile */
    .hero {
        padding: 0 5%;
        text-align: center;
        justify-content: center;
    }

    .hero::after {
        background: radial-gradient(circle, rgba(0, 8, 20, 0.7) 0%, rgba(0, 8, 20, 0.95) 100%);
    }

    .hero-content h1 {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    .hero-content p {
        margin: 0 auto 2rem;
    }

    .hero-content .btn {
        width: 100%;
        margin: 0.5rem 0 !important;
    }

    /* Search Widget Mobile */
    .search-widget {
        position: relative;
        bottom: 0;
        left: 0;
        transform: none;
        width: 90%;
        margin: -50px auto 0;
        padding: 1.5rem;
    }

    .search-form {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .search-form button {
        width: 100%;
        height: 50px !important;
    }

    /* Sections Mobile */
    .section {
        padding: 5rem 5% 3rem;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        text-align: left;
    }

    .section-head h2 {
        font-size: 1.8rem !important;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    /* Card Adjustments */
    .card-img-wrapper {
        height: 220px;
    }

    .card-body {
        padding: 1.5rem;
    }

    /* Trust Markers Section */
    .section.glass {
        margin: 0 5% 4rem;
        padding: 3rem 1.5rem;
        border-radius: 24px;
    }

    /* Footer Mobile */
    footer {
        padding: 4rem 5% 2rem;
    }

    footer .grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    footer .logo {
        justify-content: center;
    }

    footer div:first-child div {
        justify-content: center;
    }
    /* Detail Page Responsive */
    .hero-mini {
        height: 50vh;
        padding: 3rem 5%;
    }

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

    .detail-card {
        margin-top: -50px;
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }

    .detail-card h3 {
        font-size: 1.4rem;
        margin-bottom: 2rem !important;
    }

    .grid[style*="grid-template-columns: 2fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }

    .itinerary-item {
        gap: 1.2rem;
    }

    .itinerary-day {
        min-width: 60px;
        height: 60px;
        font-size: 1rem;
    }

    div[style*="position: sticky"] {
        position: relative !important;
        top: 0 !important;
    }

    /* Payment Container Mobile */
    .payment-container {
        grid-template-columns: 1fr;
        margin-top: 6rem;
        padding: 0 5%;
    }

    /* Profile Container Mobile */
    .profile-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .profile-sidebar {
        padding: 1.5rem;
    }

    .booking-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .booking-card div[style*="text-align: right"] {
        text-align: left !important;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* Auth Container Tweaks */
    .auth-container {
        padding: 2rem 1.5rem;
    }
    /* Review Container Mobile */
    .review-container {
        margin-top: 6rem;
        padding: 0 5%;
    }

    .review-card {
        padding: 2rem 1.5rem;
    }

    .star-rating {
        font-size: 2rem;
    }

    /* Admin Table Mobile */
    table thead {
        display: none; /* Hide headers on mobile */
    }

    table, tbody, tr, td {
        display: block;
        width: 100%;
    }

    tr {
        margin-bottom: 1.5rem;
        border: 1px solid var(--glass-border);
        border-radius: 16px;
        overflow: hidden;
    }

    td {
        text-align: right;
        padding: 1rem !important;
        position: relative;
    }

    td::before {
        content: attr(data-label);
        position: absolute;
        left: 1rem;
        font-weight: 700;
        color: var(--text-secondary);
        font-size: 0.8rem;
    }

    td:first-child, td:last-child {
        border-radius: 0;
        border: none;
    }
}

@media (max-width: 480px) {
    .hero-content h1 { font-size: 2.1rem; }
}
