/* ==========================================================================
   INDEX.CSS - DARBY MICHAELS OFFICIAL SITE
   ========================================================================== */

/* --- 1. FULL-WIDTH SECTION BANDING & ZIGZAG --- */

/* Every even book row gets the medium cream banding AND flips the layout */
#book-list .book-row:nth-child(even) {
    background-color: #f2eee4;
    flex-direction: row-reverse; /* Reverses the layout: Image Right, Text Left */
}

/* --- 2. LAYOUT & ALIGNMENT --- */
.book-row {
    display: flex;
    gap: 80px;
    padding: 120px 60px;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* --- 3. IMAGE & VIDEO SCALING --- */
.book-image {
    flex: 0 0 320px; /* Prevents the image column from shrinking */
}

.media-wrapper {
    position: relative; /* Anchor for absolute video */
    width: 320px;
    height: 480px; /* Maintains 2:3 book ratio */
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.static-poster {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;
}

.book-video {
    position: absolute; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; 
    z-index: 2;
}

/* --- 4. TYPOGRAPHY & TEXT STYLING --- */
.book-info {
    flex: 0 1 500px;
}

.status-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #777; 
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.book-info h2 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.book-tagline {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1a1a1a; 
    margin-bottom: 20px;
}

.book-info p {
    line-height: 1.6;
    color: #333;
}

/* --- 5. BUTTONS --- */
.button-group {
    display: flex;
    gap: 15px;
    margin-top: 35px;
}

.btn {
    background: #ae0000;
    color: white;
    padding: 16px 32px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    transition: background 0.3s ease;
    display: inline-block;
}

.btn:hover {
    background: #8e0000;
}

.btn-secondary {
    border: 1px solid #1a1a1a;
    padding: 16px 32px;
    text-decoration: none;
    color: #1a1a1a;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    display: inline-block;
}

/* --- 6. NEWSLETTER --- */
#newsletter {
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 140px 60px;
    text-align: center;
}

#newsletter h2 {
    color: #ffffff;
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    margin-bottom: 20px;
}

.newsletter-container {
    max-width: 600px;
    margin: 40px auto 0;
}

/* --- 7. RESPONSIVE MOBILE FIX --- */
@media (max-width: 800px) {
    /* 1. Force the video to stay hidden */
    .book-video {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }

    /* 2. FORCE the image to be visible at all times */
    /* This overrides any JavaScript trying to hide it */
    .static-poster {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        z-index: 10 !important; /* Put it on the very top layer */
    }

    /* 3. Ensure the container doesn't disappear */
    .media-wrapper {
        display: block !important;
        width: 320px !important;
        height: 480px !important;
        background-color: transparent !important;
    }

    /* Keep your existing layout alignment */
    .book-row, #book-list .book-row:nth-child(even) {
        flex-direction: column !important;
        padding: 60px 20px;
        gap: 30px;
        align-items: flex-start; 
    }

    .book-info, .book-info h2, .book-info p, .status-label, .book-tagline {
        text-align: left;
        width: 100%;
    }

    .button-group {
        justify-content: flex-start; 
    }
}