/* ==========================================================================
   Akna Mobile Header v2.1 — style.css
   Identity: White #FFFFFF · Rouge #E5231B · Noir #141414
   Fonts: Inter (injected via PHP)
   ========================================================================== */

/* ---- Reset & base ---- */
#amh-header,
#amh-header *,
#amh-header *::before,
#amh-header *::after {
  box-sizing: border-box !important;
  -webkit-tap-highlight-color: transparent;
}

#amh-header {
  --amh-bar-h: 68px;
  --amh-radius: 12px;
  --amh-ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --amh-ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 999999;
}

html.admin-bar #amh-header { top: 46px; }
@media (min-width: 783px) { html.admin-bar #amh-header { top: 32px; } }

#amh-header.amh-sticky  { position: fixed; }
#amh-header:not(.amh-sticky) { position: absolute; }

/* ============================================================
   TOP BAR
   ============================================================ */

.amh-bar {
  height: var(--amh-bar-h);
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 16px;
  background: #ffffff !important;
  position: relative;
  z-index: 10;
  transition: box-shadow 0.3s ease;
}

#amh-header.amh-scrolled .amh-bar {
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
}

/* Red accent line under bar */
.amh-bar-accent {
  height: 3px;
  background: var(--amh-primary);
  position: relative;
  z-index: 10;
  transform-origin: left;
  transition: transform 0.4s var(--amh-ease-spring);
}

#amh-header.amh-open .amh-bar-accent {
  transform: scaleX(0);
}

/* ---- Logo ---- */
.amh-logo {
  display: flex !important;
  align-items: center !important;
  height: 100%;
  text-decoration: none !important;
  flex-shrink: 0;
}

.amh-logo img {
  max-height: 38px;
  width: auto;
  display: block !important;
}

.amh-logo-text {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--amh-dark);
}

/* ---- Bar right group ---- */
.amh-bar-right {
  display: flex !important;
  align-items: center !important;
  gap: 8px;
  flex-shrink: 0;
}

/* ---- CTA bar button ---- */
.amh-cta-bar {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px;
  padding: 10px 16px;
  background: var(--amh-primary) !important;
  color: #ffffff !important;
  font-family: 'Inter', -apple-system, sans-serif !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
  text-decoration: none !important;
  border-radius: 50px !important;
  border: none !important;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 16px rgba(229, 35, 27, 0.38) !important;
  white-space: nowrap;
  line-height: 1 !important;
}

/* Shimmer sweep */
.amh-cta-bar::before {
  content: '';
  position: absolute;
  top: 0; left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  transform: skewX(-18deg);
  animation: amh-shimmer 3s ease-in-out infinite 1.5s;
}

@keyframes amh-shimmer {
  0%   { left: -75%; }
  100% { left: 140%; }
}

.amh-cta-bar:hover,
.amh-cta-bar:focus-visible {
  box-shadow: 0 6px 22px rgba(229, 35, 27, 0.55) !important;
  transform: translateY(-1px);
  color: #ffffff !important;
  text-decoration: none !important;
}

.amh-cta-bar:active { transform: scale(0.96); }

/* Arrow icon inside CTA bar */
.amh-cta-arrow {
  flex-shrink: 0;
  color: #ffffff !important;
  stroke: #ffffff !important;
  transition: transform 0.2s ease;
}
.amh-cta-bar:hover .amh-cta-arrow {
  transform: translateX(3px);
}

/* Hide text label on very small screens */
@media (max-width: 380px) {
  .amh-cta-bar-text { display: none; }
  .amh-cta-bar { padding: 11px 13px; }
}

/* ---- Hamburger toggle — RED with white lines ---- */
.amh-toggle,
#amh-toggle,
#amh-header .amh-toggle,
#amh-header #amh-toggle {
  width: 44px !important;
  height: 44px !important;
  border: none !important;
  background: var(--amh-primary) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  padding: 0 !important;
  border-radius: 50% !important;
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.25s ease !important;
  position: relative;
  z-index: 11;
  box-shadow: 0 3px 12px rgba(229,35,27,0.30) !important;
  outline: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.amh-toggle:hover,
