/* =====================================
   ROOT & RESET
===================================== */
:root {
    --text-dark: #1f2937;
    --border-color: #e5e7eb;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--text-dark);
    background-color: var(--white);
    line-height: 1.6;
}

/* =====================================
   HEADER
===================================== */
.main-header {
    width: 100%;
    background: #fff;
    border-bottom: 1px solid var(--border-color);
}

.header-inner {
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 60px;
}

.logo img {
    height: 60px;
    display: block;
}

.main-nav {
    margin-left: auto;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 32px;
}

.main-nav a {
    text-decoration: none;
    color: #000;
    font-size: 15px;
    font-weight: 500;
}

.main-nav a:hover {
    text-decoration: underline;
}

/* =====================================
   HERO SECTION (HOME)
===================================== */
.search-hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 32vh;
    overflow: hidden;
}

/* Background slideshow */
.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    animation: fadeSlide 30s infinite;
    z-index: 1;
}

.bg1 {
    background-image:
        linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45)),
        url("../images/hero1.jpg");
    animation-delay: 0s;
}

.bg2 {
    background-image:
        linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45)),
        url("../images/hero2.jpg");
    animation-delay: 10s;
}

.bg3 {
    background-image:
        linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45)),
        url("../images/hero3.jpg");
    animation-delay: 20s;
}

/* Hero content */
.search-overlay {
    position: relative;
    z-index: 2;
    width: 100%;
}

.search-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

/* Hero text */
.hero-text {
    max-width: 700px;
    margin: 0 auto 30px;
}

.hero-text h1 {
    color: #fff;
    font-size: 48px;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 12px;
}

.hero-text p {
    color: rgba(255,255,255,0.85);
    font-size: 18px;
}

/* =====================================
   SEARCH BAR
===================================== */
.search-box {
    display: flex;
    max-width: 700px;
    margin: 0 auto;
    background: #fff;
    border-radius: 999px;
    overflow: hidden;
}

.search-box input {
    flex: 1;
    padding: 14px 22px;
    border: none;
    font-size: 16px;
    outline: none;
}

.search-box button {
    padding: 14px 28px;
    background: #000;
    color: #fff;
    border: none;
    font-size: 16px;
    cursor: pointer;
    white-space: nowrap;
}

.search-box button:hover {
    background: #222;
}

/* =====================================
   FEATURED DESTINATIONS (FIXED)
===================================== */
.featured-destinations {
    padding: 60px;
    background-color: #fafafa;
}

.featured-destinations h3 {
    font-size: 32px;
    margin-bottom: 10px;
}

.featured-destinations p {
    color: #555;
}

.destination-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.destination-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.destination-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.destination-card:hover {
    transform: translateY(-6px);
}

.destination-card img {
    width: 100%;
    height: 180px;          /* 🔥 FIX: prevents huge images */
    object-fit: cover;      /* 🔥 FIX */
    display: block;
}

.destination-card h4 {
    font-size: 20px;
    margin: 16px;
}

.destination-card p {
    font-size: 14px;
    margin: 0 16px 20px;
    color: #555;
}

/* =====================================
   FOOTER
===================================== */
footer {
    text-align: center;
    padding: 30px;
    font-size: 14px;
    color: #777;
    border-top: 1px solid #eee;
}

/* =====================================
   ANIMATIONS
===================================== */
@keyframes fadeSlide {
    0%   { opacity: 0; transform: scale(1); }
    10%  { opacity: 1; }
    30%  { opacity: 1; transform: scale(1.05); }
    40%  { opacity: 0; }
    100% { opacity: 0; }
}

/* =====================================
   MOBILE RESPONSIVE
===================================== */
@media (max-width: 768px) {

    .header-inner {
        padding: 0 20px;
    }

    .logo img {
        height: 48px;
    }

    .search-hero {
        padding-top: 28vh;
        min-height: 80vh;
    }

    .hero-text h1 {
        font-size: 32px;
    }

    .hero-text p {
        font-size: 16px;
    }

    .search-box {
        max-width: 100%;
    }

    .search-box input {
        padding: 12px 16px;
        font-size: 15px;
    }

    .search-box button {
        padding: 12px 18px;
        font-size: 15px;
    }

    .featured-destinations {
        padding: 40px 20px;
    }

    .destination-card img {
        height: 160px;
    }
}

/* =========================
   MOBILE FIX (FINAL)
========================= */
@media (max-width: 768px) {

  /* HERO SECTION */
  .search-hero {
    min-height: 70vh;
    padding-top: 22vh;
  }

  .hero-bg {
    background-position: center;
    background-size: cover;
  }

  /* HERO TEXT */
  .hero-text {
    max-width: 92%;
    margin: 0 auto 16px;
    text-align: center;
  }

  .hero-text h1 {
    font-size: 28px;
    line-height: 1.3;
  }

  .hero-text p {
    font-size: 15px;
  }

  /* SEARCH BAR */
  .search-box {
    max-width: 92%;
    margin: 0 auto;
    height: 46px;
  }

  .search-box input {
    padding: 10px 14px;
    font-size: 14px;
  }

  .search-box button {
    padding: 0 18px;
    font-size: 14px;
  }

  /* FEATURED DESTINATIONS */
  .destination-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .destination-card img {
    height: 200px;
    object-fit: cover;
  }

  /* HEADER */
  header,
  .header-inner {
    padding: 12px 20px;
  }

  nav ul {
    gap: 16px;
  }
}
/* =========================
   FIX LARGE IMAGES ON MOBILE
========================= */
@media (max-width: 768px) {

  .destination-grid {
    grid-template-columns: 1fr;
  }

  .destination-card {
    max-width: 100%;
  }

  .destination-card img {
    width: 100%;
    height: 180px;          /* 👈 KEY FIX */
    object-fit: cover;     /* crops nicely */
    display: block;
  }

  .destination-card h4 {
    font-size: 18px;
  }

  .destination-card p {
    font-size: 14px;
  }
}
