@import url('https://fonts.googleapis.com/css2?family=Barlow+Semi+Condensed:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Karla:ital,wght@0,200..800;1,200..800&family=Manrope:wght@200..800&family=Overpass:ital,wght@0,100..900;1,100..900&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&family=Rubik:ital,wght@0,300..900;1,300..900&family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&family=Work+Sans:ital,wght@0,100..900;1,100..900&display=swap');

body {
    font-family: "Inter";
    background-color: hsl(36, 100%, 99%);
    padding: 1.875rem;
}

p {
    font-size: 0.9375rem;
    line-height: 1.5625rem;
}

h1 {
    color: hsl(240, 100%, 5%);
    font-weight: 800;
    font-size: 3.125rem;
}

h2 {
    color: hsl(35, 77%, 62%);
    margin-bottom: -1.25px;
}

hr {
    color: hsl(236, 13%, 42%);
    width: 95%;
}

/* nav */

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

.nav-ul {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.nav-ul li, .sidebar li {
    list-style-type: none;
    justify-content: space-between;
    padding: 0.625rem;
    cursor: pointer;
}

.nav-ul li:hover {
    color: hsl(35, 77%, 62%);
}

.sidebar {
    display: flex; /* Ensure it's always in the DOM */
    position: fixed;
    top: 0;
    right: 0;
    width: 50%;
    height: 100vh;
    background-color: hsl(36, 100%, 99%);
    box-shadow: -4px 0 10px rgba(0, 0, 0, 0.2);
    z-index: 2;
    transform: translateX(100%); /* Start hidden off-screen */
    flex-direction: column;
    justify-content: center;
    margin: 0;
}

.sidebar li {
    font-size: 1.5625rem;
}

.sidebar.visible {
    transform: translateX(0); /* Slide in when visible */
}
    
/* divs*/

.main-and-side-grid {
    display: grid;
    grid-template-columns: 2.25fr 0.75fr;
    grid-template-rows: 1fr;
    column-gap: 0.625rem;
    margin-bottom: 1.875rem;
}

.main-grid {
    display: grid;
    grid-template-columns: 2fr;
    grid-template-rows: 1fr 1fr;
    height: 37.5rem;
    padding: 0.625rem;
}

.main-grid-text {
    display: flex;
    flex-direction: row;
    column-gap: 0.625rem;
}

.side-grid {
    background-color: hsl(240, 100%, 5%);
    padding: 0.625rem;
    display: flex;
    flex-direction: column;
    height: 37.5rem;
    justify-content: space-between;
    margin: 0.625rem;
    padding-left: 20px;
}

.numbered-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr;
    padding: 0.625rem;
}

.numbered-grid-item {
    display: flex;
    flex-direction: row;
    column-gap: 1.25rem;
    grid-template-columns: 1fr 2fr;
}

/* text */

.side-grid-heading {
    font-weight: 800;
    color: hsl(233, 8%, 79%);
    cursor: pointer;
}

.side-grid-heading:hover {
    color: hsl(35, 77%, 62%);
}

.number {
    color: hsl(5, 85%, 63%);
    font-weight: 800;
}

.numbered-grid-heading {
    font-weight: 800;
    color: hsl(240, 100%, 5%);
    cursor: pointer;
}

.numbered-grid-heading:hover {
    color: hsl(5, 85%, 63%);
}

.summary {
    color: hsl(236, 13%, 42%);
}

/* buttons */

.read-more-btn {
    letter-spacing: 0.125rem;
    text-transform: uppercase;
    border: none;
    background-color: hsl(5, 85%, 63%);
    font-weight: 800;
    padding: 0.625rem 0.9375rem;
}

.read-more-btn:hover {
    color: hsl(36, 100%, 99%);
    background-color: hsl(240, 100%, 5%);
    font-weight: 400;
}

/* images */

.menu-icon {
    display: none;
    z-index: 3;
}

.main-grid-img {
    height: 18.75rem;
    width: 100%;
    object-fit: cover;
    object-position: center;
}

.numbered-grid-img {
    width: 90px;
    object-fit: contain;
    object-position: center;
}

/* overlay */
.overlay {
    position: fixed;
    display: none;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 1;
  }

/* attribution */

.attribution {
    font-size: 0.6875rem;
    text-align: center;
    position: fixed;
    bottom: 0;
    right: 0.625rem;
    text-align: center;

}

.attribution a {
    color: hsl(228, 45%, 44%);
}

@media (min-width: 2000px) {
    body {
        padding: 6.25rem;
    }
}

@media (max-width: 800px) {
    .main-and-side-grid {
        grid-template-rows: 1fr 0.75fr;
        grid-template-columns: 1fr;
        row-gap: 0.625rem;
        margin-bottom: 1.875rem;
        width: 100%;
    }

    .main-grid-img {
        src: "./assets/images/image-web-3-mobile.svg";
    }

    .main-grid-text {
        flex-direction: column;
        row-gap: 0.625rem;
    }

    .numbered-grid {
        grid-template-rows: 1fr 1fr 1fr;
        grid-template-columns: 1fr;
        
    }

    .numbered-grid-item {
        row-gap: 1.25rem;
        grid-template-rows: 1fr 2fr;
    }

    .nav-ul {
        display: none;
    }

    .menu-icon {
        display: inline;
    }
}