/**
 * package-master.css - White Theme Compatible - COMPLETE FILE WITH ALL FIXES
 * Uses main.css centralized styles and variables
 * All colors and styles inherited from main.css white theme
 * Card borders and hover effects use main brand colors
 * FIXED: Card alignment, height consistency, and responsive layout issues
 * VERSION: Complete file with all sections included
 */

/* =============================================
 * INHERIT ALL WHITE THEME STYLES FROM MAIN.CSS
 * ============================================= */
body {
  /* Inherit all background and text colors from main.css */
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

/* =============================================
 * CATEGORIES SECTION STYLES - FIXED ALIGNMENT
 * ============================================= */
.tour-categories-section {
  padding: 80px 0;
  background-color: var(--bg-primary);
}

.section-subtitle {
  color: var(--primary-orange);
  letter-spacing: 2px;
  font-size: 0.9rem;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  font-weight: 600;
  display: block;
}

.section-title {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  position: relative;
  padding-bottom: 15px;
  color: var(--text-primary);
}

.section-title:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: var(--primary-orange);
}

.section-description {
  max-width: 700px;
  margin: 0 auto 30px;
  color: var(--text-muted);
}

/* FIXED: Category cards with consistent heights */
.categories-container {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch; /* Ensures all cards stretch to same height */
}

.category-card {
  padding: 30px 20px;
  border-radius: var(--border-radius-xl);
  background-color: var(--bg-primary);
  text-align: center;
  transition: all 0.3s ease;
  height: 100%;
  min-height: 280px; /* FIXED: Minimum height for consistency */
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-gray);
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* FIXED: Distribute content evenly */
}

.category-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-orange);
}

.category-icon {
  font-size: 2.5rem;
  color: var(--primary-orange);
  margin-bottom: 20px;
}

.category-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.category-description {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
  flex-grow: 1; /* FIXED: Allow description to grow and fill space */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.category-link {
  color: var(--primary-orange);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: inline-block;
  margin-top: auto; /* FIXED: Push link to bottom */
}

.category-link:hover {
  color: var(--dark-orange);
  transform: translateX(5px);
}

/* =============================================
 * PACKAGE CARD ENHANCED HOVER EFFECTS - FIXED ALIGNMENT
 * ============================================= */
.package-card {
  border-radius: var(--border-radius-xl);
  overflow: hidden;
  background-color: var(--bg-primary);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  margin-bottom: 30px;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--border-gray);
  position: relative;
  height: 100%; /* FIXED: Full height for consistent card heights */
  display: flex;
  flex-direction: column;
}

.package-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-brand);
  border-color: var(--primary-orange);
  z-index: 10;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--off-white) 100%);
}

.package-card:hover::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, var(--primary-orange), var(--primary-teal));
  border-radius: var(--border-radius-xl);
  z-index: -1;
  opacity: 0.1;
}

.package-card:focus-within {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-teal);
}

/* =============================================
 * TOUR PACKAGES SECTION STYLES - FIXED GRID ALIGNMENT
 * ============================================= */
.tour-packages-section {
  padding: 80px 0;
  background-color: var(--bg-secondary);
}

/* FIXED: Packages container with proper grid layout - 3 CARDS PER ROW */
#packagesContainer {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch; /* FIXED: All cards same height */
  gap: 20px; /* FIXED: Consistent gap between cards */
  margin: 0 -10px; /* Negative margin to compensate for gap */
}

#packagesContainer .col-lg-4,
#packagesContainer .col-md-4,
#packagesContainer .col-sm-6,
#packagesContainer .col-12 {
  display: flex;
  align-items: stretch;
  padding: 0 10px; /* Add padding to maintain gap */
}

/* FIXED: Force 3 cards per row on desktop and large tablets */
#packagesContainer > div {
  flex: 0 0 calc(33.333333% - 20px); /* 3 cards per row with gap */
  max-width: calc(33.333333% - 20px);
}

