/* General Reset */
body {
    font-family: "Inter", sans-serif;
    background-color: #ffffff;
    margin: 0;
    padding: 0;

    overflow-x: hidden;
}

.navbar {
    position: sticky;
    top: 0;
    box-shadow: 0 0 10px white;
    z-index: 4;
    display: flex;
    margin-top: 10px;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    /* background: green; */
    background: white;
}

.desktop-logo {
    display: none;
}


.nav-links {
    display: none;
}

/* mobile navbar */

#menu li a {
    text-decoration: none;
    color: #1E1E23;
    opacity: 1;
    font-family: 'work sans', sans serif;
    font-size: 1.5em;
    font-weight: 400;
    transition: 200ms;
}

#menu a:hover {
    opacity: 0.5;
}

#menu {
    padding: 0;
    list-style-type: none;
}


.menu-nav {
    /* background-color: #1E1E23; */
    height: 65px;
}


#menuToggle {
    display: flex;
    flex-direction: column;
    position: relative;
    top: 25px;
    left: 25px;
    z-index: 1;
    -webkit-user-select: none;
    user-select: none;
}

#menuToggle input {
    display: flex;
    width: 40px;
    height: 32px;
    position: absolute;
    cursor: pointer;
    opacity: 0;
    z-index: 2;
}

#menuToggle span {
    display: flex;
    width: 29px;
    height: 2px;
    margin-bottom: 5px;
    position: relative;
    background: black;
    border-radius: 3px;
    z-index: 1;
    transform-origin: 5px 0px;
    transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0),
        background 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0),
        opacity 0.55s ease;
}

#menuToggle span:first-child {
    transform-origin: 0% 0%;
}

#menuToggle span:nth-last-child(2) {
    transform-origin: 0% 100%;
}

#menuToggle input:checked~span {
    opacity: 1;
    transform: rotate(45deg) translate(-3px, -1px);
    background: #36383F;
}

#menuToggle input:checked~span:nth-last-child(3) {
    opacity: 0;
    transform: rotate(0deg) scale(0.2, 0.2);
}

#menuToggle input:checked~span:nth-last-child(2) {
    transform: rotate(-45deg) translate(0, -1px);
}

#menu {
    position: absolute;
    width: 180px;
    height: 400px;
    box-shadow: 0 0 10px #85888C;
    margin: -50px 0 0 -50px;
    padding: 50px;
    padding-top: 125px;
    background-color: #F5F6FA;
    -webkit-font-smoothing: antialiased;
    transform-origin: 0% 0%;
    transform: translate(-100%, 0);
    transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0);
}

#menu li {
    padding: 10px 0;
    transition-delay: 2s;
}

#menuToggle input:checked~ul {
    transform: none;
}

/* Search Section */
.search-container {
    min-height: 60vh;
    margin: 0 10px 0 10px;
    padding-bottom: 20px;
    flex-direction: column;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    text-align: center;
    border-radius: 10px;
    background: linear-gradient(to right, #333, #000);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.search-container h3 {
    color: #fff;
    font-size: 1.7em;
    /* margin-bottom: 40px; */
    width: 70%;
    line-height: 1.4;
}

.search-box {
    display: flex;
    /* display: none; */
    align-items: center;
    justify-content: center;
    /* padding-bottom: 30px; */

    width: 80%;
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 18px;
    outline: none;
    font-size: 16px;
}

.search-button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    margin-left: -45px;
    outline: none;
    display: flex;
}

/* Articles Section */
.articles-container {
    /* margin: 50px; */
    text-align: center;
}

.articles-container h2 {
    font-size: 2.5em;
    margin: 50px 40px 20px;
    color: #000;
    /* width: 70vw; */
}

.articles-list {
    display: flex;
    justify-content: center;
    gap: 35px;
    flex-wrap: wrap;
}

.article-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    width: 300px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}


.article-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.article-details {
    padding: 0 15px 0 15px;
    text-align: left;
}

.article-details h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #1c1c1c;
}

.article-details .meta {
    font-size: 0.9em;
    color: #777;
    margin-bottom: 10px;
}

.article-details .meta .author,
.article-details .meta .category,
.article-details .meta .time {
    font-weight: bold;
    color: #444;
}

.article-details .description {
    font-size: 1em;
    color: #666;
    margin-bottom: 15px;
}

.click-card {
    text-decoration: none;
}

/* .article-details .read-more {
    display: inline-block;
    padding: 10px 20px;
    background: #1c1c1c;
    color: #fff;
    border-radius: 5px;

} */


/* Explore Articles Button */
.explore-articles-button {
    display: inline-block;
    /* margin: 60px; */
    padding: 10px 20px;
    background: #000;
    color: white;
    text-decoration: none;
    font-size: 1.5em;

    border-radius: 5px;

    margin-top: 40px;
}


/* ------------ */



/* Author Spotlight Section */
.author-spotlight-container {
    margin: 40px;
    text-align: center;
}

.author-spotlight-container h2 {
    font-size: 2.5em;
    margin-top: 50px;
    margin-bottom: 20px;
    color: #000;
}

