/* ==================================================
   GLOBAL RESET AND BASE STYLES
   ================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-justify: none !important;
    hyphens: none !important;
}

body {
    font-family: Georgia, serif;
    background-color: #f8f8f8;
    color: #333;
    line-height: 1.6;
}

/* ==================================================
   LAYOUT STRUCTURE
   ================================================== */
.container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 200px;
    background-color: #000080;
    padding: 20px;
    box-shadow: none;
    border-right: none;
    position: relative;
}

.main-content {
    flex: 1;
    padding: 40px 80px;
    text-align: left;
}

/* ==================================================
   HAMBURGER MENU BUTTON (Mobile Only)
   ================================================== */
.hamburger-btn {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background-color: #000080;
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.hamburger-btn:hover {
    background-color: #4169E1;
    transform: scale(1.05);
}

.hamburger-btn.active {
    background-color: #1E90FF;
}

/* Hamburger icon */
.hamburger-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.hamburger-icon span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: white;
    margin: 2px 0;
    transition: all 0.3s ease;
}

.hamburger-btn.active .hamburger-icon span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-btn.active .hamburger-icon span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active .hamburger-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ==================================================
   MOBILE OVERLAY
   ================================================== */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
}

/* ==================================================
   NAVIGATION BUTTONS
   ================================================== */
.nav-button {
    display: block;
    width: 100%;
    padding: 8px 12px;
    margin-bottom: 2px;
    background-color: #4169E1;
    color: white;
    text-decoration: none;
    border: 1px solid #0000CD;
    border-radius: 0;
    font-size: 13px;
    font-weight: normal;
    text-align: left;
    transition: background-color 0.3s ease;
    cursor: pointer;
    font-family: Verdana, Arial, sans-serif;
}

.nav-button:hover {
    background-color: #1E90FF;
    color: white;
}

.nav-button.active {
    background-color: #1E90FF;
}

/* ==================================================
   HOMEPAGE ELEMENTS
   ================================================== */
.logo-section {
    margin-bottom: 100px;
}

.logo-text {
    font-size: 32px;
    font-weight: normal;
    letter-spacing: 2px;
    margin-bottom: 20px;
    color: #333;
}

.lotus-image {
    margin: 30px 0 50px 0;
}