.filter-controls {
  border-radius: var(--border-radius-xl);
  padding: 20px;
  background-color: var(--bg-primary);
  margin-bottom: 30px;
  border: 1px solid var(--border-gray);
  box-shadow: var(--shadow-sm);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-filter {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-gray);
  border-radius: var(--border-radius-full);
  padding: 8px 15px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-filter:hover, 
.btn-filter.active {
  background-color: var(--primary-orange);
  color: var(--text-white);
  border-color: var(--primary-orange);
  transform: translateY(-2px);
  box-shadow: var(--shadow-orange);
}

.form-select {
  font-size: 0.85rem;
  border-color: var(--border-gray);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.form-select:focus {
  border-color: var(--primary-orange);
  box-shadow: var(--shadow-orange);
}

/* FIXED: Package image with consistent aspect ratio */
.package-image {
  position: relative;
  height: 200px;
  overflow: hidden;
  flex-shrink: 0; /* FIXED: Prevent image from shrinking */
}

.package-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  background-color: var(--bg-tertiary);
}

.package-card:hover .package-image img {
  transform: scale(1.1);
  filter: brightness(1.1) contrast(1.05);
}

.package-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}

.package-category {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 5px 10px;
  background-color: var(--primary-orange);
  color: var(--text-white);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  z-index: 2;
}

/* FIXED: Package info with flexible layout */
.package-info {
  padding: 20px;
  background-color: var(--bg-primary);
  flex-grow: 1; /* FIXED: Allow info section to grow */
  display: flex;
  flex-direction: column;
  position: relative;
}

.package-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
  display: block;
  text-decoration: none;
  transition: color 0.3s ease;
  line-height: 1.4; /* FIXED: Better line height for title */
  min-height: 3.6rem; /* FIXED: Consistent title height for 2-3 lines */
  word-wrap: break-word;
  hyphens: auto;
}

.package-title:hover {
  color: var(--primary-orange);
}

.package-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  align-items: center; /* FIXED: Align meta items */
}

.package-duration {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.package-duration i {
  color: var(--primary-orange);
  font-size: 0.8rem;
}

.package-price {
  color: var(--primary-orange);
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
}

.package-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 20px;
  line-height: 1.6;
  flex-grow: 1; /* FIXED: Allow description to fill available space */
  min-height: 4.5rem; /* FIXED: Consistent description height */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3; /* FIXED: Limit to 3 lines */
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}

.package-features {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
  min-height: 3rem; /* FIXED: Consistent features section height */
}

.package-feature {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.package-feature i {
  color: var(--primary-orange);
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* FIXED: Package actions positioned at bottom */
.package-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: auto; /* FIXED: Push actions to bottom */
  padding-top: 15px;
  border-top: 1px solid var(--border-gray);
}

.btn-view-details {
  background-color: transparent;
  color: var(--primary-orange);
  border: 1px solid var(--primary-orange);
  border-radius: var(--border-radius-full);
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  flex: 1; /* FIXED: Equal width buttons */
  text-align: center;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-view-details:hover {
  background-color: var(--primary-orange);
  color: var(--text-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-orange);
  text-decoration: none;
}

.btn-book-package {
  background-color: var(--primary-orange);
  color: var(--text-white);
  border: 1px solid var(--primary-orange);
  border-radius: var(--border-radius-full);
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  flex: 1; /* FIXED: Equal width buttons */
  text-align: center;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-book-package:hover {
  background-color: var(--dark-orange);
  color: var(--text-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--glow-orange);
  text-decoration: none;
}

.package-code {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: inline-block;
  margin-top: 10px;
  padding: 2px 6px;
  background-color: var(--bg-tertiary);
  border-radius: var(--border-radius-sm);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* =============================================
 * TOUR PLANNING SECTION STYLES
 * ============================================= */
.tour-planning-section {
  padding: 80px 0;
  position: relative;
  background-color: var(--bg-primary);
}

.custom-tour-features {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.custom-tour-features li {
  padding: 8px 0;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.custom-tour-features li i {
  color: var(--primary-orange);
  font-size: 1rem;
  width: 16px;
  text-align: center;
}

.custom-tour-image {
  position: relative;
  border-radius: var(--border-radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.custom-tour-image img {
  width: 100%;
  height: auto;
  display: block;
}

.tour-planning-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to bottom right, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.1));
}

.tour-planning-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background-color: var(--primary-orange);
  color: var(--text-white);
  font-weight: 700;
  box-shadow: var(--shadow-brand);
  animation: pulse 2s infinite;
}

.tour-planning-badge span:first-child {
  font-size: 1.8rem;
  line-height: 1;
}

.tour-planning-badge span:last-child {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 5px;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: var(--shadow-brand);
  }
  50% {
    transform: scale(1.05);
    box-shadow: var(--glow-primary);
  }
  100% {
    transform: scale(1);
    box-shadow: var(--shadow-brand);
  }
}

/* =============================================
 * TESTIMONIAL SECTION STYLES
 * ============================================= */
.testimonial-section {
  padding: 80px 0;
  background-color: var(--bg-secondary);
}

.testimonial-card {
  padding: 30px;
  border-radius: var(--border-radius-xl);
  background-color: var(--bg-primary);
  margin: 15px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-gray);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-teal);
}

.testimonial-content {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
  position: relative;
  flex-grow: 1;
}

.testimonial-content:before {
  content: '\201C';
  font-size: 4rem;
  color: var(--primary-orange);
  opacity: 0.3;
  position: absolute;
  top: -20px;
  left: -15px;
  line-height: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: auto;
}

.testimonial-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-orange);
  flex-shrink: 0;
}