.author-spotlight {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.author-spotlight a {
    text-decoration: none;
}

.author-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    width: 250px;
    padding: 20px;
    text-align: center;

}


.author-card img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 0px;
}

.author-card h3 {
    font-size: 1.5em;
    margin-bottom: 0px;
    color: #1c1c1c;
}

.author-card p {
    font-size: 1.1em;
    color: #666;
}

/* Categories Section */
.categories-container {
    margin: 40px;
    text-align: center;
}

.categories-container h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #1c1c1c;
}

.categories-list {
    display: flex;
    justify-content: center;
    flex-flow: row;
    gap: 20px;
    flex-wrap: wrap;
}

.category-card {

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    width: 70px;
    /* height: ; */
    padding: 20px;
    text-align: center;
}


.category-card img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    /* margin-bottom: 15px; */
}

.category-card h3 {
    font-size: 1.4em;
    margin-top: 10px;
    margin-bottom: 0;
    color: #1c1c1c;
}



/* Newsletter Signup Section */
.newsletter-container {
    margin: 10px;
    text-align: center;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.newsletter-container h2 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #1c1c1c;
}

.newsletter-container p {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 20px;
}

.newsletter-form {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.newsletter-input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
    outline: none;
}

.newsletter-button {
    margin: 10px;
    padding: 10px 20px;
    background: #1c1c1c;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s ease;
}

.newsletter-button:hover {
    background: #555;
}

/* About Section */
.about-container {
    margin: 40px 10px 40px 10px;
    text-align: left;
    background: #f4f4f4;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.about-container h2 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #1c1c1c;
}

.about-container p {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.6;
}

/* /footer */

.footer {
    /* border: 1px solid black; */
    padding: 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    background-color: #fff;
}

.footer div {
    margin: 10px;
}

.newsletter {
    flex: 1;
    min-width: 250px;
}

.newsletter input {
    margin: 10px;
    padding: 8px;
    width: 200px;
    border: 1px solid #ccc;
}

.newsletter button {
    padding: 8px;
    background: #000;
    color: #fff;
    border: none;
    cursor: pointer;
}

.links,
.resources,
.social {
    flex: 1;
    min-width: 150px;
}

.links p a,
.resources p a {
    display: block;
    text-decoration: none;
    color: black;
}

.social a {
    display: block;
    text-decoration: none;
    color: black;
    margin-bottom: 5px;
}

.footer-bottom {
    text-align: center;
    padding: 10px;
    font-size: 14px;
}

.footer-bottom a {
    margin: 0 10px;
    text-decoration: none;
    color: black;
}

.search-preview {
    position: absolute;
    display: none;
}

.search-box:focus-within+.search-preview {
    display: block;
}

.suggestions-box {
    background: white;
    border: 1px solid #ccc;
    max-height: 250px;
    overflow-y: auto;
    width: 100%;
    z-index: 1000;
    top: 100%;
    left: 0;
}

.suggestions-box ul li a {
    display: block;
    padding: 10px;
    color: #1c1c1c;
    text-decoration: none;
}

.suggestions-box ul li a:hover {
    background-color: #f0f0f0;
}

mark {
    background-color: yellow;
    padding: 0 2px;
    border-radius: 2px;
}



/* Overlay with blur effect */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(4px);
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Popup box */
.popup-box {
    background: #fff;
    padding: 30px 24px;
    border-radius: 12px;
    text-align: center;
    max-width: 350px;
    width: 90%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    position: relative;
}

/* Tablet View */
@media (min-width: 768px) {
    .search-container h3 {
        font-size: 3em;
    }

    .desktop-logo {
        display: block;
    }

    .mobile-logo {
        display: none;
    }

    .unique-article-card {
        width: 600px;
    }
}

/* Desktop View */
@media (min-width: 1024px) {

    .navbar {
        justify-content: space-around;
    }

    .nav-links li {
        display: inline;
    }

    .nav-links a {
        text-decoration: none;
        color: rgb(0, 0, 0);
        border-radius: 5px;
        transition: background 0.3s ease;
    }

    .menu-nav {
        display: none;
    }

    .nav-links {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        font-weight: 400;
        font-size: 1.3em;
        color: grey;
    }

    .nav-links li {
        padding: 0 .5em .25em;
        cursor: pointer;
        position: relative;
        overflow: hidden;
        transition: .3s;
    }

    .nav-links li:hover {
        color: #fff;
    }

    .nav-links li:before {
        content: "";
        position: absolute;
        inset: calc(100% - 3px) 0 0 0;
        /* 3px = the thickness */
        background: #ffd500;
        /* the color */
        scale: 0 1;
        transition: .3s, translate 0s .3s;
    }

    .nav-links:hover li:before {
        scale: 1;
    }

    .nav-links li:hover:before {
        translate: 0;
        transition: .3s;
    }

    .nav-links:hover li:has(~ li:hover):before {
        translate: 100% 0;
        transition: .2s .2s, scale 0s .4s;
    }

    .nav-links:hover li:hover~li:before {
        translate: -100% 0;
        transition: .2s .2s, scale 0s .4s;
    }

    .unique-article-card {
        width: 800px;
    }
}