/*
Theme Name: Mandibhav Theme
Theme URI: http://mandibhav.in
Author: Amit Yadav
Author URI: http://amityadav.in
Description: A lightweight, custom theme for Mandibhav data.
Version: 1.0.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mandibhav-theme
*/

:root {
    --primary-color: #4CAF50;
    --primary-dark: #388E3C;
    --accent-color: #8BC34A;
    --text-color: #333333;
    --text-light: #666666;
    --bg-color: #f4f6f8;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 4px rgba(0,0,0,0.05);
    --radius: 8px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Roboto, Ubuntu, "Helvetica Neue", sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
    font-size: 16px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Structure (Akusara Style) */
#navigation {
    background-color: #fff;
    height: 60px;
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 999;
    box-shadow: none; /* No shadow initially for cleaner look */
    border-bottom: 1px solid #f0f0f0;
    line-height: 60px;
    transition: all 0.3s ease;
}

#navigation.site-header-scrolled {
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border-bottom: none;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(5px);
}

.sp-container {
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
}

#nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

/* Logo */
#top-logo img {
    max-height: 42px;
    width: auto;
    vertical-align: middle;
}
#top-logo .site-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-color);
    text-transform: uppercase;
}

/* Desktop Menu */
.menu-primary-menu-container-wrap ul.menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.menu-primary-menu-container-wrap ul.menu > li > a {
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #262626;
    text-decoration: none;
    transition: color 0.2s ease;
}
.menu-primary-menu-container-wrap ul.menu > li > a:hover {
    color: var(--primary-color);
}

/* Search Icon */
#top-misc {
    display: flex;
    align-items: center;
    position: relative;
    margin-left: 20px;
}
.search-icon {
    vertical-align: middle;
    cursor: pointer;
    width: 20px;
    height: 20px;
}
.search-path { stroke: #848F91; transition: stroke 0.2s ease; }
.search-icon:hover .search-path { stroke: var(--primary-color); }

.show-search {
    display: none;
    position: absolute;
    top: 50px;
    right: 0;
    background: #fff;
    padding: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    width: 320px;
    border-radius: 6px;
    border: 1px solid #eee;
    animation: fadeIn 0.2s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.show-search input[type="search"] {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background-color: #f9f9f9;
}
.show-search input[type="search"]:focus {
    background-color: #fff;
    border-color: var(--primary-color);
    outline: none;
}
#close-search {
    position: absolute;
    right: 25px;
    top: 25px;
    color: #999;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s;
}
#close-search:hover { color: #333; }

/* Mobile Menu Toggle */
#mobile-menu-toggle {
    display: none;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    color: #000;
}
.hamburger .bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: #000;
    margin: 4px 0;
}

/* Mobile Menu Container */
#mobile-menu-container {
    display: none;
    background: #fff;
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    padding: 10px 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 998;
}
#mobile-menu-container ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
#mobile-menu-container li {
    border-bottom: 1px solid #eee;
}
#mobile-menu-container li a {
    display: block;
    padding: 12px 0;
    color: #333;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 900px) {
    .menu-primary-menu-container-wrap { display: none; }
    #mobile-menu-toggle { display: flex; }
}

/* Layout Grid */
.site-content-container {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 30px;
    margin-top: 30px;
    margin-bottom: 30px;
}

@media (max-width: 850px) {
    .site-content-container {
        grid-template-columns: 1fr;
    }
}

/* Main Content */
.site-main {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Sidebar */
.widget-area {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.widget {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    color: var(--text-color);
    display: inline-block;
    width: 100%;
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget ul li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}
.widget ul li:last-child { border-bottom: none; }
.widget ul li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Typography & Default Elements */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-color);
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 600;
    line-height: 1.3;
}
h1 { font-size: 32px; color: #000000; margin-bottom: 20px;}
h2 { font-size: 26px; }
h3 { font-size: 22px; }

p { margin-bottom: 20px; }

hr {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin: 30px 0;
}

/* Form Elements */
input[type="text"], input[type="email"], input[type="search"], textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 15px;
}
input[type="submit"], button {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
}
button:hover, input[type="submit"]:hover {
    background: var(--primary-dark);
}

/* Pagination */
.pagination { 
    margin-top: 40px; 
    text-align: center;
}
.pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 10px;
}
.pagination .page-numbers {
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--white);
    color: var(--text-color);
}
.pagination .page-numbers.current, .pagination .page-numbers:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* Footer */
footer.site-footer {
    background: #222;
    color: #aaa;
    padding: 40px 0;
    margin-top: 40px;
    text-align: center;
    font-size: 14px;
}

/* Utility */
.text-center { text-align: center; }
.display-none { display: none; }

