/*
Theme Name: TaskTeam Theme (Child)
Template: twentytwentyone
*/

/* Cargar Roboto (400/500/700/800) */
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700;800&display=swap");

/* =========================
   Design tokens (variables)
   ========================= */
:root {
  --tt-primary: #1880e7;
  --tt-text: #0a0a0a;
  --tt-muted: #6b7280;
  --tt-bg: #ffffff;

  /* Anchuras de contenido */
  --global--content-size: 1050px;  /* base de lectura */
  --global--wide-size: 1200px;     /* “wide” */

  /* Sincroniza variables de Gutenberg con las tuyas */
  --wp--style--global--content-size: var(--global--content-size);
  --wp--style--global--wide-size: var(--global--wide-size);
}

/* =========================
   Reset mínimo
   ========================= */
html, body { margin: 0; padding: 0; background: var(--tt-bg); color: var(--tt-text); }
* { box-sizing: border-box; }
img, svg, video, canvas, iframe { max-width: 100%; height: auto; }

/* =========================
   Header fijo
   ========================= */
.tt-header{
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  background: #fff; height: 88px; width: 100%;
  border-bottom: 1px solid #e9e9ee;
}
.tt-header__container{
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 30px;
}
.tt-header__logo img{ height: 20px; width: auto; display: block; }
.tt-header__cta{
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 18px; border-radius: 8px;
  background: var(--tt-primary); color: #fff; font-weight: 700; font-size: 16px;
  text-decoration: none; line-height: 1; transition: filter .15s, transform .02s;
}
.tt-header__cta:hover{ filter: brightness(.95); }
.tt-header__cta:active{ transform: translateY(1px); }

/* Empuje del header en móviles para que no tape el primer bloque */
@media (max-width: 480px){
  body { padding-top: 88px !important; }
}

/* ========== SOLO MÓVIL: quitar hueco entre barra y primer bloque (slider) ========== */
@media (max-width: 767px){
  .page .entry-content { margin-top: 0 !important; }
  .page .entry-content > *:first-child { margin-top: 0 !important; }

  /* si el primer bloque es RevSlider, que no añada margen */
  .wp-block-themepunch-revslider,
  .wp-block-themepunch-revslider .rev_slider_wrapper,
  .rev_slider_wrapper { margin-top: 0 !important; }
}

/* =========================
   Páginas: ocultar cabecera automática de WP
   ========================= */
.page .entry-header,
.page header.entry-header,
.page header.entry-header.alignwide,
.page h1.entry-title{
  display: none !important;
  height: 0 !important; margin: 0 !important; padding: 0 !important; border: 0 !important;
}
.page .entry-content::before{ content:none !important; display:none !important; }

/* =========================
   Contenedor responsive de PÁGINAS (base 1050px)
   ========================= */
.page .entry-content{
  width: min(100%, var(--global--content-size)) !important;
  max-width: none !important;
  margin-left: auto !important; margin-right: auto !important;
  padding: 0 30px; box-sizing: border-box;
}

/* Gutenberg “constrained”: respeta tus anchos base */
.page .entry-content :where(.is-layout-constrained){
  max-width: var(--global--content-size);
  margin-left: auto;
  margin-right: auto;
  padding-left: 0;
  padding-right: 0;
}
/* No vuelvas a estrechar el contenido normal dentro del constrained */
.page .entry-content :where(.is-layout-constrained) > :where(*):not(.alignwide):not(.alignfull){
  max-width: 100%;
}

