/**
 * BUDAYA.CSS - Professional & Seamless Design
 * Jejak Layar - Budaya Melayu Bengkalis
 * 
 * Features:
 * - Seamless layout (no gaps)
 * - Elegant animations
 * - Professional appearance
 * - Smooth transitions
 */

/* =========================================
   ROOT VARIABLES
   ========================================= */
:root {
  --primary-gold: #e8b84d;
  --dark-brown: #8b5e3c;
  --light-cream: #fef9f0;
  --soft-shadow: rgba(0, 0, 0, 0.08);
  --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   LAYOUT WRAPPER - SEAMLESS
   ========================================= */
.bd-page {
  background: transparent;
  padding: 0;
  margin: 0;
}

.bd-page .container {
  max-width: var(--max-width, 1100px);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* =========================================
   HERO SECTION - SEAMLESS & PROFESSIONAL
   ========================================= */
.bd-hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(135deg,
      #ffd95a 0%,
      #ffe8a3 50%,
      #fff5d6 100%);
}

/* Animated Background Pattern */
.bd-hero-pattern {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(232, 184, 77, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(139, 94, 60, 0.12) 0%, transparent 50%),
    repeating-linear-gradient(45deg,
      transparent,
      transparent 60px,
      rgba(255, 255, 255, 0.03) 60px,
      rgba(255, 255, 255, 0.03) 120px);
  animation: patternShift 20s ease-in-out infinite;
  pointer-events: none;
}

@keyframes patternShift {

  0%,
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 0.6;
  }

  50% {
    transform: scale(1.05) rotate(1deg);
    opacity: 0.8;
  }
}

/* Floating Particles */
.bd-hero::before,
.bd-hero::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.bd-hero::before {
  top: -100px;
  left: -100px;
  background: rgba(255, 217, 90, 0.3);
  animation: floatParticle1 15s ease-in-out infinite;
}

.bd-hero::after {
  bottom: -100px;
  right: -100px;
  background: rgba(232, 184, 77, 0.25);
  animation: floatParticle2 18s ease-in-out infinite;
}

@keyframes floatParticle1 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(50px, 30px) scale(1.1);
  }
}

@keyframes floatParticle2 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(-40px, -40px) scale(1.15);
  }
}

/* Hero Inner Content */
.bd-hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-width, 1100px);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
  padding: 4rem 2rem;
}

/* Hero Text Section */
.bd-hero-text {
  max-width: 580px;
  opacity: 0;
  animation: fadeInUp 1s var(--transition-smooth) 0.3s forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bd-hero-eyebrow {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dark-brown);
  margin-bottom: 0.8rem;
  opacity: 0;
  animation: fadeInUp 0.8s var(--transition-smooth) 0.5s forwards;
  display: inline-block;
  position: relative;
  padding-left: 2rem;
}

.bd-hero-eyebrow::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 1.5rem;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-gold), var(--dark-brown));
  transform: translateY(-50%);
}

.bd-hero h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  color: #1f2937;
  margin: 0 0 1rem;
  opacity: 0;
  animation: fadeInUp 1s var(--transition-smooth) 0.7s forwards;
}

.bd-hero h1 .accent {
  color: var(--dark-brown);
  display: inline-block;
  position: relative;
}

.bd-hero h1 .accent::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 8px;
  background: linear-gradient(90deg, transparent, rgba(232, 184, 77, 0.3), transparent);
  transform: scaleX(0);
  transform-origin: left;
  animation: underlineExpand 1s var(--transition-smooth) 1.2s forwards;
}

@keyframes underlineExpand {
  to {
    transform: scaleX(1);
  }
}

.bd-hero .lead {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #374151;
  max-width: 520px;
  opacity: 0;
  animation: fadeInUp 1s var(--transition-smooth) 0.9s forwards;
}

/* Hero Actions */
.bd-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  opacity: 0;
  animation: fadeInUp 1s var(--transition-smooth) 1.1s forwards;
}

.bd-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 50px;
  padding: 1rem 2rem;
  background: var(--dark-brown);
  color: #fff !important;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(139, 94, 60, 0.3);
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--transition-smooth);
}

.bd-hero-cta::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.bd-hero-cta:hover::before {
  width: 300px;
  height: 300px;
}

.bd-hero-cta:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 15px 40px rgba(139, 94, 60, 0.4);
  background: #6d4428;
}

.bd-hero-secondary {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark-brown);
  text-decoration: none;
  position: relative;
  padding-bottom: 4px;
  transition: color 0.3s ease;
}

.bd-hero-secondary::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--dark-brown);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--transition-smooth);
}

.bd-hero-secondary:hover {
  color: #6d4428;
}

.bd-hero-secondary:hover::after {
  transform: scaleX(1);
}

