/* Base Styles for a Clean, Formal Look */
body {
    font-family: 'Noto Serif Devanagari', serif; /* Primary font for Marathi text */
    margin: 0;
    background-color: #fcfaf5; /* A soft, off-white background, like aged paper */
    color: #333; /* Dark grey for main text, softer than pure black */
    line-height: 1.6; /* Good line spacing for readability */
    font-size: 1.1em; /* Slightly larger base font size */
    -webkit-font-smoothing: antialiased; /* Smoother font rendering */
    -moz-osx-font-smoothing: grayscale; /* Smoother font rendering for Firefox */
    display: flex; /* Use flexbox for sidebar and main content layout */
    min-height: 100vh; /* Ensure body takes full viewport height */
}

/* Sidebar Styling - Left-hand Navigation */
.sidebar {
    width: 280px; /* Fixed width for the sidebar */
    background-color: #2c3e50; /* Dark, professional background */
    color: #ecf0f1; /* Light text for contrast */
    padding-top: 20px;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15); /* Subtle shadow for depth */
    position: fixed; /* Keep sidebar fixed while content scrolls */
    height: 100%;
    overflow-y: auto; /* Enable scrolling for long Aarti lists */
    flex-shrink: 0; /* Prevent sidebar from shrinking */
}

.app-title {
    font-size: 1.9em;
    font-weight: 700; /* Bold title */
    text-align: center;
    padding: 20px;
    color: #fcfaf5; /* Slightly brighter for the title */
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Subtle separator */
}

.sidebar nav a {
    padding: 14px 25px; /* Generous padding for navigation links */
    text-decoration: none;
    font-size: 1.05em;
    color: #bdc3c7; /* Softer white for links */
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); /* Light separator between links */
    transition: background-color 0.2s, color 0.2s; /* Smooth transition for hover effects */
}

.sidebar nav a:hover,
.sidebar nav a:focus {
    background-color: #34495e; /* Highlight on hover/focus */
    color: #ffffff; /* Brighter text on hover */
    outline: none; /* Remove default focus outline */
}

/* Main Content Area - The "Book Page" */
.main-content {
    margin-left: 280px; /* Offset for the fixed sidebar */
    flex-grow: 1; /* Allow content to take remaining space */
    max-width: 900px; /* Constrain content width for a book-page feel */
    margin-right: auto; /* Center content horizontally */
    margin-top: 30px; /* Top margin for overall page aesthetic */
    margin-bottom: 30px; /* Bottom margin */
    padding: 50px 60px; /* Generous padding inside the content box */
    background-color: #ffffff; /* White background for the "page" */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); /* More pronounced shadow for page depth */
    border-radius: 8px; /* Slightly rounded corners for a softer look */
    min-height: calc(100vh - 60px); /* Ensure content area takes full height minus margins */
}

/* Header Styling */
header {
    text-align: center;
    margin-bottom: 50px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee; /* Subtle separator below header */
}

header h1 {
    font-size: 2.8em;
    color: #2c3e50; /* Darker color for main titles */
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.2em;
    color: #7f8c8d; /* Muted color for subtitle */
    font-style: italic;
    margin-top: 0;
}

/* Aarti Section Styling */
.aarti-section {
    margin-bottom: 50px; /* Space between different Aarti sections */
    padding-bottom: 30px;
    border-bottom: 1px dashed #e0e0e0; /* Dotted line separator for a classic look */
}

.aarti-section:last-child {
    border-bottom: none; /* No border after the last section */
    margin-bottom: 0;
    padding-bottom: 0;
}

.aarti-section h2 {
    font-size: 2.2em;
    color: #2980b9; /* A distinct, elegant color for Aarti titles */
    text-align: center;
    margin-bottom: 30px;
    margin-top: 40px;
    line-height: 1.3;
    font-weight: 700;
    border-bottom: 2px solid rgba(41, 128, 185, 0.2); /* Underline effect for H2 */
    display: inline-block; /* Make underline fit text width */
    padding-bottom: 8px;
    width: auto;
    max-width: 100%;
    box-sizing: border-box; /* Include padding/border in element's total width */
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.aarti-section h3.sub-aarti-title {
    font-size: 1.6em;
    color: #34495e;
    text-align: center;
    margin-top: 40px;
    margin-bottom: 25px;
    font-weight: 600;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    display: inline-block;
}


/* Paragraph and Line Formatting - Key for Typeset Style */
.aarti-section p {
    text-align: justify; /* Justify text for a clean, block-like appearance */
    margin-bottom: 1.2em; /* More space between paragraphs/stanzas */
    text-indent: 1.8em; /* First line indentation for a traditional book look */
    line-height: 2; /* Increased line height for poetic text readability */
    font-size: 1.15em; /* Slightly larger font within paragraphs for emphasis */
    padding: 0 10px; /* Small horizontal padding to prevent text from touching edges */
}

/* Specific styling for line breaks within a stanza */
.aarti-section p br {
    display: block; /* Ensure line breaks function correctly */
    margin-bottom: 0.2em; /* Small space between lines within a stanza */
}


/* Footer Styling */
footer {
    text-align: center;
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #7f8c8d;
    font-size: 0.9em;
}

/* Basic Responsiveness (for smaller screens) */
@media (max-width: 768px) {
    body {
        flex-direction: column; /* Stack sidebar and content vertically */
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: static; /* Remove fixed positioning */
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        padding-bottom: 0;
        overflow-y: hidden; /* Prevent sidebar scrolling on mobile */
    }

    .sidebar nav {
        display: flex; /* Make navigation items horizontal */
        flex-wrap: wrap; /* Allow items to wrap to next line */
        justify-content: center; /* Center items */
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .sidebar nav a {
        flex-grow: 1; /* Allow links to grow to fill space */
        text-align: center;
        border-bottom: none; /* Remove bottom border */
        border-right: 1px solid rgba(255, 255, 255, 0.05); /* Add right border */
        padding: 10px 15px;
        font-size: 0.95em;
    }
    .sidebar nav a:last-child {
        border-right: none;
    }

    .app-title {
        border-bottom: none;
        margin-bottom: 0;
    }

    .main-content {
        margin-left: 0; /* Remove left margin */
        margin-top: 20px;
        max-width: 95%; /* Adjust max-width for smaller screens */
        padding: 30px; /* Adjust padding */
        min-height: auto; /* Allow content to dictate height */
    }

    header h1 {
        font-size: 2em;
    }

    .aarti-section h2 {
        font-size: 1.7em;
        margin-top: 30px;
        margin-bottom: 20px;
    }

    .aarti-section p {
        text-indent: 1.5em; /* Slightly reduced indent */
        font-size: 1.05em;
        line-height: 1.8;
        padding: 0; /* Remove extra paragraph padding on small screens */
    }
}