/*
 Theme Name:   OpoTheme
 Theme URI:    https://opinionorihuela.es
 Description:  Theme del observatorio de opinion
 Author:       Leal
 Template:     twentytwentyfive
 Version:      1.1.1
 Text Domain:  opotheme
*/

:root{
    --font-alternative:var(--wp--preset--font-family--funnel-display);
    --color-brand:var(--wp--preset--color--accent-3);
    --border-card:8px;
}
body{
	background:var(--scheme-3-background);
}
.wp-site-blocks{
	max-width:1600px;
	margin-inline:auto;
	background:var(--wp--preset--color--base);
}
@media (max-width:575px){
    body{
        --wp--style--root--padding-right:24px;
        --wp--style--root--padding-left:24px;
    }
}
.sr-only:not(:focus):not(:active) {
  clip: rect(0 0 0 0); 
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap; 
  width: 1px;
}
.style-section-2 {
  background-color: var(--wp--preset--color--accent-2);
  color: var(--wp--preset--color--contrast);
}
.font-alternative{
    font-family:var(--font-alternative);
}
.mt-0{ margin-top:0 !important;}
.pt-0{ padding-top:0 !important;}
.p-block-0{ padding-block:0 !important;}
.rowgap-0{ row-gap: 0 !important;}
.rowgap-0 > *:not(:first-child){ margin-block-start:0 !important;}
.rowgap-lg > *:not(:first-child){ margin-block-start:var(--wp--preset--spacing--60);}
.rowgap-md > *:not(:first-child){ margin-block-start:var(--wp--preset--spacing--50);}
.columngap-0{ column-gap: 0 !important;}
.order-first{ order:0;}
.order-last{ order:13;}
.radius-lg{
  border-radius:24px 24px 24px 0;
}
@media (max-width:575px){
  .full-width--xs{ width:100%;}
}
@media (min-width:768px){
    .order-md-last{
        order:13;
    }
    .order-md-first{
      order:0;
    }
    .radius-lg{
  border-radius:48px 48px 48px 0;
}
}

.fw-light{
    font-weight:300 !important;
}
.h0{
    font-size:var(--wp--preset--font-size--xxxx-large) !important;
}
.h1{
    font-size:var(--wp--preset--font-size--xxx-large) !important;
}
.h2{
    font-size:var(--wp--preset--font-size--xx-large) !important;
}
.h3{
    font-size:var(--wp--preset--font-size--x-large) !important;
}
.h4{
    font-size:var(--wp--preset--font-size--large) !important;
}
.h5{
    font-size:var(--wp--preset--font-size--medium) !important;
}
.rte{
    font-size:var(--wp--preset--font-size--medium) !important;
}
.small{
    font-size:var(--wp--preset--font-size--xsmall) !important;
}
.title--decoration-1 {
    --deco-dim:24px;
    --title--color:var(--wp--preset--color--accent-3);
    padding: 1rem 1.5rem;
    border: 1px solid currentColor;
    border-radius: 16px 16px 16px 0;
    position: relative;
    color:var(--title--color);
    margin-block-end:var(--deco-dim) !important;
}
.title--decoration-1::after {
  content: "";
  position: absolute;
  bottom: calc(-1 * var(--deco-dim));
  left: calc(-1 * var(--deco-dim));
  width: var(--deco-dim);
  height: var(--deco-dim);
  background: var(--title--color);
}
.is-style-antetitle {
  position: relative;
  padding-left: 16px;
}

.is-style-antetitle::before {
  content: "";
  width: 8px;
  height: 8px;
  position: absolute;
  left: 0;
  top: 6px;
  background: #D13E49;
}

