/* assets/css/destinations.css - Premium styles for destinations.html */

/* Hero Section */
.destinations-hero {
  min-height: 70vh;
  background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../images/destinations-hero.jpg') no-repeat center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 2.5rem;
  animation: fadeInUp 1s ease-out forwards;
}

h1 {
  font-size: 3.8rem;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  margin-bottom: 1.2rem;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

p.lead {
  font-size: 1.4rem;
  font-family: 'Roboto', sans-serif;
  font-weight: 300;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.btn-primary {
  background: linear-gradient(90deg, var(--giraffe-gold), var(--yellow-ochre));
  color: var(--earth-brown);
  padding: 1rem 2.5rem;
  border-radius: 0.6rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: inline-block;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(216, 169, 3, 0.5);
}

/* Destinations Section */
.destinations-section {
  padding: 4rem 0;
  background: var(--bg);
}

.container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.section-heading {
  font-size: 2.8rem;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: var(--earth-brown);
  text-align: center;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  position: relative;
  padding-bottom: 0.5rem;
}

.section-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--giraffe-gold), var(--yellow-ochre));
}

.lead {
  font-size: 1.3rem;
  font-family: 'Roboto', sans-serif;
  font-weight: 300;
  color: var(--muted);
  text-align: center;
  margin-bottom: 3rem;
}

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

.destination-card {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  background: #fff;
}

.destination-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(216, 169, 3, 0.3);
}

.card-layout {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr; /* Explicitly define first, second, and third columns */
  gap: 2rem;
  padding: 2rem;
  height: auto; /* Changed from 100% to auto to prevent height overflow */
  grid-template-areas:
    "image summary separator"
    "image summary actions"; /* Ensure actions is in the third column */
}

.card-image {
  grid-area: image;
  overflow: hidden; /* Contain the image within the column */
}

.card-image img {
  width: 100%;
  height: 300px; /* Fixed height to contain the image */
  object-fit: cover; /* Maintain quality and aspect ratio */
  border-radius: 1rem;
  transition: transform 0.4s ease;
}

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

.card-summary {
  grid-area: summary;
  padding: 1.5rem;
  color: var(--earth-brown);
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* Distribute content evenly */
}

.card-separator {
  grid-area: separator;
  width: 2px;
  background: linear-gradient(var(--giraffe-gold), var(--yellow-ochre));
  opacity: 0.8;
  border-radius: 1px;
}

.card-actions {
  grid-area: actions;
  padding: 1rem; /* Minimal padding for centering */
  display: flex;
  flex-direction: column;
  justify-content: center; /* Center vertically within the third column */
  align-items: center; /* Center horizontally within the third column */
  text-align: center; /* Ensure all text is centered */
  height: 100%; /* Use full height of the third column */
  width: 100%; /* Ensure it fills the third column */
}

.destination-title {
  font-size: 2.2rem;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--giraffe-gold);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  position: relative;
}

.destination-title::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 30%;
  height: 2px;
  background: var(--yellow-ochre);
}

.card-summary p {
  font-size: 1rem;
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.summary-section h4 {
  font-size: 1.2rem;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  color: var(--earth-brown);
  margin-bottom: 0.8rem;
  text-transform: uppercase;
}

.summary-section ul {
  list-style: none;
  padding-left: 0;
}

.summary-section ul li {
  font-size: 1rem;
  font-family: 'Roboto', sans-serif;
  font-weight: 300;
  margin-bottom: 0.8rem;
  color: var(--muted);
}

.summary-section ul li strong {
  color: var(--earth-brown);
}

.summary-note {
  font-size: 1rem;
  font-style: italic;
  color: var(--muted);
  margin-bottom: 1.5rem; /* Space before CTAs */
  width: 100%; /* Span the column width */
  text-align: center; /* Center the text */
}

.btn-destination {
  background: linear-gradient(90deg, var(--giraffe-gold), var(--yellow-ochre));
  color: var(--earth-brown);
  padding: 0.8rem 1.8rem;
  border-radius: 0.6rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: inline-block;
  font-size: 1rem;
  width: 180px; /* Fixed width for consistent centering */
  text-align: center;
  margin: 0 auto; /* Center the button horizontally */
}

.btn-destination:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(216, 169, 3, 0.5);
}

.btn-gallery {
  color: var(--giraffe-gold);
  font-size: 0.9rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.3s ease;
  width: 180px; /* Fixed width for consistent centering */
  justify-content: center; /* Center the flex items */
  margin: 0.5rem auto; /* Center with slight spacing */
}

