/* ═══════════════════════════════════════════════════════════
   📄 alternatives.css
   صفحة البدائل الذكية في نظام الطيبات
   v1.0 - 2026
   ═══════════════════════════════════════════════════════════ */

/* ===== Variables ===== */
:root {
  --alt-primary: #1a3d2b;
  --alt-primary-light: #2d6a4f;
  --alt-accent: #c9a84c;
  --alt-danger: #c0392b;
  --alt-success: #27ae60;
  --alt-bg: #fafaf7;
  --alt-bg-card: #ffffff;
  --alt-text: #2c3e50;
  --alt-text-muted: #7f8c8d;
  --alt-border: #e8e8e3;
  --alt-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  --alt-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
  --alt-radius: 16px;
  --alt-radius-sm: 8px;
}

/* ===== Breadcrumb ===== */
.breadcrumb-nav {
  background: #fff;
  border-bottom: 1px solid var(--alt-border);
  padding: 12px 0;
  font-size: 0.9rem;
}
.breadcrumb {
  list-style: none;
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
}
.breadcrumb li {
  color: var(--alt-text-muted);
}
.breadcrumb li:not(:last-child)::after {
  content: " ‹ ";
  margin-right: 8px;
  color: var(--alt-border);
}
.breadcrumb a {
  color: var(--alt-primary);
  text-decoration: none;
}
.breadcrumb a:hover {
  text-decoration: underline;
}
.breadcrumb .active {
  color: var(--alt-accent);
  font-weight: 600;
}

/* ===== Hero Section ===== */
.alt-hero {
  background: linear-gradient(135deg, var(--alt-primary) 0%, var(--alt-primary-light) 100%);
  color: #fff;
  padding: 60px 0 80px;
  position: relative;
  overflow: hidden;
}
.alt-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(201, 168, 76, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
  pointer-events: none;
}
.alt-hero-content {
  position: relative;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}
.alt-badge {
  display: inline-block;
  background: var(--alt-accent);
  color: var(--alt-primary);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}
.alt-hero-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin: 0 0 16px;
  line-height: 1.3;
}
.alt-hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--alt-accent);
  font-weight: 600;
  margin: 0 0 16px;
}
.alt-hero-description {
  font-size: 1.05rem;
  line-height: 1.8;
  opacity: 0.95;
  max-width: 600px;
  margin: 0 auto 32px;
}

/* Hero Stats */
.alt-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 500px;
  margin: 0 auto 32px;
}
.alt-stat {
  text-align: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--alt-radius-sm);
  backdrop-filter: blur(10px);
}
.alt-stat-num {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--alt-accent);
}
.alt-stat-label {
  display: block;
  font-size: 0.85rem;
  opacity: 0.9;
  margin-top: 4px;
}

/* Hero CTA */
.alt-hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Buttons ===== */
.alt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--alt-radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.alt-btn-primary {
  background: var(--alt-accent);
  color: var(--alt-primary);
}
.alt-btn-primary:hover {
  background: #d4b75d;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(201, 168, 76, 0.4);
}
.alt-btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}
.alt-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}
.alt-btn-accent {
  background: var(--alt-primary);
  color: #fff;
}
.alt-btn-accent:hover {
  background: var(--alt-primary-light);
  transform: translateY(-2px);
}

