/********************************************************************************************/
/* ESTILOS GENERALES */
/********************************************************************************************/
html, body{
    height: 100%; /* Define la altura de cualquier elemento usando porcentajes */
    scroll-behavior: smooth; /* Permite scroll automático al dar click en links del navbar */
}

/* Modificar el modelo de cajas CSS */
html{
    -webkit-box-sizing: border-box;
            box-sizing: border-box
}

*, *::before, *::after{
    -webkit-box-sizing: inherit;
            box-sizing: inherit;
}

/* Resetear márgenes y padding */
*{
    margin: 0;
    padding: 0;
}

/* Estilos de la fuente */
body{
    font-family: 'Dosis', 'Open Sans', sans-serif;
    font-size: 1rem;
    color: #444;
}

/* Tamaños de los textos */
h1{
    font-size: 2.5rem;
}

h2{
    font-size: 1.5rem;
}

p{
    font-size: 1.1rem;
    line-height: 1.8;
}

small{
    font-size: .8rem;
}

/* Estilos para los botones */
a.btn{
    display: inline-block;
    text-decoration: none;
    color: #fff;
    background-color: rgba(255, 255, 255, .1);
    border: 1px solid #b9b248;
    padding: .5em 2em;
    margin-top: 2em;
}   

/* Centrar elementos en pantalla */
.container{
    width: 90%;
    max-width: 1366px;
    margin: 0 auto;
}

/********************************************************************************************/
/* CONTENIDO */
/********************************************************************************************/

/* ********************************* */
/* header */
/* ********************************* */

#top-header{
    width: auto;
    height: auto;
    background-color: #4e4d38;
    color: #fff;
    padding: .1em 2em;
    
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
}

#top-header div{
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
}

#top-header div a{
    color: #fff;
    text-decoration: none;
}

#top-header div i {
    color: #fff;
    font-size: 1.1rem;
    margin-left: 0.5em;
    padding-top: 0.1em;
}

#top-header div p{
    margin-left: 0.5em;
}

#header{
    width: auto;
    height: 120px;
    padding: 1em 2em;
    border-bottom: 1px solid #444;

    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
}

#header a {
    text-decoration: none;
    color: #444;
}

#header a p:first-child{
    font-size: 2rem;
    text-transform: uppercase;
}

#header a div p:nth-child(2){
    font-size: 1.2rem;
}

#header #logo {
    width: 30%;
}

#header #logo img{
    width: auto;
    height: 100%;
    float: right;
}

/* ********************************* */
/* navbar */
/* ********************************* */

nav{
    margin: 1em 0;
}

nav ul{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
}

nav div{
    display: none; /* Oculta el menú por defecto */
}

nav ul li{
    display: inline-block;
    margin: 0.5em 1em;
}

nav ul li a{
    display: block; 
    width: 100%; 
    padding: .2em .5em; 
    position: relative; 
    z-index: 2;
    text-decoration: none;
    color: #777;
    box-sizing: border-box;
    -moz-box-sizing: border-box;  
    -webkit-box-sizing: border-box; 
}
    
