/* CritiReads Custom Styles */

/* ===================================
   Typography & Base Styles
   =================================== */

body {
    font-size: 20px;
    line-height: 1.7;
    color: #1a1a1a;
}

h1 {
    font-size: 64px;
    line-height: 1.2;
}

h2 {
    font-size: 48px;
    line-height: 1.3;
}

h3 {
    font-size: 36px;
    line-height: 1.3;
}

h4 {
    font-size: 28px;
    line-height: 1.4;
}

h5 {
    font-size: 24px;
    line-height: 1.4;
}

/* ===================================
   Navigation
   =================================== */

.nav-link {
    position: relative;
    color: #4a4a4a;
    transition: color 0.3s ease;
    text-decoration: none;
}

.nav-link:hover {
    color: #d4a574;
}

.nav-link.active {
    color: #1a1a1a;
    font-weight: 600;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #d4a574;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ===================================
   Mobile Hamburger Menu
   =================================== */

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #1a1a1a;
    margin: 4px 0;
    transition: all 0.3s ease;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #ffffff;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e5e5;
}

.mobile-menu-close {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a1a;
    transition: color 0.3s ease;
}

.mobile-menu-close:hover {
    color: #d4a574;
}

.mobile-menu-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 2rem 0;
    overflow-y: auto;
}

.mobile-menu-link {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 32px;
    font-weight: 500;
    color: #1a1a1a;
    padding: 1.5rem 2rem;
    text-decoration: none;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.mobile-menu-link:hover {
    background-color: #fafafa;
    border-left-color: #d4a574;
    color: #d4a574;
}

.mobile-menu-link.active {
    border-left-color: #d4a574;
    color: #d4a574;
    font-weight: 600;
}

/* Prevent body scroll when menu is open */
body.mobile-menu-open {
    overflow: hidden;
}

/* Hide mobile menu on desktop */
@media (min-width: 768px) {
    .mobile-menu {
        display: none;
    }
}

/* ===================================
   Star Rating
   =================================== */

.star-rating {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.star {
    display: inline-block;
    line-height: 1;
}

.star-full {
    color: #d4a574;
}

.star-half {
    background: linear-gradient(90deg, #d4a574 50%, #e0e0e0 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.star-empty {
    color: #e0e0e0;
}

/* ===================================
   Review Cards
   =================================== */

.review-card {
    padding: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: white;
}

@media (min-width: 640px) {
    .review-card {
        padding: 1.5rem;
    }
}

@media (min-width: 768px) {
    .review-card {
        padding: 2rem;
    }
}

.review-card:hover {
    background: #fafafa;
}

@media (min-width: 768px) {
    .review-card:hover {
        transform: translateY(-2px);
    }
}

.review-card a {
    text-decoration: none;
    color: inherit;
}

/* ===================================
   Book Covers
   =================================== */

.book-cover-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 2/3;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.review-card:hover .book-cover-wrapper {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transform: scale(1.02);
}

.book-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.book-cover-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-cover-large-wrapper {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.book-cover-large {
    width: 100%;
    height: auto;
    display: block;
}

/* ===================================
   Read More Link
   =================================== */

.read-more {
    color: #d4a574;
    transition: all 0.3s ease;
    display: inline-block;
}

.review-card:hover .read-more {
    transform: translateX(4px);
}

/* ===================================
   Prose Styling (Review Content)
   =================================== */

.prose {
    color: #1a1a1a;
    font-size: 20px;
}

.prose h2 {
    font-size: 48px;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    font-family: 'Crimson Pro', Georgia, serif;
}

.prose h3 {
    font-size: 36px;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    font-family: 'Crimson Pro', Georgia, serif;
}

.prose h4 {
    font-size: 28px;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    font-family: 'Crimson Pro', Georgia, serif;
}

.prose h5 {
    font-size: 24px;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    font-family: 'Crimson Pro', Georgia, serif;
}

.prose p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 20px;
}

.prose a {
    color: #d4a574;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.prose a:hover {
    color: #b88d5c;
}

.prose ul,
.prose ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

.prose em {
    font-style: italic;
}

.prose strong {
    font-weight: 600;
}

.prose blockquote {
    border-left: 4px solid #d4a574;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #4a4a4a;
}

/* ===================================
   Animations
   =================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.review-card {
    animation: fadeIn 0.6s ease forwards;
}

.review-card:nth-child(1) { animation-delay: 0.1s; }
.review-card:nth-child(2) { animation-delay: 0.2s; }
.review-card:nth-child(3) { animation-delay: 0.3s; }
.review-card:nth-child(4) { animation-delay: 0.4s; }
.review-card:nth-child(5) { animation-delay: 0.5s; }

/* ===================================
   Authors Page
   =================================== */

.author-section {
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
}

.author-section:nth-child(1) { animation-delay: 0.1s; }
.author-section:nth-child(2) { animation-delay: 0.2s; }
.author-section:nth-child(3) { animation-delay: 0.3s; }
.author-section:nth-child(4) { animation-delay: 0.4s; }
.author-section:nth-child(5) { animation-delay: 0.5s; }

/* ===================================
   Responsive Adjustments
   =================================== */

@media (max-width: 768px) {
    body {
        font-size: 19px;
    }

    h1 {
        font-size: 48px;
    }

    h2 {
        font-size: 38px;
    }

    h3 {
        font-size: 30px;
    }

    h4 {
        font-size: 26px;
    }

    h5 {
        font-size: 22px;
    }

    .prose {
        font-size: 19px;
    }

    .prose h2 {
        font-size: 38px;
    }

    .prose h3 {
        font-size: 30px;
    }

    .prose h4 {
        font-size: 26px;
    }

    .prose h5 {
        font-size: 22px;
    }

    .prose p {
        font-size: 19px;
    }

    .book-cover-wrapper {
        max-width: 300px;
        margin: 0 auto;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    body {
        font-size: 19px;
    }

    h1 {
        font-size: 56px;
    }

    h2 {
        font-size: 44px;
    }

    h3 {
        font-size: 34px;
    }

    h4 {
        font-size: 27px;
    }

    h5 {
        font-size: 23px;
    }

    .prose {
        font-size: 19px;
    }

    .prose h2 {
        font-size: 44px;
    }

    .prose h3 {
        font-size: 34px;
    }

    .prose h4 {
        font-size: 27px;
    }

    .prose h5 {
        font-size: 23px;
    }

    .prose p {
        font-size: 19px;
    }
}

/* ===================================
   Utility Classes
   =================================== */

.transition-all {
    transition: all 0.3s ease;
}

/* ===================================
   Selection
   =================================== */

::selection {
    background-color: #d4a574;
    color: white;
}

::-moz-selection {
    background-color: #d4a574;
    color: white;
}

/* ===================================
   Focus Styles
   =================================== */

a:focus,
button:focus {
    outline: 2px solid #d4a574;
    outline-offset: 2px;
}

/* ===================================
   Loading States
   =================================== */

img {
    transition: opacity 0.3s ease;
}
