/* styles.css - Custom Styling & Smooth SPA Animations for ZEN GARDEN */

:root {
  --primary-color: #1E4620;
  --brand-green: #4A8B2C;
  --brand-light: #65B741;
  --accent-color: #4A8B2C;
}

html, body {
  scroll-behavior: smooth;
  font-family: 'Inter', sans-serif;
}

/* ==================== TYPOGRAPHY: PLUS JAKARTA SANS & INTER ==================== */
h1, h2, h3, h4, h5, h6, 
.font-heading,
.heading-serif,
.font-serif-soft {
  font-family: 'Playfair Display', 'Plus Jakarta Sans', Georgia, serif;
  letter-spacing: -0.015em;
}

/* Thanh Menu Navigation & nút bấm dùng Plus Jakarta Sans hiện đại, cao cấp, nét chữ rõ ràng */
#desktop-nav .nav-link,
#mobile-menu .nav-link,
.font-sans-clean,
.font-jakarta {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

.font-body {
  font-family: 'Inter', sans-serif;
}

/* ==================== 1. HIỆU ỨNG CHUYỂN TRANG SPA (FADE-IN) ==================== */
.view-fade-in {
  animation: fadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== 2. TÙY BIẾN THANH CUỘN (SCROLLBAR) ==================== */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #4A8B2C;
}

/* ==================== 3. TÙY CHỈNH THANH TRƯỢT RANGE SLIDER ==================== */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: #e2e8f0;
  border-radius: 9999px;
  height: 8px;
  outline: none;
  transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #4A8B2C;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(74, 139, 44, 0.4);
  border: 2.5px solid #ffffff;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.18);
  background: #3d7224;
}

input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #4A8B2C;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(74, 139, 44, 0.4);
  border: 2.5px solid #ffffff;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

/* ==================== 4. HIỆU ỨNG NÚT NỔI (PULSE & SHAKE ANIMATION) ==================== */
@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.35;
  }
  100% {
    transform: scale(0.95);
    opacity: 0.8;
  }
}

.floating-btn-pulse {
  animation: pulse-ring 2.4s infinite ease-in-out;
}

@keyframes gentle-shake {
  0%, 100% {
    transform: rotate(0deg);
  }
  20%, 60% {
    transform: rotate(-4deg);
  }
  40%, 80% {
    transform: rotate(4deg);
  }
}

.floating-btn-gentle-shake {
  animation: gentle-shake 3s ease-in-out infinite;
}

/* ==================== 5. TOAST NOTIFICATION ==================== */
.toast-slide-in {
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-slide-out {
  animation: slideOutRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInRight {
  from {
    transform: translateX(110%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(110%);
    opacity: 0;
  }
}

/* ==================== 6. PRODUCT CARD HOVER EFFECT ==================== */
.product-card-img {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover .product-card-img {
  transform: scale(1.06);
}

/* ==================== 7. FORM FOCUS & MODAL BACKDROP ==================== */
input:focus, select:focus, textarea:focus {
  border-color: #4A8B2C !important;
  box-shadow: 0 0 0 2px rgba(74, 139, 44, 0.2) !important;
}

/* ==================== 8. PERMANENT TRANSPARENT NAVBAR & MINIMAL NAVIGATION ==================== */
#main-navbar {
  background-color: rgba(0, 0, 0, 0.10) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Biến tất cả các box trên menu thành trong suốt hoàn toàn, bo nhẹ subtle */
#desktop-nav .nav-link {
  position: relative;
  background-color: transparent !important;
  box-shadow: none !important;
  border-radius: 2px !important;
  color: rgba(255, 255, 255, 0.9);
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-weight: 600 !important;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  transition: color 0.25s ease, background-color 0.25s ease, text-shadow 0.25s ease;
}

/* Gân chân (underline bar) tinh tế nhận biết mục active */
#desktop-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 24px;
  height: 2.5px;
  background-color: #65B741;
  box-shadow: 0 0 10px rgba(101, 183, 65, 0.8);
  border-radius: 2px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  opacity: 0;
  pointer-events: none;
}

/* Khi Active: Đổi màu chữ xanh lá chủ đạo, giữ nền trong suốt, font-bold & hiện gân chân */
#desktop-nav .nav-link.active {
  color: #65B741 !important;
  font-weight: 700 !important;
  background-color: transparent !important;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

#desktop-nav .nav-link.active::after {
  transform: translateX(-50%) scaleX(1);
  opacity: 1;
}

/* Hover: Phủ lớp kính mờ rất nhẹ (hover:bg-white/10), chữ sáng rõ */
#desktop-nav .nav-link:hover:not(.active) {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.1) !important;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.6);
}

#desktop-nav .nav-link:hover:not(.active)::after {
  transform: translateX(-50%) scaleX(0.5);
  opacity: 0.5;
}

