/**
 * EBD 360 - Official Design System
 * 
 * Reusable classes, variables, design tokens, and components for portal pages.
 * 
 * @package EBD360_Theme
 * @since   2.1.0
 */

:root {
  /* Colors */
  --ebd-primary: #1A2634;
  --ebd-secondary: #2C3E50;
  --ebd-gold: #C5A059;
  --ebd-gold-hover: #B48E47;
  --ebd-gold-light: rgba(197, 160, 89, 0.1);
  --ebd-bg: #F8F9FA;
  
  --ebd-success: #10B981;
  --ebd-success-light: #E6F4EA;
  --ebd-warning: #F59E0B;
  --ebd-warning-light: #FEF3C7;
  --ebd-danger: #EF4444;
  --ebd-danger-light: #FEE2E2;
  --ebd-info: #3B82F6;
  --ebd-info-light: #EFF6FF;
  
  --ebd-neutral-50: #F8FAFC;
  --ebd-neutral-100: #F1F5F9;
  --ebd-neutral-200: #E2E8F0;
  --ebd-neutral-300: #CBD5E1;
  --ebd-neutral-400: #94A3B8;
  --ebd-neutral-600: #475569;
  --ebd-neutral-800: #1E293B;
  --ebd-neutral-900: #0F172A;
  
  /* Typography Scale */
  --ebd-font-sans: 'Inter', sans-serif;
  --ebd-font-serif: 'Merriweather', serif;
  
  /* Spacings */
  --ebd-space-xs: 4px;
  --ebd-space-sm: 8px;
  --ebd-space-md: 12px;
  --ebd-space-lg: 16px;
  --ebd-space-xl: 24px;
  --ebd-space-2xl: 32px;
  --ebd-space-3xl: 40px;
  --ebd-space-4xl: 48px;
  --ebd-space-5xl: 64px;
  --ebd-space-6xl: 80px;
  --ebd-space-7xl: 96px;

  /* Borders / Radius */
  --ebd-radius-sm: 4px;
  --ebd-radius-md: 8px;
  --ebd-radius-lg: 12px;
  --ebd-radius-xl: 20px;
  --ebd-radius-full: 9999px;
  
  /* Shadows */
  --ebd-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --ebd-shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --ebd-shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
  --ebd-shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.06);
  --ebd-shadow-xl: 0 20px 50px -12px rgba(15, 23, 42, 0.15);
}

/* -------------------------------------------------------------
   Typography scale classes
   ------------------------------------------------------------- */
.ebd-h1 {
  font-family: var(--ebd-font-serif);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.25;
  color: var(--ebd-primary);
  letter-spacing: -0.5px;
}
.ebd-h2 {
  font-family: var(--ebd-font-serif);
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--ebd-primary);
}
.ebd-h3 {
  font-family: var(--ebd-font-serif);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  line-height: 1.35;
  color: var(--ebd-primary);
}
.ebd-h4 {
  font-family: var(--ebd-font-serif);
  font-size: clamp(18px, 2.5vw, 22px);
  font-weight: 700;
  line-height: 1.4;
  color: var(--ebd-primary);
}
.ebd-card-title {
  font-family: var(--ebd-font-sans);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ebd-primary);
}
.ebd-subtitle {
  font-family: var(--ebd-font-sans);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--ebd-neutral-600);
}
.ebd-text {
  font-family: var(--ebd-font-sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--ebd-neutral-600);
}
.ebd-legend {
  font-family: var(--ebd-font-sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ebd-neutral-400);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.ebd-small-text {
  font-family: var(--ebd-font-sans);
  font-size: 12px;
  font-weight: 400;
  color: var(--ebd-neutral-400);
}

/* -------------------------------------------------------------
   Buttons Component
   ------------------------------------------------------------- */
.ebd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ebd-space-sm);
  font-family: var(--ebd-font-sans);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--ebd-radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  line-height: 1;
}

.ebd-btn--primary {
  background: var(--ebd-primary);
  color: #FFFFFF;
}
.ebd-btn--primary:hover:not(:disabled) {
  background: var(--ebd-secondary);
  transform: translateY(-1px);
  box-shadow: var(--ebd-shadow-md);
}