nav ul li a:hover{ border-bottom: 0px; color: #fff;}
nav ul li:first-child a{ border-left: 1px solid #444; }
nav ul li:nth-child(2) a{ border-left: 1px solid #444; }
nav ul li:nth-child(3) a{ border-left: 1px solid #444; }
nav ul li:nth-child(4) a{ border-left: 1px solid #444; }
nav ul li:nth-child(5) a{ border-left: 1px solid #444; }
nav ul li:nth-child(6) a{ border-left: 1px solid #444; }
nav ul li:nth-child(7) a{ border-left: 1px solid #444; }
nav ul li:last-child a{ 
    display: inline-block;
    text-decoration: none;
    color: #777;
    border: 1px solid #b9b248;
    padding: .2em 2em;
}
  
nav ul li a::after { 
    content: "";
    height: 100%; 
    left: 0; 
    top: 0; 
    width: 0px;  
    position: absolute; 
    transition: all 0.3s ease 0s; 
    -webkit-transition: all 0.3s ease 0s; 
    z-index: -1;
}
  
nav ul li a:hover::after{ width: 100%; }
nav ul li:first-child a::after{ background: #b9b248; }
nav ul li:nth-child(2) a::after{ background: #b9b248; }
nav ul li:nth-child(3) a::after{ background: #b9b248; }
nav ul li:nth-child(4) a::after{ background: #b9b248; }
nav ul li:nth-child(5) a::after{ background: #b9b248; }
nav ul li:nth-child(6) a::after{ background: #b9b248; }
nav ul li:nth-child(7) a::after{ background: #b9b248; }
nav ul li:last-child a:hover{ 
    background-color: #b9b248; 
    color: #fff;}

/* ********************************* */
/* section-banner */
/* ********************************* */

#section-banner{
    width: auto;
    height: 500px;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url(../images/office_1.png);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    text-align: center;
    animation: shrink 25s linear;
}

@keyframes shrink {
    0%{
        background-size: 120%;
    }
    100%{
        background-size: 100%;
    }
}

#section-banner h1{
    color: #fff;
    padding: 3em 0 0 0;
    text-transform: uppercase;
}

#section-banner p{
    color: #fff;
    margin-top: 1em;
}

#section-banner div{
    margin: .5em 0 0 0;

    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;

}

#section-banner div a{
    color: #b9b248;
    text-decoration: none;
    font-size: .8rem;
    margin: 0 .3em 0 .3em;
}

#section-banner div a:hover{
    text-decoration: underline;
}

#section-banner a.button{
    margin: 5em 0 0 0;
}

#section-banner a:hover{
    background-color: rgba(0, 0, 0, 0.2);
}

/* ********************************* */
/* section-aboutme */
/* ********************************* */

#section-aboutme-title{
    text-align: center;    
}

#section-aboutme-title h2{
    padding: 2em 0 0 0 
} 

#section-aboutme-title hr{
    width: 300px;
    border-color: #b9b248;
    margin: 1em auto 0 auto;
}

#section-aboutme-content{
    margin: 2em;
    overflow: hidden;
}

#section-aboutme-content img{
    float: left;
    margin: 0 2em 0 0;
}   

#section-aboutme-content p:not(p:last-child){
    margin: 1em 0;
}

#section-aboutme-content p:last-child{
    clear: both;
    background-color: #fff;
    margin: 1em 0 0 0;
    border: 1px solid #b9b248;
    padding: 1em;
    
    transition: background-color 0.5s ease-out; 
}

#section-aboutme-content p:last-child:hover{
    background-color: #b9b1482f;
    
    transition: all 0.5s ease-in; 
}

/* ********************************* */
/* section-services */
/* ********************************* */

#section-services-title{
    text-align: center;    
}

#section-services-title h2{
    padding: 2em 0 0 0
} 

#section-services-title hr{
    width: 300px;
    border-color: #b9b248;
    margin: 1em auto;
}

#section-services-content{
    width: auto;
    height: auto;
    margin: 2em;
    text-align: center;

    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-around;
}

article.card-services{
    width: 20%;
    border: 1px solid #ececec;
    margin: .5em .3em;
    padding: 1em;
}

article.card-services:hover{
    transform: scale(1.05);
    background-color:#fbfbfb;
    box-shadow: rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;
 }

article.card-services i{
    display: block;
    color: #b9b248;
    font-size: 1.5rem;
    margin-bottom: .5em;
}

/* ********************************* */
/* section-credentials */
/* ********************************* */

#section-credentials-title{
    text-align: center;
}

#section-credentials-title h2{
    padding: 2em 0 0 0 
} 

#section-credentials-title hr{
    width: 300px;
    border-color: #b9b248;
    margin: 1em auto 0 auto;
}

