/*
 * TECNOYDES V10.6 — UNIFIED CONTENT LAYOUT
 *
 * - One responsive content system for Gutenberg pages created now or later.
 * - Generic legal pages, Contacto and Soluciones use templates/page.html.
 * - Existing special landing templates for Servicios/Proyectos remain intact,
 *   but inherit the same horizontal measure and spacing.
 * - V10 homepage, approved header, footer and CTA are untouched.
 */
body:not(.home){
  --tec-v106-gutter:clamp(18px,4.88vw,128px);
  --tec-v106-content-max:2400px;
  --tec-v106-width:min(calc(100% - (2 * var(--tec-v106-gutter))),var(--tec-v106-content-max));
  --tec-v106-ink:#17283c;
  --tec-v106-muted:#526176;
  --tec-v106-red:#ed111b;
  --tec-v106-text:clamp(16px,1.13vw,27px);
  --tec-v106-h2:clamp(27px,2.65vw,61px);
  /* Gutenberg's global constrained layout follows the theme design,
     including legacy content edited before this release. */
  --wp--style--global--content-size:min(90vw,2400px);
  --wp--style--global--wide-size:min(95vw,2600px);
}

/* WordPress' automatic block gutters must not shrink the site-level canvas. */
body:not(.home) .wp-site-blocks > .tec-v106-page,
body:not(.home) .wp-site-blocks > main.tec-v102-generic,
body:not(.home) main.tec-v106-page{
  margin:0!important;
  padding:0!important;
  width:100%!important;
  max-width:none!important;
  background:#fff;
  min-width:0;
}
body:not(.home) :is(.tec-v106-page,.tec-v106-page *),
body:not(.home) .tec-v106-page-wrap{box-sizing:border-box}
body:not(.home) .tec-v106-page-wrap{
  width:var(--tec-v106-width)!important;
  max-width:var(--tec-v106-content-max)!important;
  margin-left:auto!important;
  margin-right:auto!important;
  min-width:0;
}