.ebd-btn--secondary {
  background: var(--ebd-gold);
  color: #FFFFFF;
}
.ebd-btn--secondary:hover:not(:disabled) {
  background: var(--ebd-gold-hover);
  transform: translateY(-1px);
  box-shadow: var(--ebd-shadow-md);
}

.ebd-btn--outline {
  background: transparent;
  border-color: var(--ebd-neutral-300);
  color: var(--ebd-neutral-800);
}
.ebd-btn--outline:hover:not(:disabled) {
  background: var(--ebd-neutral-50);
  border-color: var(--ebd-primary);
  color: var(--ebd-primary);
}

.ebd-btn--ghost {
  background: transparent;
  color: var(--ebd-neutral-600);
}
.ebd-btn--ghost:hover:not(:disabled) {
  background: var(--ebd-neutral-100);
  color: var(--ebd-primary);
}

.ebd-btn--icon {
  padding: 12px;
  border-radius: var(--ebd-radius-full);
  background: var(--ebd-neutral-100);
  color: var(--ebd-neutral-800);
}
.ebd-btn--icon:hover:not(:disabled) {
  background: var(--ebd-neutral-200);
  color: var(--ebd-primary);
}

.ebd-btn:active {
  transform: translateY(1px);
}
.ebd-btn:focus-visible {
  outline: 2px solid var(--ebd-gold);
  outline-offset: 2px;
}
.ebd-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Loading button */
.ebd-btn--loading {
  position: relative;
  color: transparent !important;
}
.ebd-btn--loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: calc(50% - 8px);
  left: calc(50% - 8px);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #FFFFFF;
  animation: ebd-spin 0.6s linear infinite;
}
.ebd-btn--outline.ebd-btn--loading::after,
.ebd-btn--ghost.ebd-btn--loading::after {
  border-color: rgba(26, 38, 52, 0.2);
  border-top-color: var(--ebd-primary);
}

@keyframes ebd-spin {
  to { transform: rotate(360deg); }
}

/* -------------------------------------------------------------
   Badges & Tags
   ------------------------------------------------------------- */
.ebd-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--ebd-font-sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: var(--ebd-radius-full);
}
.ebd-badge--category { background: var(--ebd-gold-light); color: var(--ebd-gold); }
.ebd-badge--new { background: var(--ebd-success-light); color: var(--ebd-success); }
.ebd-badge--featured { background: var(--ebd-warning-light); color: var(--ebd-warning); }
.ebd-badge--published { background: #E2E8F0; color: var(--ebd-primary); }
.ebd-badge--upcoming { background: var(--ebd-info-light); color: var(--ebd-info); }
.ebd-badge--updated { background: var(--ebd-danger-light); color: var(--ebd-danger); }

.ebd-tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--ebd-font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--ebd-neutral-600);
  background: var(--ebd-neutral-100);
  padding: 6px 14px;
  border-radius: var(--ebd-radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.ebd-tag:hover {
  background: var(--ebd-neutral-200);
  color: var(--ebd-primary);
}
.ebd-tag.active {
  background: var(--ebd-primary);
  color: #FFFFFF;
  border-color: var(--ebd-primary);
}

/* -------------------------------------------------------------
   Breadcrumbs & Pagination
   ------------------------------------------------------------- */
.ebd-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--ebd-space-sm);
  font-family: var(--ebd-font-sans);
  font-size: 13.5px;
  color: var(--ebd-neutral-400);
  margin-bottom: var(--ebd-space-xl);
}
.ebd-breadcrumb a {
  color: var(--ebd-neutral-600);
  text-decoration: none;
  transition: color 0.2s ease;
}
.ebd-breadcrumb a:hover {
  color: var(--ebd-gold);
}
.ebd-breadcrumb__separator {
  user-select: none;
  font-size: 11px;
}

.ebd-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--ebd-space-xs);
  margin-top: var(--ebd-space-3xl);
}
.ebd-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--ebd-radius-md);
  border: 1px solid var(--ebd-neutral-200);
  color: var(--ebd-neutral-600);
  text-decoration: none;
  font-family: var(--ebd-font-sans);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}
