/* IMPORTANTE:
   box-sizing: border-box hace que:
   width y height INCLUYAN padding + border
   (no hay que sumarlos manualmente al tamaño final)
*/

/* FUENTES */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@200..700&family=Quicksand:wght@300..700&display=swap');

/* VARIABLES COLORES */
:root{
    --blanco: #ffffff;
    --blancoBase: #F4E2DE;
    --Claro: rgb(247, 243, 242);
    --naranja: #F29325;
    --naranjaSelec: #fcc653;
    --naranjaHover: #eb790f;
    --naranjaOscuro: #D94F04;
    --VerdosoClaro:#007172;
    --VerdosoClaroPlaceholder:#65a2a3;
    --VerdosoOscuro:#025259;
}

/*ANIMACIONES*/
@keyframes palpitar{
    from{
        transform: scale(1);
    }
    to{
        transform: scale(1.1);
    }
}

@keyframes tambaleo{
    from{
        transform: rotate(-5deg);
    }
    to{
        transform: rotate(5deg);
    }
}

*{
    box-sizing: border-box;
}

body{
    background-image: url(../IMG/backgroundBasic.PNG); 
    background-size: cover;
}

header{
    background-color: var(--Claro);
    width: 100%;
    height: 200px;
}
/* CÁLCULO:
   width total = 100% 
   height total = 200px 
*/

header img{
    display: inline-block;
    width: 450px;
    margin-left: 100px;
    vertical-align: middle;
}
/* CÁLCULO:
       ancho total = 450px + 100px (margin-left)
       = 550px
*/

header h1{
    display: inline-block;
    width: 20%;
    height: 100px;
    vertical-align: top;
    margin-left: 150px;
    font-size: 50px;
    text-align: center;
    color: var(--naranja);
    -webkit-text-stroke-width: 1px; /* Grosor */
    -webkit-text-stroke-color: var(--naranjaOscuro);
    font-family: 'Oswald';
    line-height: 1;
}
/* CÁLCULO:
   width = 20% del contenedor padre (header)
   height = 100px (incluye contenido + padding + border)
   espacio horizontal total = 20% + 150px margin
*/

header span{
    color: var(--blanco);
    /*Color del borde*/
    -webkit-text-stroke-width: 2px; /* Grosor */
    -webkit-text-stroke-color: var(--naranjaOscuro);
}

nav{
    background-color: var(--naranja);
    width: 100%;
    height: 75px;
    border-top: solid var(--blancoBase) 3px;
    border-bottom: solid var(--naranjaOscuro) 3px;
    font-family: 'Oswald';

    position: relative; /* Para colocar el logo en la esquina izquierda */
}
/* CÁLCULO:
   height total = 75px 
*/

nav ul {
    list-style-type: none;
    text-align: center;
    /*Los navegadores añaden margin y padding por defecto a ul*/
    margin: 0;
    padding: 0;
}

nav li{
    display: inline-block;
}

nav a{
    display: block;
    text-decoration: none;
    color:var(--Claro);
    font-size: 30px;

    padding: 10px 20px 10px 20px; /*top right bottom left*/
}
/* CÁLCULO:
    altura total del enlace = contenido + 10px top + 10px bottom
     
    ancho total = contenido + 20px left + 20px right
*/

nav a:hover{
    background-color: var(--naranjaHover);
    border-radius: 10px;
    color: var(--naranjaOscuro);
    font-weight: bold;
    border-bottom: solid var(--naranjaOscuro) 5px;
}

nav img{
    position: absolute; /* Para colocar el logo en la esquina izquierda */
    left: 1px;
    width: 110px;
}

.seleccionado{
    background-color: var(--naranjaOscuro);
    border-radius: 10px;
    color: var(--naranjaSelec);
    border-bottom: solid var(--naranjaOscuro) 5px;
}

.cerrar{
    display: inline-block;
    font-size: 20px;
}

.cerrarDer{
    float: right;
}

