/* WiseLeaf Perfect Horizontal Journal Cards */
/* Portrait book covers with horizontal content layout */

/* FULL-WIDTH HORIZONTAL JOURNAL CARD - STACK VERTICALLY */
.journal-card {
    background: white !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08) !important;
    transition: all 0.3s ease !important;
    border: 1px solid #e5e7eb !important;
    
    /* HORIZONTAL: Portrait Cover LEFT + Content RIGHT */
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    min-height: 200px !important;
    margin-bottom: 24px !important;
    width: 100% !important;
    
    /* Force vertical stacking */
    clear: both !important;
    float: none !important;
}

/* Ensure journal list container stacks cards vertically */
.journals-list {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 0 !important;
}

.journal-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: var(--shadow-elevated) !important;
    border-color: var(--accent-color) !important;
}

/* LEFT SECTION: Bigger Portrait Book Cover */
.journal-image {
    /* Bigger book cover dimensions */
    width: 160px !important;
    min-width: 160px !important;
    height: 100% !important;
    flex-shrink: 0 !important;
    order: 1 !important;
    
    /* Center the portrait cover perfectly */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    
    /* Clean book cover area */
    background: #f9fafb !important;
    border-right: 1px solid #e5e7eb !important;
    padding: 20px !important;
    
    /* Text fallback for missing covers */
    color: #6b7280 !important;
    font-size: 0.8rem !important;
    text-align: center !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
}

/* RIGHT SECTION: Journal Content & Buttons */
.journal-content {
    flex: 1 !important;
    order: 2 !important;
    padding: 24px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    
    /* Perfect vertical spacing */
    gap: 12px !important;
}

/* Journal Title - Clean & Professional */
.journal-title {
    font-family: 'Merriweather', serif !important;
    font-size: 1.2rem !important;
    font-weight: 600 !important;
    color: #111827 !important;
    line-height: 1.3 !important;
    margin: 0 0 8px 0 !important;
    
    /* Ensure full title displays with proper wrapping */
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-wrap: break-word !important;
    hyphens: auto !important;
}

/* Journal Description - Brief & Clear */
.journal-description {
    color: #6b7280 !important;
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    margin: 0 0 12px 0 !important;
    
    /* Limit to 2 lines for perfect layout */
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* Meta Information - Clean Icons */
.journal-meta {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
    margin: 0 0 16px 0 !important;
}

.journal-meta-item {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 0.8rem !important;
    color: #6b7280 !important;
}

.journal-meta-item i {
    color: #0c4a60 !important;
    font-size: 0.75rem !important;
}

/* BOTTOM: Journal action buttons */
.journal-actions {
    display: flex !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
    margin-top: auto !important;
    padding-top: 5px !important;
}

.journal-btn {
    padding: 10px 20px !important;
    border-radius: var(--border-radius-sm) !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    text-decoration: none !important;
    transition: var(--transition) !important;
    border: 2px solid transparent !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.journal-btn.primary {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
}

.journal-btn.primary:hover {
    background: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
    transform: translateY(-2px) !important;
}

.journal-btn:not(.primary) {
    background: transparent !important;
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.journal-btn:not(.primary):hover {
    background: var(--primary-color) !important;
    color: white !important;
    transform: translateY(-2px) !important;
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    .journal-card {
        flex-direction: column !important;
        min-height: auto !important;
    }
    
    .journal-image {
        width: 100% !important;
        min-width: 100% !important;
        height: 160px !important;
        min-height: 160px !important;
        background-position: center top !important;
    }
    
    .journal-content {
        padding: 20px !important;
    }
    
    .journal-title {
        font-size: 1.2rem !important;
    }
    
    .journal-actions {
        justify-content: center !important;
    }
    
    .journal-btn {
        flex: 1 !important;
        justify-content: center !important;
        min-width: 120px !important;
    }
}

@media (max-width: 480px) {
    .journal-meta {
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    .journal-actions {
        flex-direction: column !important;
    }
    
    .journal-btn {
        width: 100% !important;
    }
}

/* Loading state */
.journal-image[data-loading="true"] {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color)) !important;
}

.journal-image[data-loading="true"]:after {
    content: "Loading Cover..." !important;
    color: white !important;
    font-size: 0.8rem !important;
    opacity: 0.7 !important;
}