/* 
   --------------------------------------------------
   Mandi Plugin Styles (Ported from Plugin CSS)
   --------------------------------------------------
*/
.all-commodity { color: #ccc; }
.all-commodity.inline { display: table-caption; }
.all-commodity a {
    padding: 10px;
    border: 1px solid #8BC34A;
    border-radius: 5px;
    line-height: 3;
    margin: 0px;
    background-color: #4CAF50;
    color: #fff;
    white-space: nowrap;
}
.all-commodity a:hover {
    background-color: #12a118;
    text-decoration: none;
}

/* Commodity List */
.commodity-list a {
    padding: 5px 10px;
    font-weight: bold;
    font-size: 14px;
    color: #0c9d02;
    white-space: nowrap;
    display: inline-block;
    border: 1px solid #ccc;
    margin: 10px;
    border-radius: 5px;
    text-align: center;
    background: linear-gradient(6deg, #ebebeb, #ffffff);
}
.commodity-list img { display: block; margin: auto; }
.commodity-list a:hover { text-decoration: none; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }

/* Tables */
.comodity-table table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 16px;
    text-align: left;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}
.comodity-table th {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px 15px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
}
.comodity-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    color: #333;
}
.comodity-table tr:nth-of-type(even) { background-color: #f9f9f9; }
.comodity-table tr:hover { background-color: #f1f1f1; transition: background-color 0.2s ease; }
.comodity-table tr:last-of-type td { border-bottom: 2px solid var(--primary-color); }

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
    color: #888;
}
.tooltip .info {
    visibility: hidden;
    width: 140px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 10;
    bottom: 125%;
    left: 50%;
    margin-left: -70px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}
.tooltip .info::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #555 transparent transparent transparent;
}
.tooltip:hover .info { visibility: visible; opacity: 1; }


/* 
   --------------------------------------------------
   FAQ Modern Styling
   --------------------------------------------------
*/
.schema-faq-code {
    margin: 40px auto;
}

.faq-question {
    background: #ffffff;
    border: 1px solid #eef0f3;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
}

.faq-question:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    transform: translateY(-2px);
    border-color: #dbe2ea;
}

.faq-question summary {
    padding: 20px 24px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    color: var(--text-color);
    background-color: #fff;
    list-style: none;
    position: relative;
    padding-right: 50px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid transparent; /* Prepare for transition */
    transition: all 0.2s ease;
}

.faq-question summary::-webkit-details-marker {
    display: none;
}

/* Custom Icon */
.faq-question summary::after {
    content: '+';
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: var(--primary-color);
    font-weight: 300;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    width: 24px;
    height: 24px;
    line-height: 22px;
    text-align: center;
    border-radius: 50%;
    background: rgba(76, 175, 80, 0.1); /* Gentle green background */
}

/* Open State */
.faq-question[open] {
    box-shadow: 0 8px 16px rgba(76, 175, 80, 0.1);
    border-color: rgba(76, 175, 80, 0.3);
}

.faq-question[open] summary {
    border-bottom: 1px solid #f0f0f0;
    color: var(--primary-dark);
}

.faq-question[open] summary::after {
    content: '-';
    transform: translateY(-50%) rotate(180deg);
    background: var(--primary-color);
    color: #fff;
}

.faq-answer {
    background-color: #fafbfc;
    padding: 24px;
    animation: slideDown 0.3s ease-out;
}

.faq-answer p {
    margin: 0;
    color: #555;
    font-size: 15px;
    line-height: 1.7;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 
   --------------------------------------------------
   Migrated Plugin Styles (Frontend)
   --------------------------------------------------
*/

/* 404 Page Styling */
.mandi-404-container {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin: 20px 0;
}
.mandi-404-icon {
    font-size: 60px;
    color: #ffd700;
    margin-bottom: 20px;
}
.mandi-404-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}
.mandi-404-text {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}
.mandi-btn-home {
    display: inline-block;
    padding: 10px 25px;
    background-color: #2271b1;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background 0.3s;
}
.mandi-btn-home:hover {
    background-color: #135e96;
    color: #fff;
}

/* Mobile Responsive Table Scroll */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
}
.table-scroll table {
    margin: 0;
    white-space: nowrap; /* Ensures columns don't wrap and trigger scroll */
    box-shadow: none; /* Remove duplicate shadow if present */
    border-radius: 0;
}
@media (max-width: 600px) {
    .table-scroll th, .table-scroll td {
        padding: 10px;
        font-size: 14px;
    }
    #navigation {
        padding: 0px 20px;
    }
    .sp-container {
        padding: 0px;
    }
    .site-main {
        padding: 15px;
    }
    h1 {
    font-size: 24px;
    color: #000000;
    margin-bottom: 10px;
    }
    h2 {
    font-size: 20px;
    }
    .faq-question summary {
    padding: 10px;
    }
    .faq-answer {
    padding: 10px;
    }
}
