body{
    background: #ffffff;
    font-family: "Poppins", Arial, sans-serif;
}

h2{
    font-family: "Shadows Into Light", serif;
    font-weight: 600;
    line-height: normal;
}


.cuerpo h2{
    font-size: 1.5em;
    padding-bottom: 2rem;
}

h4{
    padding-bottom: 1em;
    font-weight: 400;
    font-style: italic;
    font-size: 1.5rem;
    color: #520f0f;
    font-family: Verdana;
}

img#logo{
    height: 120px;
}

.fa {
    font-family: var(--fa-style-family, "Font Awesome 6 Free");
    font-weight: var(--fa-style, 900); 
}

.error {
    color: red;
    font-size: 0.9em;
    margin-bottom: 10px;
    height: 1em;
}

input.error-border {
    border: 1px solid red;
}

.success {
    color: lightgreen;
    font-size: 0.9em;
    margin-bottom: 10px;
    height: 1em;
}

/* //Pantallas muy grandes  (desktops de más de 1200px de ancho)

//No hace falta media-query porque será nuestro diseño por defecto */

.portada{
    position: relative;
}

header{
    width: 100%;
}

.cabecera{  
    position: absolute;
    top: 0;
    background: rgba(255,255,255,.7);     
    width: 100%;
    margin: auto;
    display: grid;
    grid-template-rows: 80px 40px;
    grid-template-columns: 10% 60% 10% 10% 10%;
    height: 160px;

        --altura: 0px;
        --opacidad: 0;
}

.cabecera.secundaria{
    background: radial-gradient(circle, rgb(156, 231, 188) 0%, rgba(96, 248, 192, 0.82) 50%, rgba(111, 83, 237, 1) 100%);
    position: relative;
}

.logo{
    grid-column: 2/3;
    grid-row: 1/3;
}

img#logo{
    max-height: 120px;
    height: 120px;
    object-fit: initial;
    width: auto;
}

.redes_sociales{
    display: grid;
    grid-column: 4;
    grid-row: 1/2;
    grid-template-columns: repeat(3, 2rem);
    grid-template-rows: repeat(2, 50%);
    justify-content: end;
    padding-top: 10px;
    column-gap: 2px;
    align-items: center;
    
}

.red_facebook{
    grid-column: 2/3;
    grid-row: 1;
    padding: 0;
}
    
.red_youtube{
    grid-column: 3/4;
    grid-row: 1;
    padding: 0;
}

.fa-square-facebook {
    color: #0644ec;
}

.fa-square-youtube {
    color: #000000;
}

.fa-brands {
    font-size: 2em;
}

.fa-brands:hover{
    color: #790303d5;
}

.nav_toggle{
    display: none;
}

nav {
    grid-column: 2/5;
    grid-row: 3/4;
    display: grid;
}

.menu_check{
    display: none;
}

.navbar{
    display: flex;
    justify-content: center;
    gap: 20px;
    align-self: end;
}

.nav_item a{
    font-size: 1.1em;
    text-align: center;
    padding: 0.2rem 0px;
    justify-content: center;
    color: rgb(84, 48, 255); 
    font-weight: bold;
    text-transform: uppercase;
    text-shadow: 0px 3px 3px rgba(255,255,255,0.4),0px -1px 1px rgba(0,0,0,0.3);
    display: flex;
}

nav li{
    position: relative;
}

.down{
    padding-left: 0.6rem;
    color: #000;
}

.nav_item > a::before{
    content: "";
    position: absolute;
    top: 90%;
    left: 0;
    height: 4px;
    background: #630202;
    width: 100%;
    transform: translateX(-60px);
    opacity: 0;
    transition: 0.5s;
}

.nav_item.drown > a::before{
    width:calc(100% - 27.2px) ;
}

.navbar > .nav_item:hover > a{
    color: #ffffff;
}

.nav_item:hover > a::before{
    transform: translateX(0px);
    opacity: 1;
}

.down .fa-solid {
    transition: .2s transform;
}

.nav_item:hover .down .fa-solid {
    color: #ffffff;
    transform: rotate(180deg);
}

