@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@400;500;600;700&display=swap');
@import url('./design-tokens.css');

/* Global Variables */

/* CSS Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
    --primary-color-hover: #1e40af; /* A slightly darker blue for hover */
    --primary-color-active: #1e3a8a; /* An even darker blue for active */
  /* Colors */
  --primary-color: #3B82F6; /* Example Primary Color */
  --secondary-color: #10B981; /* Example Secondary Color */
  --accent-color: #F59E0B; /* Example Accent Color */
  --neutral-color: #F3F4F6; /* Example Neutral Color */
  --text-color: #1F2937;
  --text-light: #ffffff;

  /* Typography */
  --font-family-sans: 'Inter', sans-serif; /* Example Font */
  --font-family-serif: 'Playfair Display', serif; /* Example Font */

  /* Spacing */
  --spacing-unit: 8px;

  /* Border Radius */
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 16px;
  --border-radius-full: 9999px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-sans);
  color: var(--text-color);
  background-color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Utility class to prevent scrolling when mobile menu is open */
body.no-scroll {
  overflow: hidden;
  height: 100%;
  position: fixed;
  width: 100%;
}

/* Mobile menu overlay styles */
@media (max-width: 768px) {
  .header.menu-open {
    position: fixed;
    width: 100%;
  }
  
  .header.menu-open nav {
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  }
  
  .header.menu-open nav ul li {
    width: 100%;
    margin-bottom: 8px;
  }
  
  .header.menu-open nav a {
    display: block;
    text-align: center;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  
  .header.menu-open nav a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
  
  .header.menu-open nav a.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  }
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 calc(var(--spacing-unit) * 2);
}

/* Section Basics */
section {
    padding: calc(var(--spacing-unit) * 10) 0;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: calc(var(--spacing-unit) * 5);
    position: relative;
    padding: calc(var(--spacing-unit) * 2) 0;
}

/* Testimonial Badge Styling */
.testimonial-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: calc(var(--spacing-unit) * 0.75);
    background-color: #f8fafc;
    border-radius: calc(var(--border-radius) * 1.5);
    padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 2);
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.testimonial-rating {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit) * 1.5);
}

.rating-stars {
    display: flex;
    color: #ffb700;
    font-size: 1rem;
}

.rating-score {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

.testimonial-source {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit));
}

.google-logo {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}

.google-logo i {
    background: linear-gradient(45deg, #4285f4, #34a853, #fbbc05, #ea4335);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.review-count {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.testimonial-avatars {
    display: flex;
    margin-top: calc(var(--spacing-unit));
}

.avatar-placeholder {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #e2e8f0;
    border: 2px solid #fff;
    margin-right: -8px;
}

.avatar-placeholder:nth-child(1) {
    background-color: #c7d2fe;
}

.avatar-placeholder:nth-child(2) {
    background-color: #bfdbfe;
}

.avatar-placeholder:nth-child(3) {
    background-color: #ddd6fe;
}

@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: calc(var(--spacing-unit) * 2);
    }
    
    .testimonial-badge {
        align-self: stretch;
        align-items: flex-start;
        margin-top: calc(var(--spacing-unit));
    }
}

.section-titles-stacked {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: calc(var(--spacing-unit));
}

.section-tag {
    color: #4a86e8; /* Updated to match the blue color in the reference */
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: calc(var(--spacing-unit) * 0.5);
    display: block;
}

.section-title {
    font-family: var(--font-family-serif);
    font-size: 2.75rem;
    font-weight: 600;
    color: #1e293b; /* Dark slate color from reference */
    line-height: 1.2;
    margin-top: calc(var(--spacing-unit));
}

/* explore-more styles moved to design-tokens.css */

/* Destinations Section */
.destinations-section {
    background-color: #f8fafc; /* Updated to match the light gray in reference */
    padding-top: calc(var(--spacing-unit) * 12);
}

.destinations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: calc(var(--spacing-unit) * 3);
}

.destination-card {
    background-color: #fff;
    border-radius: 24px; /* Larger rounded corners as shown in reference */
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); /* Softer shadow as in reference */
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.destination-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.1);
}

