/* GLOBAL */

:root {
    --text-color: #000;
    --text-color2: rgba(42, 178, 11, 1);
    --text-color3: #fff;
    --text-error: red;
    --font-family: 'Source Sans 3', sans-serif;
    --background-gray: rgba(242, 242, 242, 1);
    --background-yellow: #FBCE16;
    --background-top-menu: #fff;
    --active-color: #fff7d9;
    --back-button-color:rgba(177, 178, 181, 1);
    --footnote-color: rgba(144, 144, 144, 1);

    --color: #999;
    --checked-color: rgba(42, 178, 11, 1);
    --bg-color: #e8e8e8;
}

@media (prefers-contrast: more) {
    :root {
        --text-color2: rgba(26, 102, 9, 1);
        --background-gray: rgba(249, 249, 249, 1);
        --background-yellow: #f9edb9;
        --active-color: #fefbef;
        --footnote-color: rgba(0, 0, 0, 1);
        --checked-color: rgba(26, 102, 9, 1);
    }
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
}

@media screen {
    .sr-only {
        display: none;
    }
}

/* MENU */

menu {
    padding: 0;
    margin: 0;
}

#topmenu {
    background-color: var(--background-top-menu);
    display: grid;
    grid-template-columns: 10fr 67px;
    grid-template-rows: repeat(2, 1fr);
    grid-column-gap: 0px;
    grid-row-gap: 0px;
    box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.1);
}

.title {
    grid-column-start: 1;
    grid-column-end: 2;
    grid-row-start: 1;
    grid-row-end: 2;
    margin-left: 27px;
    margin-top: 15px;
    font-weight: bold;
}

.error {
    color: var(--text-error);
}

.logo {
    width: 140px;
    grid-column-start: 1;
    grid-column-end: 2;
    grid-row-start: 2;
    grid-row-end: 3;
    margin-left: 27px;
    margin-top: 3px;
    margin-bottom: 3px;
}

.logo img {
    max-width: 100%;
}

.hamburger {
    grid-column-start: 2;
    grid-column-end: 3;
    grid-row-start: 1;
    grid-row-end: 3;
    margin-top: 27px;
    margin-right: 27px;
}

.hamburger,
.hamburger img {
    width: 40px;
    height: 26px;
}

#topmenu .autoconsumo,
#topmenu .calculadora,
#topmenu .descarga {
    display: none;
}

/* SIDE MENU */

#sidemenu {
    background: rgba(251, 206, 22, 1);
    color: var(--text-color);
    height: 100vh;
    width: 100vw;
    position: fixed;
    top: 0;
    z-index: 9999;
}

#sidemenu a {
    color: var(--text-color);
    text-decoration: none;
}

#insidemenu {
    display: grid;
    grid-template-columns: 10fr 67px;
    grid-template-rows: repeat(1, 1fr);
    grid-column-gap: 0px;
    grid-row-gap: 0px;
    align-items: start;
}

.topinside {
    grid-column-start: 1;
    grid-column-end: 2;
    grid-row-start: 1;
    grid-row-end: 2;
    margin-left: 27px;
    margin-top: 16px;
}

.close2 {
    grid-column-start: 2;
    grid-column-end: 3;
    grid-row-start: 1;
    grid-row-end: 2;
    margin-top: 27px;
}

.title2 {
    font-weight: bold;
}

.logo2 {
    width: 140px;
    margin-top: 10px;
}

.logo2 img {
    max-width: 100%;
}

.menulinks {
    margin-top: 2rem;
}

.menulinks div {
    padding: 10px 0;
    font-size: 1.3rem;
}

.menulinks div:nth-child(1),
.menulinks div:nth-child(2) {
    border-bottom: 1px solid #000;
}

/* *DECISION BOX */

.decision-box {
    background-color: var(--background-gray);
    padding: 3.5rem 0;
    text-align: center;
}

.decision-box .question {
    font-weight: bold;
    text-align: center;
    font-size: 1.13rem;
    margin: 0 0 0.5rem 0;
}

.decision-box .option {
    color: var(--text-color2);
    text-transform: uppercase;
    font-size: 1rem;
    font-weight: bold;
    padding: 1rem 1.6rem;
    background-image: url(../img/l.svg), url(../img/r.svg);
    background-repeat: no-repeat;
    background-position: left, right;
    display: inline-block;
    text-align: center;
    margin: 1rem 0;
}