.menu {
    position: absolute;
    max-height: var(--altura);
    opacity: var(--opacidad);
    overflow:hidden;
    margin-top: 2px;
    width: auto;
    background: linear-gradient(to bottom, #e2e2e2c3 0%, #dbdbdbb5 50%, #d1d1d1b4 51%, #fefefeaf 100%);
    box-shadow: 0px 50px 100px -20px rgba(50, 50, 93, 0.25), 0px 30px 60px -30px
    rgba(0, 0, 0, 0.3), 0px -2px 6px 0px inset rgba(10, 37, 64, 0.35);
    border: #520f0f 3px solid;
    border-radius: 12px;
    transition:  2s all ease-in-out;
}

.cinco .menu{
    width: 100%;
}

.fa-solid.fa-caret-right{
    display: none;
}

.menu ul{
    display: flex;
    flex-direction: column;
    width: auto;
    white-space: nowrap;
}

.menu_item a{
    padding: 0.2rem 0.5rem;
    justify-content: start;
    text-align: left;
    font-size: 1rem;
    color: #320536;
    text-shadow: 3px 2px 5px #474747;
    box-shadow: 0px 50px 100px -20px rgba(50, 50, 93, 0.25), 0px 30px 60px -30px
    rgba(0, 0, 0, 0.3), 0px -2px 6px 0px inset rgba(10, 37, 64, 0.35);
}

.up{
    display: none;
}

.nav_item:hover .menu{
    max-height: 600px;
    opacity: 1;
}

.nav_item:hover .down .fa-solid {
    color: #ffffff;
    transform: rotate(180deg);
}

.menu_item:hover {
    background: #110cab;
    background: linear-gradient(0deg, rgba(17, 12, 171, 1) 0%, rgba(152, 148, 235, 0.99) 53%, rgba(4, 18, 128, 0.73) 100%);
}

.menu_item:hover a{
    color: #ffffff;
}

main{
    display: grid;
    grid-template-columns: 10% 60% 10% 10% 10%;
}

.cuerpo{
    grid-column: 2/5;
    padding-top: 1rem;
    width: 98%;
    margin: auto;

}

#afiliarseForm{
    margin-top: 3rem;
    box-shadow: 0px 0px 4px 4px rgba(0,0,0,0.1);
    display: grid;
    grid-template-columns: repeat(2, 50%);
    font-weight:400 ;
}

#return{
    grid-column: 1/3;
}

.apartado.personal{
    margin-left: 0.5rem;
}

.personal_row{
    grid-column: 1/3;
    font-size: 1.2rem;
    line-height: 1.8rem;
    text-align: center;
    background-color: #87848462;
    font-weight: 600;
}

input.marcoForm2, .marcoFormIban{
    border: 1px solid #ccc;
    border-radius: 2px;
    -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
    -webkit-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
    -o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
    transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
    width: 80%;
}

input.marcoForm2:focus-visible{
    border-color: #66afe9;
    outline: 0;
    -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);
}

.apartado.personal.domicilio,.apartado.personal.iban,.apartado.personal .iban  {
    grid-column: 1/3;
}

#domicilio, .iban1{
    width: 90%;
}

.iban1{
    display: flex;
}

.marcoFormIban{
    text-align: center;
}

.button-2 {
    grid-column: 1/3;
    display: flex;
    justify-content: center;
    padding-top: 3rem;
}

.enviar{
    text-align: center;
    border: #520f0f 2px solid;
    border-radius: 3px;
    padding: 2px 10px;
    background-color: #804e7b8c;
}
/* //Pantallas grandes (desktops de menos de 1200px)// */

/* @media (max-width: 1199.98px) { 
    
    ...

} */



/* //Pantallas medianas (tablets de menos de 992px) */

@media (max-width: 991.98px) {

.cabecera {
    grid-template-columns: auto 80% 1rem 80px auto;

}

.navbar{
    gap: 7px;
}

}



/* //Pantallas pequeñas (móviles en landscape de menos de 768px) */

