/* Fenomen Detay Page Styles */

html, body {
    background: #3FA0D8;
}

.fd-wrapper {
    background: linear-gradient(180deg, #5BC0F8 0%, #3FA0D8 100%);
    min-height: calc(100vh - 90px);
    position: relative;
    overflow: hidden;
    padding-bottom: 4rem;
}


/* Title Bar */
.fd-title-bar {
    background: linear-gradient(180deg, #7C5FC7 0%, #6B4FC7 100%);
    padding: 1.2rem 2rem;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 5;
}

.fd-title-bar h1 {
    font-family: 'Poppins', sans-serif;
    color: #FFFFFF;
    font-size: 1.6rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

.fd-title-bar h1 span {
    font-weight: 400;
    opacity: 0.95;
}

/* Container */
.fd-container {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 2rem;
    max-width: 1300px;
    margin: 0 auto;
    padding: 2.5rem 2rem 0;
    position: relative;
    z-index: 3;
}

/* Sidebar */
.fd-sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
    background: #FFFFFF;
    border-radius: 24px;
    padding: 1.5rem 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.fd-sidebar-title {
    font-family: 'Poppins', sans-serif;
    color: #4BB0E8;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.fd-class-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    align-items: center;
}

.fd-class-btn {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    border: 3px solid #FFFFFF;
    background: linear-gradient(180deg, #C8C8C8 0%, #A8A8A8 100%);
    color: #FFFFFF;
    transition: all 0.3s ease;
    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.15),
        inset 0 1px 2px rgba(255, 255, 255, 0.4);
    position: relative;
}

.fd-class-btn.active {
    background: linear-gradient(180deg, #6FCBF0 0%, #4BB0E8 100%);
    color: #FFFFFF;
    transform: scale(1.08);
    box-shadow:
        0 6px 15px rgba(0, 0, 0, 0.25),
        inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

.fd-class-btn:hover:not(.active) {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.fd-class-num {
    font-size: 1.3rem;
    line-height: 1;
}

.fd-class-label {
    font-size: 0.65rem;
    font-weight: 500;
    margin-top: 2px;
}

/* Books Grid */
.fd-books {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.2rem;
    background-color: #FFFFFF;
    padding: 1.8rem;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.fd-loading {
    grid-column: 1 / -1;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    color: #4c4c4c;
    text-align: center;
    padding: 2rem 1rem;
}

.fd-book-card {
    background: #FFFFFF;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    position: relative;
}

.fd-book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.18);
}

.fd-book-image {
    background:
        url('public/Mask-Group-22.svg') center / cover no-repeat,
        linear-gradient(180deg, #8EC8E8 0%, #5BC0F8 100%);
    padding: 1rem 0.8rem 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 190px;
    position: relative;
    overflow: visible;
}

.fd-book-image img {
    max-width: 100%;
    max-height: 200px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.25));
    position: relative;
    z-index: 3;
    margin-bottom: -15px;
}

.fd-book-info {
    padding: 2.5rem 0.8rem 1rem;
    text-align: center;
    background: #FFFFFF;
    position: relative;
    margin-top: -15px;
    z-index: 2;
}

.fd-book-info::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -25px;
    height: 25px;
    background: #FFFFFF;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.fd-book-title {
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.2rem;
    font-weight: 500;
}

.fd-book-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    color: #333;
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.fd-book-btn {
    font-family: 'Poppins', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: linear-gradient(180deg, #7C5FC7 0%, #6B4FC7 100%);
    color: #FFFFFF;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow:
        0 3px 8px rgba(107, 79, 199, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
    text-decoration: none;
}

.fd-book-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(107, 79, 199, 0.5);
}

/* Active card highlight */
.fd-book-card.active {
    outline: 3px solid #5BC0F8;
    outline-offset: -3px;
}

/* Decorative boy character */
.fd-mascot {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 480px;
    height: auto;
    z-index: 4;
    pointer-events: none;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
    transform: translateY(50%);
}

/* Responsive */
@media (max-width: 1200px) {
    .fd-books {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1024px) {
    .fd-container {
        grid-template-columns: 120px 1fr;
        gap: 1.5rem;
        padding: 2rem 1.5rem 0;
    }

    .fd-books {
        grid-template-columns: repeat(3, 1fr);
    }

    .fd-class-btn {
        width: 60px;
        height: 60px;
    }

    .fd-class-num {
        font-size: 1.1rem;
    }

    .fd-mascot {
        width: 340px;
    }
}

@media (max-width: 768px) {
    .fd-title-bar h1 {
        font-size: 1.2rem;
    }

    .fd-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem 1rem 0;
    }

    .fd-sidebar {
        position: relative;
        top: 0;
        padding: 1rem;
    }

    .fd-sidebar-title {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }

    .fd-class-list {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }

    .fd-class-btn {
        width: 55px;
        height: 55px;
    }

    .fd-books {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 1.2rem;
    }

    .fd-book-image {
        min-height: 160px;
    }

    .fd-mascot {
        width: 200px;
        transform: translateY(55%);
    }
}

@media (max-width: 480px) {
    .fd-title-bar {
        padding: 1rem 0.8rem;
    }

    .fd-title-bar h1 {
        font-size: 1rem;
    }

    .fd-books {
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
        padding: 1rem;
    }

    .fd-book-image {
        min-height: 140px;
        padding: 0.6rem;
    }

    .fd-book-title {
        font-size: 0.7rem;
    }

    .fd-book-subtitle {
        font-size: 0.75rem;
    }

    .fd-book-btn {
        font-size: 0.7rem;
        padding: 0.35rem 0.8rem;
    }

    .fd-mascot {
        width: 150px;
    }

    .fd-class-btn {
        width: 50px;
        height: 50px;
    }
}