.decision-box .option.active {
    background-color: var(--active-color);
}

.decision-box .option a {
    text-decoration: none;
    color: var(--text-color2);
}

.optionback {
    display: inline-block;
    text-align: center;
    background-image: url(../img/arr.svg);
    background-repeat: no-repeat;
    background-position: left;
    padding: 0px 0 3px 15px;
}

.optionback a {
    color: var(--back-button-color);
    text-decoration: none;
    font-style: italic;
}

/* SUBPAGES */

.subpage {
    width: 100%;
    padding-top: 30px;
    padding-bottom: 30px;
}

.subpage .topsub {
    display: grid;
    grid-template-columns: auto;
}

.subpage .bottomsub {
    display: grid;
    grid-template-columns: auto;
}

.subpage .bottomsub4 {
    display: grid;
    grid-template-columns: auto;
}

.subpage h1 {
    color: var(--text-color2);
    margin-left: 27px;
    margin-right: 27px;
}

.subpage p {
    margin-left: 27px;
    margin-right: 27px;
    font-size: 1.13rem;
}

.download-box {
    background-color: var(--background-yellow);
    padding: 27px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 40px;
}

.download-box p {
    margin: 0;
    font-weight: bold;
}

.download-box p a {
    color: var(--text-color2);
}

.download-button {
    text-align: center;
    height: 50px;
    margin-top: 45px; 
    margin-bottom: 25px;
}

.download-button a {
    background-color: var(--text-color2);
    padding: 1rem 2rem;
    color: var(--text-color3);
    text-decoration: none;
    text-transform: uppercase;
    font-weight: bold;
    border-radius: 10px;
}

.outsideback {
    display: none;

}

@media screen and (min-width: 470px) {}

@media screen and (min-width: 813px) {

    /* MENU */

    .hamburger,
    .title {
        display: none;
    }

    #topmenu .autoconsumo,
    #topmenu .calculadora,
    #topmenu .descarga {
        display: inline-block;
    }

    #topmenu {
        grid-template-columns: 5fr 7fr 5fr 4fr;
        grid-template-rows: repeat(1, 1fr);
        height: 50px;
        background-color: var(--background-yellow);
    }

    .logo {
        grid-column-start: 1;
        grid-column-end: 2;
        grid-row-start: 1;
        grid-row-end: 2;
        margin-top: 10px;
    }

    .autoconsumo {
        grid-column-start: 2;
        grid-column-end: 3;
        grid-row-start: 1;
        grid-row-end: 2;
        margin-top: 12px;
    }

    .calculadora {
        grid-column-start: 3;
        grid-column-end: 4;
        grid-row-start: 1;
        grid-row-end: 2;
        margin-top: 12px;
    }

    .descarga {
        grid-column-start: 4;
        grid-column-end: 4;
        grid-row-start: 1;
        grid-row-end: 2;
        margin-top: 12px;
    }

    #topmenu a {
        text-decoration: none;
        color: var(--text-color);
        font-weight: bold;
    }

    .download-box p {
        width: 94vw;
    }

    .outsideback {
        display: flex;
        justify-content: center;
        margin: 40px 0 40px;
    }

    .download-box .optionback {
        display: none;
    }

    .subpage {
        padding-top: 50px;
        padding-bottom: 50px;
    }

}

@media screen and (min-width: 1024px) {

    /* MENU */

    #topmenu {
        width: 960px;
        margin: auto;
    }

    .download-box p {
        width: 960px;
    }
}


/* ------------- ANIMATIONS ------------- */

