/* Galería de plantillas: jerarquía simple, muestras y acciones consistentes. */
.templates-section{padding-top:28px}
.templates-head.page-head{padding:10px 0 8px;margin-bottom:18px}
.templates-head h1{font-size:clamp(2.2rem,4.3vw,3.3rem);max-width:none;line-height:1.08;margin:0 0 17px}
.templates-head .eyebrow{margin-bottom:16px}
.templates-head .lede{max-width:65ch;font-size:1.03rem;margin:0;line-height:1.7}
.templates-bar{display:flex;justify-content:space-between;gap:16px;align-items:center;border-bottom:1px solid var(--line);padding:14px 0;margin-bottom:24px;font-size:.82rem;color:var(--muted)}
.templates-bar p{margin:0}.templates-bar strong{font-weight:600;color:var(--text)}.templates-bar a{text-underline-offset:4px;color:var(--turquesa)}
.templates-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;align-items:start}
.template{border:1px solid var(--line);background:var(--bg-soft);border-radius:16px;overflow:hidden;scroll-margin-top:100px}
.template__visual{position:relative;height:190px;background:#0a0a0f;overflow:hidden;border-bottom:1px solid var(--line)}
.template__visual iframe{border:0;width:100%;height:100%;pointer-events:none;position:absolute;inset:0;color-scheme:dark}
.template__body{padding:22px;display:flex;flex-direction:column;gap:13px}
.template__tag{margin:0;font-size:.65rem;text-transform:uppercase;letter-spacing:.1em;color:var(--turquesa);font-weight:600}
.template h2{font-family:var(--font-display);font-size:1.65rem;line-height:1.12;font-weight:400;min-height:2.24em;margin:0;letter-spacing:-.02em}
.template__description{font-size:.85rem;line-height:1.65;min-height:3.3em;color:var(--muted);margin:0}
.template__meta{list-style:none;display:flex;gap:12px;flex-wrap:wrap;margin:0;padding:0;color:var(--muted);font-size:.7rem}
.template__meta li+li{border-left:1px solid var(--line);padding-left:12px}
.template__actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:5px}
.template__actions .btn{padding:.65rem .45rem;font-size:.76rem;min-height:44px;white-space:nowrap}
.template__credit{font-size:.72rem;line-height:1.7;color:var(--muted);margin-top:1px;border-top:1px solid var(--line);padding-top:13px}
.template__credit summary{cursor:pointer}.template__credit p{margin:12px 0 0}.template__credit a{text-underline-offset:3px}
.templates-note{margin:20px 0 0;color:var(--muted);font-size:.78rem;line-height:1.75}
.templates-guide{display:grid;grid-template-columns:1fr 1.45fr;gap:45px;border-top:1px solid var(--line);padding-top:45px}
.templates-guide h2{font-family:var(--font-display);font-size:2.4rem;line-height:1.1;font-weight:400;max-width:15ch;margin:0}
.templates-steps{list-style:none;margin:0;padding:0;counter-reset:step}
.templates-steps li{counter-increment:step;display:grid;grid-template-columns:32px 1fr;gap:15px;padding:0 0 25px;color:var(--muted);line-height:1.7;font-size:.92rem}
.templates-steps li:before{content:'0' counter(step);color:var(--violeta);font-family:var(--font-display);font-size:1.4rem}
.templates-steps strong{display:block;color:var(--text);font-weight:600}
.templates-faq{margin-top:35px}.templates-faq details{border-bottom:1px solid var(--line);padding:19px 0}.templates-faq summary{cursor:pointer;font-size:1rem;line-height:1.5}.templates-faq p{color:var(--muted);line-height:1.8;max-width:80ch;font-size:.92rem}
.preview-dialog{padding:0;color:var(--text);background:var(--bg-soft);border:1px solid var(--line-strong);border-radius:20px;width:min(1160px,calc(100vw - 40px));max-width:calc(100vw - 40px);max-height:92svh;overflow:hidden;box-shadow:0 35px 100px #0008}
.preview-dialog::backdrop{background:#06060dbe;backdrop-filter:blur(9px)}
.preview-dialog[open]{display:flex;flex-direction:column}.preview-dialog__header,.preview-toolbar,.preview-dialog__foot{flex-shrink:0}
.preview-dialog__header{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:20px 24px;border-bottom:1px solid var(--line)}
.preview-dialog__header h2{font-family:var(--font-display);font-size:1.55rem;font-weight:400;line-height:1.2;margin:0}
.preview-dialog__header p{font-size:.71rem;color:var(--muted);margin:5px 0 0}
.preview-dialog__close{border:1px solid var(--line);border-radius:50%;background:var(--panel);color:var(--text);width:44px;height:44px;flex:none;font-size:1.4rem;cursor:pointer}
.preview-toolbar{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;padding:12px 24px;border-bottom:1px solid var(--line)}
.preview-toolbar__views{display:flex;gap:6px}.preview-toolbar button{font:inherit;font-size:.72rem;cursor:pointer;background:transparent;color:var(--muted);border:1px solid var(--line);border-radius:8px;min-height:40px;padding:8px 12px}.preview-toolbar button[aria-pressed=true]{background:var(--text);color:var(--bg)}
.preview-toolbar a{font-size:.74rem;padding:.55rem .85rem;min-height:40px}
.preview-frame{background:var(--panel);padding:0;display:flex;justify-content:center;height:min(65svh,720px);min-height:0;flex:1 1 auto;overflow:auto;position:relative}
.preview-frame iframe{border:0;display:block;width:100%;height:100%;min-height:0;background:#0a0a0f;flex-shrink:0}.preview-frame[data-view=mobile] iframe{width:390px;max-width:100%}
.preview-dialog__foot{padding:12px 24px;border-top:1px solid var(--line);font-size:.7rem;line-height:1.6;color:var(--muted);margin:0}
.preview-dialog__foot a{text-underline-offset:3px}
.preview-open{overflow:hidden}.preview-loading{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-size:.9rem;color:var(--text);background:var(--bg-soft);padding:12px 20px;border-radius:10px;z-index:2}
@media(max-width:960px){.templates-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.templates-guide{grid-template-columns:1fr;gap:28px}.preview-toolbar{padding:12px 16px}.preview-dialog__header{padding:16px}.preview-dialog__foot{padding:10px 16px}}
@media(max-width:620px){.templates-head.page-head{padding-top:10px;margin-bottom:20px}.templates-section{padding-top:28px}.templates-grid{grid-template-columns:1fr;gap:20px}.template__visual{height:210px}.template__body{padding:22px}.template h2{font-size:1.65rem;min-height:0}.template__description{min-height:0}.templates-bar{font-size:.73rem}.template__actions .btn{font-size:.8rem}.preview-dialog{width:calc(100vw - 16px);max-width:calc(100vw - 16px);border-radius:14px;max-height:94svh}.preview-dialog__header h2{font-size:1.18rem}.preview-toolbar__views{width:100%;justify-content:space-between}.preview-toolbar__views button{flex:1;font-size:.66rem;padding:8px}.preview-toolbar>a{width:100%;justify-content:center}.preview-frame{height:55svh}.preview-dialog__foot{font-size:.65rem}.templates-guide h2{font-size:2rem}}
@media(prefers-reduced-motion:reduce){.template,.preview-dialog{scroll-behavior:auto}}
