/* ============================================
   Kandamangalam.com - Vedic Rituals Theme
   Warm, spiritual, temple-inspired design
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: Georgia, 'Times New Roman', 'Palatino Linotype', serif;
    background-color: #FFF8F0;
    color: #3B2D1E;
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Links --- */
a {
    color: #CC5500;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #FF6600;
    text-decoration: underline;
}

/* --- Header / Banner --- */
.site-header {
    background-color: #CC5500;
    text-align: center;
    border-bottom: 3px solid #A04000;
}

.banner-image {
    width: 100%;
    max-height: 120px;
    object-fit: cover;
    display: block;
}

.site-title-bar {
    background: linear-gradient(135deg, #FF6600 0%, #CC5500 50%, #A04000 100%);
    padding: 12px 20px;
}

.site-title-bar h1 {
    margin: 0;
    font-size: 1.6rem;
    font-family: Georgia, 'Times New Roman', serif;
    letter-spacing: 1px;
}

.site-title-bar h1 a {
    color: #FFF8F0;
    text-decoration: none;
}

.site-title-bar h1 a:hover {
    color: #FDF5E6;
    text-decoration: none;
}

/* --- Navigation --- */
.site-nav {
    background-color: #3B2D1E;
    padding: 8px 20px;
    text-align: center;
    border-bottom: 2px solid #CC5500;
}

.site-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0;
    padding: 0;
    margin: 0;
}

.site-nav li {
    display: flex;
    align-items: center;
}

.site-nav li:not(:last-child)::after {
    content: "|";
    color: #A08060;
    margin: 0 8px;
    font-size: 0.85rem;
}

.site-nav a {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.85rem;
    color: #FDF5E6;
    text-decoration: none;
    padding: 4px 4px;
    transition: color 0.2s ease, background-color 0.2s ease;
    border-radius: 3px;
}

.site-nav a:hover {
    color: #FF6600;
    text-decoration: none;
}

.site-nav a.active {
    color: #FF6600;
    font-weight: bold;
}

/* --- Main Content --- */
.content {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 30px 20px;
    flex: 1;
}

.content h1 {
    font-size: 1.8rem;
    color: #3B2D1E;
    border-bottom: 2px solid #CC5500;
    padding-bottom: 8px;
    margin-bottom: 20px;
}

.content h2 {
    font-size: 1.4rem;
    color: #5A3E28;
    margin-top: 30px;
    margin-bottom: 12px;
    border-bottom: 1px solid #DDD0C0;
    padding-bottom: 5px;
}

.content h3 {
    font-size: 1.2rem;
    color: #6B4C35;
    margin-top: 20px;
    margin-bottom: 10px;
}

.content p {
    margin-bottom: 16px;
    text-align: justify;
}

.content img {
    max-width: 100%;
    height: auto;
    border: 2px solid #DDD0C0;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(59, 45, 30, 0.15);
}

.content ul, .content ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.content li {
    margin-bottom: 6px;
}

/* --- Audio Section --- */
.audio-section {
    background-color: #FDF5E6;
    border: 1px solid #DDD0C0;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.audio-section h2 {
    border-bottom-color: #CC5500;
    color: #3B2D1E;
    margin-top: 0;
}

.audio-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 6px;
    background-color: #FFF8F0;
    border: 1px solid #E8DDD0;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.audio-item:hover {
    background-color: #FFF0E0;
}

.audio-item .audio-number {
    font-weight: bold;
    color: #CC5500;
    min-width: 30px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.9rem;
}

.audio-item .audio-title {
    flex: 1;
    font-size: 1rem;
}

.audio-item a {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.85rem;
    background-color: #CC5500;
    color: #FFF8F0;
    padding: 5px 14px;
    border-radius: 3px;
    text-decoration: none;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.audio-item a:hover {
    background-color: #FF6600;
    text-decoration: none;
}

/* Audio sub-items (nested within Avani Avittam, etc.) */
.audio-sub-list {
    margin-left: 40px;
    margin-top: 8px;
    margin-bottom: 12px;
}

.audio-sub-list .audio-item {
    background-color: #FEFAF4;
    border-color: #E0D5C5;
}

/* --- Document List --- */
.document-list {
    list-style: none;
    padding-left: 0;
}

.document-list li {
    padding: 10px 14px;
    margin-bottom: 4px;
    background-color: #FDF5E6;
    border: 1px solid #E8DDD0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.document-list li::before {
    content: "\1F4C4";
    font-size: 1.1rem;
}

.document-list li a {
    font-size: 1rem;
}

/* --- Stotra / PDF links --- */
.stotra-item {
    padding: 10px 14px;
    margin-bottom: 6px;
    background-color: #FDF5E6;
    border: 1px solid #E8DDD0;
    border-radius: 4px;
}

/* --- Section List (for list.html) --- */
.section-list {
    list-style: none;
    padding-left: 0;
}

.section-list li {
    margin-bottom: 8px;
}

.section-list li a {
    display: block;
    padding: 12px 16px;
    background-color: #FDF5E6;
    border: 1px solid #DDD0C0;
    border-left: 4px solid #CC5500;
    border-radius: 0 4px 4px 0;
    color: #3B2D1E;
    font-size: 1.05rem;
    transition: all 0.2s ease;
}

.section-list li a:hover {
    background-color: #FFF0E0;
    border-left-color: #FF6600;
    text-decoration: none;
    color: #CC5500;
}

/* --- Footer --- */
.site-footer {
    background-color: #3B2D1E;
    color: #C8B89A;
    text-align: center;
    padding: 20px;
    font-size: 0.85rem;
    border-top: 3px solid #CC5500;
    margin-top: auto;
}

.site-footer a {
    color: #FF6600;
}

.site-footer p {
    margin-bottom: 6px;
}

.free-service-notice {
    color: #E8DDD0;
    font-style: italic;
    margin-top: 8px;
}

/* --- Home Page --- */
.home-content {
    overflow: hidden; /* clear floats */
}

.home-content p {
    font-size: 1.05rem;
    line-height: 1.8;
}

.home-content u {
    text-decoration-color: #CC5500;
}

/* --- Clearfix --- */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .site-nav ul {
        flex-direction: column;
        gap: 2px;
    }

    .site-nav li:not(:last-child)::after {
        display: none;
    }

    .site-nav a {
        display: block;
        padding: 6px 12px;
        font-size: 0.9rem;
    }

    .content {
        padding: 20px 15px;
    }

    .content h1 {
        font-size: 1.4rem;
    }

    .content img[style*="float"] {
        float: none !important;
        display: block;
        margin: 10px auto !important;
        max-width: 80% !important;
    }

    .audio-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .audio-sub-list {
        margin-left: 16px;
    }

    .banner-image {
        max-height: 80px;
    }

    .site-title-bar h1 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 15px;
    }

    .site-nav a {
        font-size: 0.85rem;
    }

    .content {
        padding: 15px 12px;
    }
}
