/* RESET CSS */
:root {
    --main-font: sans-serif;
    --font-size: 16px;
    --main-color: #f7df1e;
    --second-color: #222;
    --main-modal-color: rgba(247,222,30,0.85);
    --second-modal-color: rgba(34,34,34,0.85);
    --container-width: 1200px;
}

/* RESETEO BASICO */

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

*,
*:before,
*:after {
    box-sizing: inherit;
}
body {
    margin:0;
    overflow-x: hidden;
}

img{
    max-width: 100%;
    height: auto;
}

/* MENU HAMBURGUESA */

.header {
    position: sticky;
    z-index: 997;
    top: 0;
    padding: 1rem;
    background-color: var(--main-color);
    color: var(--second-color);
}

.header h1 {
    margin: 0 auto;
    text-align: center;
}

.section {
    padding: 2rem;
    padding-top: 6rem;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: var(--container-width);
    min-height: 100vh;
    text-align: center;
}
.panel {
    position: fixed;
    z-index: 998;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    overflow-y: auto;
    background-color: var(--second-modal-color);
    transition: transform 0.3s ease;
    /* comando para que el panel salga de arriba */
    /* transform: translate(0,-100%); */
    /* comando de la izquiera */
    /* transform: translate(0,100%); */
    /* comando para que panel salga de abajo */
    transform: translate(0,100%);
}
.panel.is-active {
    transform: translate(0,0);
}
.panel-btn {
    position: fixed;
    z-index: 999;
    bottom: 1vh;
    right: 1vw;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--main-color);
}

.menu {
    width: inherit;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    text-align: center;
}
.menu a {
    padding: 2rem;
    width: inherit;
    display: block;
    font-size: 1.5rem;
    text-decoration: none;
    color: var(--main-color);
    transition: all 0.3s ease;
}
.menu a:hover {
    font-weight: bold;
    color: var(--second-color);
    background-color: var(--main-modal-color);
}

/* EVENTOS DEL TECLADO */

.stage {
    display: flex;
    min-height: 50vh;
    background-color: var(--second-color);
}
.ball {
    margin: auto;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background-color: var(--main-color);
}

/* SCROLL TOP BUTTON */

.scroll-top-btn {
    position: fixed;
    z-index: 999;
    bottom: 1vh;
    right: calc(4.25rem + 1vw);
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    font-size: 2rem;
    font-weight: bold;
    background-color: var(--main-color);
    color: var(--second-color);
    cursor: pointer;
    outline: 0;
    border: 0;
    transition: all 0.3s ease-out;
}
.scroll-top-btn:hover {
    background-color: var(--second-color);
    color: var(--main-color);
}
.hidden {
    visibility: hidden;
    opacity: 0;

}

/* DARK-THEME-BUTTON */

.dark-theme-btn {
    position: fixed;
    z-index: 999;
    bottom: 1vh;
    left:1vw;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    font-size: 2rem;
    font-weight: bold;
    background-color: var(--main-color);
    color: var(--second-color);
    cursor: pointer;
    outline: 0;
    border: 0;
    transition: all 0.3s ease-out;
}
.dark-theme-btn:hover {
    background-color: var(--second-color);
    color: var(--main-color);
}

.dark-mode {
    background-color: var(--second-color);
    color: var(--main-color);
}

/* NETWORK STATUS */

.online,
.offline {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    background-color: #1b5e20;
    color: #fff;
}
.offline {
    background-color: #b71c1c;
}

/* SEARCH FILTERS */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.card {
    background-color: var(--second-color);
    color: var(--main-color);
    transition: all 0.3s ease-out;
}
.card img {
    width: 100%;
    height: auto;
}
.card figcaption {
    padding: 1rem;
}
.filter {
    visibility: hidden;
    opacity: 0;
    order: 1;
}

/* RESPONSIVE SLIDER */

.slider {
    position: relative;
    width: 80%;
    margin: 1rem auto;
    text-align: center;
}
.slider-slides {
    position: relative;
    height: 400px;
}

.slider-slide {
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease;
}
.slider-slide img {
    height: inherit;
    width: inherit;
    object-fit: cover;
    object-position: 50% 0%;
}
.slider-slide.active {
    opacity: 1;
    visibility: visible;
}
.slider-btns {
    position: absolute;
    width: 100%;
    top: 50%;
    display: flex;
    justify-content: space-between;
    font-size: 3rem;
    font-weight: bold;
}
.slider a {
    display: block;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    border: thin solid black;
    text-decoration: none;
    background-color: #fff;
    color: #000;
    transition: all 0.3s ease;
}
.slider a:hover {
    color: #4d4d4d;
}

/* SrollSpy */

@media screen and (min-width: 1024px) {
    body {
        display: grid;
        grid-template-columns: 79% 21%;
        grid-template-rows: 4rem auto;
        grid-template-areas: 
        "header header"
        "main panel";
    }
    main {
        grid-area: main;
    }
    .header {
        grid-area: header;
    }
    .panel {
        grid-area: panel;
        background-color: var(--second-color);
        justify-content: flex-start;
        align-self: start;
        position: sticky;
        top: 4rem;
        transform: translate(0,0);
        opacity: 1;
        visibility: visible;

    }
    
    .panle-btn {
        display: none;
    }
    .menu{
        justify-content: start;
        text-align: right;
    }
    .menu a {
        font-size: 1rem;
        padding: 1.2rem;
    }
    .menu a:hover,
    .menu a.active {
        color: var(--second-color);
        background-color: var(--main-color);
    }
    .scroll-top-btn {
        right: initial;
        left: calc(4.25rem + 1vw );
    }
}
