body {
    font-family: 'Libre Baskerville', Georgia, serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
}

.navbar-brand strong {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 800;
    letter-spacing: 2px;
}

@media (max-width: 768px) {
    .navbar-brand strong {
        font-size: 1.3rem;
        letter-spacing: 1px;
    }
    .card-body {
        padding: 1.25rem !important;
    }
    h2 {
        font-size: 1.5rem !important;
    }
    h3 {
        font-size: 1.25rem !important;
    }
    h4 {
        font-size: 1.1rem !important;
    }
}

.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-outline-dark:hover {
    background-color: #2c1810;
    border-color: #2c1810;
    color: white;
}

.card {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.nav-tabs .nav-link {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
}

.nav-tabs .nav-link.active {
    background-color: #8B2635;
    color: white !important;
    border-color: #8B2635;
}

.nav-tabs .nav-link:hover {
    color: #8B2635;
}

.card-body {
    padding: 2rem !important;
}

@media (max-width: 768px) {
    .card-body {
        padding: 1.25rem !important;
    }
}

main {
    background: #fdfcfb;
}

ul li {
    margin-bottom: 0.5rem;
}

.hero-content {
    background: white;
    padding: 2rem 2.5rem 1.25rem 2.5rem;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.col-lg-5.col-12.pe-lg-3.ms-2 {
    display: flex;
    flex-direction: column;
}

.col-lg-5.col-12.pe-lg-3.ms-2 > .mb-3 {
    flex: 1;
    display: flex;
    align-items: stretch;
}

.main-book-wrapper {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: inline-block;
    max-width: 100%;
    height: 100%;
    min-height: 550px;
}

.main-book-wrapper img {
    display: block;
    width: auto;
    max-width: 100%;
    height: 100%;
    min-height: 550px;
    object-fit: contain;
}

.thumbnail-row {
    flex-wrap: wrap;
}

.thumbnail-image {
    flex-shrink: 0;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.thumbnail-image:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

@media (max-width: 991px) {
    .thumbnail-row {
        justify-content: center !important;
    }

    .thumbnail-image {
        width: 85px !important;
        height: 120px !important;
    }
}

@media (max-width: 768px) {
    main .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        padding-top: 1.25rem !important;
        padding-bottom: 1rem !important;
    }

    main .container > div > div {
        gap: 2rem !important;
    }

    h1 {
        font-size: 1.5rem !important;
        margin-bottom: 1rem !important;
        line-height: 1.3 !important;
    }

    h2 {
        font-size: 0.85rem !important;
        margin-bottom: 0.65rem !important;
    }

    h3 {
        font-size: 1.35rem !important;
    }

    h4 {
        font-size: 1.15rem !important;
    }

    h5 {
        font-size: 1rem !important;
        margin-bottom: 0.75rem !important;
    }

    p {
        font-size: 0.95rem !important;
        line-height: 1.65 !important;
        margin-bottom: 1rem !important;
    }

    .mb-3 {
        margin-bottom: 0.75rem !important;
    }

    .mb-4 {
        margin-bottom: 1rem !important;
    }

    .mt-4 {
        margin-top: 1rem !important;
    }

    .p-3 {
        padding: 0.75rem !important;
    }

    .btn-lg {
        font-size: 1rem !important;
        padding: 0.875rem 1.5rem !important;
        min-height: 48px !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .card-body {
        padding: 1.5rem !important;
    }

    .thumbnail-image {
        width: 78px !important;
        height: 105px !important;
    }

    .thumbnail-row {
        gap: 0.5rem !important;
    }
}

@media (max-width: 768px) {
    main img[src*="preview-1-main.jpg"] {
        height: auto !important;
        max-height: 280px !important;
    }

    .main-book-wrapper {
        min-height: auto;
        max-height: 280px;
        margin: 0 auto;
    }

    .main-book-wrapper img {
        min-height: auto;
        max-height: 280px;
        height: auto;
    }

    .col-lg-5.col-12.pe-lg-3.ms-2 {
        margin-left: 0 !important;
    }

    .col-lg-5.col-12.pe-lg-3.ms-2 > .mb-3 {
        display: flex;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.35rem !important;
    }

    main img[src*="preview-1-main.jpg"] {
        max-height: 240px !important;
    }

    .main-book-wrapper {
        min-height: auto;
        max-height: 240px;
        margin: 0 auto;
    }

    .main-book-wrapper img {
        min-height: auto;
        max-height: 240px;
        height: auto;
    }

    .thumbnail-image {
        width: 70px !important;
        height: 95px !important;
    }

    .thumbnail-row {
        gap: 0.4rem !important;
    }

    footer .row {
        flex-direction: column;
        gap: 1rem;
        text-align: center !important;
    }

    footer .col-auto {
        width: 100%;
    }

    footer .text-end {
        text-align: center !important;
    }
}
