/* ========================================================================== 
   IA-CHATBOTS - GUIDES & DOCUMENTATION STYLES
   ========================================================================== */

.service-breadcrumb {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 0.75rem 1rem;
  color: whitesmoke;
  font-size: 0.95rem;
  background-color: var(--color-akutangulo);
}

.service-breadcrumb ol {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.service-breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.4rem;
  color: whitesmoke;
  ;
}

.service-breadcrumb a {
  color: whitesmoke;
  ;
}

/* --- Layout for Guides (Sidebar + Content) --- */
.guide-layout {
  display: flex;
  align-items: flex-start;
  min-height: 100vh;
  position: relative;
}

/* Guías introductorias para lectores sin conocimientos técnicos */
.guide-plain-language {
  font-size: 1.08rem;
  line-height: 1.75;
}

.guide-plain-language p,
.guide-plain-language li,
.guide-plain-language td,
.guide-plain-language th {
  text-wrap: pretty;
}

.guide-plain-section,
.guide-next-steps,
.guide-sources {
  width: min(100%, 800px);
  margin-inline: auto;
}

.guide-plain-hero {
  width: 100%;
  padding: 80px 20px;
  text-align: center;
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  font-family: system-ui, -apple-system, sans-serif;
}

.guide-plain-hero .hero-container {
  max-width: 800px;
  margin: 0 auto;
}

.guide-plain-hero .hero-title {
  margin: 0 0 25px;
  padding: 0;
  color: var(--text-primary);
  font-size: 38px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.guide-plain-hero .hero-tagline {
  margin-bottom: 15px;
  color: var(--color-accent-text);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.guide-plain-hero .hero-subtitle {
  max-width: 700px;
  margin: 0 auto 35px;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.6;
}

.guide-example-type {
  color: var(--color-accent-text);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.guide-reading-time {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.guide-plain-section {
  padding: 60px 20px;
  border-bottom: 1px solid var(--border);
}

.guide-plain-language .section-title {
  margin-bottom: 40px;
  padding: 0.1rem 3rem 0.1rem 15px;
  border-left: 5px solid var(--accent-primary);
  color: var(--text-primary);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.guide-definition-box,
.guide-note,
.guide-warning,
.guide-key-message {
  margin: 1.5rem 0;
  padding: 1.25rem 1.4rem;
  border-left: 5px solid var(--accent-primary);
  border-radius: 8px;
  background: var(--bg-card);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.guide-definition-box strong,
.guide-definition-box span {
  display: block;
}

.guide-definition-box span {
  margin-top: 0.35rem;
  font-size: 1.18rem;
}

.guide-warning {
  border-left-color: #f59e0b;
}

.guide-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-block: 1.5rem;
}

.guide-simple-card,
.guide-example-stack article {
  padding: 1.35rem;
  border: 1px solid var(--border-card);
  border-radius: 12px;
  background: var(--bg-card);
}

.guide-simple-card>span {
  font-size: 1.8rem;
}

.guide-simple-card h3,
.guide-example-stack h3 {
  margin: 0.5rem 0;
  color: var(--text-primary);
}

.guide-simple-card p,
.guide-example-stack p {
  margin-bottom: 0;
}

.guide-table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border-card);
  border-radius: 12px;
}

.guide-comparison-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  background: var(--bg-card);
}

.guide-comparison-table th,
.guide-comparison-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.guide-comparison-table thead th {
  background: var(--bg-inner-details);
  color: var(--text-primary);
}

.guide-comparison-table tbody th {
  color: var(--color-accent-text);
}

.guide-example-stack {
  display: grid;
  gap: 1rem;
  margin-block: 1.5rem;
}

.guide-check-list,
.guide-step-list {
  display: grid;
  gap: 0.9rem;
  padding-left: 0;
  list-style: none;
}

.guide-check-list li,
.guide-step-list li {
  position: relative;
  padding: 1rem 1rem 1rem 3rem;
  border-radius: 8px;
  background: var(--bg-inner-details);
}

.guide-check-list li::before {
  position: absolute;
  top: 1rem;
  left: 1rem;
  color: var(--color-cta);
  font-weight: 900;
  content: "✓";
}

.guide-step-list {
  counter-reset: guide-step;
}

.guide-step-list li {
  counter-increment: guide-step;
}

.guide-step-list li::before {
  position: absolute;
  top: 0.9rem;
  left: 1rem;
  display: grid;
  width: 1.5rem;
  height: 1.5rem;
  place-items: center;
  border-radius: 50%;
  background: var(--color-ia-privada);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 900;
  content: counter(guide-step);
}

.guide-step-list strong,
.guide-step-list span {
  display: block;
}

.guide-next-steps {
  margin-block: 3rem;
  padding: clamp(1.5rem, 5vw, 3rem);
  border: 1px solid var(--accent-primary);
  border-radius: 14px;
  background: var(--bg-card);
}

.guide-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.guide-sources {
  padding: 2rem 1rem 4rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.guide-sources a {
  overflow-wrap: anywhere;
}

@media (max-width: 700px) {
  .guide-card-grid {
    grid-template-columns: 1fr;
  }

  .guide-plain-language {
    font-size: 1rem;
  }

  .guide-plain-section,
  .guide-plain-hero {
    padding-inline: 20px;
  }
}

/* Sidebar */
.guide-sidebar {
  width: 280px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 1.5rem 1rem 2rem;
  position: sticky;
  top: 0;
  overflow-y: auto;
  height: 100vh;
  transition: transform 0.3s ease;
  z-index: 60;
  flex-shrink: 0;
}

.guide-sidebar .logo {
  font-weight: 800;
  color: var(--color-ia-privada);
  margin-bottom: 2rem;
  font-size: 1.1rem;
  text-shadow: 0 0 5px var(--color-akutangulo);
}

.guide-sidebar nav h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin: 1.5rem 0 0.5rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.2rem;
}

.guide-sidebar nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.guide-sidebar nav li {
  margin: 0.25rem 0;
}

.guide-sidebar nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.guide-sidebar nav a:hover {
  background: var(--color-transparente);
  color: var(--color-ia-privada);
  transform: translateX(5px);
}

.guide-main-content {
  flex-grow: 1;
  width: 100%;
  position: relative;
  padding: 0;
}

/* Topbar for Mobile Guides */
.guide-topbar {
  display: none;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  z-index: 900;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}

.guide-menu-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
}

.guide-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  z-index: 1999;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.guide-overlay.show {
  display: block;
}

/* --- Tables in Guides --- */
.responsive-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.responsive-table th,
.responsive-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.responsive-table th {
  background: var(--bg-secondary);
  color: var(--color-ia-privada);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
}

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

/* --- Footer Adjustments for Guides --- */
.guide-layout+footer {
  margin-top: 0;
}

@media (max-width: 960px) {
  .guide-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    transform: translateX(-100%);
    width: 280px;
    height: 100vh;
    z-index: 2000;
  }

  .guide-sidebar.open {
    transform: translateX(0);
  }

  .guide-main-content {
    margin-left: 0;
    width: 100%;
    padding-top: 60px;
  }

  .guide-topbar {
    display: flex;
  }
}

@media (max-width: 720px) {
  .responsive-table thead {
    display: none;
  }

  .responsive-table,
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table td {
    display: block;
    width: 100%;
  }

  .responsive-table tr {
    margin-bottom: 1rem;
    border: 1px solid var(--border);
  }

  .responsive-table td {
    display: flex;
    justify-content: space-between;
    text-align: right;
  }

  .responsive-table td::before {
    content: attr(data-label);
    font-weight: 700;
    margin-right: 1rem;
    color: var(--text-muted);
  }
}