/* ==================== DROPDOWN DỊCH VỤ ARCHITECTURAL GLASS ==================== */
#services-menu-dropdown-wrapper:hover > div {
  display: block !important;
}

#services-menu-dropdown-wrapper > div {
  animation: dropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.services-dropdown-glass {
  background-color: rgba(10, 18, 14, 0.72) !important;
  backdrop-filter: blur(16px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 4px !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
}

.services-dropdown-item {
  color: rgba(255, 255, 255, 0.90) !important;
  font-size: 0.875rem !important; /* 14px */
  font-weight: 500 !important;
  padding: 0.875rem 1.25rem !important; /* py-3.5 px-5 */
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  display: block !important;
  white-space: nowrap !important;
  text-decoration: none !important;
}

.services-dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.10) !important;
  color: #65B741 !important;
  transform: translateX(4px) !important;
}

/* Mobile Menu Links */
#mobile-menu .nav-link {
  background-color: transparent !important;
  border-radius: 4px !important;
  font-weight: 600 !important;
  transition: all 0.2s ease;
}

#mobile-menu .nav-link.active {
  color: #65B741 !important;
  font-weight: 700 !important;
  border-left: 3px solid #65B741 !important;
  background-color: rgba(101, 183, 65, 0.12) !important;
  padding-left: 0.85rem !important;
}

#mobile-menu .nav-link:hover:not(.active) {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.08) !important;
}

/* ==================== 9. FULL-SCREEN ARCHITECTURAL HERO SLIDER ==================== */
.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  transform: scale(1.05);
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  pointer-events: auto;
}

/* Architectural Sharp Rectangular Slider Indicators */
.slider-dot {
  width: 16px;
  height: 3px;
  border-radius: 0 !important;
  background-color: rgba(255, 255, 255, 0.4);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  border: none;
  outline: none;
  padding: 0;
}

.slider-dot:hover {
  background-color: rgba(255, 255, 255, 0.85);
}

.slider-dot.active {
  width: 38px;
  background-color: #65B741;
  box-shadow: 0 0 10px rgba(101, 183, 65, 0.5);
}

/* ==================== 10. FLOATING CONTACT LOGO BUTTONS ==================== */
/* Nút floating badges luôn hiển thị trực tiếp */
.fab-container {
  position: fixed;
  bottom: 2rem;
  right: 1.5rem;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.fab-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.fab-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Thẻ link logo nguyên bản không box vuông */
.fab-logo-link {
  display: block;
  position: relative;
  width: 48px;
  height: 48px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.fab-logo-link:hover {
  transform: scale(1.12);
}

.fab-logo-link:active {
  transform: scale(0.95);
}

/* Ảnh logo gốc của từng nền tảng, bo tròn tự nhiên và bóng mờ nhẹ chuẩn như ảnh mẫu */
.fab-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.28));
  display: block;
}

/* Tooltip nhãn nổi bên trái khi rê chuột */
.fab-tooltip {
  position: absolute;
  right: calc(100% + 0.75rem);
  white-space: nowrap;
  background-color: rgba(15, 41, 30, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
  pointer-events: none;
  opacity: 0;
  transform: translateX(8px);
  transition: all 0.2s ease;
}

.fab-item:hover .fab-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* Hiệu ứng gợn sóng pulse tròn cho nút Hotline */
.fab-pulse-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #FF7A00;
  opacity: 0.85;
  animation: fabPulse 2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
  pointer-events: none;
}

