/**
1. Typography
2. Layout
3. Utilities classes
4. Forms
5. Buttons
6. Components
 */

:root{
  --base-font: 'Rubik', sans-serif;
  --heading-font: 'Figtree', sans-serif;

  --h1-size: clamp(2rem, 1.5454rem + 1.9394vw, 3rem);
  --h2-size: clamp(1.75rem, 1.4091rem + 1.4546vw, 2.5rem);
  --h3-size: clamp(1.5rem, 1.2727rem + 0.9697vw, 2rem);
  --h4-size: clamp(1.25rem, 1.1364rem + 0.4849vw, 1.5rem);
  --h5: clamp(1.125rem, 1.0682rem + 0.2424vw, 1.25rem);
  --base-size: 1rem;
  --caption-size: 0.875rem;
  --h1-height: clamp(2.5rem, 2.1023rem + 1.697vw, 3.375rem);
  --h2-height: clamp(2rem, 1.5454rem + 1.9394vw, 3rem);
  --h3-height: 1.25;
  --h4-height: clamp(1.5rem, 1.3295rem + 0.7273vw, 1.875rem);
  --h5-height: clamp(1.375rem, 1.2614rem + 0.4849vw, 1.625rem);
  --base-height: 1.375rem;
  --caption-height: 1.25rem;

  --border-radius: 10px;

  /*Layout*/
  --layout-margin: max(5%, 16px);
  --site-grid-layout: var(--layout-margin) 1fr var(--layout-margin);

}

.provisional-block{
  border: 2px red solid;
  padding: 20px;
}

*{
  box-sizing: border-box;
}

/* Reset box-sizing */
*, *::before, *::after {
  box-sizing: border-box;
}

html{
  scroll-behavior: smooth;
}

body{
  background-color: white;
  overflow-wrap: break-word;
}
body *{
  scroll-margin-top: 200px;
}

@media (prefers-color-scheme: dark) {
  .body {
    background-color: white;
  }
}

/***********************
1. Typography
***********************/

/**reset useragent styles**/
body, h1, h2, h3, h4, h5, p, ul, ol, figure, blockquote, dl, dd, dt, table, fieldset, legend, pre, textarea, input, button, select, progress, menu, ul{
  margin-block-start: 0;
  margin-block-end: 0;
  margin-inline-start: 0;
  margin-inline-end: 0;
  padding-inline-start: 0;
}

main p:not(main .bisiesto-block p),
main ul:not(main .bisiesto-block ul),
main ol:not(main .bisiesto-block ol)
{
    margin-block-start: 0;
    margin-block-end: 12px;
}

main h1:not(main .bisiesto-block h1),
main .h1:not(main .bisiesto-block .h1),
main .is-style-h1:not(main .bisiesto-block .is-style-h1),
main .wp-block-button:not(main .bisiesto-block .wp-block-button),
main figure:not(main .bisiesto-block figure)
{
  margin-block-end: 24px;
}

main  h2:not(main .bisiesto-block h2),
main h3:not(main .bisiesto-block h3),
main .h2:not(main .bisiesto-block .h2),
main .h3:not(main .bisiesto-block .h3),
main .is-style-h2:not(main .bisiesto-block .is-style-h2),
main .is-style-h3:not(main .bisiesto-block .is-style-h3){
  margin-block-end: 16px;
  margin-block-start: 24px;
}


main h4:not(main .bisiesto-block h4),
main .h4:not(main .bisiesto-block .h4),
main .is-style-h4:not(main .bisiesto-block .is-style-h4)
{
  margin-block-end: 16px;
  margin-block-start: 24px;
}

main h5:not(main .bisiesto-block h5),
main .h5:not(main .bisiesto-block .h5),
main .is-style-h5:not(main .bisiesto-block .is-style-h5){
  margin-block-end: 8px;
  margin-block-start: 24px;
}

.bisiesto-block,
.bisiesto-block *,
.is-no-prose{
  margin-block-start: 0;
  margin-block-end: 0;
}

.bisiesto-block .is-prose > *{
  margin-block-start: 0px;
  margin-block-end: 16px;
}