/* Hero Ornament */
.bd-hero-ornament {
  width: 280px;
  height: 280px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  opacity: 0;
  animation: fadeInScale 1.2s var(--transition-smooth) 0.8s forwards;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.8) rotate(-10deg);
  }

  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.bd-hero-ornament-img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15));
  animation: gentleFloat 6s ease-in-out infinite;
}

@keyframes gentleFloat {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-15px) rotate(2deg);
  }
}

.bd-hero-ornament svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: rotateGlow 20s linear infinite;
}

@keyframes rotateGlow {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Scroll Indicator */
.bd-scroll-indicator {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(55, 65, 81, 0.7);
  opacity: 0;
  animation: fadeIn 1s ease 2s forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.bd-scroll-line {
  width: 2px;
  height: 30px;
  border-radius: 2px;
  background: linear-gradient(to bottom,
      transparent,
      rgba(139, 94, 60, 0.6),
      transparent);
  position: relative;
  overflow: hidden;
}

.bd-scroll-line::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  height: 40%;
  top: -40%;
  background: var(--dark-brown);
  border-radius: 2px;
  animation: scrollDot 2s ease-in-out infinite;
}

@keyframes scrollDot {
  to {
    transform: translateY(180%);
    opacity: 0;
  }
}

/* =========================================
   INTRO SECTION - SEAMLESS CONNECTION
   ========================================= */
.bd-intro {
  padding: 5rem 0 4rem;
  background: linear-gradient(180deg,
      #fff5d6 0%,
      #ffffff 100%);
  text-align: center;
  margin: 0;
}

.bd-intro .section-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--dark-brown);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.bd-intro .section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-gold), var(--dark-brown));
  border-radius: 2px;
  animation: pulseWidth 2s ease-in-out infinite;
}

@keyframes pulseWidth {

  0%,
  100% {
    width: 80px;
  }

  50% {
    width: 100px;
  }
}

.bd-intro .section-sub {
  max-width: 760px;
  margin: 1.5rem auto 0;
  color: #33383e;
  line-height: 1.9;
  font-size: 1.05rem;
}

/* =========================================
   KATEGORI SECTION - SEAMLESS GRID
   ========================================= */
.bd-kategori {
  padding: 4rem 0 5rem;
  background: transparent;
  margin: 0;
}

.bd-section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.bd-kategori .section-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 800;
  color: #000000;
  margin-bottom: 1rem;
}

.bd-section-subtitle {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1rem;
  color: #000000;
  line-height: 1.7;
}

/* Grid Layout */
.bd-kategori-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  max-width: var(--max-width, 1100px);
  margin: 0 auto;
}

/* Card Design */
.bd-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  color: #ffffff;
  height: 380px;
  display: flex;
  align-items: flex-end;
  box-shadow: 0 10px 40px var(--soft-shadow);
  background: #000;
  transition: all 0.5s var(--transition-smooth);
  opacity: 0;
  transform: translateY(30px);
}

.bd-card.in {
  opacity: 1;
  transform: translateY(0);
}

.bd-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--transition-smooth);
}

.bd-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0.4) 60%,
      rgba(0, 0, 0, 0.8) 100%);
  transition: background 0.5s ease;
}

.bd-card:hover .bd-card-overlay {
  background: linear-gradient(180deg,
      rgba(0, 0, 0, 0.1) 0%,
      rgba(0, 0, 0, 0.5) 60%,
      rgba(0, 0, 0, 0.9) 100%);
}

.bd-card-body {
  position: relative;
  z-index: 2;
  padding: 2rem;
  width: 100%;
  transform: translateY(10px);
  transition: transform 0.4s var(--transition-smooth);
}

.bd-card:hover .bd-card-body {
  transform: translateY(0);
}

.bd-card-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 1rem;
  border-radius: 50px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(232, 184, 77, 0.5);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary-gold);
  margin-bottom: 0.8rem;
  transition: all 0.3s ease;
}

.bd-card:hover .bd-card-badge {
  background: rgba(232, 184, 77, 0.3);
  border-color: var(--primary-gold);
}

.bd-card-title {
  font-family: "Playfair Display", serif;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.bd-card:hover .bd-card-title {
  color: var(--primary-gold);
}

.bd-card-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #ffffff;
  margin-bottom: 1rem;
}

.bd-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary-gold);
  font-weight: 600;
  transition: gap 0.3s ease;
}

.bd-card:hover .bd-card-link {
  gap: 1rem;
}

.bd-card-link-arrow {
  transition: transform 0.3s ease;
}

.bd-card:hover .bd-card-link-arrow {
  transform: translateX(5px);
}

.bd-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.bd-card:hover .bd-card-img {
  transform: scale(1.08);
}

/* Stagger Animation */
.bd-card:nth-child(1).in {
  animation: slideInCard 0.6s var(--transition-smooth) 0.1s forwards;
}

.bd-card:nth-child(2).in {
  animation: slideInCard 0.6s var(--transition-smooth) 0.2s forwards;
}

