* {
    margin: 0;
    caret-color: transparent;

}

body {
    font-family: Arial, sans-serif;
    background-color: #F5F5F0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/*=========== NAVBAR ============== */
nav {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    /* logo kiri, nav kanan */
    padding: 16px 120px;
    /* kurangi padding agar muat */
    border-bottom: 1px solid #90AB8B;
    font-size: 1.02em;
}

/* Container search + menu */
.nav-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    flex-wrap: nowrap;
    flex-grow: 1;
    /* ambil sisa ruang */
    justify-content: space-between;
}

.menu-logo {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: center;
}

main {
    padding: 0px 90px;
}


/*================ Logo =============== */
.logo {
    font-weight: bold;
    font-size: 20px;
    color: #3B4953;
}

/*============== Search bar ============= */
.search-container {
    flex-shrink: 1;
}

.search-box {
    transition: width 0.6s, border-radius 0.6s, background 0.6s, box-shadow 0.6s;
    width: 39px;
    height: 40px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    background: rgb(235, 235, 235);
    color: black;
}

.search-box+label .search-icon {
    color: black;
}

.search-box:hover {
    color: white;
    background: rgb(200, 200, 200);
    box-shadow: 0 0 0 5px #5A7863;
}

.search-box:hover+label .search-icon {
    color: white;
}

.search-box:focus {
    border: none;
    outline: none;
    box-shadow: none;
    padding-left: 15px;
    cursor: text;
    width: 300px;
    border-radius: auto;
    background: rgb(235, 235, 235);
    color: black;
}

.search-box:focus+label .search-icon {
    color: black;
}

.search-box:not(:focus) {
    text-indent: -5000px;
}

#search-submit {
    position: relative;
    left: -5000px;
}

.search-icon {
    position: relative;
    left: -31px;
    color: white;
    cursor: pointer;
}

/*============ Menu =========== */
#information {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 15px;
    flex-shrink: 0;
    /* menu tidak mengecil terlalu kecil */
    font-size: 1.1em;
}


#information li {
    margin-left: 20px;
}

#information a {
    text-decoration: none;
    color: #3B4953;
    font-weight: 10px;
    transition: color 0.2s ease;
}

#information a:hover {
    color: #5A7863;
}

/* Login button */
.login {
    background-color: #5A7863;
    color: #EBF4DD !important;
    padding: 8px 16px;
    border-radius: 20px;
    transition: background-color 0.2s ease;
}

.login:hover {
    background-color: #3B4953;
}