.testimonial-info {
  flex: 1;
}

.testimonial-name {
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text-primary);
  font-size: 1rem;
}

.testimonial-location {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 5px;
}

.testimonial-rating {
  color: var(--primary-orange);
  font-size: 0.9rem;
}

.testimonial-rating i {
  margin-right: 2px;
}

/* =============================================
 * FAQ SECTION STYLES
 * ============================================= */
.faq-section {
  padding: 80px 0;
  background-color: var(--bg-primary);
}

.accordion-item {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-gray);
  margin-bottom: 15px;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

.accordion-button {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-weight: 600;
  padding: 20px;
  box-shadow: none;
  border: none;
  font-size: 1rem;
  text-align: left;
  width: 100%;
  position: relative;
}

.accordion-button:not(.collapsed) {
  color: var(--primary-orange);
  background-color: var(--bg-orange-light);
  box-shadow: none;
}

.accordion-button::after {
  filter: hue-rotate(15deg) saturate(1.5);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23FF5722'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.accordion-button:focus {
  box-shadow: var(--shadow-orange);
  border-color: var(--primary-orange);
}

.accordion-body {
  padding: 20px;
  color: var(--text-secondary);
  background-color: var(--bg-primary);
  border-top: 1px solid var(--border-gray);
  line-height: 1.6;
}

/* =============================================
 * NO RESULTS MESSAGE
 * ============================================= */
#noResultsMessage {
  padding: 50px 20px;
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius-xl);
  margin-top: 20px;
  border: 1px solid var(--border-gray);
  text-align: center;
}

#noResultsMessage i {
  color: var(--primary-orange);
  margin-bottom: 15px;
  font-size: 3rem;
}

#noResultsMessage h3 {
  color: var(--text-primary);
  margin-bottom: 15px;
  font-size: 1.5rem;
}

#noResultsMessage p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 1rem;
}

#resetFilters {
  background-color: var(--primary-orange);
  color: var(--text-white);
  border: none;
  padding: 10px 20px;
  border-radius: var(--border-radius-lg);
  font-weight: 600;
  transition: all 0.3s ease;
}

#resetFilters:hover {
  background-color: var(--dark-orange);
  transform: translateY(-2px);
  box-shadow: var(--shadow-orange);
}

/* =============================================
 * LOADING STYLES
 * ============================================= */
.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid var(--border-gray);
  border-top: 3px solid var(--primary-orange);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

.loading-text {
  color: var(--text-muted);
  text-align: center;
  margin-top: 15px;
  font-size: 0.9rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* =============================================
 * HERO SLIDESHOW STYLES
 * ============================================= */
.hero-slideshow {
  position: relative;
  height: 60vh;
  min-height: 400px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-teal) 100%);
}

