/* ═══════════════════════════════════════════════
   tailwind.css — Página de Fundamentos Tailwind
   Heredamos variables de style.css
══════════════════════════════════════════════════ */

/* ── Page Header ── */
.page-header {
  text-align: center;
  padding: 60px 20px 40px;
  max-width: 900px;
  margin: 0 auto;
}
.page-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  background: linear-gradient(135deg, #38bdf8, #818cf8, #a78bfa);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
  line-height: 1.2;
}
.page-title i {
  background: none;
  -webkit-text-fill-color: #38bdf8;
}
.page-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 680px;
  margin: 0 auto 30px;
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  padding: 8px 18px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  backdrop-filter: blur(8px);
}
.stat-pill i { color: #38bdf8; }
.stat-pill span { color: var(--text-primary); font-weight: 600; }

/* ── Tabs ── */
.section-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 0 20px 30px;
  max-width: 900px;
  margin: 0 auto;
}
.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: var(--card-bg);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-family: "Outfit", sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
}
.tab-btn:hover {
  border-color: #38bdf8;
  color: var(--text-primary);
  transform: translateY(-2px);
}
.tab-btn.active {
  background: linear-gradient(135deg, rgba(56,189,248,0.2), rgba(129,140,248,0.2));
  border-color: #38bdf8;
  color: var(--text-primary);
  box-shadow: 0 4px 15px rgba(56,189,248,0.2);
}
.tab-btn i { color: #38bdf8; font-size: 1rem; }

/* ── Tab Content ── */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Section & Content ── */
.tw-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 60px;
}
.section-title {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(56,189,248,0.3);
  font-family: "Outfit", sans-serif;
}

/* ── Cards Grid ── */
.tw-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}
.tw-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 22px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  backdrop-filter: blur(8px);
}
.tw-card:hover {
  transform: translateY(-5px);
  border-color: #38bdf8;
  box-shadow: 0 10px 30px rgba(56,189,248,0.15);
}
.tw-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: 10px;
  font-family: "Outfit", sans-serif;
}
.tw-card h3 i { color: #38bdf8; font-size: 1.2rem; }
.tw-card p { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.6; }

/* ── Code Block ── */
.code-block-wrapper {
  position: relative;
  background: #0d1117;
  border: 1px solid rgba(56,189,248,0.2);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
}
.code-lang-badge {
  display: block;
  background: rgba(56,189,248,0.12);
  color: #38bdf8;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 7px 16px;
  border-bottom: 1px solid rgba(56,189,248,0.15);
  font-family: "Outfit", sans-serif;
  text-transform: uppercase;
}
.code-block-wrapper pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.88rem;
  line-height: 1.65;
  color: #e2e8f0;
}
.copy-btn {
  position: absolute;
  top: 8px;
  right: 10px;
  background: rgba(56,189,248,0.1);
  border: 1px solid rgba(56,189,248,0.25);
  color: #38bdf8;
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  transition: all 0.2s;
}
.copy-btn:hover { background: rgba(56,189,248,0.25); }