/* ===== Controls (Search + Filter) ===== */
.alt-controls {
  background: #fff;
  padding: 24px 0 20px;
  border-bottom: 1px solid var(--alt-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.alt-search-wrap {
  position: relative;
  max-width: 600px;
  margin: 0 auto 16px;
  padding: 0 16px;
}
.alt-search {
  width: 100%;
  padding: 14px 20px;
  font-size: 1rem;
  border: 2px solid var(--alt-border);
  border-radius: 100px;
  background: var(--alt-bg);
  color: var(--alt-text);
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.alt-search:focus {
  outline: none;
  border-color: var(--alt-primary);
  box-shadow: 0 0 0 4px rgba(26, 61, 43, 0.1);
}
.alt-search-clear {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--alt-border);
  color: var(--alt-text-muted);
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: background 0.2s;
}
.alt-search-clear.visible {
  display: flex;
}
.alt-search-clear:hover {
  background: var(--alt-danger);
  color: #fff;
}

/* Filter Buttons */
.alt-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 16px;
  padding: 0 16px;
}
.alt-filter-btn {
  padding: 8px 14px;
  border: 2px solid var(--alt-border);
  background: #fff;
  color: var(--alt-text);
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  white-space: nowrap;
}
.alt-filter-btn:hover {
  border-color: var(--alt-primary);
  color: var(--alt-primary);
}
.alt-filter-btn.active {
  background: var(--alt-primary);
  color: #fff;
  border-color: var(--alt-primary);
}

.alt-results-info {
  text-align: center;
  color: var(--alt-text-muted);
  font-size: 0.9rem;
  margin-top: 8px;
}

/* ===== Philosophy Box ===== */
.alt-philosophy {
  padding: 40px 0 0;
  background: var(--alt-bg);
}
.alt-phil-box {
  background: linear-gradient(135deg, #fffaf0 0%, #fff 100%);
  border: 1px solid var(--alt-accent);
  border-radius: var(--alt-radius);
  padding: 24px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  box-shadow: var(--alt-shadow);
}
.alt-phil-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}
.alt-phil-content h3 {
  margin: 0 0 8px;
  color: var(--alt-primary);
  font-size: 1.2rem;
}
.alt-phil-content p {
  margin: 0;
  line-height: 1.8;
  color: var(--alt-text);
}
.alt-phil-highlight {
  color: var(--alt-accent);
  font-weight: 700;
}

/* ===== Main Section ===== */
.alt-main {
  background: var(--alt-bg);
  padding: 40px 0;
}

/* ===== Category Section ===== */
.alt-category {
  margin-bottom: 60px;
}
.alt-cat-header {
  text-align: center;
  margin-bottom: 32px;
}
.alt-cat-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--alt-primary);
  margin: 0 0 8px;
  font-weight: 800;
}
.alt-cat-desc {
  color: var(--alt-text-muted);
  margin: 0;
  font-size: 1rem;
}

/* ===== Alternatives Grid ===== */
.alt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
}

/* ===== Card ===== */
.alt-card {
  background: var(--alt-bg-card);
  border-radius: var(--alt-radius);
  overflow: hidden;
  box-shadow: var(--alt-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: grid;
  grid-template-rows: 1fr auto 1fr;
}
.alt-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--alt-shadow-hover);
}

/* Forbidden Section (top) */
.alt-card-forbidden {
  padding: 24px;
  background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
  border-bottom: 1px dashed var(--alt-danger);
  text-align: center;
}
.alt-card-emoji {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 12px;
}
.alt-card-title {
  font-size: 1.25rem;
  color: var(--alt-danger);
  margin: 0 0 8px;
  font-weight: 700;
}
.alt-card-reason {
  font-size: 0.9rem;
  color: var(--alt-text);
  line-height: 1.6;
  margin: 0 0 12px;
}

/* Arrow Section (middle) */
.alt-card-arrow {
  background: var(--alt-primary);
  color: #fff;
  padding: 12px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 700;
}
.alt-arrow {
  font-size: 1.4rem;
  color: var(--alt-accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { transform: translateX(0); opacity: 1; }
  50% { transform: translateX(-4px); opacity: 0.7; }
}
.alt-arrow-text {
  font-size: 0.95rem;
}

/* Allowed Section (bottom) */
.alt-card-allowed {
  padding: 20px 24px;
  background: linear-gradient(135deg, #f0f9f4 0%, #e8f5ed 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.alt-allowed-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.alt-allowed-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--alt-radius-sm);
  font-size: 0.95rem;
  color: var(--alt-text);
  transition: background 0.2s;
}
.alt-allowed-item:hover {
  background: #fff;
}
.alt-allowed-item.alt-primary {
  background: rgba(39, 174, 96, 0.15);
  border-right: 3px solid var(--alt-success);
  font-weight: 600;
}
.alt-allowed-item.alt-exception {
  background: rgba(201, 168, 76, 0.15);
  border-right: 3px solid var(--alt-accent);
  font-style: italic;
}
.alt-allowed-emoji {
  font-size: 1.3rem;
  flex-shrink: 0;
}
.alt-allowed-name {
  flex: 1;
  line-height: 1.4;
}

/* Card Links */
.alt-card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 100px;
  transition: all 0.2s;
  border: 1.5px solid transparent;
}
.forbidden-link {
  color: var(--alt-danger);
  background: rgba(192, 57, 43, 0.08);
  border-color: rgba(192, 57, 43, 0.2);
}
.forbidden-link:hover {
  background: var(--alt-danger);
  color: #fff;
}
.allowed-link {
  color: var(--alt-success);
  background: rgba(39, 174, 96, 0.1);
  border-color: rgba(39, 174, 96, 0.3);
  align-self: center;
}
.allowed-link:hover {
  background: var(--alt-success);
  color: #fff;
}

/* ===== No Results ===== */
.alt-no-results {
  text-align: center;
  padding: 60px 20px;
  background: #fff;
  border-radius: var(--alt-radius);
  box-shadow: var(--alt-shadow);
}
.alt-no-results-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  opacity: 0.5;
}
.alt-no-results h3 {
  color: var(--alt-primary);
  margin: 0 0 8px;
}
.alt-no-results p {
  color: var(--alt-text-muted);
  margin: 0 0 24px;
}