.card-image {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.destination-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: calc(var(--spacing-unit) * 3) calc(var(--spacing-unit) * 4);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    font-family: var(--font-family-serif);
    font-size: 1.6rem;
    margin-bottom: calc(var(--spacing-unit) * 1.5);
    color: #1e293b; /* Dark slate color from reference */
    font-weight: 600;
}

.card-content p {
    color: #64748b;
    margin-bottom: calc(var(--spacing-unit) * 2.5);
    line-height: 1.6;
    font-size: 1rem;
}

.see-more {
    margin-top: auto;
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #4a86e8; /* Updated to match the blue color in the reference */
    gap: calc(var(--spacing-unit));
    text-transform: uppercase;
}

.see-more i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.destination-card:hover .see-more i {
    transform: translateX(5px);
}

/* Packages Section */
.packages-section {
background-color: #fff;
padding-bottom: calc(var(--spacing-unit) * 8);
}

.tabs-container {
margin-top: calc(var(--spacing-unit) * 4);
position: relative;
}

.tabs-wrapper {
position: relative;
padding: 0 calc(var(--spacing-unit) * 2);
}

.tabs {
display: flex;
gap: 0; /* Removed gap to accommodate dividers */
border-bottom: 1px solid #e5e7eb;
margin-bottom: calc(var(--spacing-unit) * 4);
overflow-x: auto;
scrollbar-width: none;
-ms-overflow-style: none;
padding-bottom: calc(var(--spacing-unit) * 2);
scroll-behavior: smooth;
-webkit-overflow-scrolling: touch;
position: relative;
}

.scroll-indicator {
display: none;
}

@media (max-width: 768px) {
.tabs-wrapper {
overflow: hidden;
position: relative;
}
  
.scroll-indicator {
display: flex;
align-items: center;
justify-content: center;
position: absolute;
top: 0;
bottom: 0;
width: calc(var(--spacing-unit) * 4);
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9));
z-index: 2;
cursor: pointer;
transition: opacity 0.3s ease;
}
  
.scroll-indicator i {
font-size: 1.5rem;
color: #4a86e8;
background-color: rgba(255, 255, 255, 0.8);
border-radius: 50%;
padding: 5px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
  
.scroll-left {
padding-left: calc(var(--spacing-unit) * 1);
padding-right: calc(var(--spacing-unit) * 1);
gap: calc(var(--spacing-unit) * 1.5);
}
}

.tabs::-webkit-scrollbar {
display: none;
}

/* Tab Button Styles */
.tab-button {
  color: #64748b;
  font-weight: 600;
  padding: calc(var(--spacing-unit) * 1) calc(var(--spacing-unit) * 2);
  transition: all 0.15s ease;
  white-space: nowrap;
  position: relative;
  background: transparent;
  font-size: 1rem;
  border-radius: var(--border-radius-sm);
  box-shadow: inset 0 0.0625em 0 0 rgba(255, 255, 255, 0.1),
              0 0.0625em 0 0 rgba(0, 0, 0, 0.02),
              0 0.125em 0 0 rgba(0, 0, 0, 0.01);
}

/* Subtle line dividers between tab buttons */
.tab-button:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 25%;
  height: 50%;
  width: 1px;
  background-color: #e5e7eb;
  opacity: 0.7;
}

/* Underline indicator */
.tab-button:before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: #4a86e8; /* Primary color */
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.tab-button.active {
  color: #4a86e8; /* Primary color */
  font-weight: 600;
  box-shadow: inset 0 0.03em 0 0 rgba(255, 255, 255, 0.1),
              0 0.03em 0 0 rgba(74, 134, 232, 0.05),
              0 0.0625em 0 0 rgba(74, 134, 232, 0.04);
  translate: 0 0.03em;
}