@keyframes fabPulse {
  0% {
    transform: scale(0.95);
    opacity: 0.85;
  }
  70% {
    transform: scale(1.35);
    opacity: 0;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

/* ==================== 11. SUBTLE ROUNDED CORNERS (2px - 4px) ==================== */
.card-box, .btn-ui, input, select, textarea {
  border-radius: 4px !important;
}

/* ==================== 12. LEADERSHIP TEAM CARD SLIDER (LSS STYLE) ==================== */
.team-member-card {
  border-radius: 8px !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-member-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.12);
}

.team-member-photo-frame {
  border-radius: 6px !important;
}

.team-slider-dot-btn {
  width: 24px;
  height: 4px;
  border-radius: 2px;
  background-color: #CBD5E1;
  transition: all 0.3s ease;
  cursor: pointer;
}

.team-slider-dot-btn.active {
  width: 36px;
  background-color: #1E4620;
}

/* ==================== 13. TESTIMONIALS SLIDER ==================== */
.testimonial-card {
  border-radius: 4px !important;
}

.testimonial-dot-btn {
  width: 20px;
  height: 4px;
  border-radius: 2px;
  background-color: #CBD5E1;
  transition: all 0.3s ease;
  cursor: pointer;
}

.testimonial-dot-btn.active {
  width: 32px;
  background-color: #1E4620;
}

/* ==================== 14. PARTNERS LOGO GRID ==================== */
.partner-logo-card {
  border-radius: 4px !important;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.partner-logo-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}

.partner-logo-inner {
  filter: none !important;
  opacity: 1 !important;
  transition: all 0.35s ease;
}

.partner-logo-card:hover .partner-logo-inner {
  filter: none !important;
  opacity: 1 !important;
}

.partner-dot-btn {
  width: 20px;
  height: 4px;
  border-radius: 2px;
  background-color: #CBD5E1;
  transition: all 0.3s ease;
  cursor: pointer;
}

.partner-dot-btn.active {
  width: 32px;
  background-color: #1E4620;
}

/* ==================== 15. EDITORIAL LSS BLOG STYLING & LIGHTBOX ==================== */
#blog-detail-content h2,
.blog-editorial-content h2 {
  scroll-margin-top: 110px;
  border-left: 4px solid #4A8B2C;
  padding-left: 14px;
  color: #1E4620;
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1.35;
  margin-top: 2.25rem;
  margin-bottom: 1rem;
}

#blog-detail-content h3,
.blog-editorial-content h3 {
  scroll-margin-top: 110px;
  color: #1E293B;
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.4;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

/* Cụm lưới ảnh minh họa LSS (1, 2, 3, 4 ảnh) */
.blog-image-grid {
  margin: 1.5rem 0;
}

.blog-image-grid img {
  border-radius: 4px;
  transition: transform 0.3s ease, filter 0.3s ease;
  cursor: zoom-in;
}

.blog-image-grid img:hover {
  filter: brightness(1.03);
  transform: scale(1.015);
}

/* Khối liên kết "Xem thêm" chuẩn Editorial */
.blog-inline-related {
  border-left: 4px solid #4A8B2C;
  background-color: #F8FAFC;
  padding: 0.85rem 1.15rem;
  border-radius: 0 4px 4px 0;
  margin: 1.5rem 0;
  transition: all 0.25s ease;
}

.blog-inline-related:hover {
  background-color: #F0FDF4;
  border-left-color: #1E4620;
  transform: translateX(3px);
}

/* Smooth TOC nesting */
.toc-item-h2 {
  font-weight: 700;
  color: #1E4620;
}

.toc-item-h3 {
  font-weight: 500;
  color: #475569;
}

/* ==================== 12. ADMIN CMS LEFT SIDEBAR & ACCORDION NAVIGATION ==================== */
#admin-sidebar {
  width: 260px;
  background-color: #0B1F17;
  color: #FFFFFF;
  scrollbar-width: thin;
  scrollbar-color: #1A3E2F #0B1F17;
}

#admin-sidebar::-webkit-scrollbar {
  width: 5px;
}
#admin-sidebar::-webkit-scrollbar-track {
  background: #0B1F17;
}
#admin-sidebar::-webkit-scrollbar-thumb {
  background-color: #1A3E2F;
  border-radius: 4px;
}

/* Menu parent accordion button */
.admin-accordion-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #D1D5DB;
  border-radius: 4px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.admin-accordion-btn:hover {
  background-color: rgba(255, 255, 255, 0.06);
  color: #FFFFFF;
}

.admin-accordion-btn.expanded {
  color: #65B741;
  background-color: rgba(101, 183, 65, 0.08);
}

.admin-accordion-arrow {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-accordion-btn.expanded .admin-accordion-arrow {
  transform: rotate(180deg);
}

/* Submenu container */
.admin-submenu {
  display: none;
  padding-left: 1rem;
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  margin-left: 1.15rem;
}

.admin-submenu.open {
  display: block;
  animation: adminFadeIn 0.2s ease forwards;
}

@keyframes adminFadeIn {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Nav Item Button */
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.45rem 0.65rem;
  font-size: 0.775rem;
  font-weight: 500;
  color: #9CA3AF;
  border-radius: 4px;
  transition: all 0.15s ease;
  cursor: pointer;
  text-align: left;
}

.admin-nav-item:hover {
  background-color: rgba(255, 255, 255, 0.07);
  color: #FFFFFF;
}

.admin-nav-item.active {
  background-color: #153828;
  color: #65B741;
  font-weight: 700;
  border-left: 3px solid #65B741;
  padding-left: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Image preview thumbnails in Admin */
.admin-img-preview-box {
  width: 100%;
  height: 120px;
  border: 1px dashed #D1D5DB;
  border-radius: 4px;
  background-color: #F8FAFC;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.admin-img-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}



/* Phân quyền tài khoản - Khóa các nút xóa khi canDelete = false */
body.admin-restrict-delete .admin-delete-btn,
body.admin-restrict-delete button[data-action="delete"],
body.admin-restrict-delete button[title="Xóa"],
body.admin-restrict-delete button[title="xóa"],
body.admin-restrict-delete .btn-delete-record {
  display: none !important;
}