.ebd-page-link:hover:not(.ebd-page-link--disabled) {
  border-color: var(--ebd-gold);
  color: var(--ebd-gold);
}
.ebd-page-link.active {
  background: var(--ebd-primary);
  border-color: var(--ebd-primary);
  color: #FFFFFF;
}
.ebd-page-link--disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* -------------------------------------------------------------
   Forms & Search Bar
   ------------------------------------------------------------- */
.ebd-form-group {
  margin-bottom: var(--ebd-space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--ebd-space-sm);
}
.ebd-form-label {
  font-family: var(--ebd-font-sans);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ebd-neutral-800);
}
.ebd-form-input,
.ebd-form-textarea,
.ebd-form-select {
  font-family: var(--ebd-font-sans);
  font-size: 14px;
  padding: 12px 16px;
  border-radius: var(--ebd-radius-md);
  border: 1px solid var(--ebd-neutral-200);
  background: #FFFFFF;
  color: var(--ebd-neutral-900);
  transition: all 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}
.ebd-form-input:focus,
.ebd-form-textarea:focus,
.ebd-form-select:focus {
  outline: none;
  border-color: var(--ebd-gold);
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.15);
}

.ebd-form-checkbox,
.ebd-form-radio {
  accent-color: var(--ebd-gold);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Custom Switch */
.ebd-form-switch {
  display: inline-flex;
  align-items: center;
  gap: var(--ebd-space-md);
  cursor: pointer;
  user-select: none;
}
.ebd-switch-track {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--ebd-neutral-200);
  border-radius: var(--ebd-radius-full);
  transition: background 0.3s ease;
}
.ebd-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #FFFFFF;
  border-radius: 50%;
  box-shadow: var(--ebd-shadow-sm);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.ebd-form-switch input {
  display: none;
}
.ebd-form-switch input:checked + .ebd-switch-track {
  background: var(--ebd-gold);
}
.ebd-form-switch input:checked + .ebd-switch-track .ebd-switch-thumb {
  transform: translateX(20px);
}

/* Custom File Upload */
.ebd-form-upload {
  position: relative;
  border: 2px dashed var(--ebd-neutral-300);
  border-radius: var(--ebd-radius-lg);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  background: var(--ebd-neutral-50);
  transition: all 0.3s ease;
}
.ebd-form-upload:hover {
  border-color: var(--ebd-gold);
  background: #FFFFFF;
}
.ebd-form-upload input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* Search Bar */
.ebd-search-bar {
  position: relative;
  width: 100%;
}
.ebd-search-input {
  padding-left: 44px;
}
.ebd-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ebd-neutral-400);
  pointer-events: none;
  font-size: 18px;
}
.ebd-search-autocomplete {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #FFFFFF;
  border-radius: var(--ebd-radius-md);
  border: 1px solid var(--ebd-neutral-200);
  box-shadow: var(--ebd-shadow-lg);
  margin-top: 6px;
  z-index: 10;
  display: none;
  overflow: hidden;
}
.ebd-search-autocomplete.active {
  display: block;
}
.ebd-search-autocomplete-item {
  padding: 12px 16px;
  cursor: pointer;
  font-family: var(--ebd-font-sans);
  font-size: 14px;
  color: var(--ebd-neutral-800);
  border-bottom: 1px solid var(--ebd-neutral-100);
}
.ebd-search-autocomplete-item:hover {
  background: var(--ebd-neutral-50);
  color: var(--ebd-gold);
}

/* -------------------------------------------------------------
   Cards Component Library
   ------------------------------------------------------------- */
.ebd-card {
  background: #FFFFFF;
  border: 1px solid var(--ebd-neutral-200);
  border-radius: var(--ebd-radius-lg);
  overflow: hidden;
  box-shadow: var(--ebd-shadow-xs);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}
.ebd-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ebd-shadow-lg);
  border-color: rgba(197, 160, 89, 0.3);
}
.ebd-card__thumb {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--ebd-neutral-100);
}
.ebd-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.ebd-card:hover .ebd-card__thumb img {
  transform: scale(1.03);
}
.ebd-card__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Card: Lição */
.ebd-card--licao .ebd-card__body::before {
  content: "Lição Bíblica";
  font-family: var(--ebd-font-sans);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ebd-gold);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

/* Card: Artigo */
.ebd-card--artigo .ebd-card__body::before {
  content: "Artigo & Opinião";
  font-family: var(--ebd-font-sans);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ebd-info);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