.hero-bg-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.hero-bg-layer.active {
  opacity: 0.3;
}

.hero-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(255, 87, 34, 0.3) 0%, transparent 70%);
  pointer-events: none;
}

#hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 0 20px;
}

#hero-content h1 {
  font-size: 3rem;
  font-weight: 900;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

#hero-content p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* =============================================
 * RESPONSIVE MEDIA QUERIES - COMPLETE COVERAGE
 * ============================================= */
@media (max-width: 1399.98px) {
  /* Extra large screens */
  .section-title {
    font-size: 2rem;
  }
  
  .package-title {
    font-size: 1.25rem;
  }
  
  .category-card {
    min-height: 260px;
  }
}

@media (max-width: 1199.98px) {
  /* Large screens - 3 cards per row */
  #packagesContainer > div {
    flex: 0 0 calc(33.333333% - 20px); /* Keep 3 cards per row */
    max-width: calc(33.333333% - 20px);
  }
  
  .package-title {
    font-size: 1.2rem;
    min-height: 3.2rem;
  }
  
  .package-description {
    min-height: 4rem;
  }
  
  .section-title {
    font-size: 1.9rem;
  }
  
  .tour-planning-badge {
    width: 110px;
    height: 110px;
  }
}

@media (max-width: 991.98px) {
  /* Medium screens - 3 cards per row still */
  #packagesContainer > div {
    flex: 0 0 calc(33.333333% - 15px); /* 3 cards per row with smaller gap */
    max-width: calc(33.333333% - 15px);
  }
  
  #packagesContainer {
    gap: 15px;
    margin: 0 -7.5px;
  }
  
  #packagesContainer .col-lg-4,
  #packagesContainer .col-md-4,
  #packagesContainer .col-sm-6,
  #packagesContainer .col-12 {
    padding: 0 7.5px;
  }
  
  .filter-buttons {
    margin-bottom: 15px;
    justify-content: center;
  }
  
  .btn-filter {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
  
  .tour-planning-badge {
    width: 100px;
    height: 100px;
  }
  
  .tour-planning-badge span:first-child {
    font-size: 1.5rem;
  }
  
  .category-card {
    min-height: 260px;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  #hero-content h1 {
    font-size: 2.5rem;
  }
  
  #hero-content p {
    font-size: 1.1rem;
  }
}

@media (max-width: 767.98px) {
  /* Small screens - 2 cards per row */
  #packagesContainer > div {
    flex: 0 0 calc(50% - 15px); /* 2 cards per row on mobile */
    max-width: calc(50% - 15px);
  }
  
  #packagesContainer {
    gap: 15px;
    margin: 0 -7.5px;
  }
  
  .category-card {
    padding: 20px 15px;
    min-height: 240px;
  }
  
  .package-card {
    margin-bottom: 20px;
  }
  
  .package-actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .btn-view-details, 
  .btn-book-package {
    width: 100%;
    text-align: center;
    flex: none;
  }
  
  .testimonial-card {
    padding: 20px;
    margin: 10px 0;
  }
  
  .testimonial-avatar {
    width: 50px;
    height: 50px;
  }
  
  .accordion-button {
    padding: 15px;
    font-size: 0.95rem;
  }
  
  .accordion-body {
    padding: 15px;
    font-size: 0.9rem;
  }
  
  .package-title {
    font-size: 1.2rem;
    min-height: auto;
  }
  
  .package-description {
    min-height: auto;
  }
  
  .section-title {
    font-size: 1.7rem;
  }
  
  .filter-controls {
    padding: 15px;
  }
  
  .filter-buttons {
    justify-content: center;
  }
  
  #hero-content h1 {
    font-size: 2rem;
  }
  
  #hero-content p {
    font-size: 1rem;
  }
  
  .hero-slideshow {
    height: 50vh;
    min-height: 350px;
  }
}