@media (max-width: 767.98px) {

.cabecera {
    grid-template-columns: 10% auto 35px 10%;
    height: 120px;

    --icon-toggle-menu:url("../img/icons/menu.svg");
    --transform-menu-show: translateY(-50%);
    --transparencia-menu: hidden;
    --anchura:scale(0.5);
    
}

.redes_sociales {
    grid-column: 3/4;
    grid-row: 1/2;
    display: flex;
    flex-direction: column;
    justify-content: start;
}

.fa-brands {
    font-size: 1.7em;
}

.nav_toggle{
    display: block;
    grid-column: 3/4;
    grid-row: 2/3;
    background-image: var(--icon-toggle-menu);
    background-repeat: no-repeat;
    background-size: cover;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: background-image .5s;
} 

.nav-input {
    display: none;
}

.navbar{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 5px;
    position: absolute;
    z-index: 100;
    width: 80%;
    top: 120px;
    transform: var(--transform-menu-show) var(--anchura);
    transition: 1.5s transform ease-out; 
    margin-top: 3px;
    visibility: var(--transparencia-menu);
        
}

.nav_item{
    background: linear-gradient(to bottom, #e2e2e2c3 0%,#dbdbdbb5 50%,#d1d1d1b4 51%,#fefefeaf 100%);
    border: 3px solid rgb(32, 13, 81);
    border-radius: 10px;
}

.cabecera:has(.nav-input:checked){
        --icon-toggle-menu:url("../img/icons/bx-x.svg");
        --transform-menu-show: translate(0);
        --transparencia-menu: visible;
        --anchura:scale(1);


}

.nav_item.seis{
    grid-column: 3;
    grid-row: 1;
}

.nav_item.tres{
    grid-column: 2;
    grid-row: 1;
}

.nav_item:hover > a::before{
    opacity: 0;
}

.nav_item a{
    justify-content: center;
    text-align: start;
    font-size: 0.9rem;
}

.down {
  padding-left: 0.5rem;
}

.navbar > li:hover{
    background: rgb(131,4,4);
    background: -moz-linear-gradient(180deg, rgba(131,4,4,0.8072362734156162) 32%, rgba(45,3,10,0.6979925759366247) 100%);
    background: -webkit-linear-gradient(180deg, rgba(131,4,4,0.8072362734156162) 32%, rgba(45,3,10,0.6979925759366247) 100%);
    background: linear-gradient(180deg, rgba(131,4,4,0.8072362734156162) 32%, rgba(45,3,10,0.6979925759366247) 100%);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#830404",endColorstr="#2d030a",GradientType=1); 
    }

.menu{
    z-index: 101;
    width: 100%;
    top: 110%;

}

}

/* //Pantallas muy pequeñas (móviles en portrait de menos de 576px) */

 @media (max-width: 575.98px) { 


.navbar {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);

} 

.menu_check {
    display: block;
    cursor: pointer;
    width: 100%;
    position: absolute;
    opacity: 0;
    height: 29px;
    top: 0px;
}

.nav_item.dos{
    grid-column: 2;
    grid-row: 1;
}

.nav_item.tres{
    grid-column: 1;
    grid-row: 3;
}

.nav_item.seis{
    grid-column: 2;
    grid-row: 3;
}

/* .menu{
    max-height: 600px;
    opacity: 1;
} */

.nav_item:hover .menu{
    max-height: 0;
    opacity: 0;
} 

.down .fa-solid{
    color: #ea0606;
    font-size: 1rem;
}

.nav_item:hover .down .fa-solid {
    color: #ea0606;
    transform: rotate(0deg);
}

li.nav_item:has( :checked) .menu{
    max-height: 600px;
    opacity: 1;
    transition: 1s transform;
}

li.nav_item:has( :checked) .down .fa-solid{
    transform: rotate(180deg);
    color: #ffffff;
    

}

}

@media (max-width: 480.98px){

.cabecera{
    grid-template-columns: 5% auto 35px 5%;
}

nav {
  grid-column: 1/5;
   justify-items: center;
    justify-content: center;
}

.navbar {
    grid-column: 1/5;
    display: flex;
    flex-direction: column;
    gap: 0px;
    border: 3px solid rgb(26, 27, 24);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    width: 98%;
    margin: auto;
    justify-items: center;
    justify-content: center;

} 

.menu{
    position: relative;
    margin-top: 0px;
    border: 0px;
}

.nav_item {
    background: linear-gradient(to bottom, #e2e2e2c3 0%,#dbdbdbb5 50%,#d1d1d1b4 51%,#fefefeaf 100%);
    border: none;
    border-radius: 0px;
    border-bottom: 2px solid #000000;
}

li.nav_item:last-child {
    border-bottom-left-radius: 9px;
    border-bottom-right-radius: 9px;
    border-bottom: none;
}


}