/* Card: Estudo */
.ebd-card--estudo .ebd-card__body::before {
  content: "Estudo Bíblico";
  font-family: var(--ebd-font-sans);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ebd-success);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

/* Card: Comentarista */
.ebd-card--comentarista {
  text-align: center;
  align-items: center;
}
.ebd-card--comentarista .ebd-card__avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  margin-top: 24px;
  border: 3px solid #FFFFFF;
  box-shadow: var(--ebd-shadow-md);
}

/* Card: Estatística */
.ebd-card--stat {
  padding: 32px;
  background: var(--ebd-primary);
  color: #FFFFFF;
  border: none;
}
.ebd-card--stat .ebd-stat-num {
  font-size: 40px;
  font-weight: 800;
  color: var(--ebd-gold);
  margin-bottom: 8px;
}

/* Card: Destaque (Full Image overlay) */
.ebd-card--featured {
  position: relative;
  aspect-ratio: 16/9;
  justify-content: flex-end;
  color: #FFFFFF;
}
.ebd-card--featured .ebd-card__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.ebd-card--featured::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(26, 38, 52, 0.95), rgba(26, 38, 52, 0.2));
  z-index: 2;
}
.ebd-card--featured .ebd-card__content {
  position: relative;
  z-index: 3;
  padding: 40px;
}

/* Card Layout: Horizontal */
.ebd-card--horizontal {
  flex-direction: row;
}
.ebd-card--horizontal .ebd-card__thumb {
  width: 260px;
  aspect-ratio: auto;
}
@media (max-width: 768px) {
  .ebd-card--horizontal {
    flex-direction: column;
  }
  .ebd-card--horizontal .ebd-card__thumb {
    width: 100%;
    aspect-ratio: 16/10;
  }
}

/* -------------------------------------------------------------
   Alerts & Feedback
   ------------------------------------------------------------- */
.ebd-alert {
  display: flex;
  align-items: flex-start;
  gap: var(--ebd-space-md);
  padding: 16px 20px;
  border-radius: var(--ebd-radius-lg);
  font-family: var(--ebd-font-sans);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: var(--ebd-space-lg);
}
.ebd-alert__icon {
  font-size: 18px;
  margin-top: 2px;
}

.ebd-alert--success {
  background: var(--ebd-success-light);
  color: #065F46;
  border-left: 4px solid var(--ebd-success);
}
.ebd-alert--error {
  background: var(--ebd-danger-light);
  color: #991B1B;
  border-left: 4px solid var(--ebd-danger);
}
.ebd-alert--warning {
  background: var(--ebd-warning-light);
  color: #92400E;
  border-left: 4px solid var(--ebd-warning);
}
.ebd-alert--info {
  background: var(--ebd-info-light);
  color: #1E40AF;
  border-left: 4px solid var(--ebd-info);
}

/* -------------------------------------------------------------
   Modals
   ------------------------------------------------------------- */
.ebd-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.ebd-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.ebd-modal {
  background: #FFFFFF;
  border-radius: var(--ebd-radius-xl);
  box-shadow: var(--ebd-shadow-xl);
  max-width: 500px;
  width: calc(100% - 32px);
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}
.ebd-modal-overlay.active .ebd-modal {
  transform: scale(1);
}

.ebd-modal--large {
  max-width: 800px;
}

.ebd-modal-header {
  padding: 24px;
  border-bottom: 1px solid var(--ebd-neutral-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ebd-modal-title {
  margin: 0;
  font-family: var(--ebd-font-serif);
  font-size: 20px;
  color: var(--ebd-primary);
}
.ebd-modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--ebd-neutral-400);
  cursor: pointer;
}
.ebd-modal-close:hover {
  color: var(--ebd-primary);
}
.ebd-modal-body {
  padding: 24px;
  flex-grow: 1;
}
.ebd-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--ebd-neutral-100);
  display: flex;
  justify-content: flex-end;
  gap: var(--ebd-space-sm);
  background: var(--ebd-neutral-50);
}

/* -------------------------------------------------------------
   Accordions & Tabs
   ------------------------------------------------------------- */
