/* ==========================================================================
   Adi Gamliel Theme - Custom CSS
   Extracted from original index.html
   ========================================================================== */

/* --- Missing Tailwind utilities --- */
.z-10 {
  z-index: 10;
}
.z-20 {
  z-index: 20;
}
.leading-tight {
  line-height: 1.25;
}
.max-w-lg {
  max-width: 32rem;
}
.object-contain {
  object-fit: contain;
}
.py-3\.5 {
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
}
@media (min-width: 768px) {
  .md\:px-12 {
    padding-left: 3rem;
    padding-right: 3rem;
  }
}
@media (min-width: 1024px) {
  .lg\:px-24 {
    padding-left: 6rem;
    padding-right: 6rem;
  }
  .lg\:px-16 {
    padding-left: 4rem;
    padding-right: 4rem;
  }
}
.bg-black\/30 {
  background-color: rgba(0, 0, 0, 0.3);
}
.bg-black\/5 {
  background-color: rgba(0, 0, 0, 0.05);
}
.border-black\/10 {
  border-color: rgba(0, 0, 0, 0.1);
}
.border-white\/20 {
  border-color: rgba(255, 255, 255, 0.2);
}
.underline-offset-4 {
  text-underline-offset: 4px;
}
.decoration-gray-500 {
  text-decoration-color: #6b7280;
}
.group:hover .group-hover\:translate-y-0\.5 {
  transform: translateY(0.125rem);
}
.text-base {
  font-size: 1rem;
  line-height: 1.5rem;
}
.px-10 {
  padding-left: 2.5rem;
  padding-right: 2.5rem;
}
.font-normal {
  font-weight: 400;
}
.not-italic {
  font-style: normal;
}
.space-y-3 > :not([hidden]) ~ :not([hidden]) {
  margin-top: 0.75rem;
}
.space-y-4 > :not([hidden]) ~ :not([hidden]) {
  margin-top: 1rem;
}
.max-h-full {
  max-height: 100%;
}
.border-gray-200 {
  border-color: #e5e7eb;
}
@media (min-width: 640px) {
  .sm\:flex-row {
    flex-direction: row;
  }
  .sm\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.hover\:bg-gray-50:hover {
  background-color: #f9fafb;
}
.border-zinc-800 {
  border-color: #27272a;
}
.border-zinc-700 {
  border-color: #3f3f46;
}
.border-white {
  border-color: #fff;
}
.h-64 {
  height: 16rem;
}
.pt-5 {
  padding-top: 1.25rem;
}
.py-10 {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}
.mt-auto {
  margin-top: auto;
}
.overflow-y-auto {
  overflow-y: auto;
}
.opacity-90 {
  opacity: 0.9;
}
.shadow-elegant {
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
}
.shadow-glow {
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}
@media (min-width: 768px) {
  .md\:text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
  }
  .md\:flex-row {
    flex-direction: row;
  }
  .md\:mb-0 {
    margin-bottom: 0;
  }
  .md\:col-span-2 {
    grid-column: span 2 / span 2;
  }
}
.space-y-6 > :not([hidden]) ~ :not([hidden]) {
  margin-top: 1.5rem;
}
.space-y-8 > :not([hidden]) ~ :not([hidden]) {
  margin-top: 2rem;
}
.space-y-10 > :not([hidden]) ~ :not([hidden]) {
  margin-top: 2.5rem;
}
.gap-5 {
  gap: 1.25rem;
}
.gap-8 {
  gap: 2rem;
}
.gap-12 {
  gap: 3rem;
}
.gap-16 {
  gap: 4rem;
}
.lg\:gap-20 {
  gap: 5rem;
}
.mt-10 {
  margin-top: 2.5rem;
}
.-mt-4 {
  margin-top: -1rem;
}
.mb-10 {
  margin-bottom: 2.5rem;
}
.mb-16 {
  margin-bottom: 4rem;
}
.mb-20 {
  margin-bottom: 5rem;
}
.w-20 {
  width: 5rem;
}
.max-w-5xl {
  max-width: 64rem;
}
.max-w-7xl {
  max-width: 80rem;
}
.text-8xl {
  font-size: 6rem;
  line-height: 1;
}
.scale-95 {
  transform: scale(0.95);
}
.opacity-50 {
  opacity: 0.5;
}
.tracking-tighter {
  letter-spacing: -0.05em;
}
.tracking-widest {
  letter-spacing: 0.1em;
}
.hover\:-translate-y-0\.5:hover {
  transform: translateY(-0.125rem);
}
.hover\:-translate-y-1:hover {
  transform: translateY(-0.25rem);
}
.hover\:-translate-y-2:hover {
  transform: translateY(-0.5rem);
}
.hover\:shadow-xl:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}
.hover\:shadow-lg:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}
.hover\:scale-110:hover {
  transform: scale(1.1);
}

/* Author section about text links */
.adi-about .space-y-6 a {
  color: #d1d5db;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: #6b7280;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.adi-about .space-y-6 a:hover {
  color: #ffffff;
  text-decoration-color: #ffffff;
}

