/* ============================================================
   Fawzi Ronadi Hero Section Widget CSS (Dark Theme default)
   ============================================================ */

.hero-section-plugin {
  /* Dynamic style custom variable defaults */
  --accent-gold:       #D4AF37;
  --accent-gold-hover: #F1C75B;
  --accent-gold-press: #B8962E;
  --bg-primary:        transparent;
  --bg-surface:        #1E232B;
  --text-primary:      #FFFFFF;
  --text-secondary:    #B8BDC7;
  --border:            #2A3038;
  
  --glass-bg:          rgba(212, 175, 55, 0.07);
  --glass-border:      rgba(212, 175, 55, 0.20);

  /* Transitions */
  --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast:   150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-medium: 300ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Spacing */
  --space-xs:   0.25rem;
  --space-sm:   0.5rem;
  --space-md:   1rem;
  --space-lg:   1.5rem;
  --space-xl:   2rem;
  --space-2xl:  3rem;
  --space-3xl:  4rem;

  /* Border Radii */
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-xl:   32px;
  --radius-full: 9999px;

  /* Typography */
  --font-size-hero: clamp(2.5rem, 5.5vw, 4.5rem);
  --line-height: 1.7;

  width: 100%;
  position: relative;
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

/* ── Section Wrapper ────────────────────────────────────── */
.widget-hero-wrapper {
  position: relative;
  width: 100%;
  min-height: 85svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding-block: var(--space-3xl);
  z-index: 1;
}

.particles-canvas-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ── Container Grid Layout ──────────────────────────────── */
.container-grid-layout {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--space-md);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  align-items: center;
  position: relative;
  z-index: 1;
}

@media (min-width: 1024px) {
  .container-grid-layout {
    grid-template-columns: 1.2fr 1fr;
    padding-inline: var(--space-xl);
  }
}

/* ── Text Content Styles ────────────────────────────────── */
.hero-text-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  text-align: start;
}

.hero-badge-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent-gold);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  margin-block-end: var(--space-md);
}

.hero-badge-badge::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-gold);
  animation: pulse 2s infinite;
}

.hero-greeting-msg {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-block-end: var(--space-xs);
}

.hero-name {
  font-size: var(--font-size-hero);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  margin-block-end: var(--space-sm);
  background: linear-gradient(135deg, var(--text-primary) 60%, var(--accent-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Prevent disconnected Arabic letters on WebKit devices in gradient name */
.hero-section-plugin[dir="rtl"] .hero-name,
html[lang="ar"] .hero-name {
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: unset !important;
  background-clip: unset !important;
  color: var(--text-primary);
  font-weight: 700;
}

.hero-role {
  font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  color: var(--accent-gold);
  font-weight: 500;
  margin-block-end: var(--space-lg);
  min-height: 2em;
}

.hero-tagline {
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  color: var(--text-secondary);
  line-height: var(--line-height);
  margin-block-end: var(--space-xl);
  max-width: 52ch;
}

.hero-ctas {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-block-end: var(--space-lg);
}

/* ── Buttons ────────────────────────────────────────────── */
.hero-section-plugin .btn-primary {
  background: var(--accent-gold);
  color: #111111;
  border: none;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: none !important; /* Hide default pointer to show custom cursor! */
  transition: all var(--transition-medium);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.hero-section-plugin .btn-primary:hover {
  background: var(--accent-gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.35);
}

.hero-section-plugin .btn-primary:active {
  background: var(--accent-gold-press);
  transform: translateY(0);
}

.hero-section-plugin .btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border);
  padding: 0.875rem 2rem;
  border-radius: var(--radius-full);
  font-weight: 500;
  cursor: none !important;
  transition: all var(--transition-medium);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  white-space: nowrap;
}

.hero-section-plugin .btn-secondary:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.hero-available {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-block-start: var(--space-lg);
}

.available-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success, #16A34A);
  animation: pulse 2s infinite;
}

/* ── 9. Hero Visual: blob avatar & floating cards ───────── */
.hero-visual-block {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
}

/* Radial Glow Backdrop */
.hero-bg-decoration {
  display: none;
}

.hero-image-wrapper {
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 1;
  border-radius: var(--radius-xl);
  padding: 4px;
  background: var(--bg-surface);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3), 0 0 40px rgba(212, 175, 55, 0.15);
  overflow: hidden;
  transition: transform 0.5s var(--transition-smooth), box-shadow 0.5s var(--transition-smooth);
}

.hero-image-wrapper:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 60px rgba(212, 175, 55, 0.3);
}