.ebd-accordion {
  border: 1px solid var(--ebd-neutral-200);
  border-radius: var(--ebd-radius-lg);
  overflow: hidden;
  background: #FFFFFF;
  margin-bottom: var(--ebd-space-md);
}
.ebd-accordion-item {
  border-bottom: 1px solid var(--ebd-neutral-200);
}
.ebd-accordion-item:last-child {
  border-bottom: none;
}
.ebd-accordion-trigger {
  width: 100%;
  padding: 18px 24px;
  text-align: left;
  background: none;
  border: none;
  font-family: var(--ebd-font-sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--ebd-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s ease;
}
.ebd-accordion-trigger:hover {
  background: var(--ebd-neutral-50);
}
.ebd-accordion-trigger::after {
  content: "\f347"; /* Dashicons down */
  font-family: dashicons;
  transition: transform 0.3s ease;
  color: var(--ebd-gold);
}
.ebd-accordion-item.active .ebd-accordion-trigger::after {
  transform: rotate(180deg);
}
.ebd-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  background: #FFFFFF;
}
.ebd-accordion-content-inner {
  padding: 0 24px 24px 24px;
  font-family: var(--ebd-font-sans);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ebd-neutral-600);
}

/* Tabs */
.ebd-tabs {
  display: flex;
  border-bottom: 1px solid var(--ebd-neutral-200);
  gap: var(--ebd-space-xl);
  margin-bottom: var(--ebd-space-xl);
}
.ebd-tab-trigger {
  padding: 12px 4px;
  background: none;
  border: none;
  font-family: var(--ebd-font-sans);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ebd-neutral-600);
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
}
.ebd-tab-trigger:hover {
  color: var(--ebd-gold);
}
.ebd-tab-trigger.active {
  color: var(--ebd-primary);
}
.ebd-tab-trigger.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2.5px;
  background: var(--ebd-primary);
  border-radius: var(--ebd-radius-full);
}
.ebd-tab-pane {
  display: none;
}
.ebd-tab-pane.active {
  display: block;
  animation: ebd-fade-in 0.3s ease;
}

@keyframes ebd-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* -------------------------------------------------------------
   Dropdowns & Tooltips
   ------------------------------------------------------------- */
.ebd-dropdown-container {
  position: relative;
  display: inline-block;
}
.ebd-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: #FFFFFF;
  border: 1px solid var(--ebd-neutral-200);
  border-radius: var(--ebd-radius-md);
  box-shadow: var(--ebd-shadow-lg);
  margin-top: 6px;
  z-index: 100;
  min-width: 180px;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.ebd-dropdown-container.active .ebd-dropdown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.ebd-dropdown-item {
  display: block;
  padding: 10px 16px;
  font-family: var(--ebd-font-sans);
  font-size: 14px;
  color: var(--ebd-neutral-800);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease;
}
.ebd-dropdown-item:hover {
  background: var(--ebd-neutral-50);
  color: var(--ebd-gold);
}

/* Tooltips */
.ebd-tooltip-container {
  position: relative;
  display: inline-block;
  cursor: help;
}
.ebd-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: var(--ebd-primary);
  color: #FFFFFF;
  padding: 6px 12px;
  border-radius: var(--ebd-radius-sm);
  font-family: var(--ebd-font-sans);
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 100;
  box-shadow: var(--ebd-shadow-md);
}
.ebd-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--ebd-primary);
}
.ebd-tooltip-container:hover .ebd-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

/* -------------------------------------------------------------
   Skeleton Loading
   ------------------------------------------------------------- */
.ebd-skeleton {
  background: linear-gradient(90deg, #F1F5F9 25%, #E2E8F0 50%, #F1F5F9 75%);
  background-size: 200% 100%;
  animation: ebd-skeleton-pulse 1.5s infinite;
  border-radius: var(--ebd-radius-sm);
}
.ebd-skeleton--text {
  height: 16px;
  width: 100%;
  margin-bottom: 8px;
}
.ebd-skeleton--thumb {
  aspect-ratio: 16/10;
  border-radius: var(--ebd-radius-lg);
  margin-bottom: 16px;
}
.ebd-skeleton--circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

@keyframes ebd-skeleton-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* =============================================================
   LAYOUT DA DOCUMENTAÇÃO DO DESIGN SYSTEM
   ============================================================= */

.ebd-ds-layout {
  display: flex;
  flex-wrap: wrap;
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--ebd-space-xl) var(--ebd-space-lg);
  gap: var(--ebd-space-3xl);
}

