:root {
    --terracotta: #8C3325;
    --saffron: #F2BB66;
    --parchment: #F9F4E8;
    --charcoal: #2C2C2C;
    --deep-green: #2E4732;
    --font-heading: 'Rozha One', serif;
    --font-heading2: 'Tiro Devanagari Sanskrit', serif;
    --font-body: 'Lora', serif;
}

body {
    background-color: var(--parchment);
    color: var(--charcoal);
    font-family: var(--font-body);
    margin: 0;
}

header {
    background-color: white;
    border-bottom: 5px solid var(--terracotta);
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-family: var(--font-heading);
    color: var(--terracotta);
    margin: 0;
    font-size: 2rem;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: var(--charcoal);
    font-weight: bold;
    transition: 0.3s;
}

nav a:hover {
    color: var(--saffron);
}

/* Ensure the nav menu is flex */
.nav-menu {
    display: flex;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}


/* Dropdown Container */
.dropdown {
    position: relative;
    display: inline-block;
}

/* Dropdown Content (Hidden by Default) */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 200px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.1);
    z-index: 1;
    border-top: 3px solid var(--terracotta);
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Links inside the dropdown */
.dropdown-content li a {
    color: var(--charcoal);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.6rem;
    border-bottom: 1px solid #f1f1f1;
}

/* Hover effect on dropdown links */
.dropdown-content li a:hover {
    background-color: var(--parchment);
    color: var(--terracotta);
}

/* Show the dropdown on hover */
.dropdown:hover .dropdown-content {
    display: block;
}

/* Change parent color when dropdown is active */
.dropdown:hover .dropbtn {
    color: var(--saffron);
}

.homepage-container {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.widget-section {
    padding: 20px 0;
}

.widget-title {
    font-family: var(--font-heading);
    color: var(--terracotta);
    border-bottom: 2px solid var(--saffron);
    display: inline-block;
    margin-bottom: 25px;
    font-size: 1.8rem;
}

.blog-grid {
    display: grid;
    /* Changed to exactly 3 columns for desktop */
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px;
}

.blog-card {
    background: white;
    border: 1px solid var(--saffron);
    border-radius: 0; /* Keep the manuscript feel */
    position: relative;
    padding: 5px;
    transition: transform 0.3s ease; /* Smooth hover */
    display: flex;
    flex-direction: column;
}

/* Internal decorative border */
.blog-card::after {
    content: '';
    position: absolute;
    top: 5px; left: 5px; right: 5px; bottom: 5px;
    border: 1px solid rgba(140, 51, 37, 0.2); 
    pointer-events: none;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.blog-card img {
    width: 100%;
    height: 180px; /* Reduced slightly to fit 3-column height better */
    object-fit: cover;
    position: relative;
    z-index: 1;
}

.blog-card-content {
    padding: 15px;
    position: relative;
    z-index: 1;
}

.blog-card-content h3 {
    margin: 10px 0;
    color: var(--terracotta);
    font-family: var(--font-heading);
    font-size: 1.1rem; /* Scaled for 3 columns */
}

/* Responsive: 2 columns for tablets, 1 for mobile */
@media (max-width: 1100px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}
.main-wrapper {
    display: grid;
    grid-template-columns: 3fr 1fr; /* 75% Content, 25% Sidebar */
    gap: 40px;
    padding: 50px 5%;
}

.sidebar-widget {
    background: white;
    border-left: 4px solid var(--saffron);
    padding: 20px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.05);
    height: fit-content;
}

.sutra-box {
    text-align: center;
    font-family: var(--font-body);
}

.sutra-text {
    font-size: 1.2rem;
    color: var(--terracotta);
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
}




.post-container {
    max-width: 800px;
   
    padding: 0 20px;
    background: white;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
    padding: 50px;
    border-radius: 4px;
}

.post-header {
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--saffron);
    padding-bottom: 30px;
}

.post-sanskrit-title {
    font-size: 1.5rem;
    color: var(--terracotta);
    display: block;
    margin-bottom: 10px;
}