.bd-card:nth-child(3).in {
  animation: slideInCard 0.6s var(--transition-smooth) 0.3s forwards;
}

.bd-card:nth-child(4).in {
  animation: slideInCard 0.6s var(--transition-smooth) 0.4s forwards;
}

.bd-card:nth-child(5).in {
  animation: slideInCard 0.6s var(--transition-smooth) 0.5s forwards;
}

.bd-card:nth-child(6).in {
  animation: slideInCard 0.6s var(--transition-smooth) 0.6s forwards;
}

@keyframes slideInCard {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================
   QUOTE SECTION - ELEGANT
   ========================================= */
.bd-quote {
  padding: 5rem 0;
  background: linear-gradient(135deg,
      #fff5d6 0%,
      #fffaeb 100%);
  margin: 0;
}

.quote-inner {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(232, 184, 77, 0.2);
}

.bd-quote-decor {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 20%, rgba(232, 184, 77, 0.1), transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(139, 94, 60, 0.08), transparent 50%);
  border-radius: 20px;
  pointer-events: none;
}

.quote {
  position: relative;
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-style: italic;
  color: var(--dark-brown);
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.quote-mark {
  position: absolute;
  top: -1rem;
  left: 0;
  font-size: 4rem;
  color: rgba(232, 184, 77, 0.3);
  font-family: Georgia, serif;
  line-height: 1;
}

.q-item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3rem;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: all 0.8s var(--transition-smooth);
}

.q-item.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 960px) {
  .bd-hero-inner {
    flex-direction: column;
    text-align: center;
    gap: 3rem;
    padding: 3rem 1.5rem;
  }

  .bd-hero-text {
    max-width: 100%;
  }

  .bd-hero-eyebrow {
    padding-left: 0;
  }

  .bd-hero-eyebrow::before {
    display: none;
  }

  .bd-hero-actions {
    justify-content: center;
  }

  .bd-kategori-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
  }

  .bd-card {
    height: 340px;
  }
}

@media (max-width: 640px) {
  .bd-hero {
    min-height: 70vh;
  }

  .bd-hero-inner {
    padding: 2rem 1.25rem;
  }

  .bd-hero h1 {
    font-size: 2rem;
  }

  .bd-hero-ornament {
    width: 200px;
    height: 200px;
  }

  .bd-intro {
    padding: 3rem 0 2.5rem;
  }

  .bd-kategori {
    padding: 3rem 0 4rem;
  }

  .bd-kategori-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .bd-card {
    height: 320px;
  }

  .quote-inner {
    padding: 2rem 1.5rem;
  }

  .q-item {
    padding: 0 2rem;
  }

  .bd-quote {
    padding: 3rem 0;
  }
}

/* =========================================
   ACCESSIBILITY & PERFORMANCE
   ========================================= */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Improve font rendering */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Hardware acceleration for smooth animations */
.bd-card,
.bd-hero-ornament-img,
.bd-card-img {
  will-change: transform;
}

.bd-card:hover {
  will-change: auto;
}

/* =========================================
   OVERRIDE WARNA JUDUL & DESKRIPSI KARTU BUDAYA
   ========================================= */

/* Judul (h3) selalu putih */
.bd-card .bd-card-title,
.card.bd-card h3,
.card.card-category .bd-card-title {
  color: #ffffff !important;
  /* Putih */
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

/* Hover tetap gold */
.bd-card:hover .bd-card-title,
.card.bd-card:hover h3 {
  color: var(--primary-gold) !important;
}

/* Deskripsi selalu putih */
.bd-card .bd-card-text,
.card.bd-card p,
.card.card-category .bd-card-text {
  color: #ffffff !important;
  /* Putih */
  opacity: 0.95;
}

/* Link LIHAT DETAIL tetap gold */
.bd-card-link,
.card.bd-card .bd-card-link {
  color: var(--primary-gold) !important;
}

/* Arrow tetap ikut animasi */
.bd-card-hover .bd-card-link-arrow,
.card.bd-card:hover .bd-card-link-arrow {
  transform: translateX(5px);
}

/* =========================================
   RESPONSIVE FIX (MOBILE)
   ========================================= */
@media (max-width: 960px) {

  .bd-card .bd-card-title,
  .card.bd-card h3 {
    color: #ffffff !important;
    font-size: 1.35rem;
  }

  .bd-card .bd-card-text,
  .card.bd-card p {
    color: #ffffff !important;
    font-size: 0.95rem;
  }
}

/* =========================================
   OVERLAY ABU-ABU UNTUK MENAJAMKAN TEKS
   ========================================= */

.bd-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.627);
  /* abu abu lembut */
  backdrop-filter: blur(1px);
  transition: background 0.4s ease;
}

/* Hover sedikit lebih gelap */
.bd-card:hover .bd-card-overlay {
  background: rgba(15, 15, 15, 0.55);
}