#section-credentials-content{
    width: auto;
    height: auto;
    margin: 3em 0;
    
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
}

#section-credentials-content img{
    width: 60%;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5),rgba(0, 0, 0, 0.5)), url(../images/office_4.png);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
}

#section-credentials-content div{
    width: 40%;
    background-color: #222;
    color: #fff;
    padding: 1em 2em;
}

#section-credentials-content div p{
    color: #fff;
    padding: 1em;
}

#section-credentials-content div p:hover{
    transform: translate(1px);
}

#section-credentials-content div p a{
    color: #fff;
    text-decoration: none;
}

#section-credentials-content div p a:hover{
    color: #c7c7c7;
}

#section-credentials-content div p i{
    color: #b9b248;
    margin-right: 0.5em;
}

/* ********************************* */
/* section-skills */
/* ********************************* */

#section-skills-title{
    text-align: center;    
}

#section-skills-title h2{
    padding: 2em 0 0 0 
} 

#section-skills-title hr{
    width: 300px;
    border-color: #b9b248;
    margin: 1em auto 0 auto;
}

#section-skills-content{
    margin: 2em;
}

/* Style the button that is used to open and close the collapsible content */
.collapsible {
    font-family: 'Dosis', 'Latto', 'Open Sans', sans-serif;
    color: #444;
    cursor: pointer;
    padding: 1.5em;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;    
    font-size: 1rem;
    background-color: #fff;
    text-align: center;
}
  
/* Add a background color to the button if it is clicked on (add the .active class with JS), and when you move the mouse over it (hover) */
.active, .collapsible:hover {
    color: #b9b248;
    text-decoration: underline;
    background-color: #F5F5F5;
}
  
/* Style the collapsible content. Note: hidden by default */
.content {
    padding: 1em;
    display: none;
    overflow: hidden;
    text-align: center;
}

/* ********************************* */
/* section-contact */
/* ********************************* */

#section-contact{
    height: 700px;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url(../images/office_2.png);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    text-align: center;
}

#section-contact h2{
    color: #fff;
    padding: 2em 0 0 0;
    text-transform: uppercase;
    font-size: 2rem;
}

#section-contact h3{
    color: #fff;
    margin: 1em 0 0 0;
}

#section-contact > p{
    color: #fff;
}

#contact-info{
    display: flex;
    flex-wrap: nowrap;
    flex-direction: row;
    justify-content: space-around;
    margin: 2em 0;
    padding: 2em 0;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.2);
    border-top: 1px solid #b9b248;
    border-bottom: 1px solid #b9b248;

    transition: background-color .5s ease-out;

}

#contact-info:hover{
    background-color: rgba(0, 0, 0, 0.6);
    
    transition: all .5s ease-in;
}

#contact-info div:last-child p:last-child:hover{
    color: #b9b248;
    cursor: pointer;
}

.card-contact{
    width: 33.33%;
}

.card-contact a{
    font-size: 1rem;
    display: block;
    color: #fff;
    text-decoration: none;
    margin-bottom: 2em;
}

.card-contact a:hover{
    color: #b9b248;
    transform: translate(1px);
}

.card-contact a i {
    margin-right: .5em;
}

.card-contact > :first-child{
    font-size: 1.5rem;
    color: #b9b248;
    margin: 0 0 1em 0;
}

#section-contact > a.button{
    margin: 2em 0 0 0;
}

#section-contact > a:hover{
    background-color: rgba(0, 0, 0, 0.2);
}

/* ********************************* */
/* section-map */
/* ********************************* */

#section-map{
    width: auto;
}

/* ********************************* */
/* footer */
/* ********************************* */

footer{
    padding: 3em;
    color: #fff;
    background-color: #222;
    text-align: center;
}

footer p{
    margin-bottom: 1em;
}


/* ********************************* */
/* modal */
/* ********************************* */
.modal {
    display: none;
    position: fixed;
    z-index: 2;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
    text-align: center;
}
  