.ebd-ds-sidebar {
  flex: 0 0 280px;
  position: relative;
}

.ebd-ds-sidebar-inner {
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: var(--ebd-space-md);
}

.ebd-ds-sidebar-inner::-webkit-scrollbar {
  width: 4px;
}
.ebd-ds-sidebar-inner::-webkit-scrollbar-track {
  background: transparent;
}
.ebd-ds-sidebar-inner::-webkit-scrollbar-thumb {
  background: var(--ebd-neutral-200);
  border-radius: 4px;
}

.ebd-ds-sidebar-title {
  font-family: var(--ebd-font-sans);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ebd-gold);
  letter-spacing: 1px;
  margin-bottom: var(--ebd-space-lg);
  border-bottom: 1px solid var(--ebd-neutral-200);
  padding-bottom: var(--ebd-space-sm);
}

.ebd-ds-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ebd-ds-nav li {
  margin-bottom: 4px;
}

.ebd-ds-nav .ebd-ds-nav-heading {
  font-size: 13px;
  font-weight: 700;
  color: var(--ebd-neutral-800);
  margin-top: var(--ebd-space-lg);
  margin-bottom: var(--ebd-space-xs);
  text-transform: uppercase;
}

.ebd-ds-nav a {
  display: block;
  font-size: 14px;
  color: var(--ebd-neutral-600);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--ebd-radius-md);
  transition: all 0.2s ease;
}

.ebd-ds-nav a:hover,
.ebd-ds-nav a.active {
  color: var(--ebd-primary);
  background-color: var(--ebd-neutral-100);
  font-weight: 500;
}

.ebd-ds-nav a.active {
  color: var(--ebd-gold);
  background-color: var(--ebd-gold-light);
  border-left: 3px solid var(--ebd-gold);
}

/* Conteúdo Principal */
.ebd-ds-content {
  flex: 1;
  min-width: 0;
  padding-bottom: var(--ebd-space-5xl);
}

.ebd-ds-area-divider {
  border-bottom: 2px solid var(--ebd-neutral-200);
  margin: var(--ebd-space-5xl) 0 var(--ebd-space-xl) 0;
  padding-bottom: var(--ebd-space-md);
}

.ebd-ds-area-divider h2 {
  font-family: var(--ebd-font-serif);
  font-size: 36px;
  color: var(--ebd-primary);
  font-weight: 800;
  margin: 0;
}

.ebd-ds-section {
  margin-bottom: var(--ebd-space-4xl);
}

.ebd-ds-section-title {
  margin-bottom: var(--ebd-space-sm);
  border-left: 4px solid var(--ebd-gold);
  padding-left: 16px;
  font-size: 28px;
}

/* Blocos de Documentação e Demonstração */
.ebd-doc-block {
  background: var(--ebd-neutral-50);
  border: 1px solid var(--ebd-neutral-200);
  border-radius: var(--ebd-radius-md);
  padding: var(--ebd-space-xl);
  margin: var(--ebd-space-lg) 0;
}

.ebd-ds-component-demo {
  background: #ffffff;
  border: 1px solid var(--ebd-neutral-200);
  border-radius: var(--ebd-radius-lg);
  padding: var(--ebd-space-2xl);
  margin-top: var(--ebd-space-md);
  box-shadow: var(--ebd-shadow-xs);
}

.ebd-doc-code {
  background: var(--ebd-primary);
  color: #fff;
  padding: var(--ebd-space-md) var(--ebd-space-lg);
  border-radius: var(--ebd-radius-md);
  margin-top: var(--ebd-space-sm);
  font-family: monospace;
  font-size: 13px;
  overflow-x: auto;
}

/* Grid Demonstração */
.ebd-ds-grid-demo {
  background: var(--ebd-neutral-50);
  border: 1px solid var(--ebd-neutral-200);
  border-radius: var(--ebd-radius-md);
  padding: var(--ebd-space-xl);
  margin-top: var(--ebd-space-md);
}

.ebd-ds-grid-row {
  display: flex;
  gap: var(--ebd-space-xl);
  margin-bottom: var(--ebd-space-md);
}