:root {
    --animate-duration: 1s;
    --animate-delay: 1s;
    --animate-repeat: 1;
  }
  .animate__animated {
    -webkit-animation-duration: 1s;
    animation-duration: 1s;
    -webkit-animation-duration: var(--animate-duration);
    animation-duration: var(--animate-duration);
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
  }
  
  @media print, (prefers-reduced-motion: reduce) {
    .animate__animated {
      -webkit-animation-duration: 1ms !important;
      animation-duration: 1ms !important;
      -webkit-transition-duration: 1ms !important;
      transition-duration: 1ms !important;
      -webkit-animation-iteration-count: 1 !important;
      animation-iteration-count: 1 !important;
    }
  
    .animate__animated[class*='Out'] {
      opacity: 0;
    }
  }

  .animate__animated.animate__faster {
    -webkit-animation-duration: calc(1s / 2);
    animation-duration: calc(1s / 2);
    -webkit-animation-duration: calc(var(--animate-duration) / 2);
    animation-duration: calc(var(--animate-duration) / 2);
  }
  
  @-webkit-keyframes slideInLeft {
    from {
      -webkit-transform: translate3d(-100%, 0, 0);
      transform: translate3d(-100%, 0, 0);
      visibility: visible;
    }
  
    to {
      -webkit-transform: translate3d(0, 0, 0);
      transform: translate3d(0, 0, 0);
    }
  }
  @keyframes slideInLeft {
    from {
      -webkit-transform: translate3d(-100%, 0, 0);
      transform: translate3d(-100%, 0, 0);
      visibility: visible;
    }
  
    to {
      -webkit-transform: translate3d(0, 0, 0);
      transform: translate3d(0, 0, 0);
    }
  }
  .animate__slideInLeft {
    -webkit-animation-name: slideInLeft;
    animation-name: slideInLeft;
  }
  
  @-webkit-keyframes slideOutLeft {
    from {
      -webkit-transform: translate3d(0, 0, 0);
      transform: translate3d(0, 0, 0);
    }
  
    to {
      visibility: hidden;
      -webkit-transform: translate3d(-100%, 0, 0);
      transform: translate3d(-100%, 0, 0);
    }
  }
  @keyframes slideOutLeft {
    from {
      -webkit-transform: translate3d(0, 0, 0);
      transform: translate3d(0, 0, 0);
    }
  
    to {
      visibility: hidden;
      -webkit-transform: translate3d(-100%, 0, 0);
      transform: translate3d(-100%, 0, 0);
    }
  }
  .animate__slideOutLeft {
    -webkit-animation-name: slideOutLeft;
    animation-name: slideOutLeft;
  }
  

  /* COOKIE BANNER */

.modal {
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-visible-overflow {
    position: fixed;
    z-index: 10;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;

}

.modal-inside {
    background-color: rgba(255, 255, 255, 1);
    width: 80%;
    text-align: left;
    padding: 1rem 1.5rem 1rem 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .7);
    margin: auto;
    border-radius: 10px;
    border: 1px solid #000;
}

.modal-inside h2 {
    color: var(--text-color2);
    font-size: 1.5rem;
}

.modal-inside p {
    margin: 0.5rem 0;
}

.modal-inside a {
    color: var(--links-color);
    font-weight: 700;
    text-decoration: underline;
}

.modal-inside .popup-yes {
    background-color: var(--checked-color);
    color: var(--text-color3);
    font-weight: bold;
    text-transform: uppercase;
}


.modal-inside .popup-no {
    background-color: var(--background-gray);
}

.modal-inside label {
    font-weight: var(--bold-font-weight);
    display: inline;
    font-weight: bold;
}

.modal-bt-row {
    display: flex;
    justify-content: center;
    padding: 0.5rem 0 1.5rem 0;
    gap: 15px;
}

.modal-bt-row button {
    padding: .75rem;
    border: none;
    border-radius: 10px;
    color: var(--second-color);
    padding: 10px 15px 10px 15px;
    font-family: var(--headers-font);
    font-size: 1.1rem;
    cursor: pointer;
}

@media screen and (max-width: 440px) {
    .modal-bt-row {
        flex-direction: column;
    }
}

.modal-bt-row .popup-no {
    color: var(--light-text-color);
}

.modal-bt-row .popup-no:hover {
    color: var(--text-color);
}

@media (min-width: 480px) {
    .modal-inside {
        max-width: 450px;
    }
}

/* FOOTER */

footer {
    margin-top: 3rem;
    background-color: var(--background-yellow);
    color: var(--second-color);
    padding-bottom: 2px;
    padding-top: 10px;
}

footer a {
    color: var(--second-color);
    text-decoration: none;
}

footer a:hover {
    color: var(--hover-color) ;
}

footer ul {
    padding-left: 0;
}

footer li {
    list-style-type: none;
}

.footer-logo {
    text-align: center;
    margin-bottom: -20px;
}

.footer-logo a {
    display: block;
    padding: 10px;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    flex-direction: column;
    text-align: center;
}

.footer-links a {
    padding: 8px 15px;
    display: block;
}

@media screen and (min-width: 700px) {
    .footer-links {
        flex-direction: row;
    }

    .footer-links a {
        padding: 10px 20px;
    }
}