/* Syntax colors */
.tw-k  { color: #c678dd; }   /* keyword */
.tw-s  { color: #98c379; }   /* string */
.tw-c  { color: #5c6370; font-style: italic; }  /* comment */
.tw-a  { color: #e5c07b; }   /* attribute */
.tw-v  { color: #61afef; }   /* value / class */
.tw-t  { color: #56b6c2; }   /* tag */

/* ── Search Bar ── */
.tw-search-wrapper {
  position: relative;
  margin-bottom: 25px;
  width: 100%;
}
.tw-search-wrapper i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #38bdf8;
  font-size: 1.1rem;
}
.tw-search-wrapper input {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 14px 20px 14px 48px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: "Inter", sans-serif;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}
.tw-search-wrapper input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.15);
}
.tw-search-wrapper input::placeholder {
  color: var(--text-secondary);
  opacity: 0.8;
}

/* ── Utility Showcase ── */
.utility-group {
  margin-bottom: 36px;
}
.utility-group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 14px;
  font-family: "Outfit", sans-serif;
}
.utility-group-title i { color: #38bdf8; }

.utility-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.utility-item {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 10px 14px;
  transition: border-color 0.2s, transform 0.2s;
  cursor: default;
}
.utility-item:hover {
  border-color: #38bdf8;
  transform: translateX(4px);
}
.utility-class {
  font-family: 'Consolas', monospace;
  font-size: 0.82rem;
  color: #38bdf8;
  font-weight: 600;
  margin-bottom: 3px;
}
.utility-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ── Live Demo Area ── */
.demo-area {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 28px;
}
.demo-area-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  font-family: "Outfit", sans-serif;
  display: flex;
  align-items: center;
  gap: 8px;
}
.demo-area-title i { color: #38bdf8; }
.demo-preview {
  background: #1e293b;
  border-radius: 10px;
  padding: 20px;
  overflow-x: auto;
}
/* Tailwind simulation classes */
.d-flex { display: flex; }
.d-grid { display: grid; }
.d-gap-4 { gap: 16px; }
.d-p-4 { padding: 16px; }
.d-rounded { border-radius: 8px; }
.d-text-center { text-align: center; }
.d-font-bold { font-weight: 700; }
.d-text-sky { color: #38bdf8; }
.d-text-purple { color: #a78bfa; }
.d-text-green { color: #34d399; }
.d-bg-sky { background: rgba(56,189,248,0.15); border: 1px solid rgba(56,189,248,0.3); padding: 8px 14px; border-radius: 6px; }
.d-bg-purple { background: rgba(167,139,250,0.15); border: 1px solid rgba(167,139,250,0.3); padding: 8px 14px; border-radius: 6px; }
.d-bg-green { background: rgba(52,211,153,0.15); border: 1px solid rgba(52,211,153,0.3); padding: 8px 14px; border-radius: 6px; }

/* ── Comparison Table ── */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 28px;
  font-size: 0.88rem;
}
.compare-table th {
  background: rgba(56,189,248,0.12);
  color: #38bdf8;
  font-family: "Outfit", sans-serif;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 2px solid rgba(56,189,248,0.3);
}
.compare-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--glass-border);
  color: var(--text-secondary);
  vertical-align: top;
}
.compare-table tr:hover td { background: rgba(255,255,255,0.02); }
.compare-table code {
  font-family: 'Consolas', monospace;
  font-size: 0.82rem;
  color: #38bdf8;
  background: rgba(56,189,248,0.08);
  padding: 2px 6px;
  border-radius: 4px;
}
.tag-yes { color: #34d399; font-weight: 600; }
.tag-no  { color: #f87171; font-weight: 600; }

/* ── Practice Block ── */
.practice-block {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-left: 4px solid #38bdf8;
  border-radius: 12px;
  padding: 22px 24px;
  margin-bottom: 24px;
  backdrop-filter: blur(8px);
}
.practice-block h3 {
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: 10px;
  font-family: "Outfit", sans-serif;
}
.practice-block p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 14px;
}
.practice-block code {
  font-family: 'Consolas', monospace;
  font-size: 0.85rem;
  color: #38bdf8;
  background: rgba(56,189,248,0.1);
  padding: 2px 7px;
  border-radius: 4px;
}

/* ── Responsive Simulator ── */
.resp-sim {
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
}
.resp-sim-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 14px 18px;
}
.resp-bp {
  font-family: 'Consolas', monospace;
  font-size: 0.82rem;
  color: #38bdf8;
  background: rgba(56,189,248,0.1);
  border: 1px solid rgba(56,189,248,0.2);
  border-radius: 6px;
  padding: 4px 10px;
  min-width: 80px;
  text-align: center;
}
.resp-desc { color: var(--text-secondary); font-size: 0.87rem; flex: 1; }
.resp-px   { color: var(--text-primary); font-weight: 600; font-size: 0.85rem; }

/* ── Toast ── */
#copy-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #38bdf8;
  color: #0f172a;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 10px 22px;
  border-radius: 50px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 9999;
}
#copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Responsive ── */
@media (max-width: 700px) {
  .tw-cards-grid { grid-template-columns: 1fr; }
  .utility-grid  { grid-template-columns: 1fr 1fr; }
  .section-tabs  { gap: 8px; }
  .tab-btn       { padding: 8px 14px; font-size: 0.82rem; }
  .page-title    { font-size: 2rem; }
  .compare-table { font-size: 0.8rem; }
  .compare-table th, .compare-table td { padding: 8px 10px; }
}