/* ===== CTA Section ===== */
.alt-cta-section {
  background: linear-gradient(135deg, var(--alt-primary) 0%, var(--alt-primary-light) 100%);
  color: #fff;
  padding: 60px 0;
  margin-top: 40px;
}
.alt-cta-box {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}
.alt-cta-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 16px;
  font-weight: 800;
}
.alt-cta-desc {
  font-size: 1.05rem;
  line-height: 1.8;
  margin: 0 0 28px;
  opacity: 0.95;
}
.alt-cta-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Related Section ===== */
.alt-related {
  background: var(--alt-bg);
  padding: 60px 0;
}
.alt-section-title {
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--alt-primary);
  margin: 0 0 32px;
  font-weight: 800;
}
.alt-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.alt-related-card {
  background: #fff;
  border-radius: var(--alt-radius);
  padding: 24px;
  text-align: center;
  text-decoration: none;
  color: var(--alt-text);
  border: 1px solid var(--alt-border);
  transition: all 0.2s;
}
.alt-related-card:hover {
  border-color: var(--alt-primary);
  transform: translateY(-4px);
  box-shadow: var(--alt-shadow-hover);
}
.alt-related-emoji {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 12px;
}
.alt-related-card h3 {
  color: var(--alt-primary);
  margin: 0 0 8px;
  font-size: 1.1rem;
}
.alt-related-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--alt-text-muted);
  line-height: 1.5;
}

/* ===== Disclaimer ===== */
.alt-disclaimer-section {
  background: var(--alt-bg);
  padding: 20px 0 40px;
}
.alt-disclaimer {
  background: #fffaeb;
  border: 1px solid #ffd966;
  border-radius: var(--alt-radius);
  padding: 20px 24px;
}
.alt-disclaimer h3 {
  color: #c08800;
  margin: 0 0 8px;
  font-size: 1.05rem;
}
.alt-disclaimer p {
  margin: 0;
  line-height: 1.7;
  color: #5c4400;
  font-size: 0.92rem;
}

/* ===== Hidden cards (for filter) ===== */
.alt-card.hidden,
.alt-category.hidden {
  display: none;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .alt-hero { padding: 40px 0 50px; }
  .alt-hero-stats { gap: 12px; }
  .alt-stat { padding: 12px; }
  .alt-stat-num { font-size: 1.5rem; }
  .alt-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .alt-card-forbidden,
  .alt-card-allowed {
    padding: 20px;
  }
  .alt-card-emoji { font-size: 2.5rem; }
  .alt-card-title { font-size: 1.1rem; }
  .alt-hero-cta,
  .alt-cta-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  .alt-btn { padding: 14px 20px; }
  .alt-controls {
    position: relative;
    padding: 20px 0;
  }
  .alt-filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding: 0 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .alt-filters::-webkit-scrollbar { display: none; }
}

/* ===== Print ===== */
@media print {
  .alt-controls,
  .alt-hero-cta,
  .alt-cta-section,
  .alt-related,
  .site-header,
  .site-footer { display: none !important; }
  .alt-card { break-inside: avoid; box-shadow: none; border: 1px solid #ccc; }
}

/* ═══════════════════════════════════════════
   🔄 Loading & Error States (v3 Dynamic)
   ═══════════════════════════════════════════ */

.alt-loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--alt-text, #5c4400);
}

.alt-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(26, 61, 43, 0.1);
  border-top: 4px solid var(--alt-primary, #1a3d2b);
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: alt-spin 1s linear infinite;
}