.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    width: 60%;
    border-radius: 20px;
}

.modal-content h3{
    font-size: 2rem;
    font-weight: normal;
    color: #444;
    padding: 1em 0 0 0;
}

.modal-content span{
    margin: .5em .5em 0 0;
}

.modal-content p{
    margin: 1em 0 0 0;
}

.modal-content img{
    opacity: .8;
}

.means-of-contact{
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-around;
    border: 1px solid #EFEFEF;
    padding: 2em 2em;
}

.means-of-contact a{
    width: 50%;
    text-decoration: none;
    padding: 1em;
    border: 1px solid #eee;
}

.means-of-contact a:hover{
    box-shadow: rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;
}

.means-of-contact a i{
    font-size: 2rem;
    color: #b9b248;
}

.means-of-contact a p{
    font-size: 1rem;
    color: #4e4d38;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}
  
.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}  


/********************************************************************************************/
/* MEDIA QUERIES */
/********************************************************************************************/

/* Estilos para escritorios medianos */
@media only screen and (max-width: 1024px) {
    
    /* ********************************* */
    /* navbar */
    /* ********************************* */

    nav ul li{
        margin: .5em 2em;
    }

    /* ********************************* */
    /* section-services */
    /* ********************************* */

    article.card-services{
        width: 30%;
    }

    /* ********************************* */
    /* section-credentials */
    /* ********************************* */

    #section-credentials-content img{
        width: 50%;
    }

    #section-credentials-content div{
        width: 50%;
    }

    /* ********************************* */
    /* modal */
    /* ********************************* */

    .modal-content {
        padding: 1em;
    }

    .modal-content span{
        margin: .5em .5em 0 0;
    }

    .modal-content img{
        width: 100%;
    }

    .means-of-contact{
        flex-direction: column;
    }

    .means-of-contact a{
        width: 100%;
    }

}

/* Estilos para tabletas en modo vertical y móviles grandes */
@media only screen and (max-width: 768px) {
    
    /* ********************************* */
    /* header */
    /* ********************************* */

    #top-header {
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }    

    #top-header p{
        font-size: 0.9rem;
    }

    #top-header p i {
        font-size: 1rem;
    }

    #header a{
        width: 80%;
    }

    #header a p:first-child{
        font-size: 1.5rem;
    }

    #header a p:nth-child(2){
        font-size: 1rem;
    }

    #header #logo {
        width: 20%;
    }

    #header #logo img{
        width: auto;
        height: 80%;
        float: right;
    }

    /* ********************************* */
    /* navbar */
    /* ********************************* */

    nav{
        margin: 0.5em 0 1em 0;
    }

    nav ul li{
        margin: .5em 0.5em;
    }

    /* ********************************* */
    /* section-banner */
    /* ********************************* */

    #section-banner{
        height: 350px;
    }

    #section-banner h1{
        font-size: 1.5rem;
    }

    #section-banner a.button{
        font-size: 0.9rem;
    }

    /* ********************************* */
    /* section-aboutme */
    /* ********************************* */

    #section-aboutme-content{
        margin: 1em;
    }
    
    #section-aboutme-content img {
        width: 50%;
        margin: 1em 1em 0 0;
    }

    #section-aboutme-content p:not(p:last-child){
        margin-bottom: 1em 0;
    }    

    /* ********************************* */
    /* section-services */
    /* ********************************* */

    #section-services-content{
        margin: 1em 0 0 0;
    }
    article.card-services{
        width: 40%;
    }

    article.card-services i{
        font-size: 1.2rem;
    }

    /* ********************************* */
    /* section-credentials */
    /* ********************************* */

    #section-credentials-content{
        flex-direction: column;
    }

    #section-credentials-content div{
        width: 100%;
    }

    /* ********************************* */
    /* section-contact */
    /* ********************************* */

    #section-contact{
        height: 600px;
    }

    .card-contact p{
        font-size: 0.9rem;
    }

    #section-contact small{
        font-size: 0.8rem;
    }

    .card-contact a{
        font-size: 0.9rem;
    }


}

