/* 
 * style.css - Main stylesheet for Nir Nagar Books
 * Version: 2.0
 */

/* ---------- Variables & Root Settings ---------- */
:root {
    /* Color Palette */
    --primary: #0f172a;       /* Deep blue */
    --secondary: #1e293b;     /* Slate blue */
    --accent: #3b82f6;        /* Vibrant blue */
    --accent-hover: #2563eb;  /* Darker blue */
    --light: #f8fafc;         /* Almost white */
    --text: #334155;          /* Dark slate */
    --muted: #94a3b8;         /* Muted blue-gray */
    --success: #10b981;       /* Green */
    --warning: #f59e0b;       /* Amber */
    --danger: #ef4444;        /* Red */
    
    /* Gradients */
    --gradient-primary: linear-gradient(120deg, #3b82f6, #8b5cf6);
    --gradient-dark: linear-gradient(120deg, #0f172a, #1e293b);
    --gradient-light: linear-gradient(120deg, #f1f5f9, #e2e8f0);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Animations */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Dimensions */
    --header-height: 70px;
    --container-width: 1400px;
    --border-radius: 12px;
    --border-radius-lg: 20px;
}

/* ---------- Base Styles ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text);
    background-color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-normal);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition-normal);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    gap: 8px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-amazon {
    background: #FF9900;
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-amazon:hover {
    background: #e68a00;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-sample {
    background-color: white;
    color: var(--primary);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--muted);
}

.btn-sample:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* ---------- Link Animation Effect ---------- */
.link-animated {
    position: relative;
}

.link-animated::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: var(--gradient-primary);
    transition: var(--transition-normal);
}

.link-animated:hover::after {
    width: 100%;
}

/* ---------- Header ---------- */
.header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition-normal);
    height: var(--header-height);
    box-shadow: var(--shadow-sm);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.95);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 24px;
    color: var(--primary);
}

.logo img {
    height: 50px;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-link {
    font-weight: 500;
    color: var(--text);
}

.nav-link:hover {
    color: var(--accent);
}

.mobile-nav-toggle {
    display: none;
    cursor: pointer;
    background: transparent;
    border: none;
    font-size: 24px;
    color: var(--primary);
}

/* ---------- Hero Section ---------- */
.hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    background: var(--gradient-dark);
    margin-bottom: 100px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1507842217343-583bb7270b66?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2340&q=80');
    background-size: cover;
    background-position: center;
    opacity: 0.2;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 20px;
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 14px;
    color: var(--accent);
    margin-bottom: 20px;
    font-weight: 600;
}

.hero-title {
    font-size: 72px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    color: white;
}

.hero-desc {
    font-size: 18px;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
}

.btn-group {
    display: flex;
    gap: 16px;
}

/* ---------- Floating Elements ---------- */
.floating-element {
    position: absolute;
    border-radius: 50%;
    opacity: 0.8;
    filter: blur(40px);
    z-index: 0;
    pointer-events: none;
    animation: float 8s ease-in-out infinite alternate;
}

.floating-1 {
    width: 300px;
    height: 300px;
    background: rgba(59, 130, 246, 0.3);
    top: -150px;
    left: -100px;
}

.floating-2 {
    width: 200px;
    height: 200px;
    background: rgba(139, 92, 246, 0.3);
    bottom: -100px;
    right: -50px;
    animation-delay: 2s;
}

/* ---------- Books Section ---------- */
.books-section {
    padding: 100px 0;
    position: relative;
}

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

.section-subtitle {
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.section-title {
    font-size: 48px;
    font-weight: 800;
    color: var(--primary);
    position: relative;
    display: inline-block;
    padding-bottom: 16px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* Books Grid */
.books-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 40px;
}

/* Book Card */
.book-card {
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    cursor: pointer;
    position: relative;
    height: 400px;
    perspective: 1000px;
}

.book-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.book-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.book-card:hover .book-card-inner {
    transform: rotateY(10deg);
}

.book-cover {
    position: relative;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

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

.book-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0) 60%);
    display: flex !important;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    opacity: 0;
    transition: var(--transition-normal);
}

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

.book-info {
    color: white;
}

.book-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.book-genre {
    font-size: 14px;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 16px;
    background: rgba(59, 130, 246, 0.2);
    padding: 4px 10px;
    border-radius: 50px;
}

.book-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: white;
    font-size: 14px;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition-normal);
}

.book-card:hover .book-action {
    opacity: 1;
    transform: translateY(0);
}

/* Load More Button */
.load-more-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 60px;
}

