* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%; /* Prevents iOS text size adjustment */
    text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: #FFFFFF;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow-x: hidden; /* Prevents horizontal scrolling */
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    body {
        padding: 0;
    }
    
    main {
        padding: 10px !important;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0;
    }
}

@media (max-width: 360px) {
    body {
        padding: 0;
    }
}

.container {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 1.5px 8px rgba(0,0,0,0.04), 0 8px 32px rgba(110,90,66,0.06);
    max-width: 900px;
    width: 100%;
    padding: 40px 36px 32px 36px;
    margin: 2rem auto;
}

@media (max-width: 768px) {
    .container {
        max-width: 100%;
        padding: 30px 24px 24px 24px;
        margin: 1rem auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 16px;
        border-radius: 8px;
        margin: 0.5rem auto;
    }
}

.header {
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 1.5px solid #f3f3f3;
    padding-bottom: 20px;
    position: relative;
}

.intro-content {
    margin-bottom: 30px;
    padding: 20px;
    background: #faf7f1;
    border-radius: 8px;
    border: 1px solid #e8e2d3;
}

.intro-content p {
    line-height: 1.8;
    color: #443f39;
    margin-bottom: 1rem;
    font-size: 15px;
}

.intro-content h3 {
    font-family: 'Charter', 'Georgia', serif;
    font-size: 1.3rem;
    color: #2b2520;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.intro-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.intro-content ul li {
    line-height: 1.8;
    color: #443f39;
    margin-bottom: 0.75rem;
    font-size: 14px;
}

.intro-content ul li strong {
    color: #2b2520;
}

/* Sample Report Section */
.sample-report-section {
    margin: 30px 0;
    padding: 20px;
    background: #f0f7ff;
    border: 2px dashed #8b7355;
    border-radius: 8px;
    text-align: center;
}

