/* Main Layout */
body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-image: url('../../images/light_wool.png');
    background-repeat: repeat;
    padding-top: 70px; /* Account for fixed navbar */
}

.main-content {
    min-height: calc(100vh - 200px);
    padding-top: 20px;
    padding-bottom: 40px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

h1 {
    font-size: 1.8rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.3rem;
}

h4 {
    font-size: 1.1rem;
}

h5 {
    font-size: 1rem;
}

h6 {
    font-size: 0.9rem;
}

h2 a, h3 a {
    color: #333;
    text-decoration: none;
}

h2 a:hover, h3 a:hover {
    color: #483d8b;
    text-decoration: none;
}

/* Content Section */
section.content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

section.content h1:first-child {
    margin-top: 0;
}

/* Byline (Date) */
section.byline {
    padding-bottom: 10px;
    font-size: 0.85em;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Horizontal Rules */
hr {
    margin: 10px 0;
    border: 0;
    border-top: 1px solid #eee;
}

/* Post Listing */
ul.listing {
    padding: 0;
    margin: 0 0 25px 0;
    list-style: none;
}

ul.listing li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

ul.listing li:last-child {
    border-bottom: none;
}

ul.listing li h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

ul.listing li .date {
    float: right;
    padding-top: 3px;
    font-size: 0.85em;
    color: #999;
    text-transform: uppercase;
}

/* Table of Contents */
.toc {
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 20px;
    float: right;
    width: 300px;
    margin: 0 0 20px 20px;
    background: white;
    border: 1px solid #ddd;
}

/* Hide TOC in listing/summary views (only show in full article) */
.listing .toc,
ul.listing .toc {
    display: none !important;
}

.toc .toctitle {
    font-weight: bold;
    font-size: 1.1em;
    display: block;
    margin-bottom: 10px;
    color: #483d8b;
}

.toc ul {
    list-style: disc;
    padding-left: 20px;
    margin: 0;
}

.toc li {
    margin: 8px 0;
    font-size: 0.9em;
}

.toc a {
    color: #333;
    text-decoration: none;
}

.toc a:hover {
    color: #483d8b;
}

/* Responsive TOC */
@media (max-width: 768px) {
    .toc {
        float: none;
        width: 100%;
        margin: 20px 0;
    }
}

/* Tags and Badges */
.tags {
    margin-top: 15px;
}

.badge {
    margin-right: 5px;
    margin-bottom: 5px;
    font-weight: normal;
    padding: 0.5em 0.8em;
}

/* Code Blocks */
pre {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    overflow-x: auto;
}

code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

pre code {
    background: transparent;
    padding: 0;
}

/* Images */
article img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Tables */
article table {
    width: 100%;
    margin: 20px 0;
    border-collapse: collapse;
}

article table th,
article table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

article table th {
    background: #f5f5f5;
    font-weight: 600;
}

/* Footer */
.footer {
    border-top: 1px solid #ddd;
    margin-top: 40px;
}

.footer p {
    margin: 0;
    font-size: 0.9em;
}

/* Pagination */
.pagination {
    margin-top: 30px;
}

.pagination .page-link {
    color: #483d8b;
}

.pagination .page-item.active .page-link {
    background-color: #483d8b;
    border-color: #483d8b;
    color: white;
}

/* Navbar Spacing */
.navbar-nav .nav-item {
    margin-left: 15px;
    margin-right: 15px;
}

.navbar-brand {
    margin-right: 30px;
}

/* About Section Sub-Navigation */
.about-subnav {
    background-color: #f8f9fa;
    border-bottom: 2px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 0;
}

.about-subnav .navbar-nav {
    font-size: 0.95rem;
}

.about-subnav .nav-link {
    color: #483d8b;
    font-weight: 500;
}

.about-subnav .nav-link:hover {
    color: #6a5acd;
}

/* Family Sub-Section Sub-Navigation */
.family-subnav {
    background-color: #e9ecef;
    border-bottom: 2px solid #ccc;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.family-subnav .navbar-nav {
    font-size: 0.9rem;
}

.family-subnav .nav-link {
    color: #483d8b;
    font-weight: 500;
}

.family-subnav .nav-link:hover {
    color: #6a5acd;
}

/* Responsive Utilities for Icons in Navbar */
@media (min-width: 992px) {
    .navbar-nav .nav-link span {
        display: none;
    }
}

/* Page Header */
.page-header {
    padding-bottom: 15px;
    margin: 40px 0 20px;
    border-bottom: 2px solid #483d8b;
}

/* Movie images (for legacy content) */
img.movieimg {
    width: 160px;
    height: 240px;
    object-fit: cover;
}

div.movierow {
    margin: 4px;
}

/* Poetry Page Formatting (ಕಗ್ಗ) - Two Column Layout */
.poetry-content {
    max-width: 100%;
}

.poetry-stanza {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.poetry-kannada {
    white-space: pre-line;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.8;
    color: #2c3e50;
}

.poetry-english {
    white-space: pre-line;
    font-size: 0.95rem;
    line-height: 1.8;
    color: #555;
    font-style: italic;
}

/* Responsive: Stack on mobile */
@media (max-width: 768px) {
    .poetry-stanza {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .poetry-kannada {
        font-size: 1rem;
    }

    .poetry-english {
        font-size: 0.9rem;
        padding-top: 10px;
        border-top: 1px dashed #ddd;
    }
}

/* ==========================================
   Sandhyavandanam Page Styles
   ========================================== */

.sv-page-header {
    background: linear-gradient(135deg, #8b1a1a, #c0392b);
    color: #fff;
    text-align: center;
    padding: 32px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.sv-page-header h1 {
    font-size: 2em;
    margin: 0 0 6px;
    color: #fff;
}

.sv-page-header p {
    font-family: 'Georgia', serif;
    font-size: 1.05em;
    opacity: 0.9;
    margin: 0;
}

.sv-section {
    background: #fff;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.sv-section-header {
    background: linear-gradient(90deg, #8b1a1a, #a0522d);
    color: #fff;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.sv-title-kn {
    font-size: 1.2em;
    font-weight: 600;
}

.sv-title-en {
    font-family: 'Georgia', serif;
    font-size: 0.92em;
    opacity: 0.9;
}

.sv-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 50px;
}

.sv-col-left {
    padding: 18px 20px;
    border-right: 2px solid #f0e6d6;
    background: #fffdf9;
}

.sv-col-right {
    padding: 18px 20px;
    font-family: 'Georgia', serif;
    color: #444;
    background: #fefcf7;
    font-size: 0.93em;
    line-height: 1.85;
}

.sv-col-right em {
    color: #8b1a1a;
    font-style: normal;
    font-weight: 600;
}

.sv-col-right p {
    margin: 8px 0;
}

.sv-col-left p {
    margin: 8px 0;
}

.sv-mantra {
    font-size: 1.05em;
    color: #1a1a1a;
    line-height: 2;
}

.sv-mantra-highlight {
    font-size: 1.1em;
    font-weight: bold;
    color: #8b1a1a;
    line-height: 2.1;
}

.sv-repeat {
    color: #999 !important;
    font-style: italic;
}

.sv-sub-heading {
    font-weight: bold !important;
    color: #8b1a1a;
    font-size: 1.05em;
}

.sv-instruction {
    background: #f9f3e8;
    border-left: 3px solid #c0a060;
    padding: 8px 14px;
    margin: 10px 0;
    font-size: 0.9em;
    color: #5a4a30;
    border-radius: 0 4px 4px 0;
}

.sv-instruction-eng {
    background: #f5f0e5;
    border-left: 3px solid #b0956a;
    padding: 8px 14px;
    margin: 10px 0;
    font-size: 0.88em;
    color: #5a4a30;
    border-radius: 0 4px 4px 0;
    font-style: italic;
}

.sv-note {
    font-size: 0.85em;
    color: #777;
    margin-top: 6px;
}

.sv-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 0.9em;
}

.sv-table th {
    background: #f0e6d6;
    padding: 7px 10px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #d4c4a8;
}

.sv-table td {
    padding: 5px 10px;
    border-bottom: 1px solid #f0e6d6;
}

.sv-closing {
    background: linear-gradient(135deg, #8b1a1a, #c0392b);
    color: #fff;
    text-align: center;
    padding: 28px 20px;
    border-radius: 8px;
    margin-top: 24px;
}

.sv-closing-kn {
    font-size: 1.3em;
    font-weight: bold;
    margin: 6px 0;
}

.sv-closing-en {
    font-family: 'Georgia', serif;
    font-size: 1em;
    opacity: 0.9;
    margin: 4px 0 12px;
}

@media (max-width: 768px) {
    .sv-two-col {
        grid-template-columns: 1fr;
    }
    .sv-col-left {
        border-right: none;
        border-bottom: 2px solid #f0e6d6;
    }
    .sv-section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .sv-page-header h1 {
        font-size: 1.5em;
    }
}
