@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');


[data-theme="light"] {
   --base-clr: rgb(238, 238, 238);
   --line-clr: #e68837;
   --hover-clr: #cdd6eb;
   --text-clr: #074e9a;
   --accent-clr: #b1630a;
   --secondary-text-clr: #0e142b;
   --nav-clr: rgb(238, 238, 238);
   --header-clr: #679cec;
   --highlight-clr: rgb(30, 45, 67);
    --card-clr: #89b5e8;
}

[data-theme="dark"] {
    --base-clr: #14141b;
    --line-clr: #676f9c;
    --hover-clr: rgb(50, 52, 68);
    --text-clr: #efbf6b;
    --accent-clr: #5573fb;
    --secondary-text-clr: #c7c5f0;
    --nav-clr: #14141b;
    --header-clr: rgb(51, 56, 92);
    --highlight-clr: rgb(65, 82, 152);
    --card-clr: rgb(50, 52, 68);
}

.toggle__container {
    position: absolute;
    padding-left: 0.5rem;
    padding-bottom: 0.5rem;
    bottom: 0;
    float: bottom;
}

#switch {
  padding: 0.2rem 0.4rem;
  transition: all var(--global-transition-time) ease-in-out;
  border-radius: 3rem;
  cursor: pointer;
  color: var(--hover-clr);
  background-color: var(--base-clr);
  border: 0.20rem solid var(--accent-clr);
}

[data-theme="light"] #switch svg:last-child{
    display: none;
}
[data-theme="dark"] #switch svg:first-child{
    display: none;
}

* {
    margin: 0;
    padding: 0;
}

html {
    font-family: Lato, 'sans-serif';
    line-height: 1.5rem;
}

main {
    display: grid;
    
}

.main__container {   
    align-self: start;
    display: grid;
    justify-content: center;

    border: none;
    background-color: #6b7fd724;
    padding: min(2em, 10%);

    h2, p, button {
        
         margin: 0.3em;
         }
         p {
            color: var(--secondary-text-clr)
         }
         span {
                display: flex;
                justify-content: center;
                flex-wrap: wrap;
         }
         button {
            margin-left: 25px;
         }
}

.main__btn {
    width: 120px;
    padding: 8px 16px;
    background-color: var(--accent-clr);
    border: none;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 16px;
    color: #fff;
    cursor: pointer;
}

.main__content {
padding: min(30px, 5%);
}

.container{
    align-self: start;
    display: justify;
    justify-content: center;

    border: 1px solid var(--line-clr);
    border-radius: 1em;
    margin-bottom: 20px;
    padding: min(3em, 15%);

    h2, p {
         margin-top: 1em;
         }
}

.container p{
    color: var(--secondary-text-clr);
}

body{
    min-height: 100vh;
    background-color: var(--base-clr);
  color: var(--text-clr);
    
}

.header {
  overflow: hidden;
  background-color: var(--header-clr);
  padding-top: 20px;
  padding-bottom: none;
  padding-left: 1rem;
  padding-right: 1rem;
  margin-bottom: 20px;
  
  max-height: 100%;
}

.header a {
  float: left;
  color: var(--text-clr);
  text-align: center;
  padding: 12px;
  text-decoration: none;
  font-size: 18px; 
  line-height: 25px;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
}

.header a.logo {
  font-size: 25px;
  font-weight: bold;
}

.header a:hover {
  background-color: var(--card-clr);
}

.header a.active {
  background-color: var(--base-clr);
  color: var(--accent-clr);
}

.header-right {
  float: right;
}

.sub__header {
    display: grid;
    justify-content: center;

    border: none;
    padding: min(2em, 10%);

    h2, p {
         
         margin: 0.3em;
         }
         p {
            color: var(--secondary-text-clr);
         }
}

.bannerNight {
    width: 100%;
    height: 300px;
    object-fit: cover;
    z-index: -1;
}
.bannerDay {
    width: 100%;
    height: 300px;
    object-fit: cover;
    z-index: -1;
}

[data-theme="light"] .bannerNight {
    display: none;
}
[data-theme="dark"] .bannerDay {
    display: none;
}

.bcontainer {
    width: 100%;
    height: 300px;
    position: relative;
}

.bcontainer a {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: black;
    color: white;
    text-decoration: none;
    padding: 12px;
    font-size: 20px;
}