.bisiesto-block .is-prose > h5,
.bisiesto-block .is-prose > .is-style-h5{
  margin-block-end: 8px;
}

.bisiesto-block .is-prose > *:last-child{
  margin-block-end: 0px;
}


.base-font, .base-bold, .is-style-base{
  font-family: var(--base-font);
  font-size: var(--base-size);
  font-weight: 300;
  line-height: var(--base-height);
}

.base-bold, strong, b, strong .base-bold {
  font-weight: 500;
}


h1, .h1, .is-style-h1{
  font-family: var(--heading-font);
  font-size: var(--h1-size);
  font-weight: 500;
  line-height: var(--h1-height);
}


h2, .h2, .is-style-h2{
  font-family: var(--heading-font);
  font-size: var(--h2-size);
  font-weight: 500;
  line-height: var(--h2-height);
}


h3, .h3, .is-style-h3{
  font-family: var(--heading-font);
  font-size: var(--h3-size);
  font-weight: 500;
  line-height: var(--h3-height);
}


h4, .h4, .is-style-h4{
  font-family: var(--heading-font);
  font-size: var(--h4-size);
  font-weight: 500;
  line-height: var(--h4-height);
}

h5, .h5, .is-style-h5{
  font-family: var(--heading-font);
  font-size: var(--h5-size);
  font-weight: 500;
  line-height: var(--h5-height);
}

.caption, .is-style-caption{
  font-family: var(--base-font);
  font-size: var(--caption-size);
  font-weight: 300;
  line-height: var(--caption-height);
}

a,
a:link,
a:hover,
a:visited,
a:active{
  text-decoration: none;
}

/***********************
2. Layout
***********************/
body{
  display: block;
}

.is-layout-constrained{
  display: grid;
  grid-template-columns: var(--layout-margin) minmax(0, 1fr) var(--layout-margin);
}

.is-layout-constrained > *{
  grid-column: 2;
  width: 100%;
}

.expandwide{
  max-width: unset;
}

.alignfull{
  grid-column: 1 / -1;
}

.page-template-page-legal .main-general {
  padding: clamp(24px, 9.4545px + 3.8788vw, 56px) 0;
}

/*Reset menu user agent rules*/
menu,
ul{
  list-style-type: none;
  margin-block-start: 0;
  margin-block-end: 0;
  margin-inline-start: 0;
  margin-inline-end: 0;
  padding-inline-start: 0;
}


/***********************
3. Utilities classes
***********************/
.is-style-dark{
  background-color: var(--wp--preset--color--black);
  color: var(--wp--preset--color--white);
}


.u_hidden,
.js-hidden{
  display: none;
}

.u_overflow-hidden{
  overflow: hidden;
}

.u_relative{
  position:relative;
}

.u_absolute{
  position: absolute;
}

.u_hide-mobile,
.u_hide-mobile-menu{
  display: none !important;
}


.u_text-negative,
.u_text-negative *{
  color: var(--wp--preset--color--white);
}

.u_text-positive,
.u_text-positive *{
  color: var(--wp--preset--color--black);
}

.u_bg-dark{
  background-color: var(--wp--preset--color--black);
  color: var(--wp--preset--color--white);
}

.u_bg-light{
  background-color: var(--wp--preset--color--grey-light);
}

.u_bg-white{
  background-color: var(--wp--preset--color--white);
}

.u_bg-accent{
  background-color: var(--wp--preset--color--accent);
}

.u_text-center,
.has-text-align-center{
  text-align: center;
}


@media screen and (min-width: 768px) {
  .u_only-mobile{
    display: none !important;
  }
  .u_hide-mobile{
    display: block;
  }
}

@media screen and (min-width: 1024px) {
  .u_hide-desktop{
    display: none;
  }
}

@media screen and (max-width: 1024px) {
  .u_only-desktop{
    display: none !important;
  }
}

/*Breakpoint del menú*/
@media screen and (min-width: 1150px){
  .u_hide-mobile-menu{
    display: block !important;
  }
  .u_hide-desktop-menu{
    display: none !important;
  }
}

