/* ***** Custom Properties ***** */

:root {
    --color-fondo: #153958;
    --color-alpha-fondo: rgba(21, 57, 88, 0.75);
    --color-letras: #f5fed0;
    --color-cajas: #2f9e82;
    --color-secundrio: #628283;
    --color-terciario: #a3c3a8;    
    --black-alpha-color: rgba(0, 0, 0, 0.5);
    --gray-color: #ccc;
    --gray-dark-color: #666;
    --white-color: #fff; 
    --gray-light-color: #f3f3f3; 
    --title-color: #242424;
    --font: "Raleway", sans-serif;
    --max-width: 1200px;
    --header-height: 4rem;

}

/* ***** Reset ***** */

html {
    box-sizing: border-box;
    font-family: var(--font);
    font-size: 16px;
    scroll-behavior: smooth;
}

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

body {
    margin: 0;
    overflow-x: hidden;    
}

a {
    color: var(--color-terciario);
    transition: all 0.5s ease-out;
}

a:hover {
    opacity: 0.75;
}

h1 {
    margin: 0;
    font-size: 2rem;
}
h2 {
    margin: 0;
    font-size: 1.5rem;
}
h3 {
    margin: 0;
    font-size: 1.25rem;
}
h4 {
    margin: 0;
    font-size: 1rem;
}
h5 {
    margin: 0;
    font-size: 0.85rem;
}
h6 {
    margin: 0;
    font-size: 0.7rem;
}
img {
    max-width: 100%;
    height: auto;
}
p {
    line-height: 20px;
}

/* ***** Components ***** */

/* ***** Contact Form ****** */

.contact-form {
    margin: 2rem auto;
    padding: 1rem;
    max-width: 800px;
}

.contact-form > *{
    padding: 0.5rem;
    margin: 1rem auto;
    display: block;
    width: 100%;
}

.contact-form input,
.contact-form textarea {
    font-size: .85rem;
    font-family: var(--font);
}

.contact-form input {
    border: 0;
    padding-left: 0;
    border-bottom: thin solid var(--gray-dark-color);
}

.contact-form textarea {
    border: thin solid var(--gray-dark-color);
    resize: none;
}

.contact-form input[type="submit"] {
    margin-top: 0;
    cursor: pointer;
    transition: all .5s ease-out;
}

.contact-form input[type="submit"]:hover {
    opacity: .75;
}

.contact-form *::placeholder {
    color: var(--gray-dark-color);
}

.contact-form-response {
    padding: 1rem;
    width: 400px;
    text-align: center;
    background-color: var(--white-color);
}

.contact-form-response svg {
    margin-top: 2rem;
    width: 4rem;
    height: 4rem;
    fill: var(--color-fondo);
}

.modal#gracias:target {
    opacity: 1;
    pointer-events: auto;
}

@media screen and (min-width: 1024px) {
    .contact-form {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        column-gap: 1rem;
    }

    .contact-form input,
    .contact-form textarea {
    font-size: 1rem;    
    }

    .contact-form textarea,
    .contact-form-loader {
        grid-column: span 2;
    }

    .contact-form input[type="submit"] {
        margin-left: 0;
    }
}

/* ***** Heroimage ***** */

.hero-image-1 {
    background-image: url(../img/hero-2.jpg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    background-attachment: var(--hero-attachment);
}

.hero-image-opacity {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;    
    text-align: center;
    background-color: var(--hero-opacity-color);
}

.hero-image-title {
    font-size: 7.5vw;
    color: var(--hero-text-color);
}

/* ***** Menu ***** */

.menu-btn {
    outline: thin solid var(--color-letras);
    background-color: var(--color-letras);
    border: 0;
    cursor: pointer;
    display: flex;
    padding: .4rem;
}
.menu {
    position: fixed;
    left: 0;
    bottom: var(--header-height);
    width: 100%;
    background-color: #000000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}
.menu.is-active {
    opacity: 1;
    pointer-events: auto;
}
.menu a {
    padding: 1.5rem;
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    color: var(--color-fondo);
    text-align: center;
}
.menu a:hover {
    color: var(--color-letras);
    background-color: var(--color-fondo);
}
.menu-btn svg {
    fill: var(--color-fondo);
}

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

    .menu {
        position: static;
        opacity: 1;
        pointer-events: auto;
        width: auto;
        flex-direction: row;
    }
    .menu a {
        padding: 0 1rem;
        color: var(--color-letras);
    }
    .menu a:last-child {
        padding-right: 0;
    }
    .menu {
        background-color: transparent;
    }
    .menu a:hover{
        background-color: transparent;
        color: var(--color-cajas);
    }
}

/* ***** Modal ***** */

.modal {
    position: fixed;
    z-index: 999;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--black-alpha-color);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: all 1s;
}

.modal-content {
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: .5rem;
}

.modal-close svg {
    width: 2.5rem;
    height: 2.5rem;
    fill: var(--color-fondo);
}

.modal[id^="trabajo-"]:target {
    opacity: 1;
    pointer-events: auto;
}

/* ***** Tarjetas cards ***** */

.contact-card svg path {
    fill: var(--color-fondo);
}


/* ***** ProgressBar ***** */

progress {
    width: 100%;
    height: 1rem;
    background-color: var(--gray-color);
}

progress::-webkit-progress-bar {
    background-color: var(--gray-color);
}

progress::-webkit-progress-value {
    background-color: var(--gray-dark-color);
}

progress::-moz-progress-bar {
    background-color: var(--gray-dark-color);

}

.progress {
    margin: 1rem auto;
}

.progress > p {
    margin: 0;
    display: flex;
    justify-content: space-between;
    font-size: .85rem;
}