.cerrar:hover{
    animation: tambaleo;
    animation-duration: 1s;
    animation-iteration-count: infinite; /*Se repite de manera infinita*/
    animation-direction: alternate; /* La animación se reproduce en sentido contrario */
}

.puerta{   
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url(../img/doorlock.png); 
    background-size: cover;           
    background-position: center;    
    background-repeat: no-repeat;    
    margin-right: 5px;
}

.puerta:hover{   
    width: 20px;
    height: 20px;
    background-image: url(../img/opendoor.png); 
    background-size: cover;           
    background-position: center;    
    background-repeat: no-repeat;    
    margin-right: 5px;
}

main{
    width: 45%;
    height: 600px;
    margin: 30px auto 30px auto; /*top right bottom left*/
    background-color: var(--Claro);
    border-radius: 30px;
    border: var(--blancoBase) solid 5px;
    border-left: solid var(--blanco) 5px;
    border-bottom: solid var(--blanco) 5px;
    box-shadow: -30px 25px 7px var(--blancoBase); /* desplazamiento horizontal, desplazamiento vertical, radio de desenfoque, color */
}
/* CÁLCULO:
   width = 45% del body
   height total = 600px 

   margin:
   top = 30px
   bottom = 30px
   left/right = auto 
*/

main h3{
    margin: 30px auto 20px auto; /*top right bottom left*/
    width: 80%;
    font-family:'Quicksand';
    color: var(--naranjaOscuro);
}

form{
    margin: 30px auto 20px auto; /*top right bottom left*/
    width: 80%;
    height: 500px;
    font-family:'Quicksand';
}
/* CÁLCULO:
   width = 80% del main
   height total = 500px
*/

form label{
    display: block;
    font-size: 30px;
    margin: 30px 0px 10px 0px; /*top right bottom left*/
    color: var(--VerdosoOscuro);
    font-weight: bold;
}

textarea{
    width: 100%;
    height: 200px;
    border: solid var(--VerdosoClaro) 3px;
    padding: 10px;
    font-size: 20px;
    color: #007172;
    font-style: italic;
}
/* CÁLCULO:
   width total = 100% del contenedor
   height total = 200px
   contenido interno real:
   height = 200px - padding - border
   = 200 - 20px padding - 6px border = 174px
*/

textarea::placeholder{
    color: var(--VerdosoClaroPlaceholder);
    font-style: italic;
}

select{
    width: 100%;
    height: 50px;
    border: solid var(--VerdosoClaro) 3px;
    padding: 10px;
    font-size: 20px;
    color:#007172;
}
/* CÁLCULO:
   height total = 50px
   contenido interno:
   = 50 - 20px padding - 6px border = 24px útiles
*/

button{
    display: block;
    margin: 15px auto 0px auto; /*top right bottom left*/
    width: 300px;
    height: 50px;
    background-color: var(--naranja);
    color: var(--Claro);
    font-size: 20px;
    border: none;
    border-radius: 10px;
    font-family: 'Quicksand';
}
/* CÁLCULO:
    width total = 300px
    height total = 50px
    en hover:
    border-bottom: 5px sigue dentro del height (no crece)
 */

button:hover{
    background-color: var(--naranjaHover);
    color: var(--naranjaOscuro);
    font-weight: bold;
    border-bottom: solid var(--naranjaOscuro) 5px;

    animation: palpitar;
    animation-duration: 1s;
    animation-iteration-count: infinite; /*Se repite de manera infinita*/
    animation-direction: alternate; /* La animación se reproduce en sentido contrario */
    box-shadow: 0px 0px 10px var(--naranja); /* desplazamiento horizontal, desplazamiento vertical, radio de desenfoque, color */      
    cursor: pointer;
}

footer {
    text-align: center;
    padding: 20px;
    background-color: #f2f2f24b;
}

footer img {
    width: 100px;
    display: block;
    margin: 0 auto;
}

footer p {
    margin-top: 10px;
    font-size: 14px;
    color: #555;
}