/* Destination Categories Section Styles */
.destination-categories {
  position: relative;
  padding: var(--spacing-xl) 0;
  overflow: hidden;
  z-index: 5;
  background-color: #FFFFF0; /* Updated to light background based on the image */
  color: #1e252b; /* Dark text for light background */
}

.destination-categories::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(1px 1px at 25% 25%, rgba(255, 255, 240, 0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 50% 50%, rgba(255, 255, 240, 0.2) 0%, transparent 100%),
    radial-gradient(1px 1px at 75% 75%, rgba(255, 255, 240, 0.3) 0%, transparent 100%);
  background-size: 200px 200px;
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
}

.destination-categories .container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  position: relative;
  z-index: 1;
}

.destination-categories .section-header {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 4rem;
  padding: 0 2rem;
}

.destination-categories .section-subtitle,
.destination-categories .section-tagline {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--tertiary-color, #C9A053); /* Gold color works on both light and dark backgrounds */
  margin-bottom: 1.5rem;
}

.destination-categories .section-title {
  font-family: var(--font-primary);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  color: #1e252b; /* Fixed to use dark color on light background */
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  position: relative;
  line-height: 1.1;
}

.destination-categories .section-title::after {
  content: '';
  display: none; /* Removing this underline to add hero-style decoration instead */
}

/* Title decoration removed as requested */

.destination-categories .section-description {
  font-size: 1.25rem;
  line-height: 1.6;
  color: #4A5A66; /* Dark text for light background, using a gray tone for better readability */
  max-width: 800px;
  margin: 0 auto;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2rem;
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.category-card {
  background-color: rgba(30, 37, 43, 0.95); /* Updated to match hero blue with transparency */
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid rgba(255, 255, 240, 0.1);
}

.category-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.category-image {
  position: relative;
  height: 0;
  padding-bottom: 100%;
  overflow: hidden;
}

.category-image img {
  position: absolute;
  top: -10%;
  left: 0;
  width: 100%;
  height: 120%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.5s ease;
}

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

.category-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(0deg, rgba(31, 46, 46, 0.9) 0%, rgba(31, 46, 46, 0.3) 100%);
  z-index: 1;
}

.category-icon {
  position: absolute;
  top: -35px;
  left: 2rem;
  width: 70px;
  height: 70px;
  background-color: var(--tertiary-color, #C9A053); /* Added fallback gold color */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #1e252b; /* Updated to match hero blue */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  border: 5px solid rgba(30, 37, 43, 0.95); /* Updated border color to match card background */
  transition: all var(--transition-normal);
  z-index: 2;
}

.category-card:hover .category-icon {
  transform: rotateY(180deg);
}

.category-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  position: relative;
}

.category-title {
  font-family: var(--font-primary);
  font-size: 1.6rem;
  color: var(--text-light);
  margin: 0.5rem 0 1rem;
  padding-top: 1.5rem;
  line-height: 1.2;
}

.category-description {
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
  opacity: 0.9;
}

.category-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  color: var(--tertiary-color);
  font-size: 0.95rem;
}

.stat-value {
  font-weight: 700;
  color: var(--text-light);
  font-size: 1.1rem;
  margin-left: 0.3rem;
}

.category-link {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--tertiary-color);
  background-color: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: color var(--transition-normal);
  text-decoration: none;
  margin-top: auto;
}

.category-link:hover,
.category-link:focus-visible {
  color: var(--text-light);
  outline: 2px solid var(--tertiary-color);
  outline-offset: 2px;
}

.category-link i {
  transition: transform var(--transition-normal);
}

.category-link:hover i,
.category-link:focus-visible i {
  transform: translateX(3px);
}

/* Category-specific styles */
.category-card[data-category="churches"] .category-icon {
  background-color: var(--tertiary-color);
}

.category-card[data-category="marian"] .category-icon {
  background-color: var(--secondary-color);
}

.category-card[data-category="relics"] .category-icon {
  background-color: var(--tertiary-color);
}

.category-card[data-category="monasteries"] .category-icon {
  background-color: var(--accent-secondary);
}

.category-card[data-category="routes"] .category-icon {
  background-color: var(--primary-color);
}

/* Holy Land category removed as requested */

/* Adding Cosmic Wheel Animation to match Explorer section */
.destination-categories .cosmic-wheel-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100px;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
}

.destination-categories .cosmic-wheel {
  position: absolute;
  top: -450px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 900px;
  border: 1px solid rgba(201, 160, 83, 0.2);
  border-radius: 50%;
  box-shadow: 0 0 50px rgba(201, 160, 83, 0.1);
  animation: rotateWheel 120s linear infinite;
}

.destination-categories .cosmic-wheel::before {
  content: '';
  position: absolute;
  top: 5%;
  left: 5%;
  width: 90%;
  height: 90%;
  border: 1px solid rgba(201, 160, 83, 0.2);
  border-radius: 50%;
}

.destination-categories .cosmic-wheel::after {
  content: '';
  position: absolute;
  top: 15%;
  left: 15%;
  width: 70%;
  height: 70%;
  border: 1px solid rgba(201, 160, 83, 0.2);
  border-radius: 50%;
}

.destination-categories .wheel-dot {
  position: absolute;
  width: 5px;
  height: 5px;
  background-color: rgba(201, 160, 83, 0.8);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(201, 160, 83, 0.6);
}

@keyframes rotateWheel {
  0% { transform: translateX(-50%) rotate(0deg); }
  100% { transform: translateX(-50%) rotate(360deg); }
}

/* Animation for cards */
.category-card {
  opacity: 0;
  transform: translateY(30px);
}

.category-card.animate {
  animation: fade-in-up 0.8s forwards ease-out;
}

@keyframes fade-in-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Styles */
@media (max-width: 1200px) {
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .destination-categories .section-title {
    font-size: 3rem;
  }
}

@media (max-width: 992px) {
  .destination-categories .section-title {
    font-size: 2.5rem;
  }
  
  .category-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    top: -30px;
  }
}

@media (max-width: 992px) {
  .destination-categories .section-title {
    font-size: 2.5rem;
  }
  
  .category-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    top: -30px;
  }
  
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .categories-grid {
    grid-template-columns: repeat(1, 1fr);
  }
  
  .destination-categories .section-title {
    font-size: 2.2rem;
  }
  
  .destination-categories .section-description {
    font-size: 1.1rem;
  }
  
  .category-content {
    padding: 1.5rem;
  }
  
  .category-title {
    font-size: 1.4rem;
  }
}

@media (max-width: 576px) {
  .destination-categories .section-title {
    font-size: 1.8rem;
  }
  
  .category-description {
    font-size: 0.9rem;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .category-card {
    transition: none;
  }
  
  .category-card:hover {
    transform: none;
  }
  
  .category-card:hover .category-icon {
    transform: none;
  }
  
  .category-image img {
    transition: none;
  }
  
  .category-card:hover .category-image img {
    transform: none;
  }
  
  .category-link::after {
    transition: none;
  }
  
  .category-card.animate {
    animation: none;
    opacity: 1;
    transform: translateY(0);
  }
}