.load-more-btn {
    min-width: 220px;
    min-height: 60px;
    font-size: 18px;
    border-radius: 32px;
    background: linear-gradient(120deg, #3b82f6, #8b5cf6);
    color: white;
    box-shadow: 0 8px 24px 0 rgba(60,60,200,0.08);
    transition: background 0.25s, transform 0.2s;
    font-weight: bold;
    letter-spacing: 1px;
}

.load-more-btn:hover {
    background: linear-gradient(120deg, #2563eb, #7c3aed);
    transform: translateY(-2px) scale(1.04);
}

/* ---------- Book Detail Modal ---------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 1000px;
    max-height: 90vh;
    overflow: hidden;
    transform: translateY(30px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: var(--shadow-xl);
    position: relative;
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    color: var(--text);
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    box-shadow: var(--shadow-md);
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--primary);
    color: white;
    transform: rotate(90deg);
}

.modal-content {
    display: flex;
    max-height: 90vh;
}

.modal-image {
    flex: 1;
    max-width: 40%;
    background: var(--primary);
    position: relative;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    mix-blend-mode: normal;
}

.modal-details {
    flex: 1.5;
    padding: 50px 40px;
    overflow-y: auto;
}

.modal-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--primary);
}

.modal-genre {
    font-size: 14px;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 24px;
    background: rgba(59, 130, 246, 0.1);
    padding: 4px 12px;
    border-radius: 50px;
}

.modal-description {
    margin-bottom: 30px;
    color: var(--text);
    font-size: 16px;
    line-height: 1.8;
}

.modal-quote {
    padding: 24px;
    background: var(--light);
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    position: relative;
}

.modal-quote::before {
    content: '"';
    font-size: 60px;
    color: var(--accent);
    position: absolute;
    top: 10px;
    left: 10px;
    line-height: 1;
    opacity: 0.2;
}

.modal-quote p {
    font-style: italic;
    color: var(--text);
    font-size: 18px;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

.modal-buttons {
    display: flex;
    gap: 16px;
    margin-top: 30px;
}

/* ---------- Back to Top Button ---------- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition-normal);
    z-index: 100;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* ---------- About Author Section ---------- */
.about-section {
    padding: 100px 0;
    background-color: var(--light);
    position: relative;
}

.about-content {
    display: flex;
    gap: 60px;
    align-items: center;
    margin-top: 40px;
}

.author-image {
    flex: 1;
    position: relative;
    max-width: 400px;
}

.author-image img {
    width: 100%;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

.author-social {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    background-color: white;
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: var(--shadow-md);
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    transition: var(--transition-normal);
}

.social-link:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-5px);
}

.author-info {
    flex: 1.5;
}

.author-name {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary);
}

.author-bio {
    margin-bottom: 30px;
}

.author-bio p {
    margin-bottom: 15px;
    font-size: 16px;
    line-height: 1.8;
    color: var(--text);
}

.author-stats {
    display: flex;
    gap: 30px;
}

