/**
 * WP Article Section Tabs - Stylesheet
 * 3D Glossy Wave Capsule (Matching user button design)
 */

:root {
  --wp-ast-primary: #dc2626;
  --wp-ast-primary-hover: #b91c1c;
  --wp-ast-primary-3d: #991b1b;
  --wp-ast-primary-light: #fef2f2;
  --wp-ast-bg: transparent;
  --wp-ast-text: #0f172a;
  --wp-ast-border: #e2e8f0;
  --wp-ast-sticky-top: 0px;
}

/* Theme Variations */
.wp-ast-theme-red,
.wp-ast-theme-crimson {
  --wp-ast-primary: #dc2626;
  --wp-ast-primary-hover: #b91c1c;
  --wp-ast-primary-3d: #991b1b;
  --wp-ast-primary-light: #fef2f2;
}
.wp-ast-theme-lime {
  --wp-ast-primary: #65a30d;
  --wp-ast-primary-hover: #4d7c0f;
  --wp-ast-primary-3d: #365314;
  --wp-ast-primary-light: #f7fee7;
}
.wp-ast-theme-cyan,
.wp-ast-theme-ocean {
  --wp-ast-primary: #0284c7;
  --wp-ast-primary-hover: #0369a1;
  --wp-ast-primary-3d: #075985;
  --wp-ast-primary-light: #f0f9ff;
}
.wp-ast-theme-purple,
.wp-ast-theme-indigo {
  --wp-ast-primary: #8b5cf6;
  --wp-ast-primary-hover: #7c3aed;
  --wp-ast-primary-3d: #6d28d9;
  --wp-ast-primary-light: #f5f3ff;
}
.wp-ast-theme-pink,
.wp-ast-theme-rose {
  --wp-ast-primary: #ec4899;
  --wp-ast-primary-hover: #db2777;
  --wp-ast-primary-3d: #be185d;
  --wp-ast-primary-light: #fdf2f8;
}
.wp-ast-theme-dark-pink {
  --wp-ast-primary: #be185d;
  --wp-ast-primary-hover: #9d174d;
  --wp-ast-primary-3d: #831843;
  --wp-ast-primary-light: #fdf2f8;
}
.wp-ast-theme-minimal {
  --wp-ast-primary: #475569;
  --wp-ast-primary-hover: #334155;
  --wp-ast-primary-3d: #1e293b;
  --wp-ast-primary-light: #f8fafc;
}
.wp-ast-theme-emerald {
  --wp-ast-primary: #059669;
  --wp-ast-primary-hover: #047857;
  --wp-ast-primary-3d: #064e3b;
  --wp-ast-primary-light: #ecfdf5;
}
.wp-ast-theme-amber {
  --wp-ast-primary: #d97706;
  --wp-ast-primary-hover: #b45309;
  --wp-ast-primary-3d: #92400e;
  --wp-ast-primary-light: #fffbeb;
}
.wp-ast-theme-black,
.wp-ast-theme-slate {
  --wp-ast-primary: #0f172a;
  --wp-ast-primary-hover: #020617;
  --wp-ast-primary-3d: #000000;
  --wp-ast-primary-light: #f1f5f9;
}

/* Container */
.wp-ast-container {
  margin: 0.75rem 0 1rem 0;
  padding: 0.25rem 0.25rem 0 0.25rem;
  position: relative;
  z-index: 9999;
  box-sizing: border-box;
  transition: box-shadow 0.25s ease, background 0.25s ease, border-radius 0.25s ease;
}

.wp-ast-container[data-sticky="yes"] {
  position: -webkit-sticky;
  position: sticky;
  top: var(--wp-ast-sticky-top, 0px);
  z-index: 99999;
}
.wp-ast-container.is-pinned,
.wp-ast-container.wp-ast-is-fixed {
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 24px -2px rgba(15, 23, 42, 0.12) !important;
}
.wp-ast-container.wp-ast-is-fixed {
  position: fixed !important;
  z-index: 999999 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  transition: none !important;
}
.wp-ast-sticky-placeholder {
  display: none;
  visibility: hidden;
  margin: 0;
  padding: 0;
}

