/* Structure */
:root{
    --main-background-color: grey;
    --primary-color: cornflowerblue;
    --gallery-color: white;
}

body {
    background: var(--main-background-color);
    font-family: Arial, Helvetica, sans-serif;
}

#content {
    background:white;
    width:70%;
    margin:auto; /* center */
    border-radius:5px;
 
}

header, footer {
    background: var(--primary-color);
    color:white;
    position: relative;
    padding: 20px 0;
}

main {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 20px;
}


/*Playing With Position*/
#logo{
   float: left;
   height: 75px;
   width: 75px;
   position: absolute;
   top: 10px;
   left: 10px;
}


/* Navigation */

#main-nav ul {
    padding-left:0;
}

#main-nav li {
    list-style-type: none;
    text-align: center;
    border-bottom:1px solid white;
}

#main-nav li {
    background: var(--gallery-color);
}


#main-nav a {
    color:black;
    text-decoration: none;  /* remove the underlines */
    border-bottom:1px solid transparent;
}

#main-nav a:hover {
    border-bottom:1px solid black;
}

#main-nav a:hover{
    color: crimson;
}

/* Typography */
header h1 {
    text-align: center;
}

footer p {
    text-align:center;
}

main {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}
.grid-wrapper {
    text-align: center;
    max-width: 1000px; /* Increased width to ensure 4 columns fit */
    width: 100%;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Ensures flexibility */
    gap: 20px;
    text-align: center;
    width: 100%;
    flex-wrap: wrap;
}


.grid-item img {
    width: 200px;
    height: 200px;
    height: auto;
    border-radius: 8px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
}

.grid-item p {
    margin-top: 10px;   
    font-size: 14px;
    color: #333;
}
/* Larger screens */

@media only screen and (min-width: 768px) { 
    .columns {
        display:flex;
    }

    #main-nav li {
        flex:1;
    }

    #main-nav li:not(:last-child) {
        border-right: 1px solid white;
    }
    
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media screen and (max-width: 480px) {
    .grid-container {
        grid-template-columns: repeat(1, 1fr);
        display: flex;
        flex-direction: column;
        align-items: center; /* Center items */
    }
    
    .grid-item {
        width: 100%; /* Ensures full width */
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}