/* Author about text paragraphs */
.adi-about .space-y-6 p {
  font-size: 1.125rem;
  line-height: 1.75;
}

/* Animate float for order section background */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}
.animate-float {
  animation: float 6s ease-in-out infinite;
}
.animate-float-delayed {
  animation: float 8s ease-in-out 2s infinite;
}

/* --- Base --- */
body {
  font-family: "Rubik", sans-serif;
  background-color: #ffffff;
  color: #18181b;
  overflow-x: hidden;
}

/* --- Hero Canvas --- */
#hero-canvas {
  display: block;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  filter: contrast(1.05) brightness(0.95);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Grain Overlay */
#hero-sequence-container::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("https://www.transparenttextures.com/patterns/stardust.png");
  opacity: 0.12;
  pointer-events: none;
  z-index: 5;
}

#hero-sequence-container {
  position: relative;
  width: 100%;
  height: auto;
  background: #000;
}

#hero-pinned {
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

/* Bottom fade */
#hero-pinned::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 20vh;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.85));
  pointer-events: none;
  z-index: 15;
}

#adi-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: transparent !important;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  z-index: 10;
}

/* --- Preloader --- */
@keyframes preloader-timeout {
  0%, 95% { opacity: 1; visibility: visible; }
  100%    { opacity: 0; visibility: hidden; pointer-events: none; display: none; }
}

#preloader {
  position: fixed;
  inset: 0;
  background: #ffffff;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease-out;
  animation: preloader-timeout 8s forwards;
}

.loader-bar-bg {
  width: 200px;
  height: 2px;
  background: #f3f4f6;
  margin-top: 20px;
  position: relative;
  overflow: hidden;
}

.loader-bar-fill {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 0%;
  background: #000000;
  transition: width 0.3s ease-out;
}

/* --- Section Stacking --- */
section,
footer {
  position: relative;
  z-index: 20;
}

/* --- Navbar --- */
#navbar {
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  z-index: 100;
}

/* --- Hero Content Dynamic Color Transitions --- */
#hero-content h1,
#hero-content p,
#hero-content .hero-badge,
#hero-content .hero-badge span,
#hero-content .hero-btn-primary,
#hero-content .hero-btn-secondary,
#hero-content .hero-secondary p {
  transition: color 0.8s ease,
    background-color 0.8s ease,
    border-color 0.8s ease,
    filter 0.8s ease;
}

/* Ensure inner paragraphs from wp_kses_post inherit the white color */
#hero-content .hero-secondary p {
  color: inherit;
}

/* Bright scene: dark text for bright video frames (73+) */
#hero-content.bright-scene h1 {
  color: #000 !important;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.9),
    0 0 60px rgba(255, 255, 255, 0.5),
    0 2px 4px rgba(255, 255, 255, 0.8);
  filter: none;
}

#hero-content.bright-scene .hero-badge span {
  color: #000 !important;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.8),
    0 0 40px rgba(255, 255, 255, 0.4);
}

#hero-content.bright-scene .hero-badge span.text-white\/30 {
  color: rgba(0, 0, 0, 0.35) !important;
}

#hero-content.bright-scene .hero-secondary p {
  color: #000 !important;
  filter: none;
  text-shadow: 0 0 25px rgba(255, 255, 255, 0.9),
    0 0 50px rgba(255, 255, 255, 0.5);
}

#hero-content.bright-scene .hero-btn-primary {
  background: #000 !important;
  color: #fff !important;
}

#hero-content.bright-scene .hero-btn-secondary {
  background: #fff !important;
  color: #000 !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
}

/* --- Reveal Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(40px) scale(0.98);
  transition: all 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Staggered Children */
.stagger-parent .reveal-child {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.stagger-parent.active .reveal-child {
  opacity: 1;
  transform: translateY(0);
}

.stagger-parent.active .reveal-child:nth-child(1) { transition-delay: 0.1s; }
.stagger-parent.active .reveal-child:nth-child(2) { transition-delay: 0.2s; }
.stagger-parent.active .reveal-child:nth-child(3) { transition-delay: 0.3s; }
.stagger-parent.active .reveal-child:nth-child(4) { transition-delay: 0.4s; }

/* --- 3D & Parallax --- */
.perspective-container {
  perspective: 1000px;
}

.book-3d {
  transform-style: preserve-3d;
  transition: transform 0.4s ease-out;
}

/* Button Shine Effect */
.btn-shine {
  position: relative;
  overflow: hidden;
}

.btn-shine::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-20deg) translateX(200%);
  transition: transform 0.5s;
}

.btn-shine:hover::after {
  transform: skewX(-20deg) translateX(-200%);
  transition: transform 1s ease-in-out;
}

/* --- Image Hover Zoom --- */
.img-zoom-container {
  overflow: hidden;
}

.img-zoom-target {
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.group:hover .img-zoom-target {
  transform: scale(1.05);
}

/* --- Progress Bar --- */
#progress-bar {
  width: 0%;
  transition: width 0.1s;
}

/* --- Credentials Ticker --- */
#credentialsTicker {
  display: flex;
  align-items: center;
}