@media (max-width: 575.98px) {
  /* Extra small screens - 1 card per row */
  #packagesContainer > div {
    flex: 0 0 calc(100% - 10px); /* 1 card per row on very small screens */
    max-width: calc(100% - 10px);
  }
  
  #packagesContainer {
    gap: 10px;
    margin: 0 -5px;
  }
  
  #packagesContainer .col-lg-4,
  #packagesContainer .col-md-4,
  #packagesContainer .col-sm-6,
  #packagesContainer .col-12 {
    padding: 0 5px;
  }
  
  .filter-buttons .btn-filter {
    font-size: 0.75rem;
    padding: 5px 10px;
  }
  
  .package-title {
    font-size: 1.1rem;
  }
  
  .section-title {
    font-size: 1.6rem;
  }
  
  .tour-categories-section,
  .tour-packages-section,
  .tour-planning-section,
  .testimonial-section,
  .faq-section {
    padding: 50px 0;
  }
  
  .category-card {
    min-height: 220px;
    padding: 15px 10px;
  }
  
  #packagesContainer {
    gap: 10px;
  }
  
  .package-info {
    padding: 15px;
  }
  
  .package-actions {
    padding-top: 10px;
  }
  
  .filter-controls {
    padding: 10px;
  }
  
  .testimonial-card {
    padding: 15px;
    margin: 5px 0;
  }
  
  .custom-tour-features li {
    padding: 6px 0;
    font-size: 0.9rem;
  }
  
  .tour-planning-badge {
    width: 80px;
    height: 80px;
  }
  
  .tour-planning-badge span:first-child {
    font-size: 1.2rem;
  }
  
  .tour-planning-badge span:last-child {
    font-size: 0.7rem;
  }
  
  #hero-content h1 {
    font-size: 1.8rem;
    margin-bottom: 15px;
  }
  
  #hero-content p {
    font-size: 0.95rem;
    margin-bottom: 20px;
  }
  
  .hero-slideshow {
    height: 45vh;
    min-height: 300px;
  }
  
  .package-image {
    height: 180px;
  }
  
  .package-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
  
  .package-price {
    align-self: flex-end;
  }
}

/* =============================================
 * ADDITIONAL FIXES FOR EDGE CASES
 * ============================================= */

/* Fix for package cards in different screen sizes */
@media (min-width: 576px) and (max-width: 767.98px) {
  #packagesContainer .col-sm-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  #packagesContainer .col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  #packagesContainer .col-lg-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
}

@media (min-width: 1200px) {
  #packagesContainer .col-xl-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
}

/* =============================================
 * PACKAGE GRID SPECIFIC FIXES
 * ============================================= */

/* Ensure all package cards have equal heights in flexbox */
.package-grid-item {
  display: flex;
  align-items: stretch;
}

/* Better spacing for package elements */
.package-info > * {
  margin-bottom: 0.75rem;
}

.package-info > *:last-child {
  margin-bottom: 0;
}

/* Image loading states */
.package-image img:not([src]),
.package-image img[src=""] {
  opacity: 0.5;
  background-color: var(--bg-tertiary);
}

/* Focus states for accessibility */
.package-card:focus-within .package-title {
  color: var(--primary-orange);
}

.category-card:focus-within .category-title {
  color: var(--primary-orange);
}

/* =============================================
 * UTILITY CLASSES FOR PACKAGE LAYOUT
 * ============================================= */

/* Hide elements on specific screen sizes */
.d-none-mobile {
  display: block;
}

@media (max-width: 767.98px) {
  .d-none-mobile {
    display: none !important;
  }
}

.d-block-mobile {
  display: none;
}

@media (max-width: 767.98px) {
  .d-block-mobile {
    display: block !important;
  }
}

/* Text truncation utilities */
.text-truncate-2 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}

.text-truncate-3 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}

/* =============================================
 * PRINT STYLES
 * ============================================= */
@media print {
  .filter-controls,
  .package-actions,
  .btn-filter,
  .hero-slideshow {
    display: none !important;
  }
  
  .package-card {
    break-inside: avoid;
    margin-bottom: 20px;
    box-shadow: none;
    border: 1px solid #ccc;
  }
  
  .package-card:hover {
    transform: none;
    box-shadow: none;
  }
  
  .section-title {
    color: #000 !important;
  }
  
  .package-title {
    color: #000 !important;
  }
}