.ebd-ds-grid-col {
  background: var(--ebd-info-light);
  border: 1px solid var(--ebd-info);
  color: var(--ebd-info);
  text-align: center;
  padding: 10px;
  border-radius: var(--ebd-radius-sm);
  font-weight: 500;
  font-size: 14px;
}
.col-1 { flex: 1; }
.col-4 { flex: 4; }
.col-6 { flex: 6; }

/* Escala de Espaçamento */
.ebd-spacing-scale {
  background: #fff;
  border: 1px solid var(--ebd-neutral-200);
  border-radius: var(--ebd-radius-lg);
  padding: var(--ebd-space-xl);
  margin-top: var(--ebd-space-md);
}

.ebd-spacing-item {
  display: flex;
  align-items: center;
  gap: var(--ebd-space-md);
  margin-bottom: var(--ebd-space-sm);
  font-size: 14px;
  color: var(--ebd-neutral-600);
}

.ebd-spacing-item span {
  font-weight: 600;
  color: var(--ebd-primary);
  min-width: 150px;
}

.ebd-spacing-box {
  height: 24px;
  background: var(--ebd-info-light);
  border: 1px solid var(--ebd-info);
  border-radius: 2px;
}

/* Color Cards */
.ebd-color-card {
  padding: 20px;
  border-radius: var(--ebd-radius-md);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ebd-color-usage {
  margin-top: 10px;
  font-size: 12px;
  opacity: 0.9;
  line-height: 1.4;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.2);
}

.ebd-color-card[style*="background: var(--ebd-bg)"] .ebd-color-usage {
  border-top-color: var(--ebd-neutral-200);
}

/* Border & Shadows Demo */
.ebd-radius-demo {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--ebd-primary);
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  min-width: 120px;
}

.ebd-shadow-demo {
  padding: 24px 16px;
  text-align: center;
  background: #fff;
  border-radius: var(--ebd-radius-md);
  font-weight: 600;
  font-size: 14px;
}

/* Tabelas Componente */
.ebd-table th {
  font-weight: 600;
  color: var(--ebd-primary);
  font-size: 14px;
}
.ebd-table td {
  font-size: 14px;
  color: var(--ebd-neutral-800);
}
.ebd-table tbody tr:hover {
  background-color: var(--ebd-info-light) !important;
}

/* Mockups Pattern */
.ebd-ds-mockup {
  background: #fff;
  border: 1px solid var(--ebd-neutral-200);
  border-radius: var(--ebd-radius-lg);
  box-shadow: var(--ebd-shadow-sm);
  overflow: hidden;
  margin-top: var(--ebd-space-lg);
}
.ebd-ds-mockup-header {
  background: var(--ebd-neutral-100);
  padding: 10px 20px;
  font-weight: 600;
  font-size: 13px;
  color: var(--ebd-neutral-600);
  border-bottom: 1px solid var(--ebd-neutral-200);
}
.ebd-ds-mockup-body {
  padding: 20px;
}

/* Do / Don't Grid */
.ebd-do-dont-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--ebd-space-xl);
  margin-top: var(--ebd-space-lg);
}

.ebd-do, .ebd-dont {
  padding: var(--ebd-space-lg);
  border-radius: var(--ebd-radius-md);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.ebd-do {
  background: var(--ebd-success-light);
  border: 1px solid var(--ebd-success);
  color: var(--ebd-neutral-800);
}

.ebd-dont {
  background: var(--ebd-danger-light);
  border: 1px solid var(--ebd-danger);
  color: var(--ebd-neutral-800);
}

/* Back to top button */
.ebd-back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--ebd-gold);
  color: #fff;
  border: none;
  box-shadow: var(--ebd-shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 100;
}

.ebd-back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.ebd-back-to-top:hover {
  background: var(--ebd-primary);
  transform: translateY(-3px);
}

/* Responsivo */
@media (max-width: 1024px) {
  .ebd-ds-layout {
    flex-direction: column;
  }
  .ebd-ds-sidebar {
    flex: none;
    width: 100%;
  }
  .ebd-ds-sidebar-inner {
    position: static;
    max-height: none;
  }
  .ebd-do-dont-grid {
    grid-template-columns: 1fr;
  }
}
