/* ============================================================
   Cinta Terengganu — Global Styles
   ============================================================ */

:root {
  --brand: #046A38;
  --brand-dark: #0f5132;
  --radius: 14px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: #fff;
  color: #1a1a1a;
}

/* ============================================================
   BRAND COLORS
   ============================================================ */
.bg-success {
  background-color: var(--brand) !important;
}
.btn-success {
  background-color: var(--brand);
  border-color: var(--brand);
}
.btn-success:hover,
.btn-success:focus {
  background-color: var(--brand-dark);
  border-color: var(--brand-dark);
}
.btn-outline-success {
  color: var(--brand);
  border-color: var(--brand);
}
.btn-outline-success:hover {
  background-color: var(--brand);
  border-color: var(--brand);
}
.text-success {
  color: var(--brand) !important;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, .85);
  font-weight: 500;
}
.navbar-dark .navbar-nav .nav-link.active,
.navbar-dark .navbar-nav .nav-link:hover {
  color: #fff;
}

/* ============================================================
   ACCESSIBILITY — Skip link
   ============================================================ */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: #000;
  color: #fff;
  padding: .75rem 1rem;
  z-index: 9999;
}
.skip-link:focus {
  left: 0;
}

/* ============================================================
   HERO (fallback when no carousel)
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  border-radius: var(--radius);
}
.card-img-top {
  aspect-ratio: 16/9;
  object-fit: cover;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}

/* ============================================================
   ARTICLE CONTENT
   ============================================================ */
.content-article {
  font-size: 1.05rem;
  line-height: 1.75;
}
.content-article img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
.content-article h2 {
  margin-top: 1.5rem;
  font-size: 1.5rem;
}
.content-article h3 {
  margin-top: 1.25rem;
  font-size: 1.25rem;
}
.content-article a {
  color: var(--brand);
  text-decoration: underline;
}
.content-article blockquote {
  border-left: 4px solid var(--brand);
  padding-left: 1rem;
  color: #555;
  font-style: italic;
}
.content-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}
.content-article table th,
.content-article table td {
  border: 1px solid #dee2e6;
  padding: .5rem;
}

/* ============================================================
   MAPS
   ============================================================ */
#map,
#poiMap,
#accMap,
#eatMap {
  min-height: 320px;
  width: 100%;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination .page-link {
  color: var(--brand);
}
.pagination .active .page-link {
  background-color: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge.bg-warning {
  color: #000 !important;
}

/* ============================================================
   BASE RESPONSIVE ADJUSTMENTS
   ============================================================ */
@media (max-width: 575.98px) {
  .display-4 {
    font-size: 2rem;
  }
  .hero {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }
}

@media (min-width: 992px) {
  .content-article {
    font-size: 1.1rem;
  }
}

@media (min-width: 1920px) {
  .container-xl {
    max-width: 1600px;
  }
  body {
    font-size: 17px;
  }
  .card-img-top {
    aspect-ratio: 21/9;
  }
}

/* ============================================================
   HOME CAROUSEL — image-first, compact, responsive
   ============================================================ */
.home-carousel {
  position: relative;
  background: #000;
}
.home-carousel .carousel-inner {
  overflow: hidden;
}
.home-carousel .carousel-item {
  position: relative;
  /* Default: phone portrait */
  height: 240px;
}
.home-carousel .carousel-image-wrap {
  position: absolute;
  inset: 0;
}
.home-carousel .carousel-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.home-carousel .carousel-overlay {
  position: absolute;
  inset: 0;
  /* Lighter than before — only bottom 45% darkens */
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0) 55%,
    rgba(0, 0, 0, .55) 100%
  );
  pointer-events: none;
}
.home-carousel .carousel-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1rem 1.25rem 1.5rem;
  text-align: left;
  pointer-events: none;
}
.home-carousel .carousel-caption .carousel-cta {
  pointer-events: auto;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
}
.home-carousel .carousel-indicators {
  margin-bottom: .75rem;
  z-index: 5;
}
.home-carousel .carousel-indicators [data-bs-target] {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  opacity: .55;
  border: 0;
  transition: opacity .3s, transform .3s;
}
.home-carousel .carousel-indicators .active {
  opacity: 1;
  transform: scale(1.3);
}
.home-carousel .carousel-control-prev,
.home-carousel .carousel-control-next {
  width: 6%;
  opacity: .8;
  z-index: 4;
}
.home-carousel .carousel-control-prev:hover,
.home-carousel .carousel-control-next:hover {
  opacity: 1;
}

/* ---------- Carousel responsive breakpoints ---------- */

/* Tiny phones (< 400px) */
@media (max-width: 399.98px) {
  .home-carousel .carousel-item {
    height: 200px;
  }
  .home-carousel .carousel-caption {
    padding: .75rem 1rem 1.15rem;
  }
  .home-carousel .carousel-caption .carousel-cta {
    font-size: .9rem;
    padding: .5rem 1rem;
  }
}

/* Phones (400–575px) — default height already covers this */
@media (min-width: 400px) and (max-width: 575.98px) {
  .home-carousel .carousel-item {
    height: 240px;
  }
}

/* Large phones / small tablets (576–767px) */
@media (min-width: 576px) and (max-width: 767.98px) {
  .home-carousel .carousel-item {
    height: 300px;
  }
}

/* Tablets (768–991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .home-carousel .carousel-item {
    height: 360px;
  }
  .home-carousel .carousel-caption {
    padding: 1.5rem 2rem 2rem;
  }
}

/* Small laptop / desktop (992–1199px) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .home-carousel .carousel-item {
    height: 400px;
  }
  .home-carousel .carousel-caption {
    padding: 2rem 2.5rem 2.5rem;
  }
}

/* Large desktop (1200–1919px) */
@media (min-width: 1200px) and (max-width: 1919.98px) {
  .home-carousel .carousel-item {
    height: 440px;
  }
  .home-carousel .carousel-caption {
    padding: 2.5rem 3rem 3rem;
  }
}

/* TV / ultra-wide (= 1920px) */
@media (min-width: 1920px) {
  .home-carousel .carousel-item {
    height: 500px;
  }
  .home-carousel .carousel-caption {
    padding: 3rem 4rem 3.5rem;
  }
  .home-carousel .carousel-caption .carousel-cta {
    font-size: 1.25rem;
    padding: .75rem 1.75rem;
  }
}