/* ============================================================
   Fawzi Ronadi 100% Match Header Widget CSS (Dark Mode default)
   ============================================================ */

.header-section-plugin-wrapper {
  /* Brand Dark Theme Variables */
  --bg-primary:        #0F1115;
  --bg-surface:        #1E232B;
  --text-primary:      #FFFFFF;
  --text-secondary:    #B8BDC7;
  --border:            #2A3038;
  --accent-gold:       #D4AF37;
  --accent-gold-hover: #F1C75B;
  --accent-gold-press: #B8962E;
  
  --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;

  /* Border Radii */
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-full: 9999px;

  /* Z-Index */
  --z-sticky:  100;
  --z-overlay: 200;

  width: 100%;
}

/* ── Fixed Header Navbar ────────────────────────────────── */
.header-section-plugin-wrapper .navbar {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: var(--z-sticky);
  transition: background-color var(--transition-medium), box-shadow var(--transition-medium);
  animation: fadeInDown 0.5s ease both;
  background-color: transparent;
}

/* Glassmorphism state when scrolled */
.header-section-plugin-wrapper .navbar.scrolled {
  background-color: color-mix(in srgb, var(--bg-primary) 92%, transparent) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}

.header-section-plugin-wrapper .navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding-block: var(--space-sm);
}

@media (min-width: 768px) {
  .header-section-plugin-wrapper .navbar-inner {
    gap: var(--space-md);
    padding-block: var(--space-md);
  }
}

/* Container Width matches Elementor */
.header-section-plugin-wrapper .navbar-container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--space-md);
}

@media (min-width: 1024px) {
  .header-section-plugin-wrapper .navbar-container {
    padding-inline: var(--space-xl);
  }
}

.header-section-plugin-wrapper .navbar-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header-section-plugin-wrapper .navbar-logo-img {
  height: 40px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  display: block;
}

@media (min-width: 768px) {
  .header-section-plugin-wrapper .navbar-logo-img {
    height: 52px;
    max-width: 220px;
  }
}

/* ── Menu Links ────────────────────────────────────────── */
.header-section-plugin-wrapper .nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex: 1;
  justify-content: center;
}

.header-section-plugin-wrapper .nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  padding-block: var(--space-xs);
  position: relative;
  font-family: inherit;
}

.header-section-plugin-wrapper .nav-link::after {
  content: '';
  position: absolute;
  inset-block-end: 0;
  inset-inline: 0;
  height: 2px;
  background: var(--accent-gold);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--transition-medium);
}

.header-section-plugin-wrapper .nav-link:hover,
.header-section-plugin-wrapper .nav-link.active {
  color: var(--text-primary);
}

.header-section-plugin-wrapper .nav-link:hover::after,
.header-section-plugin-wrapper .nav-link.active::after {
  transform: scaleX(1);
}

.header-section-plugin-wrapper .navbar-controls {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
  margin-inline-start: auto;
}

/* ── Language Switcher ──────────────────────────────────── */
.header-section-plugin-wrapper .lang-switcher {
  display: flex;
  gap: 2px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 3px;
  flex-shrink: 0;
}

.header-section-plugin-wrapper .lang-btn {
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--transition-medium);
  min-width: 30px;
  text-align: center;
  font-family: inherit;
}

@media (min-width: 768px) {
  .header-section-plugin-wrapper .lang-btn {
    padding: 0.3rem 0.75rem;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    min-width: 36px;
  }
}

.header-section-plugin-wrapper .lang-btn.active {
  background: var(--accent-gold);
  color: #050505;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.35);
}

.header-section-plugin-wrapper .lang-btn:hover:not(.active) {
  color: var(--accent-gold);
}

/* ── CTA Button ─────────────────────────────────────────── */
.header-section-plugin-wrapper .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: pointer;
  transition: all var(--transition-medium);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
  font-family: inherit;
}

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

.header-section-plugin-wrapper .nav-cta {
  padding: 0.6rem 1.25rem;
  font-size: 0.85rem;
}

/* ── Mobile Hamburger menu ──────────────────────────────── */
.header-section-plugin-wrapper .hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  padding: 0.5rem;
  transition: border-color var(--transition-fast);
  flex-shrink: 0;
  cursor: pointer;
}

.header-section-plugin-wrapper .hamburger:hover {
  border-color: var(--accent-gold);
}

.header-section-plugin-wrapper .hamburger-line {
  display: block;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition-medium), opacity var(--transition-medium);
}

.header-section-plugin-wrapper .hamburger.open .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header-section-plugin-wrapper .hamburger.open .hamburger-line:nth-child(2) { opacity: 0; }
.header-section-plugin-wrapper .hamburger.open .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile View Rules (< 768px) */
@media (max-width: 767px) {
  .header-section-plugin-wrapper .hamburger { display: flex; }
  .header-section-plugin-wrapper .nav-cta { display: none; }

  .header-section-plugin-wrapper .nav-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: fixed;
    inset-block-start: 0;
    inset-inline-end: 0;
    width: min(80vw, 320px);
    height: 100dvh;
    background: var(--bg-primary);
    border-inline-start: 1px solid var(--border);
    z-index: var(--z-overlay);
    padding-block-start: 5rem;
    padding-block-end: var(--space-xl);
    padding-inline: var(--space-xl);
    gap: var(--space-xl);
    overflow-y: auto;
    box-shadow: -4px 0 32px rgba(0, 0, 0, 0.18);
    
    /* Hidden Initial State */
    visibility: hidden;
    opacity: 0;
    transform: translateX(100%);
    transition:
      transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
      opacity   0.35s cubic-bezier(0.4, 0, 0.2, 1),
      visibility 0s   linear 0.35s;
    pointer-events: none;
  }

  /* Drawer opens from left in RTL */
  .header-section-plugin-wrapper[dir="rtl"] .nav-links {
    inset-inline-end: 0;
    inset-inline-start: auto;
    border-inline-start: none;
    border-inline-end: 1px solid var(--border);
    transform: translateX(-100%);
    box-shadow: 4px 0 32px rgba(0, 0, 0, 0.18);
  }

  .header-section-plugin-wrapper .nav-links.mobile-open {
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    transition:
      transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
      opacity   0.35s cubic-bezier(0.4, 0, 0.2, 1),
      visibility 0s   linear 0s;
  }

  .header-section-plugin-wrapper .nav-links .nav-link {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    width: 100%;
    padding-block: var(--space-xs);
    border-bottom: 1px solid var(--border);
  }

  .header-section-plugin-wrapper .nav-links .nav-link:last-of-type {
    border-bottom: none;
  }

  /* Backdrop Dim overlay */
  .header-section-plugin-wrapper .nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: calc(var(--z-sticky) - 1);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0.35s;
  }

  .header-section-plugin-wrapper .nav-backdrop.active {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0s;
  }

  /* Close drawer X button */
  .header-section-plugin-wrapper .nav-close-btn {
    position: absolute;
    inset-block-start: var(--space-md);
    inset-inline-end: var(--space-md);
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color var(--transition-fast), color var(--transition-fast);
  }

  .header-section-plugin-wrapper .nav-close-btn:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
  }
}

@media (min-width: 768px) {
  .header-section-plugin-wrapper .hamburger { display: none; }
  .header-section-plugin-wrapper .nav-links { display: flex; }
  .header-section-plugin-wrapper .nav-cta { display: inline-flex; }
}

/* Animations */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes blink {
  0%, 100% { border-inline-end-color: var(--accent-gold); }
  50%      { border-inline-end-color: transparent; }
}