/* =============================================
 * REDUCED MOTION SUPPORT
 * ============================================= */
@media (prefers-reduced-motion: reduce) {
  .package-card,
  .category-card,
  .btn-filter,
  .btn-view-details,
  .btn-book-package,
  .testimonial-card {
    transition: none;
  }
  
  .package-card:hover,
  .category-card:hover {
    transform: none;
  }
  
  .tour-planning-badge {
    animation: none;
  }
  
  .spinner {
    animation: none;
  }
}

/* =============================================
 * HIGH CONTRAST MODE SUPPORT
 * ============================================= */
@media (prefers-contrast: high) {
  .package-card,
  .category-card {
    border-width: 2px;
    border-color: #000;
  }
  
  .btn-filter,
  .btn-view-details,
  .btn-book-package {
    border-width: 2px;
    font-weight: bold;
  }
  
  .package-category {
    border: 2px solid #000;
  }
}

/* =============================================
 * DARK MODE PREPARATION (IF NEEDED)
 * ============================================= */
@media (prefers-color-scheme: dark) {
  /* Dark mode styles would go here if needed */
  /* Currently using white theme as specified */
}

/* =============================================
 * WEBKIT SCROLLBAR STYLING
 * ============================================= */
.package-description::-webkit-scrollbar {
  width: 4px;
}

.package-description::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
}

.package-description::-webkit-scrollbar-thumb {
  background: var(--primary-orange);
  border-radius: 2px;
}

.package-description::-webkit-scrollbar-thumb:hover {
  background: var(--dark-orange);
}

/* =============================================
 * PERFORMANCE OPTIMIZATIONS
 * ============================================= */
.package-card,
.category-card {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.package-image img {
  will-change: transform;
}

/* =============================================
 * ACCESSIBILITY IMPROVEMENTS
 * ============================================= */
.package-card:focus-within,
.category-card:focus-within {
  outline: 2px solid var(--primary-orange);
  outline-offset: 2px;
}

.btn-view-details:focus-visible,
.btn-book-package:focus-visible,
.btn-filter:focus-visible {
  outline: 2px solid var(--primary-orange);
  outline-offset: 2px;
}

/* Screen reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Add this to your package-master.css file */

/* Active category card styles */
.category-card.active {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 2px solid var(--primary-color, #007bff);
}

.category-card.active .category-icon {
    color: var(--primary-color, #007bff);
    transform: scale(1.1);
}

.category-card.active .category-title {
    color: var(--primary-color, #007bff);
    font-weight: 600;
}

.category-card.active .category-link {
    background: var(--primary-color, #007bff);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.category-card.active .category-link:hover {
    background: var(--primary-dark, #0056b3);
    transform: translateX(5px);
}

/* Filter button active state */
.btn-filter.active {
    background: var(--primary-color, #007bff) !important;
    color: white !important;
    border-color: var(--primary-color, #007bff) !important;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

/* =============================================
 * END OF PACKAGE-MASTER.CSS
 * ============================================= */

/* 
 * SUMMARY OF FIXES APPLIED:
 * 
 * 1. Card Height Consistency:
 *    - Added flexbox layout with align-items: stretch
 *    - Set min-height for consistent card sizes
 *    - Used flex-grow for content distribution
 * 
 * 2. Content Alignment:
 *    - Fixed title and description heights
 *    - Used margin-top: auto for bottom alignment
 *    - Added proper text truncation
 * 
 * 3. Grid Layout:
 *    - Implemented responsive grid system
 *    - Added consistent gap spacing
 *    - Fixed column widths for all breakpoints
 * 
 * 4. Button Alignment:
 *    - Equal width buttons with flex: 1
 *    - Consistent height and padding
 *    - Proper stacking on mobile
 * 
 * 5. Responsive Design:
 *    - Complete mobile-first approach
 *    - Optimized for all screen sizes
 *    - Touch-friendly interface
 * 
 * 6. Accessibility:
 *    - Proper focus states
 *    - Screen reader support
 *    - High contrast mode support
 * 
 * 7. Performance:
 *    - GPU acceleration for animations
 *    - Reduced motion support
 *    - Optimized transitions
 */