.wp-ast-tabs-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start !important;
  direction: rtl !important;
  gap: 3px;
  overflow-x: auto;
  white-space: nowrap;
  scroll-behavior: smooth;
  padding: 0.25rem 0.15rem 0.15rem 0.15rem;
  padding-right: var(--wp-ast-tabs-right-offset, 0px) !important;
  scroll-padding-right: var(--wp-ast-tabs-right-offset, 0px) !important;
  margin: 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.wp-ast-tabs-nav::-webkit-scrollbar {
  display: none;
}

/* Progress bar directly attached and flush to tabs */
.wp-ast-progress-track {
  width: 100% !important;
  height: 5px !important;
  background: #e2e8f0 !important;
  background: rgba(226, 232, 240, 0.85) !important;
  border-radius: 9999px !important;
  overflow: hidden !important;
  margin-top: 4px !important;
  margin-bottom: 2px !important;
  position: relative !important;
  display: block !important;
}
.wp-ast-progress-fill {
  height: 100% !important;
  min-width: 0% !important;
  width: 0%;
  background: #dc2626; /* fallback */
  background: var(--wp-ast-primary, #dc2626) !important;
  border-radius: 9999px !important;
  transition: width 0.12s ease-out !important;
}

/* ======================================================== */
/* 3D TRIP CARDS TABS (MATCHING USER'S 7 IMAGES) */
/* ======================================================== */
.wp-ast-style-trip-cards .wp-ast-tabs-nav {
  justify-content: flex-start !important;
  direction: rtl !important;
  gap: 3px;
  padding: 0.25rem 0.15rem 0.15rem 0.15rem;
  padding-right: var(--wp-ast-tabs-right-offset, 0px) !important;
  scroll-padding-right: var(--wp-ast-tabs-right-offset, 0px) !important;
}
.wp-ast-style-trip-cards .wp-ast-tab-item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 115px;
  height: 58px;
  padding: 4px 10px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  text-decoration: none !important;
  color: #0f172a;
  font-family: 'Cairo', 'Segoe UI', system-ui, sans-serif;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  user-select: none;
  flex-shrink: 0;
}
.wp-ast-style-trip-cards .wp-ast-tab-icon {
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wp-ast-style-trip-cards .wp-ast-tab-icon svg,
.wp-ast-style-trip-cards .wp-ast-tab-svg {
  width: 20px;
  height: 20px;
  stroke: #0f172a;
  transition: transform 0.2s ease;
}
.wp-ast-style-trip-cards .wp-ast-tab-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
}
.wp-ast-style-trip-cards .wp-ast-tab-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}
.wp-ast-style-trip-cards .wp-ast-tab-item.is-active {
  transform: translateY(-4px) scale(1.02);
  z-index: 10;
}
.wp-ast-style-trip-cards .wp-ast-tab-item.is-active .wp-ast-tab-label {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.wp-ast-style-trip-cards .wp-ast-tab-item.is-active .wp-ast-tab-icon svg,
.wp-ast-style-trip-cards .wp-ast-tab-item.is-active .wp-ast-tab-svg {
  stroke: #ffffff;
}

/* ======================================================== */
/* 8 THEMES FOR TRIP CARDS & BUTTONS (VIBRANT STYLING)     */
/* ======================================================== */
/* 1. Fire Red */
.wp-ast-theme-red .wp-ast-tab-item.is-active,
.wp-ast-theme-red.wp-ast-style-trip-cards .wp-ast-tab-item.is-active,
.wp-ast-theme-red .wp-ast-lead-icon-tab.is-active {
  background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%) !important;
  border-color: #f87171 !important;
  box-shadow: 0 10px 24px -4px rgba(220, 38, 38, 0.6) !important;
}
.wp-ast-theme-red .wp-ast-progress-fill {
  background: linear-gradient(90deg, #ef4444, #b91c1c) !important;
}
.wp-ast-theme-red .wp-ast-tab-item:hover {
  border-color: #f87171 !important;
}

/* 2. Lime Green */
.wp-ast-theme-lime .wp-ast-tab-item.is-active,
.wp-ast-theme-lime.wp-ast-style-trip-cards .wp-ast-tab-item.is-active,
.wp-ast-theme-lime .wp-ast-lead-icon-tab.is-active {
  background: linear-gradient(180deg, #a3e635 0%, #65a30d 100%) !important;
  border-color: #bef264 !important;
  box-shadow: 0 10px 24px -4px rgba(101, 163, 13, 0.6) !important;
}
.wp-ast-theme-lime .wp-ast-progress-fill {
  background: linear-gradient(90deg, #a3e635, #65a30d) !important;
}
.wp-ast-theme-lime .wp-ast-tab-item:hover {
  border-color: #bef264 !important;
}

/* 3. Ocean Cyan */
.wp-ast-theme-cyan .wp-ast-tab-item.is-active,
.wp-ast-theme-cyan.wp-ast-style-trip-cards .wp-ast-tab-item.is-active,
.wp-ast-theme-cyan .wp-ast-lead-icon-tab.is-active {
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%) !important;
  border-color: #7dd3fc !important;
  box-shadow: 0 10px 24px -4px rgba(2, 132, 199, 0.6) !important;
}
.wp-ast-theme-cyan .wp-ast-progress-fill {
  background: linear-gradient(90deg, #38bdf8, #0284c7) !important;
}
.wp-ast-theme-cyan .wp-ast-tab-item:hover {
  border-color: #7dd3fc !important;
}

/* 4. Royal Purple */
.wp-ast-theme-purple .wp-ast-tab-item.is-active,
.wp-ast-theme-purple.wp-ast-style-trip-cards .wp-ast-tab-item.is-active,
.wp-ast-theme-purple .wp-ast-lead-icon-tab.is-active {
  background: linear-gradient(180deg, #a855f7 0%, #7e22ce 100%) !important;
  border-color: #c084fc !important;
  box-shadow: 0 10px 24px -4px rgba(126, 34, 206, 0.6) !important;
}
.wp-ast-theme-purple .wp-ast-progress-fill {
  background: linear-gradient(90deg, #a855f7, #7e22ce) !important;
}
.wp-ast-theme-purple .wp-ast-tab-item:hover {
  border-color: #c084fc !important;
}

/* 5. Vivid Pink */
.wp-ast-theme-pink .wp-ast-tab-item.is-active,
.wp-ast-theme-pink.wp-ast-style-trip-cards .wp-ast-tab-item.is-active,
.wp-ast-theme-pink .wp-ast-lead-icon-tab.is-active {
  background: linear-gradient(180deg, #f472b6 0%, #db2777 100%) !important;
  border-color: #f9a8d4 !important;
  box-shadow: 0 10px 24px -4px rgba(219, 39, 119, 0.6) !important;
}
.wp-ast-theme-pink .wp-ast-progress-fill {
  background: linear-gradient(90deg, #f472b6, #db2777) !important;
}
.wp-ast-theme-pink .wp-ast-tab-item:hover {
  border-color: #f9a8d4 !important;
}

/* 6. Luxury Dark Pink ( ثيم 8 الفاخر ) */
.wp-ast-theme-dark-pink .wp-ast-tab-item.is-active,
.wp-ast-theme-dark-pink.wp-ast-style-trip-cards .wp-ast-tab-item.is-active,
.wp-ast-theme-dark-pink .wp-ast-lead-icon-tab.is-active {
  background: linear-gradient(180deg, #db2777 0%, #9d174d 100%) !important;
  border-color: #ec4899 !important;
  box-shadow: 0 10px 24px -4px rgba(157, 23, 77, 0.7) !important;
}
.wp-ast-theme-dark-pink .wp-ast-progress-fill {
  background: linear-gradient(90deg, #db2777, #9d174d) !important;
}
.wp-ast-theme-dark-pink .wp-ast-tab-item:hover {
  border-color: #ec4899 !important;
}

/* 7. Soft Rose Minimal */
.wp-ast-theme-minimal .wp-ast-tab-item.is-active,
.wp-ast-theme-minimal.wp-ast-style-trip-cards .wp-ast-tab-item.is-active,
.wp-ast-theme-minimal .wp-ast-lead-icon-tab.is-active {
  background: linear-gradient(180deg, #fff1f2 0%, #fecdd3 100%) !important;
  border-color: #fca5a5 !important;
  box-shadow: 0 6px 16px rgba(244, 63, 94, 0.2) !important;
}
.wp-ast-theme-minimal .wp-ast-tab-item.is-active .wp-ast-tab-label {
  color: #be123c !important;
}
.wp-ast-theme-minimal .wp-ast-tab-item.is-active .wp-ast-tab-icon svg,
.wp-ast-theme-minimal .wp-ast-tab-item.is-active .wp-ast-tab-svg {
  stroke: #be123c !important;
}
.wp-ast-theme-minimal .wp-ast-progress-fill {
  background: linear-gradient(90deg, #f43f5e, #be123c) !important;
}
.wp-ast-theme-minimal .wp-ast-tab-item:hover {
  border-color: #fca5a5 !important;
}

/* 8. Carbon Black */
.wp-ast-theme-black .wp-ast-tab-item.is-active,
.wp-ast-theme-black.wp-ast-style-trip-cards .wp-ast-tab-item.is-active,
.wp-ast-theme-black .wp-ast-lead-icon-tab.is-active {
  background: linear-gradient(180deg, #27272a 0%, #09090b 100%) !important;
  border-color: #52525b !important;
  box-shadow: 0 10px 24px -4px rgba(0, 0, 0, 0.65) !important;
}
.wp-ast-theme-black .wp-ast-progress-fill {
  background: linear-gradient(90deg, #3f3f46, #09090b) !important;
}
.wp-ast-theme-black .wp-ast-tab-item:hover {
  border-color: #52525b !important;
}

/* Sizes */
.wp-ast-size-wide-compact .wp-ast-tab-item {
  min-width: 115px !important;
  height: 58px !important;
}
.wp-ast-size-medium .wp-ast-tab-item {
  min-width: 100px !important;
  height: 52px !important;
}
.wp-ast-size-large .wp-ast-tab-item {
  min-width: 108px !important;
  height: 84px !important;
}
.wp-ast-lead-icon-tab {
  min-width: 58px !important;
  max-width: 60px !important;
  width: 58px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* ======================================================== */
/* 3D GLOSSY WAVE CAPSULE BUTTON (MATCHING USER IMAGE) */
/* ======================================================== */
.wp-ast-style-glossy-capsule .wp-ast-tab-item {
  display: inline-flex;
  align-items: center;
  height: 48px;
  border-radius: 9999px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1.5px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
  padding: 0 1rem 0 0;
  text-decoration: none !important;
  color: #1e293b;
  font-weight: 800;
  font-size: 0.9rem;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}

/* Top Specular Gloss Reflection */
.wp-ast-style-glossy-capsule .wp-ast-tab-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.3) 70%, rgba(255,255,255,0) 100%);
  border-radius: 9999px 9999px 0 0;
  pointer-events: none;
  z-index: 5;
}

/* The Bulbous Colored Sphere for Icon */
.wp-ast-style-glossy-capsule .wp-ast-bulb-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  background: linear-gradient(180deg, var(--wp-ast-primary) 0%, var(--wp-ast-primary-hover) 50%, var(--wp-ast-primary-3d) 100%);
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.6), inset 0 -3px 6px rgba(0,0,0,0.3);
  position: relative;
  margin-left: 0.75rem;
  flex-shrink: 0;
}
.wp-ast-style-glossy-capsule .wp-ast-bulb-svg {
  width: 20px;
  height: 20px;
  color: #ffffff;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
  position: relative;
  z-index: 2;
}

/* Label */
.wp-ast-style-glossy-capsule .wp-ast-tab-label {
  letter-spacing: 0.06em;
  font-weight: 900;
  color: #8c0b12;
  text-transform: uppercase;
  margin-right: 0.25rem;
  margin-left: 0.25rem;
  text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}

/* Decorative Pixel Squares matching user image */
.wp-ast-style-glossy-capsule .wp-ast-pixels {
  display: inline-flex;
  gap: 2px;
  margin-right: 0.75rem;
  align-items: center;
}
.wp-ast-style-glossy-capsule .wp-ast-pixels .wp-p {
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background-color: #b8040d;
  opacity: 0.85;
}

/* Active State: Elevated with prominent glow & scale */
.wp-ast-style-glossy-capsule .wp-ast-tab-item.is-active {
  transform: scale(1.06);
  border-color: var(--wp-ast-primary);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.25), 0 8px 20px rgba(0, 0, 0, 0.15);
  z-index: 10;
}
.wp-ast-style-glossy-capsule .wp-ast-tab-item.is-active .wp-ast-tab-label {
  color: var(--wp-ast-primary);
}
.wp-ast-style-glossy-capsule .wp-ast-tab-item.is-active .wp-ast-pixels .wp-p {
  opacity: 1;
}

/* Hover & Active Press */
.wp-ast-style-glossy-capsule .wp-ast-tab-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}
.wp-ast-style-glossy-capsule .wp-ast-tab-item:active {
  transform: translateY(2px) scale(0.96);
}

/* Target Section Anchor */
.wp-ast-section-anchor {
  scroll-margin-top: 130px;
}

/* Lead Icon Tab on Right (Half Width of Standard Tab, ~58px) */
.wp-ast-tab-item.wp-ast-lead-icon-tab {
  width: 58px !important;
  min-width: 58px !important;
  max-width: 58px !important;
  height: 58px !important;
  padding: 4px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  cursor: pointer;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}
.wp-ast-tab-item.wp-ast-lead-icon-tab:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
  border-color: rgba(220, 38, 38, 0.4);
}
.wp-ast-tab-item.wp-ast-lead-icon-tab::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}
.wp-ast-lead-icon-img {
  width: 38px !important;
  height: 38px !important;
  object-fit: contain !important;
  display: block !important;
  border-radius: 6px !important;
  transition: transform 0.25s ease;
}
.wp-ast-tab-item.wp-ast-lead-icon-tab:hover .wp-ast-lead-icon-img {
  transform: scale(1.1);
}

/* Section Header Container */
.wp-ast-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

/* User's inserted icon wrapper (preserves original icon, no duplicate injection) */
.wp-ast-user-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.wp-ast-user-icon-wrap img {
  width: 36px;
  height: 36px;
  max-width: 48px;
  max-height: 48px;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

.wp-ast-section-heading {
  margin: 0 !important;
  display: inline-block;
  font-size: var(--wp-ast-heading-size, 24px) !important;
  font-weight: 800;
  color: var(--wp-ast-heading-color, #1e293b) !important;
  line-height: 1.3;
}

/* 3D Y-Icon styling on section headings */
.wp-ast-heading-icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
  vertical-align: middle;
  border-radius: 8px;
  background: #ffffff;
  padding: 2px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  margin-left: 0.6rem;
  margin-right: 0;
  display: inline-block;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.wp-ast-heading-icon:hover {
  transform: scale(1.12) rotate(3deg);
}