/* Animated moving golden border */
.hero-image-wrapper::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150%;
  height: 150%;
  background: conic-gradient(
    from 0deg,
    transparent 0%,
    transparent 15%,
    var(--accent-gold) 25%,
    transparent 35%,
    transparent 65%,
    var(--accent-gold-hover) 75%,
    transparent 85%,
    transparent 100%
  );
  transform: translate(-50%, -50%);
  animation: borderRotateAnim 5s linear infinite;
  z-index: 0;
}

.hero-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: calc(var(--radius-xl) - 4px);
  position: relative;
  z-index: 1;
  background: var(--bg-surface);
  display: block;
}

/* Floating Badge Cards */
.hero-float {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: floatRotate 5s ease-in-out infinite;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), 0 0 16px rgba(212, 175, 55, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  white-space: nowrap;
  z-index: 2;
}

.hero-float:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35), 0 0 32px rgba(212, 175, 55, 0.3);
  border-color: var(--accent-gold);
}

.hero-float-1 {
  top: 8%;
  inset-inline-start: -10%;
  animation-delay: 0s;
}

.hero-float-2 {
  bottom: 18%;
  inset-inline-end: -6%;
  animation-delay: 1.5s;
}

.hero-float .icon-wrap {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--accent-gold);
  flex-shrink: 0;
}

.hero-float-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.hero-float-text span {
  display: block;
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-block-start: 1px;
}

/* ── Keyframe Animations ─────────────────────────────── */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.3); }
}

@keyframes floatRotate {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25%      { transform: translateY(-10px) rotate(2deg); }
  50%      { transform: translateY(-18px) rotate(0deg); }
  75%      { transform: translateY(-10px) rotate(-2deg); }
}

@keyframes rotateGlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes borderRotateAnim {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes blink {
  0%, 100% { border-inline-end-color: var(--accent-gold); }
  50%      { border-inline-end-color: transparent; }
}

/* Typewriter animation dynamic cursor setting */
.typewriter-node {
  border-inline-end: 2px solid var(--accent-gold);
  animation: blink 1s step-end infinite;
  padding-inline-end: 2px;
}

/* ── RTL Overrides ───────────────────────────────────────── */
.hero-section-plugin[dir="rtl"] .typewriter-node {
  border-inline-end: none;
  border-inline-start: 2px solid var(--accent-gold);
  padding-inline-start: 2px;
  padding-inline-end: 0;
}

.hero-section-plugin[dir="rtl"] .hero-text-block {
  text-align: right;
  align-items: flex-start;
}

.hero-section-plugin[dir="rtl"] .hero-badge-badge::before {
  order: 2;
}

/* ── Responsiveness Breakpoints ─────────────────────────── */
@media (max-width: 479px) {
  .hero-visual-block {
    margin-inline: auto;
    margin-block-end: var(--space-lg);
  }
  .hero-image-wrapper {
    width: 260px;
    height: 260px;
  }
  .hero-bg-decoration {
    width: 360px;
    height: 360px;
  }
  .hero-float { display: none; } /* Hide floating badge cards on very small screens to fit layout */
  
  .hero-ctas {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }
  
  .hero-ctas .btn-primary,
  .hero-ctas .btn-secondary {
    width: 100%;
    justify-content: center;
  }
}

@media (min-width: 480px) and (max-width: 767px) {
  .hero-visual-block {
    margin-inline: auto;
    margin-block-end: var(--space-lg);
  }
  .hero-image-wrapper {
    width: 320px;
    height: 320px;
  }
  .hero-bg-decoration {
    width: 420px;
    height: 420px;
  }
  .hero-float { display: none; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .hero-image-wrapper {
    width: 420px;
    height: 420px;
  }
  .hero-float-1 { inset-inline-start: -5%; }
  .hero-float-2 { inset-inline-end: -2%; }
}

/* Touch targets spacing */
@media (hover: none) {
  .hero-section-plugin .btn-primary,
  .hero-section-plugin .btn-secondary {
    min-height: 44px;
    min-width: 44px;
  }
}

/* Accessibility reduced motion setting */
@media (prefers-reduced-motion: reduce) {
  .hero-image-wrapper img {
    animation: none !important;
  }
  
  .hero-image-wrapper::before {
    animation: none !important;
    display: none !important;
  }
  
  .hero-bg-decoration,
  .hero-float,
  .available-dot,
  .hero-badge-badge::before,
  .typewriter-node {
    animation: none !important;
  }
}