.tab-button.active:before {
  transform: scaleX(1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Package Card Carousel Styling */
.carousel-container {
    position: relative;
    overflow: visible; /* Changed from hidden to visible to prevent buttons from being cut off */
    margin: 0 -20px; /* Negative margin to compensate for padding */
    padding: 0 20px; /* Padding to ensure shadow visibility */
}

.package-cards.carousel-items {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    gap: calc(var(--spacing-unit) * 4);
    padding: calc(var(--spacing-unit) * 2) 0;
    -ms-overflow-style: none; /* Hide scrollbar in IE/Edge */
    scrollbar-width: none; /* Hide scrollbar in Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.package-cards.carousel-items::-webkit-scrollbar {
    display: none;
}

/* Premium packages with visible scrollbar */
.package-cards.premium-scroll {
    -ms-overflow-style: auto; /* Show scrollbar in IE/Edge */
    scrollbar-width: thin; /* Show thin scrollbar in Firefox */
    padding-bottom: calc(var(--spacing-unit) * 3); /* Add padding for scrollbar */
}

/* Show scrollbar for Chrome, Safari and Opera */
.package-cards.premium-scroll::-webkit-scrollbar {
    display: block;
    height: 8px;
}

.package-cards.premium-scroll::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.package-cards.premium-scroll::-webkit-scrollbar-thumb {
    background: rgba(74, 134, 232, 0.6); /* Primary color with transparency */
    border-radius: 4px;
}

.package-cards.premium-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(74, 134, 232, 0.8); /* Darker on hover */
}

/* Add hover effect for premium packages */
.package-cards.premium-scroll:hover .package-card {
    filter: brightness(0.9);
    transform: scale(0.98);
}

.package-cards.premium-scroll .package-card:hover {
    filter: brightness(1);
    transform: scale(1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.package-cards .package-card {
    flex: 0 0 auto;
    width: calc(100% - var(--spacing-unit) * 6);
    scroll-snap-align: start;
    transition: transform 0.3s ease, filter 0.3s ease;
}

/* Responsive card sizes for different screens */
@media (min-width: 768px) {
    .package-cards .package-card {
        width: calc(50% - var(--spacing-unit) * 4);
    }
}

@media (min-width: 1024px) {
    .package-cards .package-card {
        width: calc(33.333% - var(--spacing-unit) * 4);
    }
}

@media (min-width: 1440px) {
    .package-cards .package-card {
        width: calc(25% - var(--spacing-unit) * 4);
    }
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    opacity: 0.8;
    transition: all 0.15s ease;
    border: none;
    pointer-events: auto;
    /* 3D layered shadow effect consistent with design system */
    box-shadow: inset 0 0.0625em 0 0 rgba(255, 255, 255, 0.4),
                0 0.0625em 0 0 rgba(0, 0, 0, 0.1),
                0 0.125em 0 0 rgba(0, 0, 0, 0.08),
                0 0.25em 0 0 rgba(0, 0, 0, 0.06),
                0 0.3125em 0 0 rgba(0, 0, 0, 0.04),
                0 0.375em 0 0 rgba(0, 0, 0, 0.02),
                0 0.425em 0.5em 0 rgba(0, 0, 0, 0.1);
}

.carousel-container:hover .carousel-arrow,
.carousel-arrow.force-visible {
    opacity: 1;
}

.carousel-arrow.carousel-prev {
    left: 10px; /* Increased from 5px for better visibility */
}

.carousel-arrow.carousel-next {
    right: 10px; /* Increased from 5px for better visibility */
}

.carousel-arrow.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Carousel navigation wrapper */
.carousel-nav-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none; /* Allow clicks to pass through to underlying content */
    z-index: 5;
}

/* Ensure buttons receive pointer events */
.carousel-arrow {
    pointer-events: auto;
}

/* Ensure arrows are always visible on touch devices */
@media (max-width: 768px) {
    .carousel-arrow {
        opacity: 0.9; /* Always visible on mobile */
        width: 36px; /* Slightly smaller on mobile but still tappable */
        height: 36px;
    }
    
    .carousel-arrow.carousel-prev {
        left: 5px;
    }
    
    .carousel-arrow.carousel-next {
        right: 5px;
    }
    
    /* Ensure buttons are always visible on touch devices */
    .carousel-container:not(:hover) .carousel-arrow {
        opacity: 0.8;
    }
}

.carousel-arrow:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 1);
    box-shadow: inset 0 0.0625em 0 0 rgba(255, 255, 255, 0.5),
                0 0.0625em 0 0 rgba(0, 0, 0, 0.12),
                0 0.125em 0 0 rgba(0, 0, 0, 0.1),
                0 0.25em 0 0 rgba(0, 0, 0, 0.08),
                0 0.3125em 0 0 rgba(0, 0, 0, 0.06),
                0 0.375em 0 0 rgba(0, 0, 0, 0.04),
                0 0.5em 0.75em 0 rgba(0, 0, 0, 0.15);
}

.carousel-arrow:active,
.carousel-arrow.active {
    transform: translateY(-48%);
    box-shadow: inset 0 0.03em 0 0 rgba(255, 255, 255, 0.3),
                0 0.03em 0 0 rgba(0, 0, 0, 0.1),
                0 0.0625em 0 0 rgba(0, 0, 0, 0.08),
                0 0.125em 0 0 rgba(0, 0, 0, 0.06),
                0 0.125em 0 0 rgba(0, 0, 0, 0.04),
                0 0.2em 0 0 rgba(0, 0, 0, 0.02),
                0 0.225em 0.375em 0 rgba(0, 0, 0, 0.1);
}

.carousel-arrow:disabled,
.carousel-arrow.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.carousel-arrow.hidden {
    opacity: 0 !important;
    pointer-events: none;
    visibility: hidden;
}

.package-card {
    background-color: #fff;
    border-radius: 24px; /* Larger rounded corners to match destination cards */
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); /* Softer shadow as in reference */
    transition: all 0.3s ease;
    border: 1px solid #f1f5f9;
}

