/* ===== HotelXcademy — Black & Gold (Warm) ===== */
* { font-family: 'Sarabun', 'Inter', sans-serif; }
body { font-weight: 400; line-height: 1.7; font-size: 16px; }
h1, h2, h3, h4, h5, h6 { font-weight: 700; }
strong, b { font-weight: 700; }

:root {
  --yellow: #feba00;
  --yellow-light: #ffc21c;
  --yellow-dark: #d7a212;
  --black: #000000;
  --black-soft: #0a0a0a;
  --black-card: #111111;
  --orange: #f97316;
  --orange-dark: #ea580c;
}

.text-navy { color: var(--black); }
.bg-navy { background-color: var(--black); }
.text-gold { color: var(--yellow); }
.bg-gold { background-color: var(--yellow); }

/* Hero */
.hero-gradient {
  position: relative;
  overflow: hidden;
  background: var(--black);
}
@keyframes hero-zoom {
  0% { transform: scale(1.05); }
  100% { transform: scale(1.12); }
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--yellow) 0%, var(--yellow-light) 100%);
  color: var(--black);
  font-weight: 800;
  padding: 0.625rem 2rem;
  border-radius: 2rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  box-shadow: 0 2px 12px rgba(254,186,0,0.35);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--yellow-light) 0%, #ffd54f 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(254,186,0,0.5);
}

.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--yellow);
  font-weight: 600;
  padding: 0.5rem 2rem;
  border-radius: 2rem;
  border: 2px solid var(--yellow);
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
}
.btn-outline:hover { background: var(--yellow); color: var(--black); }

.btn-white {
  display: inline-block;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  color: white;
  font-weight: 600;
  padding: 0.625rem 1.5rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255,255,255,0.25);
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
}
.btn-white:hover { background: rgba(255,255,255,0.18); transform: translateY(-2px); }

/* Input */
.input-field {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #333;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  transition: all 0.3s;
  outline: none;
  background: #1a1a1a;
  color: #e5e5e5;
}
.input-field::placeholder { color: #666; }
.input-field:focus { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(254,186,0,0.18); background: #222; }

/* ===== DEPARTMENT FILTERS ===== */
.dept-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 2rem;
  border: 2px solid #333;
  background: #1a1a1a;
  color: #aaa;
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s;
}
.dept-btn:hover { border-color: var(--yellow); color: var(--yellow); }
.dept-btn.active {
  background: var(--yellow);
  color: var(--black);
  border-color: var(--yellow);
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(254,186,0,0.3);
}

/* ===== E-BOOK CARDS ===== */
.ebook-card {
  background: #141414;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  border: 1px solid #222;
}
.ebook-card:hover {
  box-shadow: 0 20px 40px rgba(254,186,0,0.1);
  transform: translateY(-8px);
  border-color: rgba(254,186,0,0.3);
}

.ebook-cover {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #0a0a0a;
  position: relative;
}
.ebook-cover-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0a0a0a;
  transition: transform 0.5s ease;
}
.ebook-card:hover .ebook-cover-img {
  transform: scale(1.03);
}

/* Sale badge — orange */
.sale-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: white;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 6px;
  z-index: 5;
  box-shadow: 0 2px 8px rgba(249,115,22,0.4);
  letter-spacing: -0.02em;
}

/* Best Seller badge — orange */
.bestseller-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: linear-gradient(135deg, var(--orange), #fb923c);
  color: #fff;
  font-weight: 800;
  font-size: 0.65rem;
  padding: 4px 8px;
  border-radius: 6px;
  z-index: 5;
  box-shadow: 0 2px 8px rgba(249,115,22,0.5);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  animation: badge-pulse 2s ease-in-out infinite;
}
@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 2px 8px rgba(249,115,22,0.5); }
  50% { box-shadow: 0 4px 16px rgba(249,115,22,0.8); }
}
.ebook-card.is-bestseller {
  border: 2px solid rgba(249,115,22,0.3);
}
.ebook-card.is-bestseller:hover {
  border-color: rgba(249,115,22,0.6);
}

/* ===== HERO SLIDER ===== */
.hero-slider {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  background-size: cover;
  background-position: center;
  filter: brightness(0.25) saturate(0.8);
}
.hero-slide.active { opacity: 1; }

.hero-slide-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 15;
}
.hero-slide-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: all 0.3s;
  border: none;
}
.hero-slide-dot.active {
  background: var(--yellow);
  box-shadow: 0 0 12px rgba(254,186,0,0.7);
}

/* Hover overlay */
.ebook-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}
.ebook-card:hover .ebook-overlay { opacity: 1; }
.overlay-btn {
  background: var(--yellow);
  color: var(--black);
  font-weight: 800;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  transform: translateY(10px);
  transition: transform 0.3s;
  box-shadow: 0 4px 16px rgba(254,186,0,0.4);
}
.ebook-card:hover .overlay-btn { transform: translateY(0); }

