html, body, h1, h2{
    margin:0;
    padding:0;
}
html{
    font-size:16px;
}
body {
  font-family: system-ui, sans-serif;
}
ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
a {
  color: inherit;
  text-decoration: none;
}
input, button {
    border: none;
    background-color: white;
}

/* search bar, search results */
.search-bar{
    display: flex;
    flex-direction: row;
    align-items: center;
    border: #A2A2A2 2px solid;
    padding-right: 5px;
}

.search-bar input{
    line-height: 25px;
    padding: 0 10px;
    width:250px;
}

input:focus {
  outline: none;
  border: none;
}

.search-results {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 65px;
    right: 27px;
    z-index: 120;
    width: 270px;
    height: max-content;
    padding: 5px 10px;
    background-color: white;
    box-shadow: 0 1px 5px #0003;
}
.search-results.active{
    display:flex;
}
.search-results img{
    width:50px;
    margin-right: 10px;
}
.search-results a{
    border-bottom: 1px solid #ccc6c6;
    padding: 10px;
}

.search-results a:hover{
    background-color: #F0F0F0;
}

.search-results a:last-child {
  border-bottom: none;
}

.result-link.image-link {
    display: flex;
    align-items: center;
}

#menu .search-results{
  left: 50%;
  transform: translateX(-50%); 
  overflow-y: auto;
  scroll-behavior: smooth;
  max-height: 70%;
}

/* menu */
#menu-icon, #menu{
    display:none;
}

.menu-list p {
    margin:0;
    margin: 20px 0 10px;
}
.menu-list{
    display:flex;
    flex-direction: column;
    align-items: center;  
    overflow-y: auto;
    scroll-behavior: smooth;
    max-height: 70%;
    width: 50%;
}

#menu {
  flex-direction: column;
  align-items: center;
  position: fixed;
  z-index: 100;
  width: 100%;
  height: 100%;
  background-color: white;
  transition: opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
  font-size:1.3rem;
  box-shadow: 0 1px 5px #0003;
  padding-top:25px;
}

#menu.active {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.menu-list a {
  font-size: 1.8rem;
  text-decoration: none;
  color: #333;
  margin: 12px 0;
  transition: color 0.2s ease;
}


.menu-list p{
    color: gray;
}
/* header */
header {
    display: flex;
    justify-content: space-between;
    padding:25px;
    background-color: white;
    position:sticky;
    top:0;
    z-index: 100;
    box-shadow: 0 1px 5px #0003;
}

header img {
    width: 100%;
}

#icon-wrapper{
    width: 100px;
}
.nav-category p {
    margin: 0;
}

.head-right, .nav, .nav-category {
    display: flex;
}
.nav{
    gap: 30px;
    margin-right: 30px;
    font-size:1.2rem;
}
.nav-category {
    flex-direction: column;
    align-items: center;
}
.nav-category i{
    font-size: 10px;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 50px; 
  background-color: #fff;
  min-width: 160px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  z-index: 100;
}

.dropdown-content a {
  display: block;
  padding: 10px 15px;
  color: #333;
  text-decoration: none;
}

.dropdown-content a:hover {
  background-color: #f5f5f5;
}

.nav-category:hover .dropdown-content {
  display: block;
}

/* hero */
.hero{
    position: relative;      
    display: block; 
    width:100%;
    height:50vh;
}

.hero-image-tag {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    position: absolute;
    z-index: 1; 
}

.overlay {
    z-index: 2; 
    position: absolute;       
    top: 50%;                 
    left: 50%;                
    transform: translate(-50%, -50%); 
    background-color: rgba(0,0,0,0.5); 
    color: #fff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    max-width: 90%;          
}

/* main */
main{
    background-color: #F0F0F0;
    padding: 30px 0;
}

section.new, section.categories{
    width: 80%;
    margin: 15px auto;
    background-color: white;
    padding: 40px;
}

section.new h2, section.categories h2{
    margin-bottom:30px;
}


.new-image-container, .category-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
}
.new-image-container img{
    width:100%; 
    height:100%;
    object-fit:cover;
}

.category{
    width:100%;
    height:170px;
    background-color: #A6A6A6;
    object-fit: cover;
}

.category-block {
  position:relative;
}

.category-title {
    position:absolute;
    font-size: 1.5rem;
    background-color: rgba(0,0,0,0.5);
    color: white;
    padding: 10px;
    height:70px;
    line-height:70px;
    transform: translate(-50%, -50%);
    top: 50%;
    left: 50%;
    width:max-content;
}


/* footer */
footer{
    color:white;
    background-color: #767676;
    padding: 25px;
    text-align:center;
}
.links{
    display:flex;
    justify-content: center;
    text-align: left;
    gap: 50px;
}

.links a {
    margin-bottom: 10px;
}

.about-links, .contact-links, .blog-links{
    display: flex;
    flex-direction: column;
}


/* Footer*/
@media (max-width: 469px) { 
    .links {
        gap: 10px;
        font-size: 0.9rem;
    }
}

/* menu bar */
@media (max-width: 767px) { 
    .head-right{
        display:none;
    }
    header {
        align-items: center;
    }
     #menu-icon{
        display:block;
        font-size: 25px;
    }

    header + .search-results.active{
        display: none !important;
    }
    .search-results{
        top: 54px;  
    }
}



@media (max-width: 480px) { 
    h1{
        font-size:1.6rem;
    }
    h2{
        font-size: 1.5rem;
    }
    
    header {
        align-items: center;
    }
    .overlay {
        width: 80%;
    }
   
}

@media (min-width: 481px) and (max-width: 767px) { 
    h1{
        font-size:1.7rem;
    }
    h2{
        font-size: 1.6rem;
    }
    .overlay {
        width: 80%;
    }
}

@media (min-width: 768px) and (max-width: 1023px) { 
    h1{
        font-size:1.8rem;
    }
    h2{
        font-size: 1.7rem;
    }
    .overlay {
        width: 60%;
    }
}

@media (min-width: 1024px) and (max-width: 1279px) { 
    h1{
        font-size:1.8rem;
    }
    h2{
        font-size: 1.7rem;
    }
    .overlay {
        width: 45%;
    }
}