.lotus-image img {
    width: 200px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* ==================================================
   QUIZ SECTION
   ================================================== */
.quiz-section {
    max-width: 600px;
    margin: 0 auto;
    text-align: center !important;
}

.quiz-title {
    font-size: 32px !important;
    margin-bottom: 30px !important;
    color: #333 !important;
    text-align: center !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

.score {
    font-size: 18px;
    margin-bottom: 30px;
    color: #666;
}

.question {
    font-size: 20px;
    margin-bottom: 30px;
    color: #333;
}

.answer-input {
    width: 400px;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    margin-bottom: 15px;
    background-color: white;
    display: block;
    margin: 0 auto 15px auto; /* 0 for top, auto for left/right, 15px for bottom */
}

.answer-input:focus {
    outline: none;
    border-color: #87CEEB;
}

.instruction {
    font-size: 14px;
    color: #666;
    margin-bottom: 25px;
}

/* Ensure homepage headings don't get the section heading styling */
.quiz-section h1,
.quiz-section h2 {
    text-align: center !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
    color: #333 !important;
}

/* ==================================================
   BUTTONS
   ================================================== */
.button {
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 10px 20px;
    margin: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: inline-block;
}

.button:hover {
    background-color: #e0e0e0;
}

.submit-btn {
    background-color: #87CEEB;
}

.submit-btn:hover {
    background-color: #6BB6D6;
}

/* ==================================================
   FEEDBACK MESSAGES
   ================================================== */
.feedback-correct {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 6px;
    margin-top: 20px;
}

.feedback-incorrect {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 6px;
    margin-top: 20px;
}

.feedback-explanation {
    background-color: #e2e3e5;
    border: 1px solid #d6d8db;
    color: #383d41;
    padding: 15px;
    border-radius: 6px;
    margin-top: 20px;
}

/* ==================================================
   BLOG POST STYLING TO MATCH MOILEON.IN
   ================================================== */

/* Blog post content container */
.blog-post,
.post-content,
.content,
article {
    max-width: 750px;
    margin: 0 auto;
    padding: 0;
    line-height: 1.7;
    font-size: 16px;
    color: #333;
}

/* Blog post main title */
.blog-post h1,
.post-content h1,
.content h1,
article h1 {
    font-size: 1.8rem !important;
    color: #000080 !important;
    margin-bottom: 15px !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
    text-align: left !important;
    font-family: Georgia, serif !important;
    font-weight: bold !important;
    line-height: 1.3 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

/* Date styling */
.post-date,
.blog-date,
.date {
    color: #666 !important;
    font-size: 14px !important;
    margin-bottom: 30px !important;
    font-style: normal !important;
    font-weight: normal !important;
    border-bottom: none !important;
}

/* Blog post paragraphs - AGGRESSIVE FIX */
.blog-post p,
.post-content p,
.content p,
article p {
    margin-bottom: 20px !important;
    text-align: left !important;
    font-size: 16px !important;
    line-height: 1.7 !important;
    color: #333 !important;
    font-family: Georgia, serif !important;
    word-wrap: normal !important;
    overflow-wrap: normal !important;
    text-justify: none !important;
    hyphens: none !important;
    white-space: normal !important;
    word-spacing: normal !important;
    letter-spacing: normal !important;
    text-rendering: optimizeLegibility !important;
}

/* Section headings within blog posts */
.blog-post h2,
.post-content h2,
.content h2,
article h2 {
    font-size: 1.3rem !important;
    color: #333 !important;
    margin: 30px 0 15px 0 !important;
    font-weight: bold !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
    text-align: left !important;
    font-family: Georgia, serif !important;
}

/* Subsection headings */
.blog-post h3,
.post-content h3,
.content h3,
article h3 {
    font-size: 1.1rem !important;
    color: #333 !important;
    margin: 25px 0 12px 0 !important;
    font-weight: bold !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
    text-align: left !important;
    font-family: Georgia, serif !important;
}

/* Remove general heading styles from blog posts */
.blog-post h1,
.blog-post h2,
.blog-post h3,
.post-content h1,
.post-content h2,
.post-content h3,
.content h1,
.content h2,
.content h3,
article h1,
article h2,
article h3 {
    border-bottom: none !important;
}

/* ==================================================
   HEADINGS - UNIFIED STYLING TO MATCH QUOTES PAGE
   ================================================== */
.section-header h1,
.section-header h2,
.main-content h1:not(.quiz-title):not(.blog-post h1):not(.post-content h1):not(.content h1):not(article h1),
.main-content h2:not(.quiz-title):not(.blog-post h2):not(.post-content h2):not(.content h2):not(article h2),
.content-section h2,
main h1:not(.quiz-title):not(.blog-post h1):not(.post-content h1):not(.content h1):not(article h1),
main h2:not(.quiz-title):not(.blog-post h2):not(.post-content h2):not(.content h2):not(article h2) {
    color: #000080 !important;
    margin-bottom: 20px !important;
    border-bottom: 2px solid #4169E1 !important;
    padding-bottom: 10px !important;
    text-align: left !important;
    font-family: Georgia, serif !important;
    font-weight: bold !important;
    font-size: 32px !important;
}

/* Also exclude quiz-section headings */
.quiz-section h1,
.quiz-section h2,
.quiz-section .quiz-title {
    color: #000080 !important;
    text-align: center !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 30px !important;
    font-weight: bold !important;
    font-size: 32px !important;
}

/* Remove any HR elements that might create double lines */
.section-page hr,
.main-content hr,
.content hr,
hr {
    display: none;
}

/* ==================================================
   LIST PAGES STYLING
   ================================================== */
.section-page {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.section-header {
    text-align: left;
    margin-bottom: 20px;
}

.section-description {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
}

.posts-list {
    padding-left: 20px;
    margin: 20px 0;
}

.posts-list ul {
    list-style-type: disc;
    padding-left: 20px;
}

.posts-list li {
    margin-bottom: 10px;
    line-height: 1.5;
}

.posts-list a {
    color: #000080;
    text-decoration: underline;
    font-size: 16px;
}

.posts-list a:hover {
    color: #4169E1;
}

/* For article-based list items (preserve original bullet style) */
.post-item,
.booknote-item,
.project-item,
.podcast-item {
    margin-bottom: 15px;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
    list-style: disc outside;
    margin-left: 20px;
}

.post-item h3,
.booknote-item h3,
.project-item h3,
.podcast-item h3 {
    display: inline;
    font-size: 16px;
    font-weight: normal;
    margin: 0;
}

.post-item h3 a,
.booknote-item h3 a,
.project-item h3 a,
.podcast-item h3 a {
    color: #000080;
    text-decoration: underline;
}

.post-item h3 a:hover,
.booknote-item h3 a:hover,
.project-item h3 a:hover,
.podcast-item h3 a:hover {
    color: #4169E1;
}

/* Hide other post elements to maintain simple bullet list */
.post-date,
.post-summary,
.book-author,
.book-rating,
.episode-number,
.episode-duration,
.tech-stack,
.book-summary,
.project-summary,
.podcast-summary,
.read-more,
.project-links,
.external-link,
.post-tags-small {
    display: none;
}

/* Show date in blog posts */
.blog-post .post-date,
.post-content .post-date,
.content .post-date,
article .post-date,
.blog-post .blog-date,
.post-content .blog-date,
.content .blog-date,
article .blog-date,
.blog-post .date,
.post-content .date,
.content .date,
article .date {
    display: block !important;
}

/* ==================================================
   RESPONSIVE DESIGN - ENHANCED MOBILE
   ================================================== */

/* Mobile styles (768px and below) */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    /* Show hamburger button on mobile */
    .hamburger-btn {
        display: block;
    }
    
    /* Mobile sidebar - slide out from left */
    .sidebar {
        position: fixed;
        top: 0;
        left: -250px;
        width: 250px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        overflow-y: auto;
        box-shadow: 2px 0 10px rgba(0,0,0,0.3);
        padding: 80px 20px 20px 20px;
    }
    
    /* Show sidebar when active */
    .sidebar.active {
        left: 0;
    }
    
    /* Show overlay when sidebar is active */
    .mobile-overlay {
        display: block;
    }
    
    /* Adjust main content for mobile */
    .main-content {
        padding: 80px 20px 20px 20px;
        width: 100%;
    }
    
    /* Navigation buttons in mobile sidebar */
    .nav-button {
        padding: 12px 16px;
        margin-bottom: 4px;
        font-size: 14px;
        text-align: left;
        width: 100%;
        border-radius: 4px;
    }
    
    /* Homepage mobile adjustments */
    .logo-section {
        margin-bottom: 50px;
    }
    
    .logo-text {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .lotus-image {
        margin: 20px 0 30px 0;
    }
    
    .lotus-image img {
        width: 150px;
    }
    
    /* Quiz mobile adjustments */
    .quiz-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .question {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    .answer-input {
        width: 100%;
        max-width: 400px;
        font-size: 16px;
    }
    
    /* Blog post mobile adjustments */
    .blog-post,
    .post-content,
    .content,
    article {
        max-width: 95%;
        padding: 0 15px;
    }
    
    .blog-post h1,
    .post-content h1,
    .content h1,
    article h1 {
        font-size: 1.8rem !important;
        line-height: 1.2 !important;
    }
}

/* Tablet styles (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar {
        width: 180px;
        padding: 18px;
    }
    
    .main-content {
        padding: 35px;
    }
    
    .nav-button {
        font-size: 12px;
        padding: 7px 10px;
    }
}

/* Desktop styles (1025px and above) */
@media (min-width: 1025px) {
    .sidebar {
        width: 200px;
        padding: 20px;
    }
    
    .main-content {
        padding: 40px;
    }
}

/* ==================================================
   SINGLE POST TEMPLATE STYLES (MOVED FROM TEMPLATE)
   ================================================== */

/* Single post styles */
.single-post {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.post-header {
    text-align: center;
    margin-bottom: 40px;
}

.post-header h1 {
    font-size: 32px;
    color: #333;
    margin-bottom: 15px;
}

.post-meta {
    color: #666;
    font-size: 14px;
}

.post-meta .author {
    margin-left: 15px;
}

/* Book info styles */
.book-info {
    display: flex;
    gap: 20px;
    background-color: #f8f8f8;
    padding: 20px;
    border-radius: 6px;
    margin: 30px 0;
}

.book-cover {
    max-width: 150px;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.book-details p {
    margin: 8px 0;
    font-size: 14px;
    color: #555;
}

/* Project info styles */
.project-info {
    background-color: #f8f8f8;
    padding: 20px;
    border-radius: 6px;
    margin: 30px 0;
}

.project-info .tech-stack {
    margin: 10px 0;
    color: #555;
}

.project-links {
    margin: 15px 0;
}

.project-links a {
    margin-right: 15px;
}

/* Podcast info styles */
.podcast-info {
    background-color: #f8f8f8;
    padding: 20px;
    border-radius: 6px;
    margin: 30px 0;
}

.episode-meta {
    margin: 8px 0;
    color: #555;
}

.podcast-player {
    margin: 20px 0;
}

.podcast-player audio {
    width: 100%;
    height: 40px;
}

/* Template post content (with fixed alignment) */
.single-post .post-content {
    font-size: 16px !important;
    line-height: 1.7 !important;
    margin: 30px 0 !important;
    text-align: left !important;
    text-justify: none !important;
}

.single-post .post-content h2,
.single-post .post-content h3,
.single-post .post-content h4 {
    margin: 30px 0 15px 0 !important;
    color: #333 !important;
    text-align: left !important;
}

.single-post .post-content p {
    margin: 15px 0 !important;
    text-align: left !important;
    text-justify: none !important;
    word-spacing: normal !important;
    letter-spacing: normal !important;
}

.single-post .post-content ul,
.single-post .post-content ol {
    margin: 15px 0;
    padding-left: 30px;
}

.single-post .post-content li {
    margin: 8px 0;
    text-align: left !important;
}

.single-post .post-content blockquote {
    background-color: #f8f8f8;
    border-left: 4px solid #000080;
    padding: 15px 20px;
    margin: 20px 0;
    font-style: italic;
    text-align: left !important;
}

.single-post .post-content code {
    background-color: #f1f1f1;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

.single-post .post-content pre {
    background-color: #f1f1f1;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    text-align: left !important;
}

/* Tags */
.post-tags {
    margin: 40px 0;
    padding: 20px;
    background-color: #f8f8f8;
    border-radius: 6px;
}

.post-tags h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

.tag-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-list li {
    display: inline-block;
}

.tag-link {
    background-color: #000080;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    transition: background-color 0.3s ease;
}

.tag-link:hover {
    background-color: #4169E1;
}

/* Navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin: 40px 0;
    padding: 20px 0;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
}

.nav-link {
    color: #000080;
    text-decoration: none;
    font-weight: bold;
    padding: 10px 15px;
    border: 1px solid #000080;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background-color: #000080;
    color: white;
}

.prev-link {
    margin-right: auto;
}

.next-link {
    margin-left: auto;
}

/* Back to section */
.back-to-section {
    text-align: center;
    margin: 30px 0;
}

/* Mobile responsive for single posts */
@media (max-width: 768px) {
    .single-post {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .book-info {
        flex-direction: column;
        text-align: center;
    }
    
    .book-cover {
        max-width: 120px;
        margin: 0 auto;
    }
    
    .post-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-link {
        text-align: center;
    }
}

/* ==================================================
   LIST TEMPLATE STYLES (MOVED FROM LIST TEMPLATE)
   ================================================== */

/* Override previous section-page styles */
.section-page {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.section-header {
    text-align: left;
    margin-bottom: 40px;
}

.section-header h1 {
    font-size: 32px;
    color: #333;
    margin-bottom: 20px;
}

.section-description {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    text-align: left !important;
    text-justify: none !important;
}

/* Book cover styling for list pages */
.book-cover-small {
    float: left;
    width: 80px;
    height: auto;
    margin: 0 15px 15px 0;
    border-radius: 4px;
}

.booknote-content {
    overflow: hidden;
}

/* Project and external links */
.project-links,
.external-link {
    margin-top: 10px;
}

.external-link {
    margin-left: 15px;
    color: #4169E1;
    text-decoration: none;
}

.external-link:hover {
    text-decoration: underline;
}

/* Small tags for list pages */
.post-tags-small {
    margin: 10px 0;
}

.tag-small {
    background-color: #f0f0f0;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    margin-right: 5px;
}

/* Pagination styling */
.pagination {
    text-align: center;
    margin: 40px 0;
    padding: 20px 0;
    border-top: 1px solid #ddd;
}

.pagination-link {
    color: #000080;
    text-decoration: none;
    padding: 10px 15px;
    margin: 0 10px;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.pagination-link:hover {
    background-color: #e8e8e8;
    text-decoration: none;
}

.pagination-info {
    margin: 0 20px;
    color: #666;
}

/* Ensure list page content has proper text alignment */
.section-page p,
.booknote-content p,
.project-item p,
.podcast-item p,
.post-item p {
    text-align: left !important;
    text-justify: none !important;
    word-spacing: normal !important;
    letter-spacing: normal !important;
}

/* ==================================================
   NUCLEAR TEXT ALIGNMENT FIX
   ================================================== */
.main-content *,
.single-post *,
.post-content *,
.blog-post *,
.content *,
article *,
p, div, span, h1, h2, h3, h4, h5, h6 {
    text-align: left !important;
    text-justify: none !important;
    word-spacing: normal !important;
    letter-spacing: normal !important;
    white-space: normal !important;
    hyphens: none !important;
    -webkit-hyphens: none !important;
    -ms-hyphens: none !important;
    text-rendering: auto !important;
}

/* Allow centered elements only where needed */
.quiz-section *,
.logo-section *,
.post-header {
    text-align: center !important;
}

/* ==================================================
   PROJECT DESCRIPTION LIST STYLING
   ================================================== */
/* Project description with nested lists */
.project-description {
    margin: 10px 0 0 0;
}

.project-description ol,
.project-description ul {
    list-style-position: outside !important;
    margin: 10px 0 !important;
    padding-left: 30px !important;
    display: block !important;
}

.project-description ol {
    list-style-type: decimal !important;
}

.project-description ul {
    list-style-type: disc !important;
}

.project-description li {
    margin: 5px 0 !important;
    display: list-item !important;
    text-align: left !important;
}

.project-description p {
    margin: 10px 0 !important;
}

/* Also target main-content lists directly for projects page */
.main-content > ul > li .project-description ol,
.main-content > ul > li .project-description ul {
    list-style-position: outside !important;
    margin: 10px 0 !important;
    padding-left: 30px !important;
}

.main-content > ul > li .project-description ol {
    list-style-type: decimal !important;
}

.main-content > ul > li .project-description ul {
    list-style-type: disc !important;
}

.main-content > ul > li .project-description li {
    display: list-item !important;
    margin: 5px 0 !important;
}