/* ***** Utilities ***** */

.bg-gray-light {
    background-color: var(--gray-light-color);
}

.box-shadow-1 {
    box-shadow: .25rem .25rem 1rem rgba(0, 0, 0, 0.25);
}

.btn {
    border-radius: .5rem;
    padding: 1rem;
    display: inline-block;
    width: 200px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    color: var(--color-letras);
    background-color: var(--color-fondo);
    margin-top: .25rem;
}

.container {
    margin-left: auto;
    margin-right: auto;    
    max-width: var(--max-width);
}

.gray-scale {
    /*filter: grayscale(1);*/
    border-radius: .3rem
}

.none {
    display: none;
}

.section {
    padding: 2rem 1rem;
}

.section-title {
    border-top: thin solid var(--color-fondo);
    border-bottom: thin solid var(--color-fondo);
    margin: 2rem auto;
    padding: .5rem 1rem;
    text-align: center;
    color: var(--title-color);
    width: 250px;

}

.text-center{
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

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

    .full-lg-screen {
        width: 100%;
        min-height: 100vh;
    }

    .text-lg-center{
        text-align: center;
    }
    
    .text-lg-left {
        text-align: left;
    }
    
    .text-lg-right {
        text-align: right;
    }
}

/* ***** Site Styles ***** */

.about > article {
    margin-bottom: 2rem;
}

.contact-card {
    margin: 1rem auto;
    padding: 1rem;
    width: 100%;
    height: 144px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
}

.contact-card > svg {
    fill: var(--color-fondo);
    width: 2rem;
    height: 2rem;
}

.contact-card > small {
    margin-top: -.7rem;
}

.footer {
    background-color: #242424;
    color: var(--color-letras);
    text-align: center;
    padding: .5rem;
    margin-bottom: var(--header-height);
}

.header {
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 999;
    width: 100%;
    padding: 1rem;
    height: var(--header-height);
    background-color: var(--color-fondo);
}

.header > .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    color: var(--color-letras);
    font-weight: bold;
    font-size: 2rem;
    text-decoration: none;
}

.porfolio-card {
    position: relative;
    width: 100%;
    margin: 0 auto;
    display: block;
    height: 400px;
}

.porfolio-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.porfolio-card-info {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 1rem;
    background-color: var(--color-alpha-fondo);
    color: var(--color-letras);
    pointer-events: none;
    opacity: 0;
    transition: all .5s ease-in-out;
}

.porfolio-card:hover .porfolio-card-info{
    opacity: 1;
    pointer-events: auto;
}

.porfolio-card-info > div {
    padding: 1rem;
    border: thin solid var(--white-color);
    width: 100%;
    height: 100%;  
    border-radius: .1rem;  
}

.porfolio-modal {
    background-color: var(--white-color);
    padding: 1rem;
    max-width: 380px;
    display: flex;
    flex-direction: column;    
}

.porfolio-modal img {
    width: 260px;
    height: 100%;
    margin: auto;
}

.porfolio-modal h3 {
    border-bottom: medium solid var(--color-fondo);
    padding: .5rem 0;
    margin: 1rem auto;
    color: var(--title-color);
}

.porfolio-details {
    display: grid;
    grid-template-columns: 40% 60%;
    grid-auto-rows: 2rem;
}

.porfolio-details b {
    color: var(--color-fondo);
}

.service-card {
    margin: 1rem auto;
    padding: 1rem;
    text-align: center;   
}

.service-card h3 {
    color: var(--title-color);
}

.service-card svg {
    margin-bottom: 1.25rem;
    fill: var(--color-fondo);
}

.social-media a {
    text-decoration: none;
    padding: 0 .4rem;
}

.social-media svg {
    width: 1.5rem;
    height: 1.5rem;
}

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

    .contact-cards {
        display: grid;
        grid-template-columns: repeat(2, 48%);
        justify-content: space-between;
    }

    .porfolio > .container {
        display: grid;
        grid-template-columns: repeat(2, 50%);    
    }

    .porfolio-modal {
        flex-direction: row;
        max-width: 800px;
    }

    .porfolio-info {
        margin-left: 1rem;
        align-self: center;
    }

    .porfolio .section-title {
        grid-column: span 2;
    }

    .services > .container {
        display: grid;
        grid-template-columns: repeat(2, 40%);
        justify-content: space-evenly;
        align-content: center;
    }

    .services .section-title {
        grid-column: span 2;
    }
}

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

    .contact-cards {
        grid-template-columns: repeat(4, 24%);    
    }

    .footer {
        margin-bottom: 0;
    }

    .about {
        display: grid;
        grid-template-columns: repeat(3, 30%);
        justify-content: space-between;
        align-content: center;
    }

    .header {
        position: sticky;
        top: 0;
        padding: 0.5rem 1rem;
        height: cal(var(--header-height) - 0.5rem);
    }

    .porfolio > .container {        
        grid-template-columns: repeat(2, 50%);         
    }

    .services > .container {         
        grid-template-columns: repeat(2, 30%);        
    }

}

@media screen and (max-width:768px){
    .porfolio-card img {
        width: 100%;
        height: 250px;        
    }
    .porfolio-card {      
        height: 250px;
    }

    .porfolio-card p {
        display: -webkit-box;
        max-height: 150px;
        -webkit-line-clamp: 7;
        -webkit-box-orient: vertical;
        -moz-line-clamp: 7;
        -moz-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media screen and (max-width: 424px){
    .porfolio-modal {
        max-width: 320px;
    }

    .modal-close svg {
        width: 2rem;
        height: 2rem;    
    }

    .modal-close {      
        right: 0rem;
    }
}