/* Neutraliza estrechamientos adicionales del tema padre */
.page .entry-content > :not(.alignwide):not(.alignfull):not(.wp-block-separator):not(.wp-audio-shortcode):not(.wp-block-embed):not(.wp-block-image):not(.wp-block-video),
.page .entry-content > :not(.alignwide):not(.alignfull):not([class*="inner-container"]) > *{
  max-width: 100% !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* =========================
   Compatibilidad Gutenberg: wide y full
   ========================= */
/* “Wide” centrado con tu ancho amplio */
.page .entry-content .alignwide{
  width: 100%;
  max-width: var(--global--wide-size) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* “Full” normal = ocupa el contenedor (sin sangrar); full-bleed controlado abajo */
.page .entry-content .alignfull{
  width: 100% !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* =========================
   FULLBLEED REAL controlado (sólo lo que marques)
   ========================= */
.page .entry-content > .tt-fullbleed.alignfull,
.page .entry-content .is-layout-constrained > .tt-fullbleed.alignfull{
  position: relative;
  left: 50%;
  right: 50%;
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
  padding: 0 !important;
  border: none !important;
}
.page .entry-content > .tt-fullbleed.alignfull:first-child { margin-top: 0 !important; }
.page .entry-content > .tt-fullbleed.alignfull { margin-bottom: 0 !important; }

/* =========================
   Tipografías globales
   ========================= */
body, button, input, select, textarea {
  font-family: var(--tt-font-sans, "Roboto", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
                   "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans",
                   "Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol");
  font-size: 16px; line-height: 1.55;
  color: var(--tt-text);
}

/* Párrafos */
.entry-content p,
.wp-site-blocks p{
  font-family: var(--tt-font-sans);
  font-size: 16px;
  line-height: 1.70;
  color: var(--tt-text);
  margin: 0 0 1.1em;
  max-width: none;
}

/* Opción “lead” (destacado) */
.entry-content p.lead,
.entry-content .is-style-lead{
  font-size: 18px;
  line-height: 1.6;
  font-weight: 500;
}

/* Enlaces dentro del contenido */
.entry-content a{
  color: var(--tt-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.entry-content a:hover{ text-decoration-thickness: 2px; }

/* Anula tamaños forzados por Gutenberg en párrafos */
.entry-content p[class*="-font-size"]{
  font-size: inherit !important;
  line-height: inherit !important;
}

/* Listas (espaciado coherente) */
ul, ol { margin: 0 0 1.1em 1.25em; }

/* =========================
   Títulos H1–H6
   ========================= */
h1, h2, h3, h4, h5, h6,
.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4, .entry-content h5, .entry-content h6,
.wp-site-blocks h1, .wp-site-blocks h2, .wp-site-blocks h3, .wp-site-blocks h4, .wp-site-blocks h5, .wp-site-blocks h6,
.wp-block-heading{
  font-family: var(--tt-font-sans);
  line-height: 1.15;
  margin: 0 0 .6em;
}
h1, .entry-content h1, .wp-site-blocks h1, .wp-block-heading:is(h1){
  font-size: clamp(26px, 3.4vw, 48px) !important;
  font-weight: 500 !important;
  letter-spacing: -.02em;
}
h2, .entry-content h2, .wp-site-blocks h2, .wp-block-heading:is(h2){
  font-size: clamp(22px, 2.6vw, 34px) !important;
  font-weight: 500 !important;
}
h3, .entry-content h3, .wp-site-blocks h3, .wp-block-heading:is(h3){
  font-size: clamp(19px, 2.2vw, 28px) !important;
  font-weight: 400 !important;
}
h4, .entry-content h4, .wp-site-blocks h4, .wp-block-heading:is(h4){
  font-size: clamp(17px, 1.9vw, 24px) !important;
  font-weight: 400 !important;
}
h5, .entry-content h5, .wp-site-blocks h5, .wp-block-heading:is(h5){
  font-size: clamp(15px, 1.6vw, 20px) !important;
  font-weight: 300 !important;
}
h6, .entry-content h6, .wp-site-blocks h6, .wp-block-heading:is(h6){
  font-size: clamp(14px, 1.4vw, 17px) !important;
  font-weight: 300 !important;
  color: var(--tt-muted);
}
/* Neutralizar tamaños en headings de Gutenberg */
.wp-block-heading[class*="-font-size"]{ font-size: inherit !important; }

/* =========================
   EXCLUSOR: NO tocar tipografías dentro de Slider Revolution
   ========================= */
.wp-block-themepunch-revslider .rev_slider :is(h1,h2,h3,h4,h5,h6,p),
.rev_slider_wrapper .rev_slider :is(h1,h2,h3,h4,h5,h6,p),
.rev_slider .tp-caption :is(h1,h2,h3,h4,h5,h6,p),
.rs-layer :is(h1,h2,h3,h4,h5,h6,p){
  font-size: unset !important;
  font-weight: unset !important;
  line-height: unset !important;
  letter-spacing: unset !important;
}

/* =========================
   Botones genéricos
   ========================= */
.wp-block-button__link,
a.button, button, input[type=submit]{
  background: var(--tt-primary); color: #fff; border: 0; border-radius: 8px;
  padding: 10px 16px; font-weight: 700; text-decoration: none; display: inline-flex;
  align-items: center; justify-content: center; gap: .5rem; cursor: pointer;
}
.wp-block-button__link:hover,
a.button:hover, button:hover, input[type=submit]:hover{ filter: brightness(.95); }

/* =========================
   Footer
   ========================= */
.tt-footer{
  background: #0065ff; color: #fff; text-align: center;
  padding: 64px 20px 56px;
}
.tt-footer__container{ max-width: 400px; margin: 0 auto; padding: 0 11px; }
.tt-footer__title{ margin: 0 0 18px; font-size: 24px; line-height: 1.2; font-weight: 800; }
.tt-footer__text{ margin: 0 auto 24px; max-width: 100%; font-size: 11px; line-height: 1.55; }
.tt-footer__email{ color: #fff; font-weight: 800; text-decoration: none; }
.tt-footer__email:hover{ text-decoration: underline; }
.tt-footer__legal{
  margin-top: 6px; display: flex; align-items: center; justify-content: center;
  gap: 10px; font-weight: 700; font-size: 10px;
}
.tt-footer__legal a{ color:#fff; text-decoration: underline; }

/* Footer responsive */
@media (max-width: 600px){
  .tt-footer{ padding: 48px 16px; }
  .tt-footer__title{ font-size: 22px; }
  .tt-footer__legal{ font-size: 12px; }
}

/* =========================
   Móvil: header fijo sin huecos con RevSlider (refuerzo)
   ========================= */
@media (max-width: 767px){
  body:not(.admin-bar){ padding-top: 88px !important; }
  body.admin-bar{ padding-top: calc(88px + 46px) !important; }

  .page .entry-content,
  .page .entry-content > *:first-child,
  .wp-block-themepunch-revslider,
  .wp-block-themepunch-revslider .rev_slider_wrapper,
  .rev_slider_wrapper{
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  /* refuerzo también para el margen inferior en móvil */
  .page .entry-content > .wp-block-themepunch-revslider{
    margin-bottom: 0 !important;
  }
}

/* =========================
   Franja beta (fullbleed controlado)
   ========================= */
.page .entry-content .tt-beta-bar{
  background:#1880e7 !important;
  color:#fff !important;
  min-height:200px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:0 !important;
  border:0 !important;
}
.page .entry-content .tt-beta-bar .tt-beta-bar__inner{ max-width:900px; padding:0 20px; }
.page .entry-content .tt-beta-bar p{ margin:0; font-size:18px; line-height:1.5; color:#fff !important; }
.page .entry-content .tt-beta-bar strong,
.page .entry-content .tt-beta-bar a{ color:#fff !important; }

/* ===== Espaciado cero entre sliders / barra beta ===== */
.page .entry-content > .wp-block-themepunch-revslider{
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
.page .entry-content > .is-layout-constrained > .wp-block-themepunch-revslider,
.page .entry-content > .wp-block-group > .wp-block-themepunch-revslider{
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
.page .entry-content > .wp-block-themepunch-revslider + .wp-block-themepunch-revslider{
  margin-top: 0 !important;
}
/* pegar la barra beta con el slider siguiente */
.page .entry-content > .tt-beta-bar + .wp-block-themepunch-revslider{
  margin-top: 0 !important;
}

/* =========================
   HERO SPLIT (2 columnas, fondo común;
   derecha con desenfoque y oscurecido)
   ========================= */
/* Fondo como <picture>/<img> absoluto */
.hero-split .hero-bg{
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  pointer-events: none;
}
.hero-split .hero-bg > img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Alto fijo en desktop/tablet */
.hero-split--600{ min-height: 600px; }

/* Contenedor y columnas */
.hero-split{
  position: relative;
  display: flex; flex-wrap: wrap; align-items: stretch;
  overflow: hidden; margin:0; padding:0; color:#fff;
}
.hero-split .hero-left,
.hero-split .hero-right{
  flex: 1 1 50%;
  padding: 60px;
  position: relative; z-index: 1;
  display: flex; align-items: center;
}
.hero-split .hero-left{
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}
.hero-split .hero-right{
  justify-content: center;
  text-align: center;
  isolation: isolate; /* stacking context defensivo */
}

/* Desenfoque + oscurecido solo en la derecha */
.hero-split .hero-right .hero-blur{
  position:absolute; inset:0;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  background-color: rgba(0,0,0,.35);
  z-index:0; pointer-events:none;
}
.hero-split .hero-right > *:not(.hero-blur){ position:relative; z-index:1; }

/* Fallback sin soporte de backdrop-filter */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))){
  .hero-split .hero-right .hero-blur{ background-color: rgba(0,0,0,.55); }
}

/* Tipos en el hero */
.hero-split h1{ margin: 0 0 16px; line-height: 1.1; font-size: clamp(32px, 4vw, 56px); }
.hero-split p{ margin: 0; font-size: 18px; line-height: 1.6; max-width: 560px; }

/* ---------- MÓVIL (≤900px) ---------- */
@media (max-width: 900px){
  .hero-split{ flex-direction: column; }

  /* El fondo sólo cubre la parte alta (600px) */
  .hero-split .hero-bg{
    top: 0; left: 0; right: 0;
    height: 600px; bottom: auto;
  }

  /* La columna de arriba asegura esos 600px */
  .hero-split .hero-left{
    min-height: 600px;
    padding: 32px;
  }

  /* La de abajo crece según contenido, sin blur ni fondo detrás */
  .hero-split .hero-right{
    padding: 32px;
    color: var(--tt-text);
    background: transparent;
  }
  .hero-split .hero-right .hero-blur{ display: none !important; }

  /* El contenedor ya no fuerza min-height */
  .hero-split--600{ min-height: unset; }
}
