/* Netflix-style Books Layout */

.netflix-container {
    min-height: 100vh;
    background: #ffffff;
    padding-bottom: 50px;
}

/* Hero Section */
.netflix-hero {
    position: relative;
    min-height: 180px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    overflow: hidden;
    padding: 30px 20px;
}

.netflix-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(86, 192, 43, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(0, 104, 157, 0.05) 0%, transparent 50%);
    animation: pulseGlow 8s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.7; }
}

/* Layout Orizzontale Logo + Testo */
.hero-content-horizontal {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.hero-logo-left {
    flex-shrink: 0;
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.hero-logo-horizontal {
    height: 120px;
    width: auto;
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.08));
    transition: transform 0.3s ease;
}

.hero-logo-horizontal:hover {
    transform: scale(1.05);
}

.hero-text-right {
    flex: 1;
    text-align: left;
}

.hero-text-center {
    width: 100%;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Titolo Orizzontale con Lettere Colorate */
.hero-title-horizontal {
    margin: 0;
    padding: 0;
}

/* SVG Banner */
.hero-banner-svg {
    max-width: 880px;
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
    position: relative;
    -webkit-mask-image: radial-gradient(ellipse 100% 100% at 50% 50%, black 60%, transparent 100%);
    mask-image: radial-gradient(ellipse 100% 100% at 50% 50%, black 60%, transparent 100%);
}

.hero-banner-svg:hover {
    transform: scale(1.02);
    opacity: 0.95;
}

.hero-line {
    display: block;
    line-height: 1.3;
    margin: 5px 0;
}

.letter-color {
    font-size: 2.8rem;
    font-weight: 900;
    display: inline-block;
    transition: all 0.3s ease;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.1),
        0 0 20px rgba(255, 255, 255, 0.3);
    letter-spacing: -2px;
}

.letter-color:hover {
    transform: scale(1.15) translateY(-5px);
    filter: brightness(1.3) drop-shadow(0 5px 10px rgba(0, 0, 0, 0.2));
    text-shadow: 
        3px 3px 8px rgba(0, 0, 0, 0.15),
        0 0 30px rgba(255, 255, 255, 0.5);
}

.space {
    display: inline-block;
    width: 0.3em;
}

/* Backward compatibility */
.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    text-shadow: none;
    letter-spacing: 2px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #6c757d;
    margin: 0;
    font-weight: 300;
}