/*--------------------------------------------------------------------*/
main > section,
.page-template main > .wp-block-post-content > section{ margin-block-start: 0 !important;}
section{
    padding-block:var(--wp--preset--spacing--60);
}
.wp-block-column{ z-index:1;}
:root :where(.wp-block-post-date) {
  color: currentColor;
  opacity: .8;
}
main p > a {
  text-decoration-thickness: 1.5px !important;
  text-underline-offset: .2em;
  font-weight: 500;
}
.wp-block-read-more{ font-weight:600;}
/*------------------------------------------------------------------*/
:root{
  --scheme-1-background: var(--wp--preset--color--accent-5);
  --scheme-1-color: var(--wp--preset--color--contrast);
  --scheme-2-background: var(--wp--preset--color--accent-2);
  --scheme-3-color: var(--wp--preset--color--accent-1);
  --scheme-3-background: var(--wp--preset--color--contrast);
  --scheme-2-color: var(--wp--preset--color--contrast);
  --scheme-4-background:var(--wp--preset--color--accent-3);
  --scheme-4-color:var(--wp--preset--color--accent-2);
  --scheme-5-background: var(--wp--preset--color--contrast);
  --scheme-5-color: var(--wp--preset--color--base);
}
.is-style-1 {
  background-color:var(--scheme-1-background);
  color:var(--scheme-1-color);
}
.is-style-2 {
  background-color:var(--scheme-2-background);
  color:var(--scheme-2-color);
}
.is-style-3 {
  background-color:var(--scheme-3-background);
  color:var(--scheme-3-color);
}
.is-style-4{
  background-color:var(--scheme-4-background);
  color:var(--scheme-4-color);
}
.is-style-5 {
  background-color:var(--scheme-5-background);
  color:var(--scheme-5-color);
}
.color-accent--2{
    color:var(--wp--preset--color--accent-2);
}
.bg-extend::before{
    content:"";
    width:100%; height:50%; position:absolute; 
    left:0;
}
.bg-top::before{
    top:0; 
}
.bg-bottom::before{
    bottom:0; 
}
.bg-height-30::before{ height:30%;}
.bg-extend--white::before{
   background-color: #fff;
}
.bg-extend--blue::before{
   background: var(--wp--preset--color--accent-3);
}
.bg-extend--light::before{
   background: var(--wp--preset--color--base);
}
.bg-gradient-light{
  background:linear-gradient(#f5f7f7 0%,#ffffff 100%);
}


/*--------------------------------------------------------------------*/
header > div{ 
    padding-top:1.5rem; height:94px;
}
header .custom-site-name{
    font-family:var(--font-alternative);
}
.header-wrapper{
    height: 54px;
    padding: 0 1.5rem;
    gap: 1.5rem;
    border-radius: 16px 16px 16px 0;
    position: relative;
    overflow:visible;
    align-items: center;
}
.header-wrapper::after{
    content:"";
    position:absolute;
    left:-16px; bottom:-16px;
    background:var(--color-brand);
    width:16px;
    height:16px;
}
.header-wrapper .wp-block-navigation .wp-block-navigation-item__content {
    color: inherit;
    padding: 4px 8px;
    background: rgba(255,255,255,0);
    border-radius: 4px 4px 4px 0;
}
@media (min-width:768px){
  .header-wrapper .wp-block-navigation__responsive-container:not(.is-menu-open) .current-menu-item .wp-block-navigation-item__content {
      background: var(--wp--preset--color--contrast);
  }
}
@media (max-width:575px){
.header-group{ padding-inline:16px;}
.header-wrapper .wp-block-navigation .wp-block-navigation-item__content{
  font-size:1.5rem;
}
}
footer{
    margin-block-start:0;
}


/*-----------------------------------------*/
aside .wp-block-search__label {
  padding-left: .5rem;
  margin-bottom: .5rem;
  display: block;
}
aside .wp-block-search__inside-wrapper > .wp-block-search__input {
  border-radius: 16px 0 0 0;
  padding-inline: 1rem;
  height: 56px;
}
aside .wp-block-search__inside-wrapper .wp-block-search__button {
  margin-left: 0;
  border-radius: 0 16px 16px 0;
  width: 56px;
  padding-inline: 0;
}
aside .wp-block-categories-list.wp-block-categories {
  list-style: none;
  margin-inline: 0;
  padding-inline: 0;
}
/*------------------------------------------*/
span.breadcrumb_last:nth-child(3) {
  display: none;
}
/*------------------------------------------*/
@media (min-width:768px){
    .page-header-media{
        padding-left:var(--wp--preset--spacing--50);
    }
}
/*------------------------------------------*/
.rounded-sm{ border-radius:16px;}
.rounded-md{ border-radius:24px;}
:root :where(.is-layout-constrained) > .wp-block-buttons{
    margin-block-start: var(--wp--preset--spacing--40);
}

/*------------------------------------------*/
.card-video--video {
  border-radius: 24px 24px 24px 0;
  overflow: hidden;
  border: 8px solid rgba(255,255,255,.1);
}
@media (max-width:576px){
    .card-video{
       padding-inline:0 !important;
    }
}
/*------------------------------------------*/
.card{ padding:var(--wp--preset--spacing--40);}
.card_estudio{ background:#fff;}

.card_estudio--info{
    margin-top:0;
    padding:var(--wp--preset--spacing--30) var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
    background:#fff;
}
.card_estudio--info > *{ margin-top:0 !important}
.card_estudio--cover{
  margin: 0;
}
.card-covertext{
    border:var(--border-card) solid rgba(0,0,0,0.1);
    border-radius:0 24px 24px 0;
    overflow:hidden;
}
.card-covertext--text{
    padding:var(--wp--preset--spacing--40);
}


@media (max-width:576px){
    .card-covertext{
       margin-left:calc(-1 * var(--wp--style--root--padding-left)) !important;
       margin-right:calc(-1 * var(--wp--style--root--padding-right)) !important;
    }
}
.single-post .wp-block-post-featured-image {
  box-shadow: 0 0 4px 4px rgba(0,0,0,0.1);
}
/*-------------------------------------------------*/
/* Base *//* Móvil: 1 columna */
.ch-post-grid{
  display:grid;
  gap:clamp(12px, 2vw, 24px);
  grid-template-columns:1fr;
  list-style:none; margin:0; padding:0;
}
.wp-block-post:not(.estudio)  {
  padding: var(--wp--preset--spacing--30);
  border-radius: 16px 16px 16px 0;
  background: #F1EDEA;
  margin-block: 0;
}
.section-grid-post{
    background: linear-gradient(rgba(255,255,255,0) 0%,#ffffff 60%);
}
/* Desktop: 2 columnas y auto-colocación */
.ch-post-grid .ch-grid-post--flex .wp-block-group {
  padding-bottom:var(--wp--preset--spacing--30);
  gap:0.5rem;
}
@media (min-width:768px){
  .ch-post-grid{
    grid-template-columns:1fr 1fr;
    grid-auto-rows:1fr;
  }
  .ch-post-grid > li{
    padding: var(--wp--preset--spacing--40);
  }
  .ch-post-grid > li:nth-child(n+2):not(:last-child){ grid-column:2; }

  .ch-post-grid > li:nth-child(n+2):not(:last-child) .ch-grid-post--flex {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        height: 100%;
  }
  .ch-post-grid .ch-grid-post--flex .wp-block-group {
    margin-inline:0 !important;
  }
  .ch-post-grid > li:nth-child(n+2):not(:last-child) .ch-grid-post--flex > figure {
    width: 40%;
    margin: 0 !important;
    padding: 0; height:100%;
  }
  .ch-post-grid > li:nth-child(n+2):not(:last-child)  .ch-grid-post--flex > figure + .wp-block-group {
  width: calc(60% - 1.5rem);
}
  /* 4 ítems: el 1º ocupa 3 filas en la col 1 */
  .ch-post-grid > li:first-child:nth-last-child(4){ grid-column:1; grid-row:1 / span 3; }

  /* 3 ítems: el 1º ocupa 2 filas */
  .ch-post-grid > li:first-child:nth-last-child(3){ grid-column:1; grid-row:1 / span 2; }

  
  .ch-post-grid > li:first-child:nth-last-child(2){ grid-column:1; grid-row:1; }

  .ch-post-grid > li:first-child:nth-last-child(2) .ch-post-grid--flex{ flex-direction:column;} 
  .ch-post-grid > li:first-child:last-child{ grid-column:1 / -1; }

  /* 
  .wp-block-post-template.ch-post-grid{ align-items:start; }        
  .wp-block-post-template.ch-post-grid > li{ align-self:start; }     
  .wp-block-post-template.ch-post-grid > li,
  .wp-block-post-template.ch-post-grid > li .wp-block-post{
    height:auto !important;
  }*/

}
@media (min-width:768px){
    /*ul.list-estudios{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    }
    .list-estudios > li{
        margin-top:0;
        grid-column: 1fr;
    }
    .list-estudios > li > .wp-block-group{ height:100%;}*/
}

.single-estudio .h4{ font-weight:600;}
table#tficha{ width:100%; border-collapse: collapse;}
table#tficha tr td:first-child, table#tficha tbody th {width: 25%; font-weight:normal; text-align: left;}
table#tficha tr td, table#tficha tr th {    padding: 1em 0; border:none; vertical-align: top;}
table#tficha tr { border-bottom: 1px solid #e5e5e5;}
@media (max-width:575px){
    #tficha tbody,#tficha tr{
      display:flex; justify-content: flex-start; align-items: flex-start;
      flex-direction: column; flex-wrap: wrap;
      width:100%;
    }
    table#tficha tr td:first-child, table#tficha tr th{ padding-bottom:0; font-weight:500;}
}
.ico-st1, .ico-st2{
  mask:no-repeat center center url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 19.25C20.4142 19.25 20.75 19.5858 20.75 20C20.75 20.4142 20.4142 20.75 20 20.75H4C3.58579 20.75 3.25 20.4142 3.25 20C3.25 19.5858 3.58579 19.25 4 19.25H20ZM11.25 4C11.25 3.58579 11.5858 3.25 12 3.25C12.4142 3.25 12.75 3.58579 12.75 4V12.1895L15.4697 9.46973C15.7626 9.17683 16.2374 9.17683 16.5303 9.46973C16.8232 9.76262 16.8232 10.2374 16.5303 10.5303L12.5303 14.5303C12.2374 14.8232 11.7626 14.8232 11.4697 14.5303L7.46973 10.5303C7.17683 10.2374 7.17683 9.76262 7.46973 9.46973C7.76262 9.17683 8.23738 9.17683 8.53027 9.46973L11.25 12.1895V4Z' fill='%230F1F45'/%3E%3C/svg%3E%0A");
  width:24px; height:24px; 
  mask-size:cover;
  background:#000;  margin-right:4px;
}
.document-list > li > a{ display:flex; width: 100%;}
.document-list { margin-left:0; padding-left:0;}
.document-list > li::before{ content:"";}
.document-list > li{
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: .5rem 0;
  border-bottom: 1px solid #ccc;
  font-size: 1rem;
}
.card-documents {
  padding: var(--wp--preset--spacing--30);
  background: #fff;
  border-radius: 1rem;
}
.document-list > li span.extension{ 
  margin-left:auto; align-self: flex-end; 
  display: block;
  background: var(--wp--preset--color--contrast);
  color: var(--wp--preset--color--base);
  padding: 2px 4px;
  font-size: 14px;
  border-radius: 4px;
}
/* animated flecha hover */
.wp-block-button.has-icon__arrow-right .wp-block-button__link-icon{
  position:relative;
  padding-right:20px;
}

.wp-block-button.has-icon__arrow-right .wp-block-button__link-icon > svg
 {
    position: absolute;
    right: 0;
    transform: translateY(-50%);
    top: 50%;
    transition: right .1s linear 0s;
}
.wp-block-button.has-icon__arrow-right .wp-block-button__link:hover .wp-block-button__link-icon > svg {
    right: -10px;
}