/* smartphones, iPhone, portrait 480x320 phones */ 
@media only screen and (max-width:480px)  { 
    
    /* ********************************* */
    /* section-header */
    /* ********************************* */
    
    #top-header{
        padding: 0.5em 0.5em;
    }

    #top-header p{
        font-size: 0.8rem;
        padding: 0 0.1em;
    }

    #top-header div p{
        font-size: 1rem;
    }
    
    #top-header div i {
        font-size: 1rem;
    }

    #header {
        height: 100px;
        padding: 1em;
    }
            
    #header a p:first-child{
        font-size: 1.2rem;
    }
    
    #header a div p:nth-child(2){
        font-size: 1rem;
    }
    
    #header #logo {
        width: 20%;
    }
    
    #header #logo img{
        height: 60%;
    }
    
    /* ********************************* */
    /* section-navbar */
    /* ********************************* */
    
    nav ul {
        display: none; /* Oculta el menú por defecto */
        flex-direction: column;
        background-color: #f4f4f4; /* Color de fondo opcional para el menú desplegable */
        position: relative;
        top: 0px; /* Ajusta según la altura de tu navbar */
        width: 100%;
        left: 0;
        z-index: 1;
    }

    nav ul li {
        margin: 0.5em 0;
        text-align: center;
    }

    nav ul li:first-child a{ border-left: 1px solid #fff; }
    nav ul li:nth-child(2) a{ border-left: 1px solid #fff; }
    nav ul li:nth-child(3) a{ border-left: 1px solid #fff; }
    nav ul li:nth-child(4) a{ border-left: 1px solid #fff; }
    nav ul li:nth-child(5) a{ border-left: 1px solid #fff; }
    nav ul li:nth-child(6) a{ border-left: 1px solid #fff; }
    nav ul li:nth-child(7) a{ border-left: 1px solid #fff; }

    #menu-icon {
        display: block;
        cursor: pointer;
        font-size: 2rem;
        padding: 0.5em;
        color: #777;
    }

    nav {
        position: relative;
    }
    
    /* Mostrar menú cuando está abierto */
    nav ul.show-menu {
        display: flex;
    }

    /* ********************************* */
    /* section-banner */
    /* ********************************* */    

    #section-banner{
        width: auto;
        height: 330px;
        background-size: 150%;
        animation-play-state: paused;
        padding: 0.5em;
    }
        
    #section-banner h1{
        font-size: 1.2rem;
    }
    
    #section-banner p{
        font-size: 1rem;
    }
    
    #section-banner div{
        margin: 1em 0 0 0;
    
    }
        
    /* ********************************* */
    /* section-aboutme */
    /* ********************************* */  
    
    #section-aboutme-content img{
        width: 100%;
        margin:  2em 0;
    }   

    /* ********************************* */
    /* section-services */
    /* ********************************* */

    article.card-services{
        width: 100%;
        padding: 0.5em;
    }

    article.card-services p{
        font-size: 0.9rem;
    }

    article.card-services i{
        font-size: 1rem;
    }


    /* ********************************* */
    /* section-contact */
    /* ********************************* */

    #section-contact{
        height: 900px;
    }

    #contact-info{
        padding: 1em 0;

        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .card-contact{
        width: 100%;
        margin-top: 2em;
    }

    /* ********************************* */
    /* modal */
    /* ********************************* */
        
    .modal-content {
        width: 80%;
    }

    .modal-content h3{
        font-size: 1.3rem;
    }

    .modal-content p{
        margin: 1em;
        font-size: 0.9rem;
    }

    .means-of-contact a{
        margin-bottom: 1em;
    }

    .means-of-contact a p{
        font-size: 0.7rem;
    }

    /* ********************************* */
    /* footer */
    /* ********************************* */

    footer{
        font-size: 0.8rem;
    } 
}