/* =========HERO PROMO========= */
.hero {
    background: linear-gradient(135deg, #90AB8B, #EBF4DD);
    padding: 80px 40px;
    border-radius: 20px;
    margin: 30px;
    color: #ffffff;
    box-shadow: 0 15px 30px rgba(59, 73, 83, 0.25);
}

.hero-content h2 {
    font-size: 36px;
    margin-bottom: 10px;
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 20px;
}

.hero-content button {
    background-color: #5A7863;
    color: #EBF4DD;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
}

/*============ BEST BOOK  ===========*/
.books {
    padding: 40px;
}

.books h2 {
    color: #3B4953;
    margin-bottom: 20px;
}

.book-card {
    min-width: 256px;
    min-height: 364px;
    background-color: #EBF4DD;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;

    border: 1px solid #90AB8B;
    border-radius: 15px;
    /* display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start; */
    color: #5A7863;
    font-weight: bold;
    padding: 20px;

    box-shadow: 0 15px 30px rgba(59, 73, 83, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rank-number {
    position: absolute;
    left: -38px;
    bottom: 16px;

    font-size: 120px;
    font-weight: 900;
    line-height: 1;
    color: #5A7863;

    -webkit-text-stroke: 3px #ffffff;
    text-shadow: 0 15px 30px rgba(59, 73, 83, 0.636);
    z-index: 10;
    pointer-events: none;
}

.book-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.25);
}

/* WRAPPER */
.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

/* VIEWPORT */
.carousel {
    padding: 50px 40px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    width: 100%;
}

.carousel::-webkit-scrollbar {
    display: none;
}

/* TRACK */
.carousel-track {
    display: flex;
    gap: 44px;
}


/* =============DOTS SLIDER=========== */
.carousel-dots {
    display: flex;
    justify-content: center;
    margin-top: 0px;
}

.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: #90AB8B;
    border-radius: 50%;
    margin: 0 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.dot.active {
    width: 20px;
    border-radius: 10px;
    background-color: #5A7863;
}

/* ============BUTTON SLIDER=========== */
.carousel-button {
    background-color: rgba(90, 120, 99, 0.85);
    color: #F5F5F0;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.carousel-button:hover {
    background-color: #3B4953;
}

.carousel-button.left {
    margin-right: 10px;
}

.carousel-button.right {
    margin-left: 10px;
}

/* ========WHY US?============ */
.why-us {
    padding: 60px 40px;
    color: #5A7863;
    text-align: center;
    /* Center the section title and content */
}

.why-us h2 {
    color: #3B4953;
    margin-bottom: 30px;
    font-size: 28px;
    text-align: left;
    width: 100%;
    display: block;
}

/* GRID */
.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

/* CARD */
.why-card {
    background: linear-gradient(135deg, #90AB8B, #EBF4DD);
    border-radius: 20px;
    padding: 30px;
    color: #ffffff;
    min-height: 180px;
    box-shadow: 0 12px 25px rgba(59, 73, 83, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.why-card.h3 {
    margin-bottom: 15px;
    font-size: 20px;
}

.why-card.p {
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.9;
}

.why-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.25);
}

footer {
    background-color: #5A7863;
    margin-top: auto;
    font-size: 0.9em;
    padding: 20px 80px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.content-top {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.content-top1 {
    display: flex;
    flex-direction: row;
    gap: 32px;
}

.content-top1-list {
    display: flex;
    flex-direction: column;
    color: #ffffff;
    gap: 8px;
}

.content-top1-list h3 {
    padding-bottom: 8px;
    font-size: 1.6em;
}

.content-top1-list a {
    color: #ffffff;
    text-decoration: underline;
}

.content-top2 {
    display: flex;
    flex-direction: column;
    color: #ffffff;
    text-align: right;
    align-items: flex-end;
    gap: 8px;
}

.content-top2 h3 {
    font-size: 1.6em;
}

.content-top2 i {
    background-color: #ffffff;
    width: fit-content;
}

.icon-top2 {
    display: flex;
    flex-direction: row;
    gap: 4px;
}

.content-bottom {
    color: #ffffff;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.content-bottom i {
    background-color: #ffffff;
}

/* =========================
   HAMBURGER MENU UTILS
========================= */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger span {
    width: 30px;
    height: 3px;
    background: #3B4953;
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

/* Hamburger Animation */
.hamburger.active span:first-child {
    transform: rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg);
}

/* =========================
   RESPONSIVE DESIGN
========================= */

@media screen and (max-width: 1024px) {
    nav {
        padding: 16px 40px;
    }

    main {
        padding: 0 40px;
    }

    footer {
        padding: 20px 40px;
    }
}

@media screen and (max-width: 768px) {

    html,
    body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }

    /* Navbar Mobile */
    nav {
        padding: 12px 20px;
        position: relative;
        justify-content: space-between;
    }

    .nav-right {
        gap: 10px;
        width: 100%;
        justify-content: space-between;
    }

    .menu-logo {
        flex-grow: 1;
        max-width: calc(100% - 40px);
    }

    .hamburger {
        display: flex;
        margin-left: 0;
    }

    /* Hide menu by default */
    #information {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #ffffff;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        padding: 0;
        /* Reset padding */
        z-index: 9999;
        text-align: left;
        border-top: 1px solid #90AB8B;
        width: 100%;
    }

    /* Show menu when active */
    #information.active {
        display: flex;
    }

    #information li {
        margin: 0;
        border-bottom: 1px solid #f0f0f0;
        width: 100%;
    }

    #information li a {
        display: block;
        padding: 15px 20px;
        width: 100%;
    }

    #information li a.login {
        display: inline-block;
        margin: 15px 20px;
        width: auto;
    }

    /*============== Search bar ============= */
    .search-container {
        flex-shrink: 1;
        position: absolute;
        left: 120px;
    }

    .search-box {
        transition: width 0.6s, border-radius 0.6s, background 0.6s, box-shadow 0.6s;
        width: 39px;
        height: 40px;
        border-radius: 20px;
        border: none;
        cursor: pointer;
        background: rgb(235, 235, 235);
        color: black;
    }

    .search-box+label .search-icon {
        color: black;
    }

    .search-box:hover {
        color: white;
        background: rgb(200, 200, 200);
        box-shadow: 0 0 0 5px #5A7863;
    }

    .search-box:hover+label .search-icon {
        color: white;
    }

    .search-box:focus {
        border: none;
        outline: none;
        box-shadow: none;
        padding-left: 15px;
        cursor: text;
        width: 150px;
        border-radius: auto;
        background: rgb(235, 235, 235);
        color: black;
    }

    .search-box:focus+label .search-icon {
        color: black;
    }

    .search-box:not(:focus) {
        text-indent: -5000px;
    }

    #search-submit {
        position: relative;
        left: -5000px;
    }

    .search-icon {
        position: relative;
        left: -31px;
        color: white;
        cursor: pointer;
    }

    /* Hero Section Mobile */
    .hero {
        padding: 40px 20px;
        margin: 20px 10px;
        text-align: center;
    }

    .hero-content h2 {
        font-size: 26px;
    }

    .hero-content p {
        font-size: 16px;
    }

    /* Book Cards Mobile */
    .books {
        padding: 20px 10px;
    }

    .carousel {
        padding: 20px 40px;
    }

    .carousel-track {
        gap: 20px;
    }

    /* Footer Mobile */
    footer {
        padding: 30px 20px;
    }

    .content-top {
        flex-direction: column;
        gap: 30px;
    }

    .content-top1 {
        flex-direction: column;
        gap: 20px;
    }

    .content-top2 {
        align-items: flex-start;
        text-align: left;
    }

    .content-bottom {
        flex-direction: column-reverse;
        gap: 20px;
        align-items: left;
        text-align: left;
    }

    /* Why Us Compact Mobile */
    .why-us {
        padding: 30px 20px;
    }

    .why-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .why-card {
        padding: 15px;
        min-height: auto;
    }

    .why-card h3 {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .why-card p {
        font-size: 12px;
        line-height: 1.4;
    }
}