.btn-gallery:hover {
  color: var(--yellow-ochre);
}

.btn-gallery span {
  font-size: 1.1rem;
}

/* CTA Section */
.cta-section {
  padding: 4rem 0;
  text-align: center;
  background: linear-gradient(135deg, var(--leopard-tan), var(--bg));
}

.cta-section .section-heading {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.cta-section .lead {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeInUp 0.6s ease-out forwards;
}

.fade-in-delay-1 {
  animation-delay: 0.2s;
}

.fade-in-delay-2 {
  animation-delay: 0.4s;
}

/* Responsive Design */
@media (max-width: 768px) {
  .destinations-hero {
    min-height: 50vh;
  }
  .hero-content {
    padding: 1.5rem;
  }
  .hero-content h1 {
    font-size: 2.5rem;
  }
  .hero-content p {
    font-size: 1rem;
  }
  .destinations-grid {
    grid-template-columns: 1fr;
  }
  .card-layout {
    grid-template-columns: 1fr; /* Stack on mobile */
    gap: 1rem;
    grid-template-areas: none; /* Reset grid areas on mobile */
  }
  .card-image img {
    height: 200px; /* Adjusted height for mobile */
  }
  .card-summary {
    padding: 1rem;
  }
  .card-actions {
    padding: 1rem;
    height: auto; /* Allow natural height on mobile */
  }
  .destination-title {
    font-size: 1.8rem;
  }
  .card-separator {
    display: none;
  }
  .btn-destination {
    padding: 0.6rem 1.4rem;
    font-size: 0.9rem;
    width: 140px; /* Adjusted width for mobile */
  }
  .btn-gallery {
    font-size: 0.8rem;
    width: 140px; /* Adjusted width for mobile */
  }
}


/* ============================
   PREMIUM RESPONSIVE DESIGN
   For Tablets (<=1024px) + Mobile (<=768px)
   ============================ */

/* ---------- TABLETS (Landscape & Portrait) ---------- */
@media (max-width: 1024px) {

  .destinations-hero {
    min-height: 55vh;
    background-position: center top;
  }

  .hero-content h1 {
    font-size: 3rem;
    white-space: normal;
  }

  .hero-content p.lead {
    font-size: 1.2rem;
    line-height: 1.6;
  }

  /* Cards become 1½-column feel */
  .card-layout {
    grid-template-columns: 1fr 1.2fr;
    grid-template-areas:
      "image summary"
      "actions actions";
    gap: 1.5rem;
  }

  .card-image img {
    height: 260px;
  }

  .card-summary {
    padding: 1.25rem;
  }

  .card-actions {
    flex-direction: row;
    gap: 1.2rem;
    padding-top: 0;
  }

  .btn-destination,
  .btn-gallery {
    width: auto;
    min-width: 160px;
  }
}

/* ---------- MOBILE (Phones <=768px) ---------- */
@media (max-width: 768px) {

  .destinations-hero {
    min-height: 48vh;
    padding: 1rem 0;
    background-position: center;
  }

  .hero-content {
    padding: 1rem;
  }

  .hero-content h1 {
    font-size: 2rem;
    white-space: normal;
    text-overflow: unset;
  }

  .hero-content p.lead {
    font-size: 0.95rem;
  }

  /* --- Mobile Grid Layout: Full Stack --- */
  .destinations-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .card-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "image"
      "summary"
      "actions";
    gap: 1rem;
    padding: 1.3rem;
  }

  .card-image img {
    height: 220px;
    border-radius: 1rem;
  }

  .destination-title {
    font-size: 1.6rem;
  }

  .summary-section h4 {
    font-size: 1.1rem;
  }

  .summary-section ul li {
    font-size: 0.95rem;
  }

  .card-actions {
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
  }

  .btn-destination {
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
  }

  .btn-gallery {
    width: 100%;
    justify-content: center;
    font-size: 0.9rem;
  }

  /* Improve CTA Section on mobile */
  .cta-section .section-heading {
    font-size: 2rem;
  }

  .cta-section .lead {
    font-size: 1rem;
  }
}

/* ---------- Extra Small Devices (<=480px) ---------- */
@media (max-width: 480px) {

  .hero-content h1 {
    font-size: 1.65rem;
  }

  .hero-content p.lead {
    font-size: 0.88rem;
  }

  .card-summary p {
    font-size: 0.9rem;
  }

  .summary-note {
    font-size: 0.85rem;
  }
}