.card__container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.card {
    max-width: 325px;
    background-color: var(--card-clr);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0px 2px 4px rgba(0,0,0,0.2);
    margin: 10px;
}
.card img {
    max-height: auto;
    width: 100%;
}
.card__content {
    padding: 16px;
}
.card__content h3 {
    color:var(--text-clr);
    font-size: 28px;
    margin-bottom: 8px;
}
.card__content p {
    color:var(--secondary-text-clr);
    font-size: 15px;
    line-height: 1.3;
}
.card__content .btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--accent-clr);
    text-decoration: none;
    border-radius: 4px;
    margin-top: 16px;
    color: #fff;
}

#sidebar {
    box-sizing: border-box;
    grid-area: b;
    justify-content: left;
    height: 100vh;
    width: 250px;
    padding: 5px 1em;
    background-color: var(--nav-clr);
    border-right: 1px solid var(--line-clr);

    position: sticky;
    float: left;
    top: 0;
    align-self: start;
    transition: 300ms ease-in-out;
    overflow: hidden;
    text-wrap: nowrap;
}
#sidebar.close{
    padding: 5px;
    width: 58px;
}
#sidebar ul{
    list-style: none;
}
#sidebar > ul > li:first-child{
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
    .logo {
        font-weight: 600;
    }
}
#sidebar ul li.active a {
    color: var(--accent-clr);

    svg{
        fill: var(--accent-clr);
    }
}

#sidebar a, #sidebar .dropdown-btn, #sidebar .logo {
    border-radius: .5em;
    padding: .85em;
    text-decoration: none;
    color: var(--text-clr);
    display: flex;
    align-items: center;
    gap: 1em;

}

.dropdown-btn {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    font: inherit;
    cursor: pointer;
}

#sidebar svg {
    flex-shrink: 0;
    fill: var(--text-clr);
}
#sidebar a span, #sidebar .dropdown-btn span {
    flex-grow: 1;
}
#sidebar a:hover, #sidebar .dropdown-btn:hover {
    background-color: var(--hover-clr);
}
#sidebar .sub-menu {
    display: grid;
    grid-template-rows: 0fr;
    transition: 300ms ease-in-out;

    > div {
        overflow: hidden;
    }
}
#sidebar .sub-menu.show {
    grid-template-rows: 1fr;
}
.dropdown-btn svg{
    transition: 200ms ease;
}
.rotate svg:last-child {
    rotate: -180deg;
}
#sidebar .sub-menu a {
    padding-left: 2em;
}
#toggle-btn {
    margin-left: auto;
    padding: 1em;
    border: none;
    border-radius: .5em;
    background: none;
    cursor: pointer;

    svg {
        transition: rotate 150ms ease;
    }
}
#toggle-btn:hover {
    background-color: var(--hover-clr);
}


@media(max-width: 800px){
    
    body{
        grid-template-columns: 1fr;
    }

    .main__content {
        padding: 2em 1em 60px 1em;
    }
    .main__container {
        display: absolute;
        padding: 2em 1em 60px 1em;

        span {
            display: grid;
            padding: 0;
        }
        button {
            margin: 0;
        }
    }
    .container{
        border: none;
        padding: 0;
    }

    #sidebar{
        height: 60px;
        width: 100%;
        border-right: none;
        border-top: 1px solid var(--line-clr);
        padding: 0;
        position: fixed;
        top: unset;
        bottom: 0;
        z-index: 999;

        > ul{
            padding: 0;
            display: grid;
            grid-auto-columns: 60px;
            grid-auto-flow: column;
            align-items: center;
            overflow-x: scroll;
        }
        ul li{
            height: 100%;
        }
        ul a, ul .dropdown-btn{
            width: 60px;
            height: 60px;
            padding: 0;
            border-radius: 0;
            justify-content: center;

        }        
            .toggle__container {
                position: relative;
                padding: 1rem;
                padding-left: 5rem;
                bottom: 5px;
                float: none;
            }

        ul li span, ul li:first-child, .dropdown-btn svg:last-child{
            display: none;
        }
        ul li .sub-menu.show{
            position: fixed;
            bottom: 60px;
            left: 0;
            box-sizing: border-box;
            height: 60px;
            width: 100%;
            background-color: var(--hover-clr);
            border-top: 1px solid var(--line-clr);
            display: flex;
            justify-content: center;
            
            > div{
                overflow-x: auto;
            }
            li{
                display: inline-flex;
            }
            a{
                box-sizing: border-box;
                padding: 1em;
                width: auto;
                justify-content: center;
            }
            a:hover{
                background: #7f7dd19c;
            }

            .header {
                overflow: hidden;
                padding: 20px 10px;
                max-height: 6rem;
                }

              .header a {
                    float: none;
                    display: block;
                    text-align: left;
                }
                
                .header-right {
                    float: none;
                }
                   
        }
    }
}