.package-card:hover {
    transform: scale(1.1, 1.1);
}

/* Removed blur effect to maintain readability when scrolling */
.package-cards:hover > .package-card:not(:hover) {
    transform: scale(0.95, 0.95);
    opacity: 0.9;
}

.package-image {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.package-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.package-badge {
    position: absolute;
    top: calc(var(--spacing-unit) * 2);
    right: calc(var(--spacing-unit) * 2);
    background-color: #f97316; /* Orange from reference */
    color: #fff;
    padding: calc(var(--spacing-unit)) calc(var(--spacing-unit) * 2);
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.package-content {
    padding: calc(var(--spacing-unit) * 3);
}

.package-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a2e42;
    margin-bottom: calc(var(--spacing-unit) * 1.5);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    height: calc(1.5rem * 1.3 * 2);
    padding-bottom: calc(var(--spacing-unit) * 1.5);
    border-bottom: 1px solid #f1f5f9;
}

.package-description {
    margin: calc(var(--spacing-unit) * 2) 0;
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3; /* Standard property for compatibility */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 4.5em; /* Approximately 3 lines of text */
    min-height: 4.5em; /* Ensure consistent height */
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.package-meta {
    display: flex;
    justify-content: space-between;
    padding-top: calc(var(--spacing-unit) * 1.5);
    border-top: 1px solid #e5e7eb;
    font-size: 0.9rem;
    color: #64748b;
}

.package-meta span {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit) * 0.5);
}



.duration-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f8fafc;
    border-radius: var(--border-radius);
    padding: calc(var(--spacing-unit) * 0.5) calc(var(--spacing-unit));
}

.duration-display .days {
    font-weight: 600;
    color: #334155;
    font-size: 1rem;
}

.duration-display .nights {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 2px;
}

.package-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: calc(var(--spacing-unit) * 2);
}

.package-price {
    display: flex;
    flex-direction: column;
}

.price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #4a86e8; /* Updated to match the blue color in the reference */
}

.per-person {
    font-size: 0.8rem;
    color: #64748b;
    display: inline-block;
}

.ratings {
    display: flex;
    align-items: center;
    margin-bottom: calc(var(--spacing-unit) * 1.5);
    padding-bottom: calc(var(--spacing-unit) * 1.5);
    border-bottom: 1px solid #f1f5f9;
}

.stars {
    display: flex;
    color: #f59e0b; /* Amber color for stars */
    margin-right: calc(var(--spacing-unit));
}

.stars i {
    margin-right: 2px;
}

.rating-count {
    font-size: 0.85rem;
    color: #64748b;
}

/* book-now-btn styles moved to design-tokens.css */
.book-now-btn {
    white-space: nowrap;
    min-width: 100px;
    text-transform: uppercase;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .destinations-grid,
    .package-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .explore-more {
        margin-top: calc(var(--spacing-unit) * 2);
    }
}

@media (max-width: 768px) {
    .destinations-grid,
    .package-cards {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
    }
}