#credentialsTicker .ticker-item {
  flex-shrink: 0;
  padding: 0 1rem;
  white-space: nowrap;
}

/* --- No Scrollbar --- */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* --- Flip Card --- */
.flip-card {
  perspective: 1000px;
  height: 400px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

[dir="rtl"] .flip-card:hover .flip-card-inner {
  transform: rotateY(-180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 1.5rem;
  overflow: hidden;
}

.flip-card-back {
  transform: rotateY(180deg);
}

[dir="rtl"] .flip-card-back {
  transform: rotateY(-180deg);
}

/* --- Blog Single Post --- */
.single-post-content {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #3f3f46;
}

.single-post-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #18181b;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.single-post-content h3 {
  font-size: 1.375rem;
  font-weight: 700;
  color: #18181b;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.single-post-content p {
  margin-bottom: 1.25rem;
}

.single-post-content blockquote {
  border-right: 4px solid #000;
  padding-right: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: #52525b;
}

.single-post-content ul,
.single-post-content ol {
  padding-right: 1.5rem;
  margin-bottom: 1.25rem;
}

.single-post-content li {
  margin-bottom: 0.5rem;
}

.single-post-content a {
  color: #000;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.single-post-content a:hover {
  color: #52525b;
}

.single-post-content img {
  border-radius: 1rem;
  margin: 1.5rem 0;
}

/* --- Pagination --- */
.adi-pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.adi-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.2s;
  color: #52525b;
}

.adi-pagination .page-numbers:hover {
  background-color: #f4f4f5;
  color: #000;
}

.adi-pagination .page-numbers.current {
  background-color: #000;
  color: #fff;
}

/* --- Blog Post Prose Styles --- */
.prose p {
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
  line-height: 1.8;
  color: #3f3f46;
}

.prose h2 {
  font-size: 1.875rem;
  font-weight: 700;
  color: #000;
  margin-top: 3rem;
  margin-bottom: 1rem;
}

.prose h3 {
  font-size: 1.375rem;
  font-weight: 700;
  color: #000;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.prose blockquote {
  border-right: 4px solid #000;
  padding-right: 1.5rem;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.6;
  color: #000;
  margin: 3rem 0;
  background: linear-gradient(to left, #f4f4f5, transparent);
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  border-radius: 0.5rem;
}

.prose ul,
.prose ol {
  padding-right: 1.5rem;
  margin-bottom: 2rem;
}

.prose ol {
  list-style-type: decimal;
}

.prose ul {
  list-style-type: disc;
}

.prose li {
  font-size: 1.125rem;
  color: #3f3f46;
  margin-bottom: 0.75rem;
  line-height: 1.8;
}

.prose li strong {
  color: #000;
}

.prose a {
  color: #000;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.prose a:hover {
  color: #52525b;
}

.prose img {
  border-radius: 1rem;
  margin: 1.5rem 0;
}

/* --- Blog "Load More" pagination link --- */
.mt-16.text-center a {
  display: inline-block;
  padding: 1rem 2.5rem;
  border-radius: 9999px;
  border: 2px solid #000;
  color: #000;
  font-weight: 700;
  transition: background-color 0.3s, color 0.3s;
}

.mt-16.text-center a:hover {
  background-color: #000;
  color: #fff;
}

/* ==========================================================================
   LTR Overrides (English)
   ========================================================================== */

/* Loader bar fill direction */
[dir="ltr"] .loader-bar-fill {
  right: auto;
  left: 0;
}

/* Nav walker underline animation: slide from left in LTR */
[dir="ltr"] .group .absolute.-bottom-1 {
  right: auto;
  left: 0;
}

/* Single post content: blockquote border + list padding */
[dir="ltr"] .single-post-content blockquote {
  border-right: none;
  padding-right: 0;
  border-left: 4px solid #000;
  padding-left: 1.5rem;
}

[dir="ltr"] .single-post-content ul,
[dir="ltr"] .single-post-content ol {
  padding-right: 0;
  padding-left: 1.5rem;
}

/* Prose styles: blockquote border + gradient + list padding */
[dir="ltr"] .prose blockquote {
  border-right: none;
  padding-right: 0;
  border-left: 4px solid #000;
  padding-left: 1.5rem;
  background: linear-gradient(to right, #f4f4f5, transparent);
}

[dir="ltr"] .prose ul,
[dir="ltr"] .prose ol {
  padding-right: 0;
  padding-left: 1.5rem;
}

/* Hero section: flip margins and text alignment for LTR */
[dir="ltr"] #hero-content {
  margin-right: 0;
  margin-left: 3rem;
  text-align: left;
}

@media (min-width: 768px) {
  [dir="ltr"] #hero-content {
    margin-left: 6rem;
  }
}

[dir="ltr"] #hero-content > .flex {
  text-align: left;
  align-items: flex-start;
}

[dir="ltr"] .hero-secondary {
  margin-right: auto;
  margin-left: 0;
}

/* Navigation: remove bullet dots from bare <li> elements */
#navbar li {
  list-style: none;
}