/* Category Section */
.netflix-category {
    margin-bottom: 50px;
    padding: 0 4%;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

.category-title-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.category-icon {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.category-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    text-shadow: none;
    transition: all 0.3s ease;
}

.category-title-link {
    display: inline-block;
    position: relative;
}

.category-title-link:hover .category-title {
    transform: translateX(5px);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
}

.category-title-link::after {
    content: '\f054';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 1.2rem;
    margin-left: 12px;
    opacity: 0;
    transition: all 0.3s ease;
    display: inline-block;
    vertical-align: middle;
}

.category-title-link:hover::after {
    opacity: 0.6;
    margin-left: 15px;
}

.book-count {
    color: #6c757d;
    font-size: 1rem;
    font-weight: 400;
}

.category-nav-arrows {
    display: flex;
    gap: 10px;
}

.nav-arrow {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #dee2e6;
    background: #ffffff;
    color: #495057;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-arrow:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-arrow:active {
    transform: scale(0.95);
}

.nav-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Books Slider */
.books-slider-container {
    position: relative;
    overflow: hidden;
    padding: 10px 0;
}

.books-slider {
    display: flex;
    gap: 15px;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 5px;
}

/* Book Card */
.book-card {
    min-width: 200px;
    max-width: 200px;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.book-card:hover {
    transform: scale(1.08) translateY(-8px);
    z-index: 10;
}

.book-cover {
    position: relative;
    width: 100%;
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    background: #f8f9fa;
}

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

.book-card:hover .book-cover img {
    transform: scale(1.05);
}

.book-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.7) 50%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.book-card:hover .book-overlay {
    opacity: 1;
}

.book-info {
    width: 100%;
}

.book-title {
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-author {
    color: #e5e5e5;
    font-size: 0.9rem;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.book-author i {
    color: #56C02B;
}

.book-description {
    color: #ccc;
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-details-btn {
    width: 100%;
    padding: 10px;
    background: #56C02B;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.book-details-btn:hover {
    background: #4a9f26;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(86, 192, 43, 0.4);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 100px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 5rem;
    margin-bottom: 30px;
    color: #dee2e6;
}

.empty-state h2 {
    color: #212529;
    font-size: 2rem;
    margin-bottom: 15px;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: #6c757d;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: #56C02B;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #4a9f26;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(86, 192, 43, 0.4);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .book-card {
        min-width: 180px;
        max-width: 180px;
    }
    
    .book-cover {
        height: 270px;
    }
}

@media (max-width: 768px) {
    .netflix-hero {
        min-height: 200px;
        padding: 20px 15px;
    }
    
    .hero-content-horizontal {
        flex-direction: column;
        gap: 20px;
        padding: 15px;
    }
    
    .hero-logo-horizontal {
        height: 70px;
    }
    
    .hero-text-right {
        text-align: center;
    }
    
    .hero-text-center {
        width: 100%;
    }
    
    .hero-title-horizontal {
        padding: 0;
    }
    
    .hero-banner-svg {
        max-width: 600px;
        width: 90%;
        margin: 0 auto;
    }
    
    .hero-line {
        text-align: center;
        white-space: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        display: flex;
        justify-content: center;
        flex-wrap: nowrap;
    }
    
    .letter-color {
        font-size: 2rem;
        letter-spacing: 0px;
    }
    
    .space {
        width: 0.3em;
    }
    
    .category-title {
        font-size: 1.4rem;
    }
    
    .category-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    /* Frecce ottimizzate per mobile */
    .category-nav-arrows {
        gap: 8px;
    }
    
    .nav-arrow {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        border-width: 2px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
        position: relative;
    }
    
    /* Espandi area di tocco */
    .nav-arrow::before {
        content: '';
        position: absolute;
        top: -10px;
        right: -10px;
        bottom: -10px;
        left: -10px;
    }
    
    .nav-arrow:active {
        transform: scale(0.9);
    }
    
    .netflix-category {
        padding: 0 20px;
        overflow: hidden;
    }
    
    .books-slider-container {
        overflow: visible;
    }
    
    .book-card {
        min-width: 150px;
        max-width: 150px;
    }
    
    .book-cover {
        height: 225px;
    }
    
    .books-slider {
        /* Rimuovo overflow-x: auto per permettere al transform di funzionare */
        overflow: visible;
    }
    
    .book-card {
        scroll-snap-align: start;
    }
    
    /* Mobile touch overlay - nascosto su mobile */
    .book-overlay {
        opacity: 0;
        pointer-events: none;
    }
    
    .book-info {
        padding-bottom: 10px;
    }
    
    .book-title {
        font-size: 0.95rem;
    }
    
    .book-author {
        font-size: 0.8rem;
    }
    
    .book-description {
        display: none;
    }
    
    .book-details-btn {
        padding: 8px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .netflix-hero {
        min-height: 180px;
        padding: 15px 10px;
    }
    
    .hero-content-horizontal {
        gap: 15px;
        padding: 10px;
    }
    
    .hero-logo-horizontal {
        height: 60px;
    }
    
    .hero-title-horizontal {
        padding: 0;
    }
    
    .hero-banner-svg {
        max-width: 480px;
        width: 95%;
        margin: 0 auto;
    }
    
    .letter-color {
        font-size: 1.5rem;
        letter-spacing: 0px;
    }
    
    .space {
        width: 0.3em;
    }
    
    .hero-line {
        margin: 5px 0;
        white-space: nowrap;
        display: flex;
        justify-content: center;
        flex-wrap: nowrap;
    }
    
    .category-title {
        font-size: 1.2rem;
    }
    
    .book-count {
        font-size: 0.85rem;
    }
    
    /* Frecce più grandi per schermi piccoli */
    .nav-arrow {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        border-width: 2px;
    }
    
    .category-nav-arrows {
        gap: 5px;
    }
    
    .netflix-category {
        margin-bottom: 35px;
    }
    
    .book-card {
        min-width: 130px;
        max-width: 130px;
    }
    
    .book-cover {
        height: 195px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .book-card:hover {
        transform: none;
    }
    
    .book-card:active {
        transform: scale(0.98);
    }
    
    /* Nascondi overlay su dispositivi touch */
    .book-overlay {
        opacity: 0 !important;
        pointer-events: none;
    }
    
    /* Frecce touch-friendly */
    .nav-arrow {
        -webkit-tap-highlight-color: transparent;
        user-select: none;
        touch-action: manipulation;
    }
    
    .nav-arrow:hover {
        transform: none;
    }
    
    .nav-arrow:active {
        transform: scale(0.85);
        background: #f0f0f0;
    }
    
    .nav-arrow:disabled:active {
        transform: none;
    }
}

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

.netflix-category {
    animation: fadeIn 0.5s ease-out;
}

/* Loading skeleton (optional for future) */
.book-card.loading {
    background: linear-gradient(90deg, #2a2a2a 25%, #333 50%, #2a2a2a 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

/* Sezione Novità - Stili Prominenti */
.novita-section {
    background: linear-gradient(135deg, #fff8e1 0%, #ffe0b2 100%);
    border-radius: 20px;
    padding: 30px 4%;
    margin-bottom: 60px;
    box-shadow: 0 8px 30px rgba(252, 195, 11, 0.3);
    border: 3px solid #FCC30B;
    position: relative;
    overflow: hidden;
}

.novita-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(253, 157, 36, 0.15) 0%, transparent 70%);
    animation: rotateGlow 10s linear infinite;
}

@keyframes rotateGlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.novita-section .category-header {
    position: relative;
    z-index: 2;
}

.novita-slider-container {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    padding: 20px 10px;
}

.novita-card {
    position: relative;
}

.novita-card .book-cover {
    border: 3px solid #FCC30B;
    box-shadow: 0 8px 25px rgba(252, 195, 11, 0.4);
}

.novita-card:hover .book-cover {
    border-color: #FD9D24;
    box-shadow: 0 12px 35px rgba(253, 157, 36, 0.5);
}


/* Responsive per Novità */
@media (max-width: 768px) {
    .novita-section {
        padding: 20px;
        margin-bottom: 40px;
        border-radius: 15px;
    }
}

@media (max-width: 480px) {
    .novita-section {
        padding: 15px;
        border-radius: 12px;
    }
}
