/* Google Fonts - for a clean, modern spiritual feel */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* Custom CSS for Serene Temple Aesthetic */
body {
    font-family: 'Inter', sans-serif;
    /* Tailwind will manage background-color from config via `bg-background-cream` class on <body> */
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.book-container {
    background-color: #ffffff; /* Pure White Content Area */
    border: 1px solid #e0e0e0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); /* Soft, pronounced shadow */

    /* All responsive sizing, centering, and padding will now be handled by Tailwind classes in the HTML. */

    border-radius: 16px; /* Base border-radius for all screen sizes */
    flex-grow: 1;
}

@media (min-width: 640px) { /* Adjust border-radius for larger screens */
    .book-container {
        border-radius: 24px; /* Larger border-radius for larger screens */
    }
}

.book-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    cursor: pointer;
    background-color: #fcfcfc; /* Off-white card background */
    border: 1px solid rgba(0,0,0,0.1); /* ADJUSTED: Thinner, subtle border color */
    /* REMOVED: overflow: hidden;  <-- This was causing the buttons to be clipped */
}

.book-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 15px rgba(14, 118, 140, 0.2); /* Soft focus shadow using the Teal accent */
    background-color: theme('colors.light-blue-fill'); /* Referencing Tailwind custom color */
}

.card-header-bg {
    background-color: theme('colors.accent-teal'); /* Deep Teal */
    color: #ffffff;
    padding: 10px 20px;
    font-weight: 700;
}

.hindi-title {
    color: theme('colors.accent-saffron'); /* Saffron/Gold */
    font-size: 1.6rem;
    font-weight: 900;
    line-height: 1.1;
}

/* --- START MODIFICATION FOR INDEX ITEMS & MOBILE RESPONSIVENESS --- */
/* The .index-item is now an <a> tag */
.index-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px dashed #e0e0e0;
    cursor: pointer; /* Ensure the entire area shows a pointer */
    text-decoration: none; /* Remove default underline from <a> */
    color: inherit; /* Inherit text color, so it's not default blue */
    transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    border-radius: 8px;
    margin-bottom: 5px;
    background-color: #ffffff;
    word-break: break-word; /* Prevents long words from overflowing on smaller screens */
}

.index-item:hover {
    background-color: theme('colors.light-blue-fill');
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.index-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* Styles for the "Read" indicator, which is now a <span> inside the clickable <a> */
.read-chapter-indicator {
    background-color: theme('colors.accent-teal');
    color: white;
    padding: 8px 16px;
    border-radius: 20px; /* Pill shape */
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap; /* Prevent wrapping */
    transition: background-color 0.2s ease, transform 0.2s ease;
    margin-left: 20px; /* Space from title on larger screens */
    display: inline-flex; /* For alignment */
    align-items: center;
}

/* Hover effect for the indicator when the parent index-item is hovered */
.index-item:hover .read-chapter-indicator {
    background-color: theme('colors.hover-teal');
    transform: translateY(-1px);
}

/* --- NEW MEDIA QUERY FOR MOBILE STYLES (applies below 640px viewport width) --- */
@media (max-width: 639px) {
    .index-item {
        flex-direction: column; /* Stack items vertically on mobile */
        align-items: flex-start; /* Align all content to the left */
        padding: 10px 15px; /* Adjust padding for smaller screens */
    }

    .index-item > div:first-child { /* This targets the <div> containing Hindi and English titles */
        width: 100%; /* Make the text content take full width */
        padding-right: 0; /* Remove right padding to allow full width usage */
        margin-bottom: 10px; /* Add some space below the text before the button */
    }

    .read-chapter-indicator {
        width: 100%; /* Make the button take full width */
        text-align: center; /* Center the "Read" text inside the button */
        margin-left: 0; /* Remove left margin on mobile */
        margin-top: 5px; /* Small gap from the text above */
        padding: 10px; /* Adjust button padding for better tap target */
    }
}
/* --- END MODIFICATION FOR INDEX ITEMS & MOBILE RESPONSIVENESS --- */

/* Style for the actual Aarti text area */
.aarti-text {
    white-space: pre-wrap; /* Ensures line breaks in the text data are respected */
    word-break: break-word; /* NEW: Forces long words to wrap to the next line */
    font-size: 1.15rem;
    line-height: 2.0; /* Increased line height for better readability of Hindi/Sanskrit text */
    text-align: center;
    padding: 24px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
}
/* Style for the actual Stotra/Aarti text area - IMPROVED CONTRAST */
.aarti-text {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 1.15rem;
    line-height: 2.0;
    text-align: left;
    padding: 24px 20px; /* <-- मोबाइल के लिए डिफ़ॉल्ट पैडिंग (ऊपर-नीचे 24px, दाएं-बाएं 20px) */
    
    /* --- NEW COLORS WITH BETTER CONTRAST --- */
    background-color: #FEF9E7; /* A very light, pleasant cream background like the image */
    color: #BF360C;             /* A deeper, richer, and less bright Saffron/Brown color */
    border: 1px solid #FAD7A0;  /* A soft, matching border */
}
/* --- Style for Deity Info in Index List --- */
.deity-info {
    font-size: 0.85rem; /* 14px */
    color: #555;
    display: flex;
    align-items: center;
    font-weight: 500;
}
/* --- डेस्कटॉप स्क्रीन के लिए पैडिंग (640px और उससे ज़्यादा चौड़ी) --- */
@media (min-width: 640px) {
    .aarti-text {
        padding: 24px 60px; /* <-- डेस्कटॉप के लिए ज़्यादा पैडिंग */
    }
}
/* --- लंबे शब्दों को स्क्रीन से बाहर जाने से रोकने के लिए --- */
#content-title {
    overflow-wrap: break-word;
    word-break: break-word;
}