.stat-item {
    text-align: center;
    background: white;
    padding: 20px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-number {
    display: block;
    font-size: 48px;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

/* ---------- Footer ---------- */
.footer {
    background: var(--primary);
    color: white;
    padding: 40px 0;
    text-align: center;
}

.footer-text {
    opacity: 0.8;
    font-size: 14px;
}

/* ---------- Loader ---------- */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-circle {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(59, 130, 246, 0.2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

/* ---------- Version Info ---------- */
.version-info {
    position: fixed;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.1);
    color: var(--muted);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 10;
    pointer-events: none;
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0);
    }
    100% {
        transform: translateY(30px) rotate(10deg);
    }
}

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

/* ---------- Responsive Styles ---------- */
@media (max-width: 1400px) {
    .books-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .hero-title {
        font-size: 60px;
    }
    
    .section-title {
        font-size: 40px;
    }
}

@media (max-width: 1200px) {
    .books-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .hero-title {
        font-size: 48px;
    }
    
    .section-title {
        font-size: 36px;
    }
}

@media (max-width: 992px) {
    .books-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .modal-content {
        flex-direction: column;
    }
    
    .modal-image {
        max-width: 100%;
        height: 300px;
    }
    
    .about-content {
        flex-direction: column;
        gap: 40px;
    }
    
    .author-image {
        max-width: 300px;
    }
    
    .author-name {
        font-size: 30px;
    }
    
    .hero-title {
        font-size: 42px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: white;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: var(--transition-normal);
        box-shadow: var(--shadow-lg);
        z-index: 1001;
        gap: 30px;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .mobile-nav-toggle {
        display: block;
        z-index: 1002;
    }
    
    .hero {
        height: auto;
        min-height: 100vh;
        padding: 120px 0 80px;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 12px;
    }
    
    .hero-desc {
        font-size: 16px;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
    }
    
    .books-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .book-card {
        height: auto;
        min-height: 320px;
    }
    
  
    
    .modal-details {
        padding: 30px 20px;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .modal-title {
        font-size: 28px;
    }
    
    .author-stats {
        flex-direction: column;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 32px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .load-more-btn {
        width: 100%;
    }
    
    .modal {
        max-height: 95vh;
    }
    
    .modal-quote {
        padding: 20px 15px;
    }
    
    .modal-quote p {
        font-size: 16px;
    }
}
/* 
 * תיקון למודל פרטי הספר - שיפור תצוגה במסכים קטנים
 * הוסף את הקוד הזה לסוף קובץ style.css שלך
 */

/* שיפור המודל */
.modal {
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* פריסה מחדש של תוכן המודל במסכים בינוניים וקטנים */
@media (max-width: 992px) {
    /* שינוי הפריסה לטור במקום שורה */
    .modal-content {
        flex-direction: column;
        max-height: 85vh;
        overflow-y: auto;
    }
    
    /* התאמת התמונה */
    .modal-image {
        max-width: 100%;
        height: 250px;
        flex: none;
    }
    
    /* קיצור המרווחים */
    .modal-details {
        padding: 25px 20px;
        overflow-y: auto;
    }
    
    /* הקטנת הכותרת */
    .modal-title {
        font-size: 28px;
        margin-bottom: 10px;
    }
    
    /* הקטנת המרווחים */
    .modal-genre {
        margin-bottom: 15px;
    }
    
    /* הקטנת גודל הטקסט בתיאור */
    .modal-description {
        font-size: 15px;
        line-height: 1.6;
        margin-bottom: 20px;
    }
    
    /* הקטנת הציטוט */
    .modal-quote {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .modal-quote p {
        font-size: 15px;
        line-height: 1.6;
    }
    
    /* שיפור הכפתורים */
    .modal-buttons {
        margin-top: 20px;
        gap: 10px;
    }
}

/* התאמות נוספות למסכים קטנים יותר */
@media (max-width: 600px) {
    .modal {
        max-height: 90vh;
    }
    
    .modal-image {
        height: 200px;
    }
    
    .modal-details {
        padding: 20px 15px;
    }
    
    .modal-title {
        font-size: 24px;
    }
    
    .modal-description, 
    .modal-quote p {
        font-size: 14px;
        line-height: 1.5;
    }
    
    /* לוודא שהכפתורים עובדים בטלפונים */
    .modal-buttons .btn {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }
}

/* 
 * תיקון לקיטוע טקסט במודל בטלפון נייד
 * הוסף את הקוד הזה לסוף קובץ style.css שלך
 */

/* שיפור המודל במובייל - תיקון קיטוע טקסט */
@media (max-width: 767px) {
    /* מוודא שהמודל מכיל את כל התוכן */
    .modal {
        max-height: 85vh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    
    /* הגדרת תוכן המודל כבר גלילה */
    .modal-content {
        display: flex;
        flex-direction: column;
        overflow-y: auto;
        max-height: 85vh;
        flex-grow: 1;
    }
    
    /* הגדרת התמונה כגובה קבוע */
    .modal-image {
        height: 220px; /* גובה קבוע לתמונה */
        min-height: 220px; /* מניעת כיווץ */
        flex: none; /* ביטול גמישות */
        width: 100%;
        overflow: hidden;
    }
    
    /* תיקון תמונה */
    .modal-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    /* אזור הפרטים - הגדרת גלילה */
    .modal-details {
        padding: 20px 15px;
        overflow-y: auto;
        flex-grow: 1;
        max-height: calc(85vh - 220px); /* מקסימום גובה בניכוי התמונה */
    }
    
    /* סגנון תוכן - הקטנה כדי שיתאים יותר למסך קטן */
    .modal-title {
        font-size: 24px;
        margin-bottom: 10px;
    }
    
    .modal-genre {
        margin-bottom: 15px;
    }
    
    .modal-description {
        font-size: 15px;
        line-height: 1.6;
        margin-bottom: 15px;
    }
    
    .modal-quote {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .modal-quote p {
        font-size: 15px;
        line-height: 1.6;
    }
    
    /* כפתורים */
    .modal-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 15px;
        margin-bottom: 15px;
    }
    
    .modal-buttons .btn {
        width: 100%;
    }

    /* תיקון סיום נכון של המודל שלא יקטע */
    .modal-overlay {
        padding: 15px;
    }
    
    /* וידוא שהמודל נפתח במיקום נכון */
    .modal-overlay.active .modal {
        transform: translateY(0) scale(1);
    }
}

/* התאמות נוספות למסכים קטנים מאוד */
@media (max-width: 380px) {
    .modal-image {
        height: 200px;
        min-height: 200px;
    }
    
    .modal-details {
        max-height: calc(85vh - 200px);
    }
    
    .modal-title {
        font-size: 22px;
    }
    
    .modal-description, 
    .modal-quote p {
        font-size: 14px;
    }
}


/* 
 * תיקון הגבלת מספר הספרים במובייל - גרסה 4.0
 * הוסף את הקוד הזה לסוף קובץ style.css שלך
 */