#amh-header .amh-toggle:hover {
  transform: scale(1.06) !important;
  box-shadow: 0 5px 18px rgba(229,35,27,0.45) !important;
}

.amh-toggle:active,
#amh-header .amh-toggle:active {
  transform: scale(0.94) !important;
}

.amh-hbg {
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.amh-hbg-line {
  display: block;
  width: 20px;
  height: 2px;
  background: #ffffff !important;
  border-radius: 2px;
  transition:
    transform 0.38s var(--amh-ease-spring),
    opacity   0.22s ease,
    width     0.28s ease;
  transform-origin: center;
}

#amh-header.amh-open .amh-toggle,
#amh-header.amh-open #amh-toggle {
  background: var(--amh-primary) !important;
  box-shadow: 0 4px 20px rgba(229,35,27,0.50) !important;
}

#amh-header.amh-open .amh-hbg-line { background: #ffffff !important; }

#amh-header.amh-open .amh-hbg-line:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}
#amh-header.amh-open .amh-hbg-line:nth-child(2) {
  transform: translateY(-4px) rotate(-45deg);
}

/* ============================================================
   OVERLAY
   ============================================================ */

#amh-overlay {
  position: fixed;
  inset: 0;
  background: rgba(229, 35, 27, 0.18);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.38s ease, visibility 0.38s ease;
  z-index: 5;
}

#amh-header.amh-open #amh-overlay {
  opacity: 1;
  visibility: visible;
}

/* ============================================================
   FULLSCREEN PANEL — RED BACKGROUND
   ============================================================ */

.amh-panel {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  /* Rich red gradient */
  background: linear-gradient(160deg, #E5231B 0%, #b71c1c 60%, #8b0000 100%) !important;
  display: flex;
  flex-direction: column;
  z-index: 9;

  /* Entry: clip from top with spring */
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.55s var(--amh-ease-spring);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

html.admin-bar .amh-panel { top: 46px; }
@media (min-width: 783px) { html.admin-bar .amh-panel { top: 32px; } }

#amh-header.amh-open .amh-panel {
  clip-path: inset(0 0 0% 0);
}

/* ---- Panel top bar (inside panel) ---- */
.amh-panel-topbar {
  height: var(--amh-bar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  position: relative;
  z-index: 2;
}

/* Logo in panel — force white via filter */
.amh-panel-logo {
  display: flex !important;
  align-items: center !important;
  text-decoration: none !important;
}

.amh-panel-logo img {
  max-height: 34px;
  width: auto;
  display: block !important;
  filter: brightness(0) invert(1);
}

.amh-panel-logo .amh-logo-text {
  color: #ffffff !important;
  font-size: 16px;
  font-weight: 800;
}

/* ---- Close button — white on red ---- */
.amh-close,
#amh-close,
#amh-header .amh-close {
  width: 40px !important;
  height: 40px !important;
  border: 1.5px solid rgba(255,255,255,0.4) !important;
  background: rgba(255,255,255,0.12) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  color: #ffffff !important;
  transition: background 0.2s, border-color 0.2s, transform 0.2s !important;
  padding: 0 !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  outline: none !important;
}

.amh-close:hover,
#amh-header .amh-close:hover {
  background: rgba(255,255,255,0.25) !important;
  border-color: rgba(255,255,255,0.7) !important;
  transform: rotate(90deg) scale(1.1) !important;
}

.amh-close svg,
#amh-header .amh-close svg {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

/* ---- White stripe accent in panel ---- */
.amh-panel-stripe {
  height: 2px;
  background: rgba(255,255,255,0.25);
  flex-shrink: 0;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.55s var(--amh-ease-spring) 0.1s;
}

#amh-header.amh-open .amh-panel-stripe {
  transform: scaleX(1);
}

/* ---- Nav container ---- */
.amh-nav {
  flex: 1;
  padding: 12px 24px 0;
  min-height: 0;
}

/* ---- Menu list ---- */
.amh-menu-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  counter-reset: amh-counter;
}

.amh-menu-list > li {
  counter-increment: amh-counter;
  border-bottom: 1px solid rgba(255,255,255,0.12) !important;
  overflow: hidden;

  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.45s var(--amh-ease-out), transform 0.45s var(--amh-ease-out);
}

