/* =========================================
   1. RESET & VARIABLES
   ========================================= */
:root {
    --primary-red: #b30000;
    --primary-red-hover: #ff1a1a;
    --text-main: #1a1a1a;
    --text-muted: #4a4a4a;
    
    /* Glass Effect Variables */
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    --glass-blur: blur(12px);
    
    /* Animation easing for "smooth" feel */
    --ease-elastic: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    /* Soft gradient background is REQUIRED for glass effect to be visible */
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ed 100%);
    background-attachment: fixed; /* Keeps background still while scrolling */
    color: var(--text-main);
    line-height: 1.6;
    padding-bottom: 50px;
    -webkit-font-smoothing: antialiased;
}

/* =========================================
   2. TYPOGRAPHY
   ========================================= */
h1, h2, h3, .heading {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: #111;
}

.heading {
    text-align: center;
    color: var(--primary-red);
    font-size: clamp(2rem, 5vw, 3.5rem); /* Fluid font size */
    margin: 60px 0 50px;
    text-shadow: 0 2px 10px rgba(179, 0, 0, 0.1);
}

/* =========================================
   3. LAYOUT & CONTAINER
   ========================================= */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

.book-section {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

/* =========================================
   4. THE GLASS CARD (The .book class) - UPDATED FOR DEPTH
   ========================================= */
.book {
    display: flex;
    flex-direction: column;
    align-items: center;
    
    /* Premium Glassmorphism */
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    
    /* --- NEW STRONGER, LAYERED SHADOWS --- */
    box-shadow: 
        /* Layer 1: Tighter, darker shadow for immediate definition */
        0 10px 25px -5px rgba(0, 0, 0, 0.18),
        /* Layer 2: Large, soft ambient shadow for deep depth */
        0 25px 50px -10px rgba(0, 0, 0, 0.1),
        /* Layer 3: The inner white glow (essential for glass look) */
        inset 0 0 25px rgba(255, 255, 255, 0.5);
        
    transition: transform 0.4s var(--ease-elastic), box-shadow 0.4s ease;
    overflow: hidden;
}

/* Hover Effect: Lift Higher with larger shadow cast */
.book:hover {
    /* Increased lift distance */
    transform: translateY(-12px) scale(1.01); 
    
    /* Heavier shadow on hover to simulate being further from background */
    box-shadow: 
        0 35px 60px -10px rgba(0, 0, 0, 0.25), 
        0 20px 30px -5px rgba(0, 0, 0, 0.15),
        inset 0 0 0 1px rgba(255,255,255,0.8); /* Brighter rim on hover */
}

/* =========================================
   5. BOOK IMAGES
   ========================================= */
.book img {
    width: 100%;
    max-width: 380px;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    transition: transform 0.5s ease;
    object-fit: cover;
}

/* Image zoom on card hover */
.book:hover img {
    transform: scale(1.03) rotate(1deg); /* Subtle rotation adds realism */
}

/* =========================================
   6. CONTENT & TEXT
   ========================================= */
.content {
    margin-top: 25px;
    text-align: center;
    color: var(--text-muted);
    width: 100%;
}

.content h1 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #000;
}

.content p {
    font-size: 1rem;
    margin-bottom: 15px;
    line-height: 1.7;
}

/* =========================================
   7. BUTTONS (Premium Feel)
   ========================================= */
.order-btn, .back-btn {
    display: inline-block;
    padding: 14px 32px;
    margin-top: 20px;
    
    /* Gradient Red */
    background: linear-gradient(135deg, #b30000 0%, #800000 100%);
    color: white;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.5px;
    
    border-radius: 50px; /* Pill shape is more modern */
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.3);
    
    transition: all 0.3s var(--ease-elastic);
}

.order-btn:hover, .back-btn:hover {
    background: linear-gradient(135deg, #ff1a1a 0%, #b30000 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.4);
}

.order-btn:active {
    transform: scale(0.95);
}

/* Back button container centering */
.back-btn-container {
    text-align: center;
    margin-top: 80px;
}

/* =========================================
   8. RESPONSIVE DESIGN (The Magic)
   ========================================= */

/* --- TABLET & DESKTOP (Width > 900px) --- */
@media (min-width: 900px) {
    .book {
        flex-direction: row; /* Side-by-side layout */
        align-items: center; /* Vertically center */
        justify-content: space-between;
        gap: 40px;
        padding: 40px;
    }

    .book img {
        width: 45%; /* Image takes left side */
        max-width: 400px;
    }

    .content {
        margin-top: 0;
        text-align: left; /* Left align text on desktop */
        width: 50%; /* Content takes right side */
    }

    .content h1 {
        font-size: 2.2rem;
    }
    
    /* Align button to the left on desktop */
    .order-btn {
        margin: 25px 0 0 0; 
    }
}

/* --- LARGE MOBILE (iPhone 14/15/16 Pro Max) --- */
@media (max-width: 899px) and (min-width: 500px) {
    .book img {
        max-width: 80%; /* Let image be larger on these screens */
    }
    
    .content h1 {
        font-size: 1.5rem;
    }
}

/* --- SMALL MOBILE (iPhone SE, Older Androids) --- */
@media (max-width: 499px) {
    .container {
        width: 92%; /* Utilize more screen width */
    }

    .heading {
        font-size: 2rem;
        margin-bottom: 40px;
    }

    .book {
        padding: 20px 15px; /* Tighter padding */
        border-radius: 20px;
    }

    .book img {
        width: 100%;
        max-width: 280px; /* Keep image manageable */
        border-radius: 12px;
    }

    .content {
        margin-top: 20px;
    }

    .content h1 {
        font-size: 1.25rem;
        line-height: 1.3;
    }

    .content p {
        font-size: 0.95rem; /* Slightly smaller text for readability */
        display: -webkit-box;
        -webkit-line-clamp: 6; /* Optional: truncate text if too long */
        -webkit-box-orient: vertical; 
        overflow: hidden;
    }

    .order-btn {
        width: 100%; /* Full width button on small mobile */
        text-align: center;
        padding: 12px;
        margin-top: 15px;
    }
}