/* ===================================
   INDEX.CSS - Phong cách Văn học Việt Nam
   =================================== */

/* ========== HERO SECTION ========== */
.hero-section{
    position:relative;
    min-height:90vh;

    display:flex;
    align-items:center;
    justify-content:center;

    overflow:hidden;

    background:
        radial-gradient(circle at top left,#d79b61 0%,transparent 30%),
        radial-gradient(circle at bottom right,#8b4513 0%,transparent 25%),
        linear-gradient(135deg,#3d2314 0%,#6d3d1f 50%,#9b5e34 100%);
}
.hero-section::before{
    content:'';

    position:absolute;
    width:500px;
    height:500px;

    background:rgba(255,255,255,.06);

    border-radius:50%;

    filter:blur(80px);

    top:-120px;
    left:-120px;
}
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMzAgMzBMMCA2MGw2MC02MHoiIGZpbGw9IiNmZmYiIG9wYWNpdHk9IjAuMDUiLz48L3N2Zz4=');
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 80px 20px;
}

.hero-title {
    font-family: 'Playfair Display', 'Crimson Text', serif;
    font-size:5rem;
    line-height:1.1;

    font-weight:800;

    color:#fff;

    margin-bottom:24px;

    text-shadow:
        0 10px 30px rgba(0,0,0,.25);

    animation:fadeUp .8s ease;
}
@keyframes fadeUp{
    from{
        opacity:0;
        transform:translateY(40px);
    }

    to{
        opacity:1;
        transform:translateY(0);
    }
}
.hero-buttons{
    display:flex;
    gap:18px;
    justify-content:center;
    margin-top:35px;
    flex-wrap:wrap;
}

.hero-btn{
    padding:16px 32px;

    border-radius:16px;

    text-decoration:none;

    font-weight:700;

    transition:.3s;
}

.hero-btn.primary{
    background:#fff;
    color:#5b371d;
}

.hero-btn.primary:hover{
    transform:translateY(-4px);
}

.hero-btn.secondary{
    border:2px solid rgba(255,255,255,.5);
    color:#fff;
}

.hero-btn.secondary:hover{
    background:rgba(255,255,255,.1);
}
.title-highlight {
    color: #FFD700;
    display: inline-block;
    position: relative;
}

.title-highlight::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    right: 0;
    height: 3px;
    background: #FFD700;
    transform: scaleX(0);
    animation: underlineGrow 1s ease-out 0.5s forwards;
}

@keyframes underlineGrow {
    to { transform: scaleX(1); }
}

.hero-subtitle {
    font-family: 'Merriweather', serif;
    font-size: 1.3rem;
    color: #FFF8DC;
    font-style: italic;
    margin-bottom: 15px;
    font-weight: 300;
}

.hero-description {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 40px;
    line-height: 1.8;
}

.stats-inline {
    color: #FFD700;
    font-weight: 600;
}

/* Search Box */
.hero-search {
    max-width: 700px;
    margin: 0 auto;
}

.search-container {
    display: flex;
    background: #fff;
    border-radius: 50px;
    padding: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.search-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 50px rgba(0,0,0,0.25);
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 15px 25px;
    font-size: 1rem;
    font-family: 'Merriweather', serif;
    color: #333;
}

.search-input::placeholder {
    color: #999;
}

.search-btn {
    background: linear-gradient(135deg, #8B4513, #D2691E);
    color: #fff;
    border: none;
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: linear-gradient(135deg, #6B3410, #B5551E);
    transform: scale(1.05);
}

/* Decorative Pattern */
.hero-pattern {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDBweCIgdmlld0JveD0iMCAwIDEyODAgMTQwIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0wIDcwTDIxLjMgNzNDNDIuNyA3NiA4NSA4MiAxMjggODhDMTcxIDk0IDIxMyAxMDAgMjU2IDk3QzI5OSA5NCAzNDEgODIgMzg0IDc2QzQyNyA3MCA0NjkgNzAgNTEyIDczQzU1NSA3NiA1OTcgODIgNjQwIDg1QzY4MyA4OCA3MjUgODggNzY4IDgyQzgxMSA3NiA4NTMgNjQgODk2IDY0QzkzOSA2NCA5ODEgNzYgMTAyNCA4MkMxMDY3IDg4IDExMDkgODggMTE1MiA4NUMxMTk1IDgyIDEyMzcgNzYgMTI1OSA3M0wxMjgwIDcwTDEyODAgMTQwTDEyNTkgMTQwQzEyMzcgMTQwIDExOTUgMTQwIDExNTIgMTQwQzExMDkgMTQwIDEwNjcgMTQwIDEwMjQgMTQwQzk4MSAxNDAgOTM5IDE0MCA4OTYgMTQwQzg1MyAxNDAgODExIDE0MCA3NjggMTQwQzcyNSAxNDAgNjgzIDE0MCA2NDAgMTQwQzU5NyAxNDAgNTU1IDE0MCA1MTIgMTQwQzQ2OSAxNDAgNDI3IDE0MCAzODQgMTQwQzM0MSAxNDAgMjk5IDE0MCAyNTYgMTQwQzIxMyAxNDAgMTcxIDE0MCAxMjggMTQwQzg1IDE0MCA0MyAxNDAgMjEgMTQwTDAgMTQwWiIgZmlsbD0iI2ZmZiIvPjwvc3ZnPg==');
    background-size: cover;
}

/* ========== STATS SECTION ========== */
.stats-section {
    padding: 80px 20px;
    background: #fff;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.stat-card {
    backdrop-filter:blur(10px);

    border-radius:24px;

    background:
        linear-gradient(
            135deg,
            rgba(255,255,255,.95),
            rgba(255,255,255,.88)
        );

    border:1px solid rgba(255,255,255,.4);
}
.stat-card,
.genre-card,
.author-card{
    animation:floatCard 4s ease-in-out infinite;
}

@keyframes floatCard{
    0%,100%{
        transform:translateY(0);
    }

    50%{
        transform:translateY(-6px);
    }
}
.hidden-scroll{
    opacity:0;
    transform:translateY(40px);
    transition:.7s;
}

.hidden-scroll.show{
    opacity:1;
    transform:translateY(0);
}
.featured-section{
    background:
        linear-gradient(to bottom,#f8f5f1,#fff);
}
@media(max-width:768px){

    .hero-title{
        font-size:3rem;
    }

    .section-title{
        font-size:2rem;
    }

    .works-grid{
        grid-template-columns:1fr;
    }

}
.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(139, 69, 19, 0.15);
    border-color: #D2691E;
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: #8B4513;
    font-family: 'Playfair Display', serif;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.stat-desc {
    font-size: 0.9rem;
    color: #666;
}

/* ========== SECTIONS ========== */
.featured-section,
.authors-section,
.genres-section {
    padding: 80px 20px;
}

.featured-section {
    background: #f8f8f8;
}

.authors-section {
    background: #fff;
}

.genres-section {
    background: #f8f8f8;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: #8B4513;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #D2691E;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #666;
    font-family: 'Merriweather', serif;
    font-style: italic;
}

/* ========== WORKS GRID ========== */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.work-card {
    position:relative;

    background:#fff;

    border-radius:24px;

    overflow:hidden;

    box-shadow:
        0 5px 15px rgba(0,0,0,.05),
        0 15px 40px rgba(0,0,0,.08);

    transition:.35s;

    border:none;
}

.work-card:hover{
    transform:translateY(-10px);

    box-shadow:
        0 15px 30px rgba(0,0,0,.1),
        0 25px 60px rgba(0,0,0,.14);
}
/* Tìm và thay thế đoạn liên quan đến work-cover bằng đoạn này: */
.work-cover {
    width: 100%;
    height: 260px;
    display: flex;       /* Thêm flexbox để căn giữa ảnh */
    align-items: center; /* Căn giữa theo chiều dọc */
    justify-content: center; /* Căn giữa theo chiều ngang */
    background-color: transparent; /* Giữ nền trong suốt hoặc chuyển thành màu tối tùy bạn */
    padding: 15px 0;    /* Tạo khoảng trống phía trên/dưới cho ảnh thoáng hơn */
    overflow: hidden;
}

.work-cover img {
    max-width: 100%;    /* Đảm bảo ảnh không vượt quá khung chứa */
    max-height: 100%;   /* Giới hạn chiều cao tối đa bằng khung chứa (260px) */
    width: auto;        /* Giữ nguyên tỉ lệ chiều rộng gốc */
    height: auto;       /* Giữ nguyên tỉ lệ chiều cao gốc */
    object-fit: contain; /* Thay vì 'cover', dùng 'contain' để ảnh thu nhỏ vừa vặn không bị cắt */
    box-shadow: 0 4px 10px rgba(0,0,0,0.15); /* Thêm chút bóng đổ cho giống quyển sách thật */
    transition: .5s;
}

/* Hiệu ứng hover phóng to nhẹ nhàng nhưng vẫn giữ nguyên tỉ lệ */
.work-card:hover img {
    transform: scale(1.05);
}

.work-content{
    padding:24px;
}

.summary{
    color:#666;
    line-height:1.7;
    margin:14px 0;
}

.work-read-btn{
    display:inline-block;

    margin-top:10px;

    background:#8b4513;
    color:#fff;

    padding:12px 18px;

    border-radius:12px;

    text-decoration:none;
    font-weight:700;
}
.work-card h3 {
    font-family: 'Crimson Text', serif;
    font-size: 1.5rem;
    color: #8B4513;
    margin-bottom: 10px;
}

.work-card .meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.section-footer {
    text-align: center;
}

.btn-explore {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 40px;
    background: linear-gradient(135deg, #8B4513, #D2691E);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.2);
}

.btn-explore:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 69, 19, 0.3);
}

.arrow {
    transition: transform 0.3s ease;
}

.btn-explore:hover .arrow {
    transform: translateX(5px);
}

/* ========== AUTHORS CAROUSEL ========== */
.authors-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.author-card {
    background: #fff;
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.author-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(139, 69, 19, 0.15);
    border-color: #D2691E;
}

.author-initial {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #8B4513, #D2691E);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 20px;
    font-family: 'Playfair Display', serif;
}

.author-card h3 {
    font-family: 'Crimson Text', serif;
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 10px;
}

.author-years {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.author-style {
    color: #8B4513;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.author-link {
    color: #D2691E;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.author-link:hover {
    color: #8B4513;
}

/* ========== GENRES GRID ========== */
.genres-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.genre-card {
    background: #fff;
    padding: 30px 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border-top: 3px solid #D2691E;
}

.genre-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.genre-card h4 {
    color: #8B4513;
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-family: 'Crimson Text', serif;
}

.genre-card .count {
    color: #666;
    font-size: 0.9rem;
}

/* ========== CTA SECTION ========== */
.cta-section {
    padding: 100px 20px;
    background: linear-gradient(135deg, #8B4513 0%, #D2691E 100%);
    text-align: center;
}

.cta-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 1.2rem;
    color: #FFF8DC;
    margin-bottom: 40px;
}

.btn-cta {
    display: inline-block;
    padding: 18px 50px;
    background: #fff;
    color: #8B4513;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.btn-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* ========== FOOTER ========== */
.footer {
    background: #2c1810;
    color: #fff;
    padding: 60px 20px 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 40px;
}

.footer-section h3 {
    color: #FFD700;
    margin-bottom: 15px;
    font-family: 'Playfair Display', serif;
}

.footer-section h4 {
    color: #FFF8DC;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #FFD700;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #999;
}

.footer-bottom p {
    margin: 5px 0;
    font-size: 0.9rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .stats-grid,
    .works-grid,
    .authors-carousel {
        grid-template-columns: 1fr;
    }
    
    .search-container {
        flex-direction: column;
        border-radius: 15px;
    }
    
    .search-btn {
        width: 100%;
        justify-content: center;
        border-radius: 10px;
    }
}