#amh-header.amh-open .amh-menu-list > li { opacity: 1 !important; transform: translateY(0) !important; }
#amh-header.amh-open .amh-menu-list > li:nth-child(1) { transition-delay: 0.10s; }
#amh-header.amh-open .amh-menu-list > li:nth-child(2) { transition-delay: 0.16s; }
#amh-header.amh-open .amh-menu-list > li:nth-child(3) { transition-delay: 0.22s; }
#amh-header.amh-open .amh-menu-list > li:nth-child(4) { transition-delay: 0.28s; }
#amh-header.amh-open .amh-menu-list > li:nth-child(5) { transition-delay: 0.34s; }
#amh-header.amh-open .amh-menu-list > li:nth-child(6) { transition-delay: 0.40s; }
#amh-header.amh-open .amh-menu-list > li:nth-child(7) { transition-delay: 0.46s; }
#amh-header.amh-open .amh-menu-list > li:nth-child(8) { transition-delay: 0.52s; }

/* Link row */
.amh-menu-list > li > a,
.amh-menu-list > li > a:visited {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 17px 0 !important;
  color: #ffffff !important;
  text-decoration: none !important;
  font-size: 24px !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  line-height: 1 !important;
  position: relative;
  transition: letter-spacing 0.22s ease, opacity 0.2s ease !important;
}

/* Number prefix */
.amh-menu-list > li > a::before {
  content: counter(amh-counter, decimal-leading-zero);
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  color: rgba(255,255,255,0.55) !important;
  align-self: flex-start;
  padding-top: 5px;
  flex-shrink: 0;
  min-width: 24px;
}

/* White chevron right */
.amh-menu-list > li > a::after {
  content: '';
  width: 7px;
  height: 7px;
  border-top: 2px solid rgba(255,255,255,0.6);
  border-right: 2px solid rgba(255,255,255,0.6);
  transform: rotate(45deg) translateX(-3px);
  opacity: 0;
  margin-left: auto;
  flex-shrink: 0;
  transition: opacity 0.2s ease, transform 0.22s ease !important;
}

.amh-menu-list > li > a:hover,
.amh-menu-list > li > a:focus-visible {
  letter-spacing: 0.01em !important;
  opacity: 0.92 !important;
  color: #ffffff !important;
}

.amh-menu-list > li > a:hover::after {
  opacity: 1;
  transform: rotate(45deg) translateX(0);
}

/* Text span underline effect */
.amh-menu-list > li > a span {
  position: relative;
}
.amh-menu-list > li > a span::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0; right: 0;
  height: 2px;
  background: rgba(255,255,255,0.5);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.amh-menu-list > li > a:hover span::after {
  transform: scaleX(1);
}

/* Sub-menus */
.amh-menu-list ul {
  list-style: none !important;
  padding: 0 0 10px 38px !important;
  margin: 0 !important;
}

.amh-menu-list ul li a,
.amh-menu-list ul li a:visited {
  display: block !important;
  padding: 8px 0 !important;
  color: rgba(255,255,255,0.7) !important;
  text-decoration: none !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  transition: color 0.2s !important;
}

.amh-menu-list ul li a:hover { color: #ffffff !important; }

.amh-empty {
  color: rgba(255,255,255,0.5);
  font-size: 14px;
  padding: 24px 0;
}

/* ============================================================
   PANEL CTA — white button on red background
   ============================================================ */

.amh-panel-cta-wrap {
  padding: 24px 24px 8px;
  flex-shrink: 0;

  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.42s var(--amh-ease-out) 0.36s,
              transform 0.42s var(--amh-ease-out) 0.36s;
}

#amh-header.amh-open .amh-panel-cta-wrap {
  opacity: 1;
  transform: translateY(0);
}

.amh-panel-cta,
.amh-panel-cta:visited,
#amh-header .amh-panel-cta {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px;
  width: 100%;
  padding: 18px 24px;
  background: #ffffff !important;
  color: var(--amh-primary) !important;
  font-family: 'Inter', -apple-system, sans-serif !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em;
  text-decoration: none !important;
  border-radius: var(--amh-radius) !important;
  border: none !important;
  position: relative;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25) !important;
}

