/**
 * Blog Post Template Styles — Koe Idiomas
 * 
 * These styles are designed to work within the blog post page which uses
 * Tailwind's prose class. All selectors are prefixed with .kb- to avoid conflicts.
 * 
 * Load this in blog/post.php before rendering content_html.
 */

/* ─── Wrapper ───────────────────────────────────────────────── */
.kb-post {
  font-family: 'Inter', sans-serif;
  color: #1a1a1a;
  line-height: 1.7;
  max-width: 100%;
}

.kb-post * {
  box-sizing: border-box;
}

/* ─── Intro Box ───────────────────────────────────────────── */
.kb-intro {
  background: linear-gradient(135deg, rgba(216, 56, 67, 0.05) 0%, rgba(252, 134, 70, 0.05) 100%);
  border-left: 4px solid #D83843;
  border-radius: 0 1rem 1rem 0;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.kb-intro p {
  font-size: 1.25rem;
  font-style: italic;
  color: #475569;
  margin: 0;
  line-height: 1.6;
}

/* ─── Sections ──────────────────────────────────────────────── */
.kb-section {
  margin-bottom: 2.5rem;
}

/* ─── Typography ──────────────────────────────────────────── */
.kb-h2 {
  font-family: 'Rubik', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 1rem;
  margin-top: 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.kb-h3 {
  font-family: 'Rubik', sans-serif;
  font-size: 1.375rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.kb-h4 {
  font-family: 'Rubik', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
  margin-top: 0;
}

.kb-text {
  font-size: 1.0625rem;
  color: #475569;
  margin-bottom: 1rem;
  line-height: 1.7;
}

/* ─── Lists ─────────────────────────────────────────────────── */
.kb-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.kb-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.0625rem;
  color: #475569;
}

.kb-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 6px;
  height: 6px;
  background: #FC8646;
  border-radius: 50%;
}

.kb-ol {
  counter-reset: kb-counter;
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.kb-ol li {
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.0625rem;
  color: #475569;
}

.kb-ol li::before {
  counter-increment: kb-counter;
  content: counter(kb-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.75rem;
  height: 1.75rem;
  background: #D83843;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
}

/* ─── Tip Box ───────────────────────────────────────────────── */
.kb-tip {
  background: #fef3f3;
  border: 1px solid rgba(216, 56, 67, 0.2);
  border-radius: 1rem;
  padding: 1.25rem;
  margin: 1.5rem 0;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.kb-tip-icon {
  color: #D83843;
  font-size: 1.5rem;
  flex-shrink: 0;
  font-family: 'Material Symbols Outlined';
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.kb-tip p {
  margin: 0;
  color: #475569;
  font-size: 1rem;
}

/* ─── Table ──────────────────────────────────────────────────── */
.kb-table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
}

.kb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.kb-table th {
  background: #f8fafc;
  padding: 1rem;
  text-align: left;
  font-weight: 700;
  color: #1a1a1a;
  border-bottom: 2px solid #e2e8f0;
}

.kb-table td {
  padding: 1rem;
  border-bottom: 1px solid #f1f5f9;
  color: #475569;
  vertical-align: top;
}

.kb-table tr:last-child td {
  border-bottom: none;
}

.kb-table tr:hover td {
  background: #fafafa;
}

/* ─── Vocabulary Grid ───────────────────────────────────────── */
.kb-vocab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.kb-vocab-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.kb-vocab-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  font-weight: 700;
  font-size: 0.9375rem;
}

.kb-vocab-header.tech {
  background: #eff6ff;
  color: #1e40af;
}

.kb-vocab-header.sales {
  background: #fef3f3;
  color: #991b1b;
}

.kb-vocab-header.hr {
  background: #f0fdf4;
  color: #166534;
}

.kb-vocab-header.general {
  background: #f8fafc;
  color: #475569;
}

.kb-vocab-list {
  list-style: none;
  padding: 1rem;
  margin: 0;
}

.kb-vocab-list li {
  padding: 0.5rem 0;
  border-bottom: 1px dotted #e2e8f0;
  font-size: 0.9375rem;
}

.kb-vocab-list li:last-child {
  border-bottom: none;
}

/* ─── Universal Tags ────────────────────────────────────────── */
.kb-tags-box {
  background: #fafafa;
  border-radius: 1rem;
  padding: 1.25rem;
  margin-top: 1rem;
}

.kb-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.kb-tag {
  background: white;
  border: 1px solid #e2e8f0;
  padding: 0.375rem 0.875rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
}

/* ─── Error Grid ──────────────────────────────────────────── */
.kb-error-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.kb-error-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.25rem;
  text-align: center;
}

.kb-error-icon {
  color: #FC8646;
  font-size: 2rem;
  margin-bottom: 0.5rem;
  font-family: 'Material Symbols Outlined';
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.kb-error-card p {
  font-size: 0.9375rem;
  color: #64748b;
  margin: 0;
}

/* ─── Checklist ─────────────────────────────────────────────── */
.kb-checklist {
  background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
  border: 1px solid #fde047;
  border-radius: 1rem;
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.kb-checklist ul {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}

.kb-checklist li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  color: #475569;
}

.kb-checklist li::before {
  content: '☐';
  position: absolute;
  left: 0;
  color: #eab308;
  font-weight: bold;
}

/* ─── CTA Inline ────────────────────────────────────────────── */
.kb-cta-inline {
  background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
  border: 2px solid #e2e8f0;
  border-radius: 1.25rem;
  padding: 1.5rem;
  margin: 2rem 0;
  text-align: center;
}

.kb-cta-inline p {
  font-size: 1.125rem;
  color: #1a1a1a;
  margin-bottom: 1rem;
  margin-top: 0;
}

.kb-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #D83843;
  color: white;
  padding: 0.875rem 1.5rem;
  border-radius: 2rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9375rem;
  transition: all 0.2s;
}

.kb-cta-btn:hover {
  background: #b91c1c;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(216, 56, 67, 0.3);
}

/* ─── Columns ───────────────────────────────────────────────── */
.kb-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.kb-column {
  background: #f8fafc;
  border-radius: 1rem;
  padding: 1.25rem;
}

.kb-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.kb-column li {
  padding: 0.5rem 0;
  border-bottom: 1px dotted #e2e8f0;
  font-size: 0.9375rem;
  color: #475569;
}

.kb-column li:last-child {
  border-bottom: none;
}

/* ─── Phrases Box ───────────────────────────────────────────── */
.kb-phrases {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 1rem;
  padding: 1.25rem;
  margin-top: 1.5rem;
}

.kb-phrases ul {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}

.kb-phrases li {
  padding: 0.625rem 0;
  border-bottom: 1px solid #bfdbfe;
  font-size: 1rem;
  color: #475569;
}

.kb-phrases li:last-child {
  border-bottom: none;
}

.kb-phrases em {
  color: #1e40af;
  font-style: normal;
  font-weight: 600;
}

/* ─── Conclusion ────────────────────────────────────────────── */
.kb-conclusion {
  border-top: 2px solid #e2e8f0;
  padding-top: 2rem;
}

/* ─── CTA Final ─────────────────────────────────────────────── */
.kb-final-cta {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border-radius: 1.5rem;
  padding: 2.5rem;
  margin: 2.5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.kb-final-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(216, 56, 67, 0.15) 0%, transparent 50%);
}

.kb-final-cta > * {
  position: relative;
  z-index: 1;
}

.kb-final-cta h3 {
  font-family: 'Rubik', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: white;
  margin-bottom: 1rem;
  margin-top: 0;
}

.kb-final-cta > p {
  color: #9ca3af;
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.kb-final-cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.kb-btn-primary,
.kb-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border-radius: 2rem;
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: all 0.2s;
}

.kb-btn-primary {
  background: #D83843;
  color: white;
}

.kb-btn-primary:hover {
  background: #b91c1c;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(216, 56, 67, 0.4);
}

.kb-btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.kb-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ─── Related Posts ─────────────────────────────────────────── */
.kb-related {
  border-top: 1px solid #e2e8f0;
  padding-top: 2rem;
  margin-top: 2rem;
}

.kb-related h4 {
  font-family: 'Rubik', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 1rem;
}

.kb-related ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.kb-related li {
  margin-bottom: 0.75rem;
}

.kb-related a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #475569;
  text-decoration: none;
  padding: 0.75rem;
  border-radius: 0.75rem;
  transition: all 0.2s;
}

.kb-related a:hover {
  background: #f8fafc;
  color: #D83843;
}

.kb-related .material-symbols-outlined {
  color: #D83843;
  font-size: 1.25rem;
  font-family: 'Material Symbols Outlined';
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 640px) {
  .kb-h2 {
    font-size: 1.5rem;
  }
  
  .kb-intro p {
    font-size: 1.125rem;
  }
  
  .kb-text {
    font-size: 1rem;
  }
  
  .kb-vocab-grid,
  .kb-error-grid {
    grid-template-columns: 1fr;
  }
  
  .kb-columns {
    grid-template-columns: 1fr;
  }
  
  .kb-final-cta {
    padding: 1.5rem;
  }
  
  .kb-final-cta h3 {
    font-size: 1.5rem;
  }
  
  .kb-final-cta-buttons {
    flex-direction: column;
  }
  
  .kb-btn-primary,
  .kb-btn-secondary {
    width: 100%;
    justify-content: center;
  }
}