/* Generic page heading uses the same palette and horizontal margins as Home. */
body:not(.home) .tec-v106-page-hero{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:clamp(43px,4.4vw,110px) 0 clamp(38px,3.8vw,94px);
  background:linear-gradient(108deg,#fff 1%,#f4f9fd 55%,#eaf4fa 100%);
  border:0;
}
body:not(.home) .tec-v106-page-hero>.tec-v106-page-wrap{margin-block:0!important}
body:not(.home) .tec-v106-page-title{
  font-size:clamp(39px,4.15vw,99px)!important;
  line-height:1.06!important;
  font-weight:800!important;
  letter-spacing:-.044em!important;
  max-width:100%!important;
  margin:0!important;
  color:var(--tec-v106-ink)!important;
  overflow-wrap:break-word;
}
body:not(.home) .tec-v106-page-title::before{
  content:"";
  display:block;
  width:clamp(20px,1.45vw,38px);
  height:3px;
  background:var(--tec-v106-red);
  margin-bottom:clamp(13px,1.05vw,25px);
}
body:not(.home) .tec-v106-page-body{
  padding-block:clamp(40px,4.3vw,106px) clamp(65px,5.1vw,135px);
  margin-block:0!important;
}

/* Content itself expands; titles and paragraphs remain readable, aligned left.
   Images, forms, columns, tables, covers and galleries may use full width. */
body:not(.home) :is(.tec-v106-page-body,.tec-v102-generic) > .wp-block-post-content,
body:not(.home) :is(.tec-v106-page-body,.tec-v102-generic) .tec-v106-post-content{
  width:100%!important;
  max-width:none!important;
  min-width:0;
  padding:0!important;
  margin:0!important;
}
body:not(.home) :is(.tec-v106-page-body,.tec-v102-generic) .wp-block-post-content{
  --wp--style--global--content-size:100%;
  --wp--style--global--wide-size:100%;
}
body:not(.home) :is(.tec-v106-page-body,.tec-v102-generic) .wp-block-post-content >
:where(.wp-block-columns,.wp-block-group,.wp-block-cover,.wp-block-media-text,.wp-block-gallery,.wp-block-image,.wp-block-table,.wp-block-query,.wp-block-shortcode,.wp-block-html,.alignwide){
  width:100%;
  max-width:100%!important;
  min-width:0;
}
/* A nested Group defaults to the available content width unless the editor
   author deliberately sets a width inline. */
body:not(.home) :is(.tec-v106-page-body,.tec-v102-generic) .wp-block-post-content > .wp-block-group.is-layout-constrained{
  --wp--style--global--content-size:100%;
  --wp--style--global--wide-size:100%;
}
body:not(.home) :is(.tec-v106-page-body,.tec-v102-generic) .wp-block-post-content :is(.alignwide,.alignfull){
  max-width:100%!important;
}
body:not(.home) :is(.tec-v106-page-body,.tec-v102-generic) .wp-block-post-content :is(p,li){
  color:var(--tec-v106-muted);
  font-size:var(--tec-v106-text);
  line-height:1.57;
}
body:not(.home) :is(.tec-v106-page-body,.tec-v102-generic) .wp-block-post-content :is(h2){
  font-size:var(--tec-v106-h2);
  line-height:1.12;
  font-weight:800;
  margin:clamp(34px,2.8vw,72px) 0 clamp(15px,1.1vw,30px);
  color:var(--tec-v106-ink);
}
body:not(.home) :is(.tec-v106-page-body,.tec-v102-generic) .wp-block-post-content :is(h3){
  font-size:clamp(23px,1.85vw,42px);
  line-height:1.18;
  margin:clamp(24px,2vw,50px) 0 clamp(10px,.8vw,22px);
  color:var(--tec-v106-ink);
}
body:not(.home) :is(.tec-v106-page-body,.tec-v102-generic) .wp-block-post-content :is(.wp-block-columns){
  gap:clamp(22px,2.6vw,72px);
  align-items:flex-start;
}
body:not(.home) :is(.tec-v106-page-body,.tec-v102-generic) .wp-block-post-content img{
  height:auto;
  max-width:100%;
}
body:not(.home) :is(.tec-v106-page-body,.tec-v102-generic) .wp-block-post-content :is(.wp-block-button__link,button[type="submit"],input[type="submit"]){
  border-radius:6px;
  background:var(--tec-v106-red);
  color:#fff;
  font-weight:700;
}
body:not(.home) :is(.tec-v106-page-body,.tec-v102-generic) .wp-block-post-content :is(input,textarea,select){
  max-width:100%;
}
/* Standard WP forms / common contact forms, without stretching radio/checkbox. */
body:not(.home) :is(.tec-v106-page-body,.tec-v102-generic) .wp-block-post-content
:is(input[type="text"],input[type="email"],input[type="tel"],input[type="url"],input[type="search"],textarea,select){
  border:1px solid #dbe4ed;
  border-radius:7px;
  padding:12px 14px;
  font:inherit;
  color:var(--tec-v106-ink);
  background:#fff;
}
body:not(.home) :is(.tec-v106-page-body,.tec-v102-generic) .wp-block-post-content
:where(.wp-block-table,.wp-block-table table){max-width:100%;overflow-x:auto}

/* Legacy Gutenberg page saved in the Site Editor: a scoped fallback makes it
   wider too, even before the database template is reset to the theme file. */
body:not(.home) .tec-v102-generic{
  width:var(--tec-v106-width)!important;
  max-width:var(--tec-v106-content-max)!important;
  margin:0 auto!important;
}
body:not(.home) .tec-v102-generic > .wp-block-post-title{
  font-size:clamp(39px,4.15vw,99px)!important;
  line-height:1.06!important;
}

/* Existing Services and Projects still have curated theme templates, but now
   get the same content width/gutters as any standard page. */
body:not(.home) :is(.tec-v102-service-list,.tec-v102-projects){
  box-sizing:border-box;
  width:100%!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
  padding-left:max(var(--tec-v106-gutter),calc((100% - 2400px) / 2))!important;
  padding-right:max(var(--tec-v106-gutter),calc((100% - 2400px) / 2))!important;
}
body:not(.home) .tec-v102-service-list h1,
body:not(.home) .tec-v102-projects h1{
  font-size:clamp(39px,4.15vw,99px)!important;
  line-height:1.06;
  letter-spacing:-.044em;
}
body:not(.home) :is(.tec-v102-service-list,.tec-v102-projects) :is(p,li){
  font-size:clamp(15px,1.07vw,25px);
  line-height:1.53;
}
body:not(.home) .tec-v102-projects .tec-project-grid,
body:not(.home) .tec-v102-service-list .tec-feature-grid{
  max-width:100%;
  min-width:0;
}
/* The theme's WordPress project CPT detail and new posts also use the normal
   site width rather than the old 940px hard limit. */
body:not(.home) :is(.tec-project-detail,.tec-project-related){
  max-width:var(--tec-v106-content-max)!important;
  width:var(--tec-v106-width)!important;
  margin-inline:auto!important;
}
body:not(.home) .tec-project-detail .wp-block-post-content{
  --wp--style--global--content-size:100%;
  --wp--style--global--wide-size:100%;
  max-width:none!important;
}

@media(max-width:759px){
  body:not(.home){--tec-v106-gutter:18px;--tec-v106-text:15px}
  body:not(.home) .tec-v106-page-hero{padding:36px 0 38px}
  body:not(.home) .tec-v106-page-title{font-size:clamp(34px,8.8vw,49px)!important}
  body:not(.home) .tec-v106-page-body{padding:32px 0 62px}
  body:not(.home) .tec-v102-generic{padding:36px 0 62px}
  body:not(.home) .tec-v102-service-list h1,body:not(.home) .tec-v102-projects h1{
    font-size:clamp(34px,8.8vw,49px)!important;
  }
  body:not(.home) :is(.tec-v106-page-body,.tec-v102-generic) .wp-block-post-content :is(h2){font-size:clamp(25px,6vw,34px)}
  body:not(.home) :is(.tec-v106-page-body,.tec-v102-generic) .wp-block-post-content :is(h3){font-size:clamp(21px,5.2vw,28px)}
  body:not(.home) :is(.tec-v106-page-body,.tec-v102-generic) .wp-block-post-content .wp-block-columns:not(.is-not-stacked-on-mobile){
    display:flex;flex-direction:column;gap:22px;
  }
  body:not(.home) :is(.tec-v106-page-body,.tec-v102-generic) .wp-block-post-content .wp-block-columns:not(.is-not-stacked-on-mobile) > *{
    flex-basis:auto!important;width:100%;max-width:100%;
  }
}

/* Forms inserted into future Gutenberg pages adapt to their column width. */
body:not(.home) :is(.tec-v106-page-body,.tec-v102-generic) .wp-block-post-content
:is(input[type="text"],input[type="email"],input[type="tel"],input[type="url"],input[type="search"],input[type="number"],textarea,select){
  width:100%;
  box-sizing:border-box;
}
body:not(.home) :is(.tec-v106-page-body,.tec-v102-generic) .wp-block-post-content :is(button[type="submit"],input[type="submit"]){
  border:0;
  border-radius:6px;
  min-height:43px;
  padding:10px 20px;
  font:inherit;
  font-weight:700;
  cursor:pointer;
}

/* The service cards are links: keep the Tecnoydes palette, not browser blue. */
body:not(.home) .tec-v102-service-list .tec-feature{
  color:var(--tec-v106-ink)!important;
  text-decoration:none!important;
}
body:not(.home) .tec-v102-service-list .tec-feature strong{color:var(--tec-v106-ink)!important}
body:not(.home) .tec-v102-service-list .tec-feature:hover strong,
body:not(.home) .tec-v102-service-list .tec-feature:focus-visible strong{color:var(--tec-v106-red)!important}


/* ======================================================================
 TECNOYDES V10.10 - LEGACY GUTENBERG CONTENT / CONTACTO
 Confirmed live DOM (2560px): .tec-contact-page and each of its sections
 were 1440px, even though the shared site design allows ~90vw (2300px).
 WordPress serves the page as a top-level .wp-block-group (NOT a <main>).
 This CSS is appended to the global content stylesheet that Contacto ALREADY
 loads. No conditional is_page(), body_class() or JS layout detection.
 ====================================================================== */

/* Keep all legacy top-level Gutenberg groups on the same horizontal frame as
   current/future pages. Do not alter full-bleed curated detail templates. */
body:not(.home) .wp-site-blocks > .wp-block-group.tec-interior:not(.tec-v102-detail),
body:not(.home) .wp-site-blocks .wp-block-group.tec-interior.tec-contact-page {
  box-sizing:border-box !important;
  width:min(calc(100% - var(--tec-v106-gutter) - var(--tec-v106-gutter)), 2400px) !important;
  max-width:2400px !important;
  min-width:0 !important;
  margin-left:auto !important;
  margin-right:auto !important;
  padding-left:0 !important;
  padding-right:0 !important;
}

/* Never allow the old 980px / 1000px caps or saved block margins to narrow
   the header, form row or FAQ when the outer frame has been widened. */
body:not(.home) .wp-site-blocks .tec-contact-page > .tec-contact-hero,
body:not(.home) .wp-site-blocks .tec-contact-page > .tec-contact-layout,
body:not(.home) .wp-site-blocks .tec-contact-page > .tec-faq,
body:not(.home) .wp-site-blocks .tec-contact-page .tec-interior-section.tec-faq {
  box-sizing:border-box !important;
  width:100% !important;
  max-width:none !important;
  min-width:0 !important;
  margin-left:0 !important;
  margin-right:0 !important;
  padding-left:0 !important;
  padding-right:0 !important;
}

/* Only the Contacto two-column row changes; its real form and handlers are
   untouched. A reliable fluid gap and minmax columns avoid overflow. */
body:not(.home) .wp-site-blocks .tec-contact-page .tec-contact-layout {
  display:grid !important;
  grid-template-columns:minmax(0,1.2fr) minmax(0,.85fr) !important;
  column-gap:clamp(30px,3.25vw,86px) !important;
  row-gap:clamp(24px,2.4vw,60px) !important;
  align-items:start !important;
}
body:not(.home) .wp-site-blocks .tec-contact-page .tec-contact-layout > * {
  min-width:0 !important;
  max-width:100% !important;
  box-sizing:border-box;
}
body:not(.home) .wp-site-blocks .tec-contact-page .tec-contact-form-panel {
  width:100% !important;
  max-width:none !important;
  min-width:0 !important;
  box-sizing:border-box;
  padding:clamp(26px,2.45vw,64px);
}
body:not(.home) .wp-site-blocks .tec-contact-page .tec-contact-form {
  max-width:100% !important;
  min-width:0;
}
body:not(.home) .wp-site-blocks .tec-contact-page .tec-contact-form :is(input,select,textarea) {
  box-sizing:border-box;
  min-width:0;
  max-width:100%;
}

/* Maintain type proportions instead of leaving 2560px screens with tiny
   1280px-era headings/labels. Text columns are still line-length limited. */
body:not(.home) .wp-site-blocks .tec-contact-page .tec-contact-hero h1 {
  max-width:100% !important;
  font-size:clamp(42px,3.75vw,100px) !important;
  line-height:1.065 !important;
  letter-spacing:-.043em;
}
body:not(.home) .wp-site-blocks .tec-contact-page :is(.tec-contact-hero p,.tec-contact-layout p,.tec-faq p) {
  font-size:clamp(15px,1.02vw,26px);
  line-height:1.55;
}
body:not(.home) .wp-site-blocks .tec-contact-page .tec-contact-form-panel h2,
body:not(.home) .wp-site-blocks .tec-contact-page .tec-faq h2 {
  font-size:clamp(28px,2.25vw,58px) !important;
  line-height:1.15;
}
body:not(.home) .wp-site-blocks .tec-contact-page .tec-contact-layout h2,
body:not(.home) .wp-site-blocks .tec-contact-page .tec-contact-layout h3 {
  overflow-wrap:break-word;
}
body:not(.home) .wp-site-blocks .tec-contact-page .tec-contact-form label {
  font-size:clamp(13px,.82vw,20px);
}
/* Fields and action scale together with the enlarged form, not as tiny
   1280px-era fixed controls. Exclude checkbox/radio/hidden inputs. */
body:not(.home) .wp-site-blocks .tec-contact-page .tec-contact-form
:is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),select,textarea) {
  font-size:clamp(14px,.88vw,22px);
  line-height:1.35;
  min-height:clamp(42px,2.6vw,68px);
  padding:clamp(10px,.74vw,18px) clamp(12px,.86vw,21px);
}
body:not(.home) .wp-site-blocks .tec-contact-page .tec-contact-form textarea {
  min-height:clamp(120px,9vw,225px);
}
body:not(.home) .wp-site-blocks .tec-contact-page .tec-contact-form :is(button[type="submit"],input[type="submit"]) {
  min-height:clamp(43px,2.8vw,72px);
  font-size:clamp(14px,.91vw,23px);
  padding:clamp(10px,.73vw,19px) clamp(17px,1.28vw,33px);
}
body:not(.home) .wp-site-blocks .tec-contact-page .tec-contact-layout h2 {
  font-size:clamp(28px,2.25vw,58px) !important;
  line-height:1.15;
}
body:not(.home) .wp-site-blocks .tec-contact-page .tec-contact-hero p {
  max-width:min(100%, 1450px);
}
body:not(.home) .wp-site-blocks .tec-contact-page .tec-faq :is(details, summary) {
  max-width:100% !important;
}
body:not(.home) .wp-site-blocks .tec-contact-page .tec-faq summary {
  font-size:clamp(14px,.93vw,23px);
}

