@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&display=swap');

:root {
    --navy: #101827;
    --navy-light: #192638;
    --green: #167C68;
    --green-light: #20977F;
    --gold: #C5A45D;
    --cream: #F2EBDD;
    --muted: #AAB5B9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    background: var(--navy);
    color: var(--cream);
    line-height: 1.8;
}

/* Navigation */

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 8%;
    background: #0C1421;
    border-bottom: 1px solid #263648;
}

.logo {
    font-size: 25px;
    font-weight: 800;
}

.logo span,
footer span {
    color: var(--gold);
}

nav {
    display: flex;
    gap: 30px;
}

nav a {
    color: var(--cream);
    text-decoration: none;
    transition: 0.3s;
}

nav a:hover {
    color: var(--gold);
}

/* Hero */

.hero {
    min-height: 520px;
    padding: 90px 10%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 35px;
    background:
        radial-gradient(circle at 80% 40%, #167c6833, transparent 35%),
        var(--navy);
}

.hero-content {
    max-width: 650px;
}

.subtitle {
    color: var(--gold);
    font-size: 13px;
    letter-spacing: 2px;
    direction: ltr;
    text-align: right;
}

.hero h1 {
    font-size: clamp(34px, 5vw, 55px);
    line-height: 1.5;
    margin: 15px 0;
}

.hero h1 span {
    color: #43B99C;
    display: block;
}

.description {
    color: var(--muted);
    max-width: 560px;
    margin-bottom: 30px;
}

.main-button {
    display: inline-block;
    background: var(--green);
    color: white;
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 10px;
    transition: 0.3s;
}

.main-button:hover {
    background: var(--green-light);
    transform: translateY(-3px);
}

.hero-icon {
    font-size: 125px;
    filter: drop-shadow(0 0 25px #167c6855);
}

/* Explore */

.explore {
    padding: 70px 10%;
    text-align: center;
    background: #141F30;
}

.section-title > p,
.about > p:first-child {
    color: var(--gold);
    font-size: 13px;
    letter-spacing: 2px;
}

.section-title h2 {
    font-size: 30px;
    margin: 10px 0;
}

.section-title span {
    color: var(--muted);
    font-size: 14px;
}

.search-box {
    display: flex;
    gap: 12px;
    max-width: 850px;
    margin: 30px auto 0;
}

.search-box input,
.search-box select {
    background: #0C1421;
    color: var(--cream);
    border: 1px solid #35485B;
    padding: 14px;
    border-radius: 9px;
    font-family: inherit;
    min-width: 0;
}

.search-box input {
    flex: 2;
}

.search-box select {
    flex: 1;
}

.search-box button {
    background: var(--gold);
    color: #101827;
    border: none;
    border-radius: 9px;
    padding: 12px 28px;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
}

#searchMessage {
    color: var(--gold);
    margin-top: 15px;
}

/* Books */

.books-section {
    padding: 65px 10%;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-heading h2 {
    font-size: 27px;
}

.section-heading span {
    color: var(--gold);
    font-size: 13px;
}

.books-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
}

.book-card {
    background: var(--navy-light);
    border: 1px solid #304355;
    border-radius: 15px;
    padding: 22px;
    transition: 0.3s;
}

.book-card:hover {
    transform: translateY(-7px);
    border-color: var(--gold);
}

.book-icon {
    font-size: 38px;
    margin-bottom: 10px;
}

.book-card h3 {
    color: var(--cream);
    margin-bottom: 8px;
}

.book-card p {
    color: var(--muted);
    font-size: 14px;
}

.book-category {
    display: inline-block;
    color: var(--gold);
    font-size: 12px;
    margin-top: 15px;
}

/* About */

.about {
    padding: 75px 10%;
    text-align: center;
    background: #141F30;
}

.about h2 {
    font-size: 30px;
    margin: 12px 0;
}

.about p:last-child {
    color: var(--muted);
    max-width: 650px;
    margin: auto;
}

/* Footer */

footer {
    padding: 30px 10%;
    text-align: center;
    background: #0C1421;
    border-top: 1px solid #263648;
}

footer h3 {
    font-size: 23px;
}

footer p {
    color: var(--muted);
    font-size: 13px;
}

/* Mobile */

@media (max-width: 700px) {

    .navbar {
        flex-direction: column;
        gap: 12px;
    }

    nav {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding: 60px 7%;
    }

    .subtitle {
        text-align: center;
    }

    .hero-icon {
        font-size: 85px;
    }

    .search-box {
        flex-direction: column;
    }

    .search-box input,
    .search-box select {
        width: 100%;
    }

    .section-heading {
        flex-direction: column;
        align-items: flex-start;
    }
}