/* Theme extras on top of tailwind.css (a precompiled build that only
   contains the utilities the original markup used). Anything the
   templates need beyond that set lives here. */

/* Chrome wrappers must not create boxes, otherwise the sticky header
   would only stick inside its own section wrapper. */
.edu-chrome,
.edu-chrome > [data-section-id] { display: contents; }

html { scroll-behavior: smooth; }

/* Circuit filters */
.edu-filter { cursor: pointer; }
.edu-filter.is-active { background: var(--ink); color: var(--primary-foreground); }
.edu-filter.is-active:hover { background: var(--ink); color: var(--primary-foreground); }
[data-edu-card][hidden] { display: none; }
@media (min-width: 1024px) {
  [data-edu-card].edu-wide { grid-column: span 2 / span 2; }
}

/* Circuit modal */
.edu-modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 1rem; }
.edu-modal[hidden] { display: none; }
.edu-modal-backdrop { position: absolute; inset: 0; background: rgb(0 0 0 / .8); animation: edu-fade .2s ease-out; }
.edu-modal-panel { position: relative; width: 100%; max-width: 32rem; max-height: calc(100vh - 2rem); overflow-y: auto;
  border-radius: 1.5rem; background: var(--background); box-shadow: 0 25px 50px -12px rgb(0 0 0 / .25); animation: edu-pop .2s ease-out; }
.edu-modal-close { position: absolute; right: 1rem; top: 1rem; display: grid; place-items: center; width: 2rem; height: 2rem;
  border-radius: 9999px; background: rgb(255 255 255 / .85); color: var(--ink); cursor: pointer; }
.edu-modal-list { display: grid; gap: .5rem; }
.edu-modal-list li { display: flex; align-items: flex-start; gap: .5rem; font-size: .875rem; }
.edu-modal-list svg { margin-top: .125rem; width: 1rem; height: 1rem; flex-shrink: 0; color: var(--leaf); }
body.edu-lock { overflow: hidden; }
@keyframes edu-fade { from { opacity: 0 } }
@keyframes edu-pop { from { opacity: 0; transform: scale(.96) } }

/* Configurator */
.edu-nivel.is-active { background: var(--teal); color: var(--primary-foreground); }
.edu-nivel.is-active:hover { background: var(--teal); }
.edu-send[aria-disabled="true"] { pointer-events: none; opacity: .5; }
.edu-config { padding-top: 4rem; padding-bottom: 4rem; }
.edu-config-card { padding: 1.5rem; }
.edu-config-title { font-size: 1.5rem; line-height: 1.2; }
.edu-config-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.edu-config-grid > * { grid-column: span 2 / span 2; }
.edu-config-grid > .edu-span-narrow { grid-column: span 1 / span 1; }
.edu-input { padding: .625rem 1rem; }
.edu-nivel { padding: .5rem 1rem; }
@media (min-width: 768px) {
  .edu-config-card { padding: 2rem 2.5rem; }
  .edu-config-title { font-size: 1.875rem; }
  .edu-config-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .edu-config-grid > .edu-span-full { grid-column: span 6 / span 6; }
  .edu-config-grid > .edu-span-wide { grid-column: span 4 / span 4; }
  .edu-config-grid > .edu-span-narrow { grid-column: span 2 / span 2; }
  .edu-config-grid > .edu-span-half { grid-column: span 3 / span 3; }
}

/* FAQ accordion (native <details>) */
.edu-faq summary { list-style: none; }
.edu-faq summary::-webkit-details-marker { display: none; }
.edu-faq summary svg { transition: transform .2s; }
.edu-faq[open] summary svg { transform: rotate(180deg); }
.edu-faq-a { padding-bottom: 1rem; font-size: .875rem; color: var(--muted-foreground); }

/* Logo image (header/footer); height comes from the section setting. */
.edu-logo { display: block; width: auto; max-width: 12rem; object-fit: contain; }

/* Long card ledes are clamped; the full text lives in the modal. */
.edu-clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* "Descripción larga" HTML inside the circuit modal. */
.edu-rich > * + * { margin-top: .75rem; }
.edu-rich.edu-plain { white-space: pre-line; }
.edu-rich p:empty { display: none; }
.edu-rich ul { list-style: disc; padding-left: 1.25rem; }
.edu-rich ol { list-style: decimal; padding-left: 1.25rem; }
.edu-rich li + li { margin-top: .25rem; }
.edu-rich h2, .edu-rich h3, .edu-rich h4 { font-family: var(--font-display); font-weight: 700; color: var(--ink); }
.edu-rich strong, .edu-rich b { font-weight: 700; color: var(--ink); }
.edu-rich a { color: var(--teal); text-decoration: underline; }
.edu-rich img { max-width: 100%; height: auto; border-radius: 1rem; }

/* "Ver más circuitos" */
.border-teal { border-color: var(--teal); }
[data-edu-more-wrap][hidden] { display: none; }