.amh-panel-cta::before {
  content: '';
  position: absolute;
  top: 0; left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(229,35,27,0.08), transparent);
  transform: skewX(-18deg);
  animation: amh-shimmer 3s ease-in-out infinite 2s;
}

@keyframes amh-shimmer {
  0%   { left: -75%; }
  100% { left: 140%; }
}

.amh-panel-cta svg,
#amh-header .amh-panel-cta svg {
  color: var(--amh-primary) !important;
  stroke: var(--amh-primary) !important;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.amh-panel-cta:hover,
.amh-panel-cta:focus-visible {
  transform: translateY(-2px) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.30) !important;
  color: var(--amh-primary) !important;
  text-decoration: none !important;
}

.amh-panel-cta:hover svg { transform: translateX(4px); }
.amh-panel-cta:active { transform: scale(0.97) !important; }

/* ============================================================
   WHATSAPP
   ============================================================ */

.amh-whatsapp,
.amh-whatsapp:visited,
#amh-header .amh-whatsapp {
  display: flex !important;
  align-items: center !important;
  gap: 10px;
  margin: 10px 24px 0;
  padding: 14px 20px;
  background: rgba(255,255,255,0.12) !important;
  border: 1.5px solid rgba(255,255,255,0.28) !important;
  color: #ffffff !important;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none !important;
  border-radius: var(--amh-radius);
  flex-shrink: 0;

  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.4s var(--amh-ease-out) 0.42s,
              transform 0.4s var(--amh-ease-out) 0.42s,
              background 0.2s ease, border-color 0.2s ease !important;
}

#amh-header.amh-open .amh-whatsapp {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.amh-whatsapp svg,
#amh-header .amh-whatsapp svg {
  color: #ffffff !important;
  fill: #ffffff !important;
  flex-shrink: 0;
}

.amh-whatsapp:hover,
#amh-header .amh-whatsapp:hover {
  background: rgba(255,255,255,0.22) !important;
  border-color: rgba(255,255,255,0.55) !important;
  color: #ffffff !important;
  text-decoration: none !important;
}

/* ============================================================
   CORNER MARKS — white on red
   ============================================================ */

.amh-corner-mark {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  padding: 24px 24px;
  flex-shrink: 0;
}

.amh-corner-mark span {
  display: block;
  background: rgba(255,255,255,0.4);
  border-radius: 2px;
  opacity: 0;
  transform: scale(0.3) rotate(45deg);
  transition: transform 0.4s var(--amh-ease-spring), opacity 0.4s ease;
}

.amh-corner-mark span:nth-child(1) { width: 8px; height: 8px; }
.amh-corner-mark span:nth-child(2) { width: 12px; height: 12px; }
.amh-corner-mark span:nth-child(3) { width: 16px; height: 16px; }

#amh-header.amh-open .amh-corner-mark span { opacity: 0.9; transform: scale(1) rotate(0deg); }
#amh-header.amh-open .amh-corner-mark span:nth-child(1) { transition-delay: 0.55s; }
#amh-header.amh-open .amh-corner-mark span:nth-child(2) { transition-delay: 0.61s; }
#amh-header.amh-open .amh-corner-mark span:nth-child(3) { transition-delay: 0.67s; }

/* ============================================================
   BODY SCROLL LOCK
   ============================================================ */

body.amh-lock {
  overflow: hidden !important;
  touch-action: none;
}

/* ============================================================
   RIPPLE EFFECT (JS-injected)
   ============================================================ */

.amh-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(229,35,27,0.18);
  transform: scale(0);
  animation: amh-ripple-anim 0.5s linear;
  pointer-events: none;
}

@keyframes amh-ripple-anim {
  to { transform: scale(4); opacity: 0; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .amh-panel,
  .amh-bar-accent,
  .amh-panel-stripe,
  .amh-menu-list > li,
  .amh-hbg-line,
  .amh-corner-mark span,
  .amh-panel-cta-wrap,
  .amh-whatsapp,
  #amh-overlay,
  .amh-cta-bar::before,
  .amh-panel-cta::before {
    transition: none !important;
    animation: none !important;
  }
}