/***********************
4. Forms
***********************/

fieldset{
  border: none;
  margin-inline: 0;
  border: none;
  padding-inline: 0;
}

textarea,
select,
input,
progress {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

textarea,
select,
input{
  font-size: var(--caption-size);
  font-family: var(--base-font);
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  border-radius: var(--standard-border-radius);
  box-shadow: none;
  max-width: 100%;
  display: inline-block;
  font-weight: 300;
  border-radius: 5px;
}
textarea,
select,
input {
  color: var(--text);
  background-color: var(--wp--preset--color--white);
  border: 1px solid var(--wp--preset--color--grey-medium);
  width: 100%;
}

input:focus, textarea:focus, select:focus,
input:active, textarea:active, select:active
input:focus-visible, textarea:focus-visible, select:focus-visible
{
  outline: none;
  border-color: var(--wp--preset--color--black);
}

input[type="checkbox"],
input[type="radio"]{
  border: none;
  padding: 0;
  width: 16px;
  height: 16px;
  background: url('../img/checkbox.svg') no-repeat;
  border-radius: 0;
}

input[type="checkbox"]:checked{
    background: url('../img/checkbox-checked.svg') no-repeat;
}

input[type="radio"]{
  background: url('../img/radio.svg') no-repeat;
}

input[type="radio"]:checked{
  background: url('../img/radio-checked.svg') no-repeat;
}


label{
  display: block;
  padding-bottom: 6px;
  font-size: var(--caption-size);
}

select:not([multiple]) {
  background-image: linear-gradient(45deg, transparent 49%, var(--wp--preset--color--grey-medium) 51%),
  linear-gradient(135deg, var(--wp--preset--color--grey-medium) 51%, transparent 49%);
  background-position: calc(100% - 15px), calc(100% - 10px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-inline-end: 25px;
}
input[type="checkbox"] + label,
input[type="radio"] + label {
  display: inline-block;
  cursor: pointer;
}



textarea:not([cols]) {
  width: 100%;
}


._error-inner{
  color: #D80000;
}

fieldset._form-fieldset {
  display: flex;
  flex-direction: row-reverse;
}


/***********************
5. Buttons
***********************/

.btn,
.wp-block-button .wp-element-button,
button._submit{
  cursor: pointer;
  font-family: var(--heading-font);
  font-size: var(--base-size);
  font-weight: 500;
  padding: 8px 32px;
  border-radius: 999px;
  text-decoration: none;
  position: relative;
  z-index: 1;
  border: none;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn,
.wp-block-button,
.wp-element-button,
button._submit{
  width: 100%;
  text-align: center;
}

@media screen and (min-width: 520px){
  .btn,
  .wp-block-button,
  .wp-element-button,
  button._submit{
    width: fit-content;
  }
}


.btn-primary,
.wp-block-button .wp-element-button,
button._submit{
  position:relative;
  background-color: transparent;
  color: var(--wp--preset--color--black);
  transition: all 0.3s;
}




.btn-primary:after,
.btn-primary:before,
.wp-block-button .wp-element-button:after,
.wp-block-button .wp-element-button:before,
button._submit:after,
button._submit:before{
  content: '';
  background: var(--wp--preset--color--accent);
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 999px;
  z-index: -1;
}


.btn-primary:after,
.wp-block-button .wp-element-button:after,
button._submit:after{
  opacity: 0;
  background: var(--wp--preset--color--accent-hover);
  transition: opacity 0.3s ease-in-out;
}

.btn-secondary, .wp-block-button. .wp-element-button{
  background: var(--wp--preset--gradient--secondary);
  color: var(--wp--preset--color--black);
}

.btn-secondary,
.wp-block-button.is-style-outline .wp-element-button,
.wp-block-button.is-style-outline-negative .wp-element-button {
  color: var(--wp--preset--color--black);
  position: relative;
  background: transparent;
  border: none;
}

.btn-secondary--negative,
.wp-block-button.is-style-outline-negative .wp-element-button{
  color: var(--wp--preset--color--accent);
}

.btn-secondary:before,
.btn-secondary:after,
.wp-block-button.is-style-outline .wp-element-button::before,
.wp-block-button.is-style-outline .wp-element-button::after,
.wp-block-button.is-style-outline-negative .wp-element-button::before,
.wp-block-button.is-style-outline-negative .wp-element-button::after{
  content: '';
  position: absolute;
  border-radius: 999px;
  z-index: -1;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 1px solid transparent;
  background: var(--wp--preset--gradient--primary) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
}

.btn-secondary:after,
.wp-block-button.is-style-outline .wp-element-button::after,
.wp-block-button.is-style-outline-negative .wp-element-button::after{
  background: var(--wp--preset--gradient--hover) border-box;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}



.btn-primary:hover:after,
.btn-secondary:hover:after,
.wp-block-button .wp-element-button:hover:after,
button._submit:hover:after,
.btn-primary:active:after,
.wp-block-button .wp-element-button:active:after,
button._submit:active:after
{
  opacity: 1;
}

button:disabled,
input:disabled,
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.link,
.link--negative,
.link--positive,
.wp-block-button.is-style-link .wp-element-button,
.wp-block-button.is-style-link-negative .wp-element-button{
  display: inline-block;
  margin-block: 8px;
  cursor: pointer;
  font-family: var(--heading-font);
  font-weight: 500;
  padding: 0px;
  border-radius: 0px;
  text-decoration: none;

}

.link--negative,
.wp-block-button.is-style-link-negative .wp-element-button{
  color: var(--wp--preset--color--accent);
}

.link:before,
.link--negative:before,
.link--positive:before
.wp-block-button.is-style-link .wp-element-button:after,
.wp-block-button.is-style-link-negative .wp-element-button:after{
  content: none;
}

.link:after,
.link--negative:after,
.link--positive:after,
.wp-block-button.is-style-link .wp-element-button:before,
.wp-block-button.is-style-link-negative .wp-element-button:before{
  content: '';
  background: none;
  height: 2px;
  width: 100%;
  top: unset;
  bottom: -3px;
  background-color: var(--wp--preset--color--accent);
  transition: transform 0.3s ease-in-out;
  display: block;
}

.link--positive:after{
  background-color: var(--wp--preset--color--black);
}


.link:hover:after,
.link--negative:hover:after,
.link--positive:hover:after,
.wp-block-button.is-style-link .wp-element-button:hover:before,
.wp-block-button.is-style-link-negative .wp-element-button:hover:before,
.link:active:before,
.link--negative:active:before,
.wp-block-button.is-style-link .wp-element-button:active:before,
.wp-block-button.is-style-link-negative .wp-element-button:active:before{
  transform: translateY(5px);
}

.tag{
  padding: 6px 12px;
  border-radius: 999px;
  border: solid 1px var(--wp--preset--color--grey-medium);
  cursor: pointer;
  white-space: nowrap;
  display: inline-block;
}

.tag.js-active,
.tag.current,
.tag:hover
{
  background: linear-gradient(317deg, rgba(255, 202, 43, 0.20) 28.77%, rgba(255, 244, 209, 0.20) 116.45%);
  border-color: var(--wp--preset--color--accent);
}

/** Visualización en editor **/

.editor-styles-wrapper .wp-block-button .wp-element-button{
  background: var(--wp--preset--gradient--cta);
}

.editor-styles-wrapper .wp-block-button.is-style-outline .wp-element-button{
  background: transparent;
  border: 1px solid var(--wp--preset--color--accent);
}

.editor-styles-wrapper .wp-block-button.is-style-link .wp-element-button,
.editor-styles-wrapper .wp-block-button.is-style-link-negative .wp-element-button{
  background: transparent;
  padding-bottom: 3px;
  border-bottom: 2px solid var(--wp--preset--color--accent);
}

/***********************
6. Components
***********************/

.c-video__image{
  position: relative;
}

.c-video__icon{
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.c-video__icon img{
  max-width: 9.5%;
  height: auto;
}