/**
 * GREATO — คอมโพเนนต์และธีม (ปุ่ม การ์ด แบนเนอร์)
 */

.btn-hero-primary {
  background-color: var(--greato-blue);
  border: none;
  color: #fff;
  font-weight: 500;
}

.btn-hero-primary:hover,
.btn-hero-primary:focus {
  background-color: var(--greato-blue-dark);
  color: #fff;
}

.btn-hero-line {
  background-color: var(--greato-line);
  border: none;
  color: #fff;
  font-weight: 500;
}

.btn-hero-line:hover,
.btn-hero-line:focus {
  background-color: var(--greato-line-dark);
  color: #fff;
}

/* แสงทองวิบครั้งเดียวบนปุ่ม Hero (หลังข้อความโผล่) */
.btn-hero-gold-shine {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn-hero-gold-shine::after {
  content: "";
  position: absolute;
  top: 0;
  left: -130%;
  width: 55%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 28%,
    rgba(255, 255, 255, 0.22) 42%,
    rgba(232, 213, 163, 0.65) 50%,
    rgba(255, 255, 255, 0.28) 58%,
    transparent 72%
  );
  transform: skewX(-18deg);
  pointer-events: none;
  animation: greato-cta-gold-shine 1.05s ease-in-out 0.82s 1 forwards;
}

.btn-hero-gold-shine--delay::after {
  animation-delay: 0.98s;
}

@keyframes greato-cta-gold-shine {
  to {
    left: 140%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn-hero-gold-shine::after {
    animation: none;
    opacity: 0;
  }
}

.btn-booking {
  background-color: var(--greato-blue);
  border: none;
  color: #fff;
  font-weight: 500;
  border-radius: 2rem;
  white-space: nowrap;
}

.btn-booking:hover,
.btn-booking:focus {
  background-color: var(--greato-blue-dark);
  color: #fff;
}

.btn-gradient-lg {
  background: linear-gradient(
    90deg,
    var(--greato-gradient-start) 0%,
    var(--greato-gradient-end) 100%
  );
  border: none;
  color: #fff;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}

.btn-gradient-lg:hover,
.btn-gradient-lg:focus {
  color: #fff;
  filter: brightness(1.05);
}

.btn-line-light {
  background-color: #fff;
  color: var(--greato-line);
  font-weight: 600;
  border: none;
}

.btn-line-light:hover,
.btn-line-light:focus {
  background-color: #f0fdf4;
  color: var(--greato-line-dark);
}

.line-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  background-color: var(--greato-line);
  color: #fff;
  border-radius: 0.35rem;
  font-size: 0.85rem;
  font-weight: 300;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  color: #fff;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 300;
}

.social-btn:hover {
  color: #fff;
  opacity: 0.9;
}

.social-btn-ig {
  background: linear-gradient(135deg, #f97316, #ec4899);
}

.contact-form .form-control:focus {
  border-color: var(--greato-blue);
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
}

/* บทความ / Blog */
.article-page-main {
  background: var(--greato-section-gray);
  min-height: 60vh;
}

/* เมนูบน — หน้าบทความ / อ่านบทความ (สีเดียวกับ footer) */
.navbar-greato-solid,
.article-list-page #mainNav,
.article-detail-page #mainNav {
  background-color: rgba(15, 23, 42, 0.96) !important;
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  backdrop-filter: blur(14px) saturate(1.1);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.45),
    0 3px 10px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.navbar-greato-solid .navbar-brand,
.article-list-page #mainNav .navbar-brand,
.article-detail-page #mainNav .navbar-brand {
  color: #fff !important;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.navbar-greato-solid .nav-link,
.article-list-page #mainNav .nav-link,
.article-detail-page #mainNav .nav-link {
  color: rgba(255, 255, 255, 0.88) !important;
}

.navbar-greato-solid .nav-link {
  position: relative;
  transition: color 0.25s ease;
}

.navbar-greato-solid .nav-link::after,
.article-list-page #mainNav .nav-link::after,
.article-detail-page #mainNav .nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.1rem;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #e8d5a3, transparent);
  transform: translateX(-50%);
  transition: width 0.28s ease;
}

.navbar-greato-solid .nav-link:hover,
.navbar-greato-solid .nav-link:focus,
.article-list-page #mainNav .nav-link:hover,
.article-detail-page #mainNav .nav-link:hover {
  color: #e8d5a3 !important;
}

.navbar-greato-solid .nav-link:hover::after,
.navbar-greato-solid .nav-link:focus::after,
.article-list-page #mainNav .nav-link:hover::after,
.article-detail-page #mainNav .nav-link:hover::after {
  width: 70%;
}

.navbar-greato-solid .nav-link.active,
.article-list-page #mainNav .nav-link.active,
.article-detail-page #mainNav .nav-link.active {
  color: #fff !important;
  font-weight: 600;
}

.navbar-greato-solid .navbar-toggler,
.article-list-page #mainNav .navbar-toggler,
.article-detail-page #mainNav .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.35);
}

.article-blog-pagination .page-link {
  color: #0f172a;
}

.article-blog-pagination .page-item.active .page-link {
  background-color: #0f172a;
  border-color: #0f172a;
}

.article-card-img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.article-prose {
  max-width: 820px;
}

.article-h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.25;
  color: #0f172a;
}

.article-body {
  font-size: 1.05rem;
  line-height: 1.75;
}

.article-heading {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: #0f172a;
}

.article-heading--h2 { font-size: 1.5rem; }
.article-heading--h3 { font-size: 1.3rem; }
.article-heading--h4 { font-size: 1.15rem; }
.article-heading--h5 { font-size: 1.05rem; }
.article-heading--h6 { font-size: 1rem; }

.article-paragraph {
  margin-bottom: 1.25rem;
}

.article-paragraph p:last-child {
  margin-bottom: 0;
}

.article-figure {
  margin: 1.75rem 0;
}

.article-featured img {
  max-height: 520px;
  object-fit: cover;
}

.article-section {
  margin-bottom: 2rem;
}

.article-section > .article-heading:first-child {
  margin-top: 0.5rem;
}

/* รูปในบทความ: 4 คอลัมน์ต่อแถว (ซ้าย→ขวา) ครบแล้วขึ้นแถวใหม่ */
.article-grid {
  display: grid;
  grid-template-columns: repeat(var(--article-grid-cols, 4), minmax(0, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 1.75rem;
}

.article-grid .article-figure {
  margin: 0;
}

.article-grid .article-figure img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

@media (max-width: 767.98px) {
  .article-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 479.98px) {
  .article-grid {
    grid-template-columns: 1fr;
  }
}