@keyframes alt-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.alt-loading p {
  font-size: 15px;
  font-weight: 500;
  color: var(--alt-primary, #1a3d2b);
}

.alt-error {
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
  border-radius: 16px;
  margin: 20px 0;
}

.alt-error-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.alt-error h3 {
  color: #c0392b;
  margin: 0 0 8px;
  font-size: 18px;
}

.alt-error p {
  color: #666;
  margin: 0 0 16px;
  font-size: 14px;
}

/* ════════════════════════════════════════════════════════════
   🎨 v3.5 - Bottom Sections Redesign
   تنويهات وقواعد منظمة واحترافية
   ════════════════════════════════════════════════════════════ */

/* Section Headers */
.alt-section-header {
  text-align: center;
  margin-bottom: 32px;
  padding: 0 16px;
}

.alt-section-badge {
  display: inline-block;
  background: linear-gradient(135deg, rgba(201,168,76,0.15) 0%, rgba(201,168,76,0.05) 100%);
  color: #c9a84c;
  border: 1px solid rgba(201,168,76,0.3);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}

.alt-section-title {
  font-size: 1.7rem;
  color: var(--alt-primary, #1a3d2b);
  margin: 0 0 8px;
  font-weight: 700;
}

.alt-section-subtitle {
  color: #6b7d70;
  font-size: 0.95rem;
  margin: 0;
}

/* ═══════════════════════════════════════════
   💡 Rules Grid (Cards 2x4 / 1x8)
   ═══════════════════════════════════════════ */
.alt-rules-section {
  padding: 40px 0;
  background: linear-gradient(180deg, #fafaf5 0%, #fff 100%);
}

.alt-rules-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
}

.alt-rule-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid #f0ebe0;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.alt-rule-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
}

.alt-rule-card[data-type="conditional"]::before { background: #c9a84c; }
.alt-rule-card[data-type="forbidden"]::before { background: #c0392b; }
.alt-rule-card[data-type="exception"]::before { background: #27ae60; }

.alt-rule-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(26, 61, 43, 0.08);
  border-color: #e0d8c5;
}

.alt-rule-icon {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafaf5;
  border-radius: 50%;
}

.alt-rule-content {
  flex: 1;
  min-width: 0;
}

.alt-rule-status {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  margin-bottom: 6px;
  text-transform: none;
}

.alt-rule-card[data-type="conditional"] .alt-rule-status {
  background: rgba(201,168,76,0.15);
  color: #8a7424;
}
.alt-rule-card[data-type="forbidden"] .alt-rule-status {
  background: rgba(192,57,43,0.12);
  color: #c0392b;
}
.alt-rule-card[data-type="exception"] .alt-rule-status {
  background: rgba(39,174,96,0.12);
  color: #27ae60;
}

.alt-rule-content h3 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--alt-primary, #1a3d2b);
}

.alt-rule-content p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: #5f6c63;
}

/* Mobile: 1 column */
@media (max-width: 640px) {
  .alt-rules-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .alt-rule-card {
    padding: 14px;
  }
  .alt-rule-icon {
    font-size: 28px;
    width: 42px;
    height: 42px;
  }
}

/* ═══════════════════════════════════════════
   ❓ FAQ Accordion
   ═══════════════════════════════════════════ */
.alt-faq-section {
  padding: 40px 0;
  background: #fff;
}

.alt-faq-list {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 16px;
}

.alt-faq-item {
  background: #fff;
  border: 1px solid #f0ebe0;
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.alt-faq-item[open] {
  border-color: #c9a84c;
  box-shadow: 0 4px 16px rgba(26, 61, 43, 0.08);
}

.alt-faq-item.alt-faq-highlight {
  background: linear-gradient(135deg, #fffbeb 0%, #fff 100%);
  border-color: rgba(201,168,76,0.4);
}

.alt-faq-question {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  font-size: 15px;
  font-weight: 700;
  color: var(--alt-primary, #1a3d2b);
  transition: background 0.2s ease;
}

.alt-faq-question::-webkit-details-marker { display: none; }
.alt-faq-question::marker { display: none; }

.alt-faq-question:hover {
  background: rgba(201,168,76,0.05);
}

.alt-faq-emoji {
  font-size: 22px;
  flex-shrink: 0;
  line-height: 1;
}

.alt-faq-text {
  flex: 1;
  line-height: 1.5;
}

.alt-faq-arrow {
  flex-shrink: 0;
  font-size: 14px;
  color: #c9a84c;
  transition: transform 0.3s ease;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(201,168,76,0.1);
  border-radius: 50%;
}

.alt-faq-item[open] .alt-faq-arrow {
  transform: rotate(180deg);
  background: #c9a84c;
  color: #fff;
}

.alt-faq-answer {
  padding: 0 18px 18px 18px;
  border-top: 1px dashed #e8e0cc;
  padding-top: 14px;
  margin-top: 4px;
}

.alt-faq-answer p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.8;
  color: #4a5650;
}

.alt-faq-answer p:last-child { margin-bottom: 0; }

.alt-faq-answer strong {
  color: var(--alt-primary, #1a3d2b);
  font-weight: 700;
}

@media (max-width: 640px) {
  .alt-faq-question {
    padding: 14px 14px;
    font-size: 13.5px;
  }
  .alt-faq-emoji { font-size: 20px; }
  .alt-faq-answer { padding: 12px 14px 14px; font-size: 13px; }
}

/* ═══════════════════════════════════════════
   🚨 Medical Alert Section (Pro Design)
   ═══════════════════════════════════════════ */
.alt-medical-alert-section {
  padding: 40px 0;
  background: linear-gradient(180deg, #fff 0%, #fff5f5 100%);
}

.alt-medical-alert {
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
  border: 2px solid #dc3545;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(220, 53, 69, 0.15);
}

.alt-medical-alert-header {
  background: linear-gradient(135deg, #dc3545 0%, #c0392b 100%);
  color: #fff;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.alt-medical-alert-icon {
  font-size: 42px;
  line-height: 1;
  background: rgba(255,255,255,0.2);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: medical-pulse 2s ease-in-out infinite;
}

@keyframes medical-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.alt-medical-alert-tag {
  display: inline-block;
  background: rgba(255,255,255,0.25);
  color: #fff;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

.alt-medical-alert-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
}

.alt-medical-alert-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.alt-medical-alert-row {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: #2c3e50;
}

.alt-medical-alert-row-icon {
  font-size: 22px;
  line-height: 1.5;
  flex-shrink: 0;
}

.alt-medical-alert-danger {
  background: #fff5f5;
  border-right: 4px solid #dc3545;
}

.alt-medical-alert-warning {
  background: #fffaf0;
  border-right: 4px solid #f0ad4e;
}

.alt-medical-alert-success {
  background: #f4f9f4;
  border-right: 4px solid #27ae60;
}

.alt-medical-alert-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.alt-medical-pill {
  background: #fff;
  border: 1px solid #f0d0d0;
  color: #c0392b;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}

.alt-medical-alert-footer {
  background: #f8f9fa;
  padding: 16px 24px;
  border-top: 1px solid #e8e8e8;
  font-size: 13px;
  color: #495057;
}

.alt-medical-cases {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.alt-medical-case {
  background: #fff;
  border: 1px solid #dee2e6;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: #495057;
}

@media (max-width: 640px) {
  .alt-medical-alert-header {
    padding: 16px 18px;
    gap: 12px;
  }
  .alt-medical-alert-icon {
    font-size: 32px;
    width: 52px;
    height: 52px;
  }
  .alt-medical-alert-title {
    font-size: 15px;
  }
  .alt-medical-alert-body {
    padding: 16px 18px;
    gap: 10px;
  }
  .alt-medical-alert-row {
    padding: 12px 14px;
    font-size: 13px;
  }
  .alt-medical-alert-footer {
    padding: 14px 18px;
  }
}

/* ════════════════════════════════════════════════════════════
   🎨 v4 - GROUPED CARDS DESIGN
   تصميم البطاقات المُجمّعة - بطاقة واحدة لكل فئة
   ════════════════════════════════════════════════════════════ */

.alt-grouped-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  margin: 0 auto;
  max-width: 1200px;
  padding: 0 16px;
}

.alt-grp-card {
  background: #fff;
  border: 2px solid #f0ebe0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(26, 61, 43, 0.06);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.alt-grp-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(26, 61, 43, 0.12);
  border-color: #c9a84c;
}

.alt-grp-card.hidden {
  display: none;
}

/* Header */
.alt-grp-header {
  background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
  padding: 18px 16px 14px;
  text-align: center;
  border-bottom: 1px dashed #c0392b;
}

.alt-grp-emoji {
  font-size: 38px;
  line-height: 1;
  margin-bottom: 8px;
}

.alt-grp-title {
  margin: 0 0 8px;
  color: #c0392b;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

.alt-grp-badge {
  display: inline-block;
  background: #c0392b;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
}

/* Forbidden Items Details */
.alt-grp-details {
  border-bottom: 1px solid #f0ebe0;
}

.alt-grp-summary {
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #c0392b;
  user-select: none;
  transition: background 0.2s ease;
}

.alt-grp-summary::-webkit-details-marker { display: none; }
.alt-grp-summary::marker { display: none; }

.alt-grp-summary:hover {
  background: rgba(192, 57, 43, 0.04);
}

.alt-grp-summary-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.alt-grp-summary-icon {
  font-size: 14px;
}

.alt-grp-summary-arrow {
  background: rgba(192, 57, 43, 0.1);
  color: #c0392b;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  transition: transform 0.3s ease;
}

.alt-grp-details[open] .alt-grp-summary-arrow {
  transform: rotate(180deg);
  background: #c0392b;
  color: #fff;
}

.alt-grp-chips-forbidden {
  padding: 0 16px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.alt-grp-chip-forbidden {
  background: #fff5f5;
  color: #c0392b;
  border: 1px solid #f0d0d0;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.alt-grp-chip-forbidden:hover {
  background: #c0392b;
  color: #fff;
  border-color: #c0392b;
  transform: translateY(-1px);
}

/* Arrow */
.alt-grp-arrow {
  background: #fafaf5;
  padding: 10px;
  text-align: center;
  color: #c9a84c;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-bottom: 1px solid #f0ebe0;
}

.alt-grp-arrow-icon {
  font-size: 18px;
  animation: alt-arrow-bounce 2s ease-in-out infinite;
}

@keyframes alt-arrow-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}

/* Allowed Section */
.alt-grp-allowed-section {
  padding: 16px;
  background: linear-gradient(135deg, #f4f9f4 0%, #e8f5ee 100%);
  flex: 1;
}

.alt-grp-medical-warning {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 12px;
  font-size: 12px;
  color: #856404;
  text-align: center;
  font-weight: 600;
}

.alt-grp-chips-allowed {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.alt-grp-chip-allowed {
  background: #fff;
  color: #1a3d2b;
  border: 1.5px solid #27ae60;
  padding: 5px 11px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.alt-grp-chip-allowed:hover {
  background: #27ae60;
  color: #fff;
  transform: translateY(-1px);
}

.alt-grp-chip-emoji {
  font-size: 14px;
}

/* Footer Links */
.alt-grp-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid #f0ebe0;
}

.alt-grp-link {
  padding: 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.alt-grp-link-forbidden {
  color: #c0392b;
  background: #fff;
  border-left: 1px solid #f0ebe0;
}

.alt-grp-link-forbidden:hover {
  background: #fff5f5;
}

.alt-grp-link-allowed {
  color: #27ae60;
  background: #fff;
}

.alt-grp-link-allowed:hover {
  background: #f4f9f4;
}

/* Mobile */
@media (max-width: 640px) {
  .alt-grouped-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0 12px;
  }

  .alt-grp-emoji { font-size: 32px; }
  .alt-grp-title { font-size: 1rem; }
  .alt-grp-header { padding: 14px 14px 12px; }
  .alt-grp-allowed-section { padding: 14px; }
  .alt-grp-chip-allowed { font-size: 11.5px; padding: 4px 10px; }
  .alt-grp-chip-forbidden { font-size: 11px; padding: 3px 9px; }
}

/* ════════════════════════════════════════════════════════════
   📱 Mobile Optimization - Controls & Filters
   ════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .alt-controls {
    padding: 16px 0 14px;
  }

  .alt-search-wrap {
    margin-bottom: 14px;
    padding: 0 14px;
  }

  .alt-search {
    padding: 11px 16px;
    font-size: 14px;
  }

  /* Filters: horizontal scrolling on mobile */
  .alt-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    justify-content: flex-start;
    gap: 6px;
    margin-bottom: 12px;
    padding: 4px 14px 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(201,168,76,0.3) transparent;
  }

  .alt-filters::-webkit-scrollbar {
    height: 4px;
  }

  .alt-filters::-webkit-scrollbar-track {
    background: transparent;
  }

  .alt-filters::-webkit-scrollbar-thumb {
    background: rgba(201,168,76,0.3);
    border-radius: 4px;
  }

  .alt-filter-btn {
    padding: 7px 12px;
    font-size: 12.5px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .alt-results-info {
    font-size: 12.5px;
    padding: 0 14px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .alt-controls {
    padding: 12px 0 10px;
  }

  .alt-search {
    padding: 10px 14px;
    font-size: 13.5px;
  }

  .alt-filter-btn {
    padding: 6px 11px;
    font-size: 12px;
  }
}