/* The FAQ belongs after the WHOLE form/sidebar row. Its spacing is separate
   from the normal interior-section margin that previously collapsed. */
body:not(.home) .wp-site-blocks .tec-contact-page > .tec-interior-section.tec-faq,
body:not(.home) .wp-site-blocks .tec-contact-page > section.tec-faq {
  margin-top:clamp(74px,6.15vw,152px) !important;
  margin-bottom:clamp(48px,4.2vw,105px) !important;
  padding-top:0 !important;
}
body:not(.home) .wp-site-blocks .tec-contact-page .tec-faq > :first-child {
  margin-top:0 !important;
}

/* Tablet/mobile: no horizontal scrollbar, one-column form/sidebar, natural
   WordPress form fields, and independently spaced FAQ. */
@media(max-width:900px) {
  body:not(.home) .wp-site-blocks .tec-contact-page .tec-contact-layout {
    grid-template-columns:minmax(0,1fr) !important;
    row-gap:30px !important;
  }
}
@media(max-width:759px) {
  /* Long contact forms use one readable input per row on narrow screens. */
  body:not(.home) .wp-site-blocks .tec-contact-page .tec-contact-form {
    grid-template-columns:minmax(0,1fr) !important;
  }
  body:not(.home) .wp-site-blocks .tec-contact-page .tec-contact-form :is(.tec-contact-fields,.tec-form-fields) {
    grid-template-columns:minmax(0,1fr) !important;
  }
  body:not(.home) .wp-site-blocks .tec-contact-page .tec-contact-hero h1 {
    font-size:clamp(35px,8.9vw,51px) !important;
  }
  body:not(.home) .wp-site-blocks .tec-contact-page .tec-contact-form-panel {
    padding:clamp(18px,5vw,28px);
  }
  body:not(.home) .wp-site-blocks .tec-contact-page > .tec-faq,
  body:not(.home) .wp-site-blocks .tec-contact-page > .tec-interior-section.tec-faq {
    margin-top:clamp(45px,9vw,68px) !important;
  }
}