.post-meta {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

.post-content {
    line-height: 1.8;
    font-size: 1.15rem;
    text-align: justify;
}

.shloka-box {
    background: #fff8e1;
    border-left: 5px solid var(--saffron);
    padding: 20px;
    margin: 30px 0;
    font-style: italic;
    text-align: center;
    font-weight: bold;
}


.search-header {
    background: var(--terracotta);
    color: var(--saffron);
    padding: 30px;
    text-align: center;
    border-radius: 4px;
    margin-bottom: 40px;
}

.search-result-item {
    border-left: 5px solid var(--terracotta);
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    transition: 0.3s;
}

.search-result-item:hover {
    background: #fdf5e6; /* Old Lace color */
    transform: translateX(10px);
}


.recent-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-posts-list li {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    transition: 0.3s;
}

.recent-posts-list li:last-child {
    border-bottom: none;
}

.recent-posts-list a {
    text-decoration: none;
    color: var(--charcoal);
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
    display: block;
}

.recent-posts-list a:hover {
    color: var(--terracotta);
}

.recent-posts-list li:hover {
    padding-left: 5px; /* Subtle movement on hover */
}



.vidya-tree {
    list-style: none;
    padding-left: 0;
}

.tree-node {
    margin-bottom: 8px;
}

.toggle-btn {
    font-weight: bold;
    color: var(--terracotta);
    display: block;
    padding: 8px;
    background: rgba(242, 187, 102, 0.1); /* Subtle saffron tint */
    border: 1px solid var(--saffron);
    cursor: pointer;
    transition: 0.3s;
}

.toggle-btn:hover {
    background: var(--saffron);
    color: white;
}

.sub-node {
    display: none; /* Hidden by default */
    list-style: none;
    padding-left: 20px;
    margin-top: 5px;
    border-left: 2px solid var(--terracotta);
}

.tree-node.active .sub-node {
    display: block; /* Shown when active class is added via JS */
}

.sub-node li {
    padding: 5px 0;
}

.sub-node li a {
    text-decoration: none;
    color: var(--charcoal);
    font-size: 0.9rem;
}

.sub-node li a:hover {
    color: var(--terracotta);
    font-weight: bold;
}
.widget-title a {
    transition: 0.3s;
}

.widget-title a:hover {
    color: var(--saffron); /* Gives a nice glow effect on hover */
    padding-left: 10px;    /* Subtle movement to indicate it's clickable */
}

/* --- RESPONSIVE REFINEMENTS --- */

/* 1. Ensure images don't overflow */
img {
    max-width: 100%;
    height: auto;
}

/* 2. Media Query for Tablets and Phones */
@media (max-width: 992px) {
    header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .main-wrapper {
        grid-template-columns: 1fr; /* Sidebar drops below content */
        padding: 20px 5%;
    }

    .post-container {
        padding: 30px 20px;
        margin: 20px auto;
    }
}

/* 3. Media Query for Mobile Phones specifically */
@media (max-width: 600px) {
    .logo h1 {
        font-size: 1.5rem;
    }

    nav ul {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
        padding: 0;
    }

    .widget-title {
        font-size: 1.4rem;
        display: block;
        text-align: center;
    }

    .blog-grid {
        grid-template-columns: 1fr; /* Force cards to take full width */
    }

    /* Shrink the floating button slightly for mobile */
    .floating-scholar-btn {
        bottom: 15px;
        right: 15px;
        padding: 10px 10px;
        font-size: 0.8rem;
    }

    .floating-scholar-btn span {
        display: none; /* Hide text on very small screens to save space */
    }

    .floating-scholar-btn::after {
        content: none; /* Show a shorter label */
        margin-left: 5px;
    }
}




.hero-manifesto {
    padding: 80px 10%;
    background: #fff;
    border: 1px solid var(--saffron);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden; /* Keeps large quotes inside the box */
    box-shadow: inset 0 0 50px rgba(242, 187, 102, 0.05);
}

.manifesto-heading {
    font-family: var(--font-heading);
    color: var(--terracotta);
    text-align: center;
    font-size: 3rem; /* Larger for impact */
    margin-bottom: 40px;
    letter-spacing: 1px;
}



.manifesto-content {
    position: relative;
    max-width: 900px; /* Constrains text width for better readability */
    margin: 0 auto;   /* Centers the block */
}

/* Big Decorative Inverted Commas */
.quote-icon {
    font-family: 'Georgia', serif;
    font-size: 12rem; /* Huge impact */
    color: var(--saffron);
    opacity: 0.25;    /* Subtle, elegant transparency */
    position: absolute;
    line-height: 1;
    z-index: 0;
}

.quote-icon.left {
    top: -60px;
    left: -50px;
}

.quote-icon.right {
    bottom: -100px;
    right: -50px;
}

.manifesto-text {
    position: relative;
    z-index: 1; /* Sits above the quotes */
}

.manifesto-text p {
    font-family: var(--font-body);
    font-size: 1.rem;
    line-height: 2; /* Increased line height for scholarly feel */
    color: var(--charcoal);
    text-align: justify;
    margin-bottom: 25px;
}
.latest-heading {
    font-family: var(--font-heading);
    color: var(--terracotta);
    text-align: center;
    font-size: 3rem; /* Larger for impact */
    margin-bottom: 5px;
    margin-top: 5px;
    letter-spacing: 1px;
}
/* Mobile Adjustments */
@media (max-width: 768px) {
    .hero-manifesto { padding: 50px 5%; }
    .manifesto-heading { font-size: 2rem; }
    .latest-heading { font-size: 2rem; }
    .quote-icon { font-size: 6rem; }
    .quote-icon.left { top: -30px; left: -10px; }
    .quote-icon.right { bottom: -50px; right: -10px; }
}