/* Department tag */
.dept-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--black);
  background: linear-gradient(135deg, var(--yellow), var(--yellow-light));
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Price styling */
.price-area {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.price-original {
  text-decoration: line-through;
  color: #9ca3af;
  font-size: 0.9rem;
  font-weight: 400;
}
.price-sale {
  color: var(--yellow-dark);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* ===== DEPARTMENT COVER COLORS ===== */
.dept-cover, .dept-cover-sm {
  display: flex;
  align-items: center;
  justify-content: center;
}
.dept-cover { height: 140px; }
.dept-cover-sm { height: 100px; }

.dept-front-office { background: linear-gradient(135deg, #0a0a0a, #1a1a1a); }
.dept-housekeeping { background: linear-gradient(135deg, #0a1a0a, #1a2a1a); }
.dept-gm { background: linear-gradient(135deg, #1a0a1a, #2a1a2a); }
.dept-revenue { background: linear-gradient(135deg, #1a0a0a, #2a1a1a); }
.dept-sale { background: linear-gradient(135deg, #1a1a0a, #2a2a1a); }
[class*="dept-front-office"] { background: linear-gradient(135deg, #0a0a0a, #1a1a1a); }
[class*="dept-housekeeping"] { background: linear-gradient(135deg, #0a1a0a, #1a2a1a); }
[class*="dept-f&b"] { background: linear-gradient(135deg, #1a0a00, #3a1a0a); }
[class*="dept-kitchen"] { background: linear-gradient(135deg, #2a0a00, #4a1a0a); }
[class*="dept-reservation"] { background: linear-gradient(135deg, #000a1a, #0a1a3a); }
[class*="dept-spa"] { background: linear-gradient(135deg, #1a0a1a, #3a1a3a); }
[class*="dept-hr"] { background: linear-gradient(135deg, #0a1a1a, #1a2a2a); }
[class*="dept-marketing"] { background: linear-gradient(135deg, #1a1a00, #3a3a0a); }
[class*="dept-sales"] { background: linear-gradient(135deg, #1a1a0a, #2a2a1a); }
[class*="dept-revenue"] { background: linear-gradient(135deg, #1a0a0a, #2a1a1a); }
[class*="dept-accounting"] { background: linear-gradient(135deg, #0a0a1a, #1a1a3a); }
[class*="dept-engineering"] { background: linear-gradient(135deg, #1a1a1a, #2a2a2a); }
[class*="dept-security"] { background: linear-gradient(135deg, #0a0a1a, #1a1a2a); }
[class*="dept-general-manager"] { background: linear-gradient(135deg, #1a0a1a, #2a1a2a); }
[class*="dept-fitness"] { background: linear-gradient(135deg, #001a0a, #0a3a1a); }
[class*="dept-hotel-owner"] { background: linear-gradient(135deg, #2a1a00, #4a2a0a); }

/* ===== SALE BANNER — ORANGE ===== */
.sale-banner {
  background: linear-gradient(90deg, var(--orange-dark), var(--orange), var(--orange-dark));
  background-size: 200% 100%;
  animation: gradient-slide 3s ease infinite;
  color: white;
  text-align: center;
  padding: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}
@keyframes gradient-slide {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Featured slider */
.featured-section {
  background: var(--black);
  position: relative;
}
.featured-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to top, #111827, transparent);
}

/* Urgency text — orange */
.urgency-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--orange);
  font-weight: 600;
  font-size: 0.75rem;
  animation: pulse-text 2s ease-in-out infinite;
}
@keyframes pulse-text {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ===== TRUST BADGES ===== */
.trust-badges {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.trust-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.trust-badge .icon {
  width: 48px;
  height: 48px;
  background: rgba(254,186,0,0.1);
  border: 1px solid rgba(254,186,0,0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}
.trust-badge .label {
  font-size: 0.75rem;
  color: #ccc;
  font-weight: 600;
}

/* ===== MODAL ===== */
.modal {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}
.modal.hidden { display: none; }
.modal-content {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 1rem;
  padding: 2rem;
  max-width: 500px;
  width: 100%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  color: #e5e5e5;
}
.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #999;
  cursor: pointer;
}

/* Admin tabs (overridden in admin.ejs but keep fallback) */
.admin-tab {
  padding: 0.75rem 1.5rem;
  border: none;
  background: none;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}
.admin-tab.active { color: var(--black); border-bottom-color: var(--yellow); }

/* ===== PROSE (blog) ===== */
.prose h2 { font-size: 1.5rem; font-weight: 700; margin: 1.5rem 0 0.75rem; color: #fff; }
.prose h3 { font-size: 1.25rem; font-weight: 600; margin: 1.25rem 0 0.5rem; color: #e5e5e5; }
.prose p { margin: 0.75rem 0; color: #bbb; line-height: 1.75; }
.prose ul, .prose ol { margin: 0.75rem 0; padding-left: 1.5rem; color: #bbb; }
.prose li { margin: 0.25rem 0; line-height: 1.75; }
.prose strong { color: #fff; }
.prose code { background: #0a0a0a; padding: 0.125rem 0.375rem; border-radius: 0.25rem; font-size: 0.875rem; color: var(--yellow); }

/* Logo */
.site-logo { height: 32px; width: auto; }
.site-logo-lg { height: 48px; width: auto; }

/* Line clamp */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Section headings */
.section-heading {
  position: relative;
  display: inline-block;
}
.section-heading::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--yellow);
  margin-top: 8px;
  border-radius: 2px;
}
.section-heading-center::after {
  margin-left: auto;
  margin-right: auto;
}

/* Stat counter — bold yellow gradient */
.stat-number {
  background: linear-gradient(135deg, var(--yellow), var(--yellow-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glass card */
.glass-card {
  background: rgba(254,186,0,0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(254,186,0,0.15);
  border-radius: 1rem;
  padding: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-gradient { padding-top: 6rem; }
  .price-sale { font-size: 1.2rem; }
}