.sample-report-btn {
    background: linear-gradient(135deg, #8b7355 0%, #6b5a45 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(139, 115, 85, 0.3);
    margin-bottom: 12px;
}

.sample-report-btn:hover {
    background: linear-gradient(135deg, #6b5a45 0%, #5a4a35 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 115, 85, 0.4);
}

.sample-report-btn:active {
    transform: translateY(0);
}

.sample-note {
    font-size: 14px;
    color: #6b5a45;
    margin: 0;
    font-style: italic;
}

@media (max-width: 768px) {
    .sample-report-section {
        padding: 15px;
        margin: 20px 0;
    }
    
    .sample-report-btn {
        padding: 12px 24px;
        font-size: 15px;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .intro-content {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .intro-content h3 {
        font-size: 1.1rem;
    }
    
    .intro-content p,
    .intro-content ul li {
        font-size: 14px;
    }
}

.header-icon {
    width: 40px;
    margin-bottom: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.header h1 {
    font-size: 1.7rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
    letter-spacing: -0.4px;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.3rem;
        letter-spacing: -0.2px;
    }
}

.header h2 {
    font-size: 1.25rem;
    font-weight: 500;
    color: #292929;
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .header h2 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .header h2 {
        font-size: 1rem;
    }
}

.subtitle {
    font-size: 15px;
    color: #666;
    font-weight: 400;
    margin-bottom: 0;
}

@media (max-width: 480px) {
    .subtitle {
        font-size: 13px;
    }
}

.kundli-form {
    display: flex;
    flex-direction: column;
    gap: 26px;
    margin-top: 28px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    letter-spacing: 0.02em;
}

.form-group input,
.form-group select {
    padding: 12px 14px;
    border: 1.2px solid #d1d1d1;
    border-radius: 7px;
    font-size: 15px;
    font-family: inherit;
    background-color: white;
    color: #1a1a1a;
    transition: border-color 0.15s ease;
}

.form-group select {
    width: 100%;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231a1a1a' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.form-group input:hover,
.form-group select:hover { border-color: #aaa; }
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #1a1a1a;
}
.form-group input::placeholder { color: #bbb; }

.searchable-dropdown {
    position: relative;
    width: 100%;
}

.searchable-dropdown > input {
    width: 100%;
}

#dropdownList {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: white;
    border: 1.2px solid #d1d1d1;
    border-radius: 7px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

#dropdownList.hidden {
    display: none;
}

.dropdown-item {
    padding: 12px 14px;
    cursor: pointer;
    font-size: 15px;
    color: #1a1a1a;
    transition: background-color 0.1s ease;
    border-bottom: 1px solid #f3f3f3;
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 480px) {
    .dropdown-item {
        padding: 14px 12px;
        font-size: 16px;
        min-height: 44px; /* Better touch target */
        display: flex;
        align-items: center;
    }
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
}

.dropdown-item:active {
    background-color: #e8e8e8;
}

.dropdown-item.loading-item,
.dropdown-item.error-item {
    cursor: default;
}

.dropdown-item.loading-item:hover,
.dropdown-item.error-item:hover {
    background-color: transparent;
}

.dropdown-item.loading-item {
    color: #666;
    font-style: italic;
}

.dropdown-item.error-item {
    color: #d32f2f;
}

.submit-btn {
    background: #1a1a1a;
    color: white;
    border: none;
    padding: 13px 0;
    border-radius: 7px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.16s, box-shadow 0.12s;
    margin-top: 8px;
    letter-spacing: 0.02em;
    width: 100%;
    box-shadow: 0 2px 9px rgba(30,30,30,0.09);
    -webkit-tap-highlight-color: transparent;
    min-height: 44px; /* Better touch target for mobile */
    display: flex;
    align-items: center;
    justify-content: center;
}

.submit-btn:hover { background: #333; }
.submit-btn:active { background: #000; }

.loading {
    text-align: center;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}
.loading.hidden { display: none; }

.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #e5e5e5;
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading p {
    color: #666;
    font-size: 14px;
    font-weight: 400;
}

.result {
    margin-top: 34px;
    padding: 21px 19px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 2px 9px rgba(110,90,66,0.04);
}
.result.hidden { display: none; }

.result h2 {
    font-size: 17px;
    color: #1a1a1a;
    margin-bottom: 11px;
    font-weight: 500;
}
.result-content {
    color: #333;
    line-height: 1.7;
    font-size: 14px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.result-content p { margin-bottom: 8px; }
.result-content strong { font-weight: 500; color: #1a1a1a; }
.result-content table { margin: 15px 0; }
.result-content table tr:hover { background-color: #f9f9f9; }
.result-content table th, 
.result-content table td { 
    border: 1px solid #e5e5e5;
}

.article-view {
    display: none;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    background: #fff;
    width: 100%;
    overflow-x: hidden;
    position: relative;
    flex-direction: row;
}

.article-view.active {
    display: flex;
    flex-direction: row;
}

.article-view.hidden {
    display: none;
}

/* Left Sidebar Navigation */
.article-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: #f8f8f8;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 0;
    z-index: 100;
    transition: transform 0.3s ease;
    transform: translateX(0);
    box-sizing: border-box;
}

.article-sidebar.hidden {
    transform: translateX(-100%);
}

/* Ensure sidebar is visible by default on desktop */
.article-sidebar:not(.hidden) {
    transform: translateX(0);
}

.sidebar-toggle {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 60px;
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    z-index: 102;
    display: none; /* Hidden by default on desktop */
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 2px 0 8px rgba(0,0,0,0.1);
}

.sidebar-toggle:hover {
    background: #333;
    width: 45px;
}

/* Hide toggle when sidebar is visible */
.article-sidebar:not(.hidden) ~ .sidebar-toggle,
body:not(:has(.article-sidebar.hidden)) .sidebar-toggle {
    display: none;
}

/* Show toggle when sidebar is hidden */
.article-sidebar.hidden ~ .sidebar-toggle,
body:has(.article-sidebar.hidden) .sidebar-toggle {
    display: flex;
    left: 0;
}

.sidebar-toggle.active {
    left: 280px;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

.sidebar-nav-item {
    margin: 0;
    padding: 0;
}

.sidebar-nav-link {
    display: block;
    padding: 12px 20px;
    color: #443f39;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    font-family: inherit;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
}

.sidebar-nav-link:hover {
    background: #f5f5f5;
    color: #8b7355;
    border-left-color: #8b7355;
}

.sidebar-nav-link.active {
    background: #fff;
    color: #8b7355;
    border-left-color: #8b7355;
    font-weight: 600;
}

.sidebar-nav-section {
    padding: 8px 20px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    font-weight: 600;
    margin-top: 15px;
}

.sidebar-nav-section:first-child {
    margin-top: 0;
}

/* Dynamic content area for tab content */
.dynamic-content-area {
    margin: 20px auto;
    min-height: 200px;
    max-width: 1200px;
    width: 100%;
    box-sizing: border-box;
    padding: 0 20px;
}

/* Consistent spacing for dynamic content in tabs */
.kundli-tab-content .dynamic-content-area {
    margin: 20px auto;
}

/* Ensure all content within dynamic areas is properly constrained */
.dynamic-content-area > * {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Grid containers for strength sections */
.strength-planetary-grid,
.strength-house-lord-grid {
    max-width: 1200px;
    margin: 20px auto !important;
    width: 100%;
    box-sizing: border-box;
    padding: 0 20px;
}

/* Consistent spacing in tabs */
.kundli-tab-content .strength-planetary-grid,
.kundli-tab-content .strength-house-lord-grid {
    margin: 20px auto !important;
}

/* Prediction sections */
.prediction-section {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    padding: 0 20px;
}

/* Consistent spacing for prediction sections in tabs */
.kundli-tab-content .prediction-section {
    margin: 20px auto;
}

.article-main-content {
    flex: 1;
    margin-left: 280px;
    transition: margin-left 0.3s ease;
    min-height: 100vh;
    width: calc(100% - 280px);
    overflow-x: hidden;
    box-sizing: border-box;
    display: block;
}

.article-main-content.sidebar-hidden {
    margin-left: 0;
    width: 100%;
}

/* When sidebar is visible (not hidden), content should shift right */
body:not(:has(.article-sidebar.hidden)) .article-main-content {
    margin-left: 280px !important;
    width: calc(100% - 280px) !important;
}

body:has(.article-sidebar.hidden) .article-main-content {
    margin-left: 0 !important;
    width: 100% !important;
}

/* Section anchors for smooth scrolling */
.article-section {
    scroll-margin-top: 100px;
}

@media (max-width: 1024px) {
    .article-sidebar {
        transform: translateX(-100%);
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .article-sidebar.active,
    .article-sidebar:not(.hidden) {
        transform: translateX(0);
    }
    
    .article-sidebar.hidden {
        transform: translateX(-100%);
    }
    
    .article-main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    .sidebar-toggle {
        display: flex !important;
    }
    
    .sidebar-toggle.active {
        left: 280px;
    }
}

@media (max-width: 768px) {
    .article-sidebar {
        width: 250px;
    }
    
    .sidebar-toggle.active {
        left: 250px;
    }
}

/* Tabs Interface Styles */
.tabs-container {
    margin: 40px 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.tabs-header {
    display: flex;
    flex-wrap: wrap;
    background: #f8f8f8;
    border-bottom: 2px solid #e0e0e0;
    overflow-x: auto;
}

.tab-button {
    flex: 1;
    min-width: 120px;
    padding: 14px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tab-button:hover {
    background: #f0f0f0;
    color: #1a1a1a;
}

.tab-button.active {
    background: white;
    color: #1a1a1a;
    border-bottom-color: #d4af37;
    font-weight: 600;
}

.tabs-body {
    padding: 30px;
    background: white;
    min-height: 200px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

@media (max-width: 768px) {
    .tabs-header {
        flex-direction: column;
    }
    
    .tab-button {
        width: 100%;
        text-align: left;
        border-bottom: 1px solid #e0e0e0;
        border-right: none;
    }
    
    .tab-button.active {
        border-bottom-color: #d4af37;
        border-left: 3px solid #d4af37;
    }
    
    .tabs-body {
        padding: 20px;
    }
}

/* Hide main container when article is shown */
body:has(.article-view.active) #mainContainer {
    display: none;
}

body:has(.article-view.active) {
    padding: 0;
    margin: 0;
    overflow-x: hidden;
    width: 100%;
}

body:has(.article-view.active) .container {
    display: none;
}

.article-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 40px 60px 40px;
    font-family: 'Charter', 'Crimson Text', Georgia, serif; /* Serif for article/report */
    line-height: 1.82;
    color: #201e1d;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
    width: 100%;
    position: relative;
    overflow-x: hidden;
    display: block;
    text-align: left;
}

/* When article-content contains tabs, reduce padding to let inner sections control their own spacing */
.article-content:has(.kundli-tab-content) {
    padding: 20px 0 40px 0;
}

@media (max-width: 768px) {
    .article-content:has(.kundli-tab-content) {
        padding: 15px 0 30px 0;
    }
    
    .kundli-tab-content .strength-assessment-section,
    .kundli-tab-content .job-timing-section,
    .kundli-tab-content .dasa-predictions-section,
    .kundli-tab-content .yoga-section,
    .kundli-tab-content .article-section:not(.article-header-fixed):not(.article-intro) {
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    .article-content:has(.kundli-tab-content) {
        padding: 10px 0 25px 0;
    }
    
    .kundli-tab-content .strength-assessment-section,
    .kundli-tab-content .job-timing-section,
    .kundli-tab-content .dasa-predictions-section,
    .kundli-tab-content .yoga-section,
    .kundli-tab-content .article-section:not(.article-header-fixed):not(.article-intro) {
        padding: 0 16px;
    }
}


.article-content * {
    max-width: 100%;
    word-wrap: break-word;
}

/* Center header and intro content */
.article-intro {
    text-align: center;
}

.article-intro p {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    max-width: 800px;
}

@media (max-width: 768px) {
    .article-content:not(:has(.kundli-tab-content)) {
        padding: 40px 20px 60px 20px;
    }
}

@media (max-width: 480px) {
    .article-content:not(:has(.kundli-tab-content)) {
        padding: 30px 16px 50px 16px;
        line-height: 1.7;
    }
}


.article-header {
    text-align: center;
    padding: 60px 0 50px 0; /* Add top padding to account for back button */
    border-bottom: 3px solid #1a1a1a;
    margin-top: 20px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 100%;
}

/* Header for kundli tabs - NOT fixed, scrolls with content */
.article-header-fixed {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1;
    background: white;
    text-align: center;
    padding: 15px 40px 15px 40px;
    border-bottom: 3px solid #1a1a1a;
    margin: 0 auto 10px auto;
    max-width: 1200px;
    width: 100%;
    display: block;
    box-sizing: border-box;
    clear: both;
}

@media (max-width: 1024px) {
    .article-header-fixed {
        left: 0 !important;
        width: 100% !important;
    }
}



/* Reduce spacing after header in tabs */
.kundli-tab-content .article-header-fixed {
    margin-bottom: 10px;
}

/* Reduce top margin on first content element after header in tabs */
.kundli-tab-content .article-header-fixed + * {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.kundli-tab-content .article-header-fixed ~ .article-section:first-of-type {
    margin-top: 10px;
}

/* Ensure no extra spacing in tab content */
.kundli-tab-content > *:first-child {
    margin-top: 0;
    padding-top: 0;
}

/* Remove any default margins/padding from article sections in tabs */
.kundli-tab-content .article-section {
    margin-top: 0;
}

/* Consistent spacing for all section types in tabs after header */
.kundli-tab-content .article-header-fixed ~ .article-section,
.kundli-tab-content .article-header-fixed ~ .planets-section,
.kundli-tab-content .article-header-fixed ~ .prediction-section,
.kundli-tab-content .article-header-fixed ~ .strength-assessment-section,
.kundli-tab-content .article-header-fixed ~ .job-timing-section,
.kundli-tab-content .article-header-fixed ~ .dasa-predictions-section,
.kundli-tab-content .article-header-fixed ~ .yoga-section,
.kundli-tab-content .article-header-fixed ~ .dynamic-content-area {
    margin-top: 20px !important;
}

/* For tabs without header (like House Lords, House Effects), use standard spacing */
.kundli-tab-content > .planets-section:first-child,
.kundli-tab-content > .article-section:first-child:not(.article-header-fixed) {
    margin-top: 20px;
}

/* Override any excessive margins on section types in tabs and ensure consistent width */
.kundli-tab-content .strength-assessment-section,
.kundli-tab-content .job-timing-section,
.kundli-tab-content .dasa-predictions-section,
.kundli-tab-content .yoga-section {
    margin: 20px auto !important;
    max-width: 1200px !important;
    width: 100%;
    box-sizing: border-box;
    padding: 0 40px;
}

/* Override yoga-section default margin in tabs */
.kundli-tab-content .yoga-section {
    margin: 20px auto !important;
    max-width: 1200px !important;
    width: 100%;
    box-sizing: border-box;
    padding: 36px 28px;
}

/* Ensure all content sections in tabs have consistent spacing and width (matching House Lords/House Effects) */
.kundli-tab-content .article-section:not(.article-header-fixed):not(.article-intro) {
    margin: 20px auto;
    max-width: 1200px;
    width: 100%;
    box-sizing: border-box;
    padding: 0 40px;
}

/* First section after header should have minimal top margin */
.kundli-tab-content .article-header-fixed + .article-section,
.kundli-tab-content .article-header-fixed + .planets-section,
.kundli-tab-content .article-header-fixed + .prediction-section,
.kundli-tab-content .article-header-fixed + .dynamic-content-area {
    margin-top: 20px !important;
}

@media (max-width: 768px) {
    .article-content {
        padding: 30px 20px 40px 20px;
    }
    
    .article-header-fixed {
        padding: 12px 20px 12px 20px;
        margin-bottom: 10px;
    }
    
    
    .kundli-tab-content {
        padding: 0;
    }
    
    .kundli-tab-content .article-intro,
    .kundli-tab-content .planets-section,
    .kundli-tab-content .fundamental-note {
        padding: 0;
    }
    
    .kundli-tab-content .birth-details-box {
        margin: 0 auto 25px auto;
        padding: 20px;
    }
    
    .article-header-fixed h1 {
        font-size: 22px;
        margin-bottom: 4px;
        color: #1a1a1a !important;
    }
    
    .article-header-fixed .article-meta {
        font-size: 10px;
        color: #666 !important;
    }
    
    .sample-report-banner {
        width: calc(100% - 40px) !important;
        margin: 0 auto 25px auto !important;
    }
    
    .nav-logo {
        padding-left: 0 !important;
        margin-left: 0 !important;
    }
}

@media (max-width: 480px) {
    .article-content {
        padding: 25px 16px 35px 16px;
    }
    
    .article-header-fixed {
        padding: 10px 16px 10px 16px;
        margin-bottom: 8px;
    }
    
    
    .kundli-tab-content .article-intro,
    .kundli-tab-content .planets-section,
    .kundli-tab-content .fundamental-note {
        padding: 0;
    }
    
    .kundli-tab-content .birth-details-box {
        margin: 0 auto 20px auto;
        padding: 16px 14px;
    }
    
    .article-header-fixed h1 {
        font-size: 18px;
        margin-bottom: 3px;
        color: #1a1a1a !important;
    }
    
    .article-header-fixed .article-meta {
        font-size: 9px;
        color: #666 !important;
    }
    
    .sample-report-banner {
        width: calc(100% - 32px) !important;
        margin: 0 auto 20px auto !important;
        padding: 12px 16px !important;
    }
    
    .nav-logo {
        padding-left: 0 !important;
        margin-left: 0 !important;
    }
}

.kundli-tab-content {
    display: none;
    padding: 0;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
    text-align: left;
    clear: both;
}

/* Ensure all direct children of tab content are centered and have consistent width */
.kundli-tab-content > * {
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;
}

/* Ensure all nested sections within tabs are also centered and have consistent width */
.kundli-tab-content .article-section,
.kundli-tab-content .planets-section,
.kundli-tab-content .prediction-section,
.kundli-tab-content .strength-assessment-section,
.kundli-tab-content .job-timing-section,
.kundli-tab-content .dasa-predictions-section,
.kundli-tab-content .yoga-section,
.kundli-tab-content .dynamic-content-area {
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100%;
    box-sizing: border-box;
}

.kundli-tab-content.active {
    display: block;
    clear: both;
    width: 100%;
}

/* Ensure content inside tabs is properly aligned */
.kundli-tab-content .article-intro {
    text-align: center;
    margin: 0 auto 40px auto;
    max-width: 800px;
    padding: 0 20px;
}

.kundli-tab-content .article-intro p {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}


.kundli-tab-content .birth-details-box {
    max-width: 600px;
    margin: 0 auto 30px auto;
    text-align: center;
    padding: 30px;
}

.kundli-tab-content .planets-section {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    box-sizing: border-box;
    width: 100%;
}

.kundli-tab-content .planets-section h2 {
    text-align: center;
    margin-bottom: 30px;
}

.kundli-tab-content .fundamental-note {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Sample banner alignment */
.sample-report-banner {
    max-width: 1200px;
    margin: 0 auto 30px auto !important;
    width: calc(100% - 40px);
    box-sizing: border-box;
    padding: 15px 20px !important;
}

.kundli-tab-content .sample-report-banner {
    margin-bottom: 30px !important;
}

@media (max-width: 768px) {
    .sample-report-banner {
        margin: 0 auto 20px auto !important;
        padding: 12px 16px !important;
    }
}

@media (max-width: 480px) {
    .sample-report-banner {
        margin: 0 auto 16px auto !important;
        padding: 10px 14px !important;
    }
    
    .sample-report-banner strong {
        font-size: 14px !important;
    }
    
    .sample-report-banner p {
        font-size: 12px !important;
    }
}

/* Ensure all content sections are properly centered */
.kundli-tab-content .fundamental-note {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .article-header {
        padding: 0 0 35px 0;
        border-bottom-width: 2px;
    }
}

@media (max-width: 480px) {
    .article-header {
        padding: 0 0 25px 0;
        border-bottom-width: 2px;
    }
}

.article-header h1,
.article-header-fixed h1 {
    font-size: 28px;
    margin: 0 0 5px 0;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.5px;
    color: #1a1a1a !important;
    display: block;
    visibility: visible;
    opacity: 1;
    width: 100%;
}


@media (max-width: 768px) {
    .article-header h1 {
        font-size: 36px;
        letter-spacing: -0.5px;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .article-header h1 {
        font-size: 28px;
        letter-spacing: -0.3px;
        margin-bottom: 12px;
    }
}

.article-meta {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 20px;
}

.article-header-fixed .article-meta {
    font-size: 11px;
    margin: 0;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: #666 !important;
    display: block;
    visibility: visible;
    opacity: 1;
}

/* Download PDF Button */
.download-pdf-btn {
    background: #2196F3 !important;
    color: white !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 6px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
    font-family: inherit !important;
}

.download-pdf-btn:hover {
    background: #1976D2 !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3) !important;
    transform: translateY(-1px);
}

.download-pdf-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
}

.download-pdf-btn svg {
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .article-header-fixed {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    
    .download-pdf-btn {
        width: 100% !important;
        justify-content: center !important;
        margin-top: 10px !important;
        padding: 10px 20px !important;
        font-size: 14px !important;
    }
}

@media (max-width: 480px) {
    .download-pdf-btn {
        padding: 10px 16px !important;
        font-size: 13px !important;
    }
}



.article-intro {
    margin-bottom: 50px;
}

@media (max-width: 768px) {
    .article-intro {
        margin-bottom: 35px;
    }
}

@media (max-width: 480px) {
    .article-intro {
        margin-bottom: 28px;
    }
}

.article-intro p {
    font-size: 21px;
    line-height: 1.8;
    margin-bottom: 20px;
    color: #2c2c2c;
}

@media (max-width: 768px) {
    .article-intro p {
        font-size: 18px;
        line-height: 1.75;
        margin-bottom: 16px;
    }
}

@media (max-width: 480px) {
    .article-intro p {
        font-size: 16px;
        line-height: 1.7;
        margin-bottom: 14px;
    }
}

.birth-details-box {
    font-family: 'Inter', sans-serif;
    background: #f9f9f9;
    padding: 30px;
    border-left: 4px solid #1a1a1a;
    margin: 40px auto;
    box-sizing: border-box;
    width: 100%;
    max-width: 600px;
    text-align: center;
    display: block;
}

@media (max-width: 768px) {
    .birth-details-box {
        padding: 20px;
        margin: 30px auto;
        max-width: calc(100% - 40px);
    }
}

@media (max-width: 480px) {
    .birth-details-box {
        padding: 16px 14px;
        margin: 24px auto;
        max-width: calc(100% - 32px);
        border-left-width: 3px;
    }
}

.birth-details-box h2 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    color: #666;
    font-weight: 600;
}

.birth-details-box p {
    font-size: 17px;
    line-height: 1.6;
    margin: 10px 0;
}

@media (max-width: 768px) {
    .birth-details-box p {
        font-size: 15px;
        margin: 8px 0;
    }
}

@media (max-width: 480px) {
    .birth-details-box p {
        font-size: 14px;
        line-height: 1.5;
        margin: 6px 0;
    }
}

.planets-section {
    margin: 50px auto;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .planets-section {
        margin: 40px auto;
    }
}

@media (max-width: 480px) {
    .planets-section {
        margin: 30px auto;
    }
}

.planets-section h2 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
    letter-spacing: -0.5px;
}

@media (max-width: 768px) {
    .planets-section h2 {
        font-size: 26px;
        margin-bottom: 24px;
    }
}

@media (max-width: 480px) {
    .planets-section h2 {
        font-size: 22px;
        margin-bottom: 20px;
        letter-spacing: -0.3px;
    }
}

.planets-table-wrapper {
    overflow-x: auto;
    margin: 30px auto;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.planets-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    margin: 0 auto;
    display: table;
}

.planets-table thead {
    background: #1a1a1a;
    color: white;
}

.planets-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 3px solid #1a1a1a;
}

@media (max-width: 768px) {
    .planets-table th {
        padding: 12px 14px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .planets-table th {
        padding: 10px 8px;
        font-size: 11px;
        letter-spacing: 0.3px;
    }
}

.planets-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e5e5;
}

@media (max-width: 768px) {
    .planets-table td {
        padding: 12px 14px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .planets-table td {
        padding: 10px 8px;
        font-size: 13px;
    }
}

.planets-table tbody tr:hover {
    background-color: #f9f9f9;
}

.planets-table tbody tr:last-child td {
    border-bottom: none;
}

.planet-name {
    font-size: 16px;
}

@media (max-width: 768px) {
    .planet-name {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .planet-name {
        font-size: 14px;
    }
}

.planets-table th:nth-child(1),
.planets-table td:nth-child(1) {
    width: 25%;
}

.planets-table th:nth-child(2),
.planets-table td:nth-child(2) {
    width: 30%;
}

.planets-table th:nth-child(3),
.planets-table td:nth-child(3) {
    width: 20%;
    text-align: center;
}

.planets-table th:nth-child(4),
.planets-table td:nth-child(4) {
    width: 25%;
    text-align: center;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-footer {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 2px solid #e5e5e5;
    text-align: center;
    color: #999;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .article-footer {
        margin-top: 60px;
        padding-top: 30px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .article-footer {
        margin-top: 40px;
        padding-top: 24px;
        font-size: 11px;
    }
}

.back-button {
    position: relative;
    background: #1a1a1a;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px; /* Better touch target for mobile */
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 1024px) {
    .back-button {
        right: 15px !important; /* Position on right side */
        left: auto !important;
    }
}

/* Fixed button container for Back and Download buttons */
body > div[style*="position: fixed"][style*="top: 80px"] {
    position: fixed !important;
    top: 80px !important;
    right: 20px !important;
    z-index: 1000 !important;
    display: flex !important;
    gap: 10px !important;
    align-items: center !important;
    flex-wrap: wrap !important;
}

@media (max-width: 768px) {
    body > div[style*="position: fixed"][style*="top: 80px"] {
        top: calc(15px + env(safe-area-inset-top, 0px)) !important;
        right: 15px !important;
    }
    
    .back-button {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .download-pdf-btn {
        padding: 10px 20px !important;
        font-size: 13px !important;
    }
}

@media (max-width: 480px) {
    body > div[style*="position: fixed"][style*="top: 80px"] {
        top: calc(10px + env(safe-area-inset-top, 0px)) !important;
        right: 10px !important;
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    .back-button {
        padding: 10px 18px;
        font-size: 13px;
        border-radius: 4px;
        min-height: 44px;
        width: 100%;
    }
    
    .download-pdf-btn {
        padding: 10px 18px !important;
        font-size: 13px !important;
        width: 100% !important;
    }
}

.back-button:hover {
    background: #333;
}

/* Responsive Design - Enhanced */
@media (max-width: 768px) {
    .kundli-form {
        gap: 22px;
    }
    
    .form-group input {
        padding: 11px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .submit-btn {
        font-size: 14px;
        padding: 12px 0;
    }
}

@media (max-width: 640px) {
    .container { 
        padding: 24px 16px; 
    }
    .header h1 { 
        font-size: 1.48rem; 
    }
    .header h2 { 
        font-size: 1.06rem; 
    }
    .subtitle { 
        font-size: 13px; 
    }
    .kundli-form { 
        gap: 20px; 
    }
    .submit-btn { 
        font-size: 14px; 
        padding: 12px 0; 
    }
}

@media (max-width: 480px) {
    .kundli-form {
        gap: 18px;
        margin-top: 20px;
    }
    
    .form-group label {
        font-size: 12px;
    }
    
    .form-group input {
        padding: 10px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .submit-btn {
        font-size: 14px;
        padding: 11px 0;
    }
    
    .result {
        margin-top: 24px;
        padding: 16px 14px;
    }
    
    .result h2 {
        font-size: 16px;
    }
    
    .result-content {
        font-size: 13px;
        line-height: 1.6;
    }
}
/* Improved House Analysis Card */
.ascendant-lord-section {
    background: #f6faff;
    box-shadow: 0 2px 10px rgba(30,60,130,0.07), 0 6px 22px rgba(108,130,170,0.10);
    border-radius: 18px;
    border: 1.3px solid #e8eefa;
    margin: 0 auto 38px auto;
    padding: 35px 30px 28px 30px;
    font-family: 'Inter', 'Crimson Text', serif;
    transition: box-shadow .16s;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}
@media (max-width:640px) {
    .ascendant-lord-section {
        padding: 22px 10px 18px 10px;
    }
}
.ascendant-lord-section h2 {
    font-size: 28px;
    color: #234183;
    margin-bottom: 19px;
    font-weight: 700;
}

@media (max-width: 768px) {
    .ascendant-lord-section h2 {
        font-size: 24px;
        margin-bottom: 16px;
    }
}

@media (max-width: 480px) {
    .ascendant-lord-section h2 {
        font-size: 20px;
        margin-bottom: 14px;
    }
}
.ascendant-lord-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #152b51;
    margin-top: 18px;
    margin-bottom: 13px;
}

@media (max-width: 768px) {
    .ascendant-lord-section h3 {
        font-size: 16px;
        margin-top: 16px;
        margin-bottom: 11px;
    }
}

@media (max-width: 480px) {
    .ascendant-lord-section h3 {
        font-size: 15px;
        margin-top: 14px;
        margin-bottom: 10px;
    }
}

.ascendant-lord-section p {
    color: #223;
    font-size: 16px;
    margin-bottom: 9px;
}

@media (max-width: 768px) {
    .ascendant-lord-section p {
        font-size: 15px;
        margin-bottom: 8px;
    }
}

@media (max-width: 480px) {
    .ascendant-lord-section p {
        font-size: 14px;
        margin-bottom: 7px;
        line-height: 1.7;
    }
}

.fundamental-note {
    border-left: 7px solid #fcbc38 !important;
    box-shadow: 0 1px 6px #ffeecc;
    background: #fff7e1 !important;
}
.fundamental-note p {
    font-size: 18px !important;
    color: #996915 !important;
    font-family: 'Inter', serif;
}

.summary-section {
    background: linear-gradient(108deg, #e7f3fb 44%, #fffbe8 100%);
    border: 1.7px solid #bad7fa;
    padding: 30px 24px 32px 22px;
    margin: 35px 0 44px 0;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(30,60,130,0.07), 0 6px 22px rgba(180,180,140,0.06);
}

@media (max-width: 768px) {
    .summary-section {
        padding: 24px 18px 26px 18px;
        margin: 28px 0 36px 0;
    }
}

@media (max-width: 480px) {
    .summary-section {
        padding: 20px 14px 22px 14px;
        margin: 24px 0 30px 0;
        border-radius: 12px;
    }
}

.summary-section h2 {
    color: #195fa3;
    font-size: 26px;
    margin-bottom: 13px;
    font-weight: 700;
}

@media (max-width: 768px) {
    .summary-section h2 {
        font-size: 22px;
        margin-bottom: 11px;
    }
}

@media (max-width: 480px) {
    .summary-section h2 {
        font-size: 19px;
        margin-bottom: 10px;
    }
}

.summary-section p {
    color: #21374a;
    font-size: 17.5px;
    letter-spacing: .01em;
    line-height: 1.75;
}

@media (max-width: 768px) {
    .summary-section p {
        font-size: 16px;
        line-height: 1.7;
    }
}

@media (max-width: 480px) {
    .summary-section p {
        font-size: 14px;
        line-height: 1.65;
    }
}

.planets-section h2 {
    color: #395596;
    border-bottom: 1.5px solid #dae8f7;
    padding-bottom: 12px;
    margin-bottom: 20px;
}

.planets-table th, .planets-table td {
    font-size: 15px;
    letter-spacing: .03em;
}
.planets-table th {
    background: #e2e6f3 !important;
    color: #133864 !important;
}
.planets-table {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 .5px 6px #f2f4fa;
}
.planet-name {
    font-weight: 600;
    color: #3c3772;
}
.article-footer {
    background: #f4f6f9;
    color: #6b7b85;
    margin-top: 90px;
    font-size: 14.5px;
    padding: 30px 0 10px 0;
    border-radius: 4px;
    font-style: italic;
    border-top: 2.5px solid #f4e6bf;
}

@media (max-width: 768px) {
    .article-footer {
        margin-top: 60px;
        font-size: 13px;
        padding: 24px 0 8px 0;
    }
}

@media (max-width: 480px) {
    .article-footer {
        margin-top: 40px;
        font-size: 12px;
        padding: 20px 0 6px 0;
    }
}
.ascendant-lord-section {
    background: #f9f7f2;
    box-shadow: 0 1px 7px rgba(44,36,23,0.03), 0 8px 24px rgba(180,150,66,0.06);
    border-radius: 13px;
    border: 1.2px solid #e8e4d9;
    margin-bottom: 38px;
    padding: 32px 30px 26px 30px;
    font-family: 'Charter', 'Georgia', serif;
    transition: box-shadow .16s;
    box-sizing: border-box;
    width: 100%;
}

@media (max-width: 768px) {
    .ascendant-lord-section {
        padding: 24px 20px 20px 20px;
        margin-bottom: 30px;
    }
}

@media (max-width: 640px) {
    .ascendant-lord-section { 
        padding: 20px 14px 18px 14px; 
        margin-bottom: 28px;
    }
}

@media (max-width: 480px) {
    .ascendant-lord-section {
        padding: 18px 12px 16px 12px;
        margin-bottom: 24px;
        border-radius: 10px;
    }
}

.ascendant-lord-section h2 {
    font-size: 26px;
    color: #201e1d;
    margin-bottom: 16px;
    font-weight: 700;
    letter-spacing: -0.25px;
    font-family: 'Charter', 'Georgia', serif;
}

@media (max-width: 768px) {
    .ascendant-lord-section h2 {
        font-size: 22px;
        margin-bottom: 14px;
    }
}

@media (max-width: 480px) {
    .ascendant-lord-section h2 {
        font-size: 19px;
        margin-bottom: 12px;
        letter-spacing: -0.2px;
    }
}

.ascendant-lord-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #4d3a25;
    margin-top: 17px;
    margin-bottom: 11px;
    letter-spacing: 0;
    font-family: 'Charter', 'Georgia', serif;
}

@media (max-width: 768px) {
    .ascendant-lord-section h3 {
        font-size: 16px;
        margin-top: 15px;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .ascendant-lord-section h3 {
        font-size: 15px;
        margin-top: 13px;
        margin-bottom: 9px;
    }
}

.ascendant-lord-section p {
    color: #20160f;
    font-size: 18px;
    margin-bottom: 12px;
    line-height: 1.93;
    font-family: 'Charter', 'Georgia', serif;
}

@media (max-width: 768px) {
    .ascendant-lord-section p {
        font-size: 16px;
        margin-bottom: 11px;
        line-height: 1.85;
    }
}

@media (max-width: 480px) {
    .ascendant-lord-section p {
        font-size: 14px;
        margin-bottom: 10px;
        line-height: 1.8;
    }
}

/* Highlighted Classical Source Note */
.fundamental-note {
    border-left: 7px solid #d7b97b !important;
    background: #f9f6ed !important;
    padding: 20px 18px !important;
    margin: 30px auto !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
}
.fundamental-note p {
    font-size: 17.5px !important;
    color: #7d5a23 !important;
    font-family: 'Merriweather', 'Charter', serif !important;
    font-style: italic;
    line-height: 1.55;
}

@media (max-width: 768px) {
    .fundamental-note p {
        font-size: 16px !important;
        line-height: 1.5;
    }
}

@media (max-width: 480px) {
    .fundamental-note {
        padding: 16px 14px !important;
    }
    .fundamental-note p {
        font-size: 14px !important;
        line-height: 1.45;
    }
}

/* Summary Card */
.summary-section {
    background: #f8f3ea;
    border: 1.5px solid #e8d4b0;
    padding: 27px 18px 30px 19px;
    margin: 32px 0 40px 0;
    border-radius: 12px;
    font-family: 'Charter', 'Georgia', serif;
    box-sizing: border-box;
    width: 100%;
}

@media (max-width: 768px) {
    .summary-section {
        padding: 22px 16px 26px 16px;
        margin: 28px 0 35px 0;
    }
}

@media (max-width: 480px) {
    .summary-section {
        padding: 18px 14px 22px 14px;
        margin: 24px 0 30px 0;
        border-radius: 10px;
    }
}

.summary-section h2 {
    color: #262220;
    font-size: 22.5px;
    margin-bottom: 10px;
    font-weight: 800;
    font-family: 'Charter', 'Georgia', serif;
}

@media (max-width: 768px) {
    .summary-section h2 {
        font-size: 20px;
        margin-bottom: 9px;
    }
}

@media (max-width: 480px) {
    .summary-section h2 {
        font-size: 18px;
        margin-bottom: 8px;
    }
}

.summary-section p {
    color: #272016;
    font-size: 18px;
    letter-spacing: 0.01em;
    line-height: 1.98;
}

@media (max-width: 768px) {
    .summary-section p {
        font-size: 16px;
        line-height: 1.85;
    }
}

@media (max-width: 480px) {
    .summary-section p {
        font-size: 14px;
        line-height: 1.75;
    }
}

/* Section Titles */
.planets-section h2 {
    color: #222;
    border-bottom: 1px solid #e7dbbc;
    padding-bottom: 9px;
    margin-bottom: 16px;
    font-family: 'Charter', 'Georgia', serif;
    letter-spacing: -0.14px;
    font-size: 23px;
}

@media (max-width: 768px) {
    .planets-section h2 {
        font-size: 20px;
        padding-bottom: 8px;
        margin-bottom: 14px;
    }
}

@media (max-width: 480px) {
    .planets-section h2 {
        font-size: 18px;
        padding-bottom: 7px;
        margin-bottom: 12px;
        letter-spacing: -0.1px;
    }
}

.planet-name {
    font-weight: 700;
    color: #242121;
    font-size: 18px;
}

@media (max-width: 768px) {
    .planet-name {
        font-size: 16px;
    }
}

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

/* Tables remain modern sans for contrast */
.planets-table th, .planets-table td {
    font-size: 15px;
    letter-spacing: .03em;
}

@media (max-width: 768px) {
    .planets-table th, .planets-table td {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .planets-table th, .planets-table td {
        font-size: 12px;
        letter-spacing: .02em;
    }
}

/* Enhanced table responsiveness */
.planets-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 20px 0;
}

@media (max-width: 480px) {
    .planets-table-wrapper {
        margin: 16px 0;
        padding: 0;
    }
    
    .planets-table {
        min-width: 500px;
    }
}

/* Ensure table columns are properly sized on mobile */
@media (max-width: 480px) {
    .planets-table th:nth-child(1),
    .planets-table td:nth-child(1) {
        width: 28%;
        min-width: 80px;
    }
    
    .planets-table th:nth-child(2),
    .planets-table td:nth-child(2) {
        width: 32%;
        min-width: 100px;
    }
    
    .planets-table th:nth-child(3),
    .planets-table td:nth-child(3) {
        width: 20%;
        min-width: 60px;
    }
    
    .planets-table th:nth-child(4),
    .planets-table td:nth-child(4) {
        width: 20%;
        min-width: 70px;
        font-size: 11px;
    }
}

.article-footer {
    background: #f4f6f9;
    color: #6b7b85;
    margin-top: 90px;
    font-size: 14.5px;
    padding: 30px 0 10px 0;
    border-radius: 4px;
    font-style: italic;
    border-top: 2.5px solid #f4e6bf;
}

@media (max-width: 768px) {
    .article-footer {
        margin-top: 60px;
        font-size: 13px;
        padding: 24px 0 8px 0;
    }
}

@media (max-width: 480px) {
.article-footer {
    margin-top: 40px;
    font-size: 12px;
    padding: 20px 0 6px 0;
    }
}

.yoga-section {
    margin: 60px 0;
    padding: 36px 28px;
    border-radius: 16px;
    border: 1.2px solid #e8e2d3;
    background: linear-gradient(135deg, #faf7f1 0%, #fefefa 100%);
    box-shadow: 0 8px 24px rgba(34, 32, 25, 0.08);
}

.yoga-section h2 {
    font-family: 'Charter', 'Georgia', serif;
    font-size: 28px;
    margin-bottom: 24px;
    color: #2b2520;
    letter-spacing: -0.25px;
    text-align: center;
}

.yoga-section__subtitle {
    margin-top: 40px;
}

.yoga-category {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
    margin-bottom: 30px;
}

.yoga-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e5dccb;
    padding: 22px 20px;
    box-shadow: 0 10px 24px rgba(120, 96, 60, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.yoga-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(120, 96, 60, 0.12);
}

.yoga-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: #2d2a26;
    letter-spacing: -0.1px;
}

.yoga-card p {
    font-size: 15px;
    line-height: 1.65;
    color: #443f39;
    margin-bottom: 8px;
}

.yoga-card--challenging {
    border: 1px solid #f0d9d5;
    background: #fff8f6;
    box-shadow: 0 10px 24px rgba(165, 66, 54, 0.08);
}

.yoga-card--challenging h3 {
    color: #7a2b24;
}

.yoga-card--challenging p {
    color: #5a3834;
}

@media (max-width: 768px) {
    .yoga-section {
        padding: 28px 18px;
        margin: 40px 0;
    }

    .yoga-section h2 {
        font-size: 24px;
    }

    .yoga-card {
        padding: 18px;
    }
}

@media (max-width: 480px) {
    .yoga-section {
        padding: 24px 14px;
    }

    .yoga-section h2 {
        font-size: 22px;
    }

    .yoga-card h3 {
        font-size: 18px;
    }

    .yoga-card p {
        font-size: 14px;
    }
}

.chatbot {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1500;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

.chatbot-toggle {
    background: linear-gradient(135deg, #2a2a2a, #4a3d2c);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.chatbot-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.chatbot-window {
    width: 320px;
    max-height: 480px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(22, 22, 26, 0.18);
    display: flex;
    flex-direction: column;
    border: 1px solid #f0eae0;
}

.chatbot-window.hidden {
    display: none;
}

.chatbot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: linear-gradient(135deg, #f3f0ea, #fff);
    border-bottom: 1px solid #e8ded1;
    border-radius: 18px 18px 0 0;
    font-weight: 600;
    color: #2f261b;
}

.chatbot-close {
    background: none;
    border: none;
    font-size: 20px;
    line-height: 20px;
    cursor: pointer;
    color: #6b6155;
    transition: color 0.18s ease;
}

.chatbot-close:hover {
    color: #2f261b;
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #faf7f1;
}

.chatbot-message {
    max-width: 90%;
    padding: 10px 14px;
    border-radius: 14px;
    line-height: 1.45;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(90, 70, 45, 0.08);
}

.chatbot-message.bot {
    align-self: flex-start;
    background: #ffffff;
    border: 1px solid #eee2cf;
    color: #3a3126;
}

.chatbot-message.user {
    align-self: flex-end;
    background: #2f261b;
    color: #fff;
}

.chatbot-form {
    display: flex;
    gap: 8px;
    padding: 14px 16px;
    border-top: 1px solid #e8ded1;
    background: #fefcf8;
    border-radius: 0 0 18px 18px;
}

.chatbot-form input {
    flex: 1;
    border: 1px solid #d8cdbf;
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.18s ease;
}

.chatbot-form input:focus {
    border-color: #2f261b;
}

.chatbot-form button {
    background: #2f261b;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.18s ease;
}

.chatbot-form button:hover {
    background: #42372a;
}

@media (max-width: 480px) {
    .chatbot {
        right: 12px;
        bottom: 12px;
    }

    .chatbot-window {
        width: calc(100vw - 32px);
        max-height: 60vh;
    }
}

/* Mahadasha Highlighting Styles - Wall Street Journal Style */
.dasha-highlighted {
    border-left: 4px solid #1a1a1a !important;
    background: #fafafa !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04) !important;
    position: relative;
    border-top: 1px solid #e5e5e5 !important;
    border-right: 1px solid #e5e5e5 !important;
    border-bottom: 1px solid #e5e5e5 !important;
}

.dasha-highlighted::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #1a1a1a;
}

.dasha-badge {
    display: inline-block;
    background: #1a1a1a;
    color: white;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 10px;
    vertical-align: middle;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
}

@media (max-width: 768px) {
    .dasha-badge {
        font-size: 11px;
        padding: 3px 10px;
        margin-left: 8px;
    }
}

@media (max-width: 480px) {
    .dasha-badge {
        font-size: 10px;
        padding: 2px 8px;
        margin-left: 6px;
        display: block;
        margin-top: 8px;
        width: fit-content;
    }
    
    .dasha-highlighted h2 {
        font-size: 18px;
    }
}

/* Dasha Summary Section Responsive */
.dasha-summary-section {
    margin: 30px 0;
}

@media (max-width: 768px) {
    .dasha-summary-section {
        padding: 24px 16px !important;
    }
    
    .dasha-summary-section > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .dasha-summary-section h2 {
        font-size: 20px !important;
    }
}

@media (max-width: 480px) {
    .dasha-summary-section {
        padding: 20px 12px !important;
        margin: 20px 0 !important;
    }
    
    .dasha-summary-section h2 {
        font-size: 18px !important;
        margin-bottom: 15px !important;
    }
    
    .dasha-summary-section > div[style*="padding: 20px"] {
        padding: 15px !important;
    }
    
    .dasha-summary-section p {
        font-size: 13px !important;
    }
}

/* Main Content Wrapper */
.main-content {
    flex: 1;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

/* Navigation Styles */
.main-nav {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    padding: 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1rem 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 0 !important;
}

.nav-container .nav-logo:first-child {
    margin-left: 0 !important;
    padding-left: 0 !important;
    transform: translateX(0);
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2b2520;
    text-decoration: none;
    font-family: 'Charter', 'Georgia', serif;
    margin-left: 0 !important;
    margin-right: auto;
    padding-left: 0 !important;
    padding-right: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: #443f39;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #8b7355;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #2b2520;
    margin: 3px 0;
    transition: 0.3s;
}

/* Footer Styles */
.main-footer {
    background: #2b2520;
    color: #e8e2d3;
    margin-top: auto;
    padding: 3rem 2rem 1rem;
    width: 100%;
    position: relative;
    z-index: 10;
}

/* When article view is active, footer should account for sidebar */
body:has(.article-view.active) .main-footer {
    margin-left: 280px;
    width: calc(100% - 280px);
    transition: margin-left 0.3s ease, width 0.3s ease;
}

body:has(.article-view.active) .article-sidebar.hidden ~ * .main-footer,
body:has(.article-view.active .article-sidebar.hidden) .main-footer {
    margin-left: 0;
    width: 100%;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-family: 'Charter', 'Georgia', serif;
}

.footer-section p {
    line-height: 1.6;
    color: #d4c5b0;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #d4c5b0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #ffffff;
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid #443f39;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #d4c5b0;
}

.footer-bottom p {
    margin: 0;
}

.footer-bottom .chatbot-toggle {
    background: #1a1a1a;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}

.footer-bottom .chatbot-toggle:hover {
    background: #333;
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Page Container Styles (for About, Contact, Privacy pages) */
.page-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    min-height: calc(100vh - 200px);
}

.page-content {
    background: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.page-content h1 {
    font-family: 'Charter', 'Georgia', serif;
    font-size: 2.5rem;
    color: #2b2520;
    margin-bottom: 1rem;
    text-align: center;
}

.page-content h2 {
    font-family: 'Charter', 'Georgia', serif;
    font-size: 1.8rem;
    color: #2b2520;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.page-content h3 {
    font-family: 'Charter', 'Georgia', serif;
    font-size: 1.4rem;
    color: #443f39;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.page-content p {
    line-height: 1.8;
    color: #443f39;
    margin-bottom: 1rem;
}

.page-content ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.page-content ul li {
    line-height: 1.8;
    color: #443f39;
    margin-bottom: 0.5rem;
}

.page-content a {
    color: #8b7355;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-content a:hover {
    color: #6b5a45;
    text-decoration: underline;
}

.content-section {
    margin-bottom: 2rem;
}

.last-updated {
    text-align: center;
    color: #6b5a45;
    font-style: italic;
    margin-bottom: 2rem;
}

.contact-info {
    background: #faf7f1;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

.faq-item {
    background: #faf7f1;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.faq-item h3 {
    margin-top: 0;
    color: #2b2520;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: #ffffff;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 1rem 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-container {
        padding: 1rem 1rem 1rem 0 !important;
        padding-left: 0 !important;
    }
    
    .nav-logo {
        padding-left: 0 !important;
        margin-left: 0 !important;
    }

    .page-container {
        padding: 1rem;
        margin: 1rem auto;
    }

    .page-content {
        padding: 1.5rem;
    }

    .page-content h1 {
        font-size: 2rem;
    }

    .page-content h2 {
        font-size: 1.5rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .main-footer {
        padding: 2rem 1rem 1rem;
    }
}
