:root {
    --primary-color: #2e7d32;
    --secondary-color: #d32f2f;
    --text-dark: #212121;
    --text-light: #5f5f5f;
    --bg-light-gray: #f8f9fa;
    --border-color: #e0e0e0;
}

body {
    font-family: "Mukta", sans-serif;
    background-color: #fff;
    color: var(--text-dark);
    scroll-behavior: smooth;
}

.crop-page-container {
    padding-top: 40px;
    padding-bottom: 40px;
}

/* --- Sidebar (Table of Contents & Crop List) --- */
/* .crop-sidebar {
                    position: sticky;
                    top: 20px;
                } */

.sidebar-widget {
    padding: 20px 15px;
    background-color: var(--bg-light-gray);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 25px;
}

.sidebar-widget h4 {
    font-family: "Mukta", serif;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    color: var(--text-dark);
}

/* Table of Contents List */
.table-of-contents ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.table-of-contents li a {
    display: block;
    padding: 8px 10px;
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    border-radius: 5px;
    transition: all 0.2s ease-in-out;
    border-left: 3px solid transparent;
}

.table-of-contents li a:hover,
.table-of-contents li a.active {
    /* For scrollspy later if needed */
    background-color: #e9ecef;
    color: var(--primary-color);
    border-left: 3px solid var(--primary-color);
}

/* Sidebar Crop Accordion */
.sidebar-widget .accordion-item {
    background-color: transparent;
    border: none;
}

.sidebar-widget .accordion-button {
    font-size: 0.9rem;
    padding: 0.6rem 0.5rem;
    background-color: #fff;
    border-radius: 5px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 5px;
}

.sidebar-widget .accordion-button:not(.collapsed) {
    background-color: var(--primary-color);
    color: #fff;
}

.sidebar-widget .accordion-body {
    padding: 0.5rem;
    font-size: 0.85rem;
}

.sidebar-widget .accordion-body ul {
    padding-left: 10px;
    list-style-type: "— ";
}

.sidebar-widget .accordion-body a {
    text-decoration: none;
    color: var(--primary-color);
}

/* --- Like Button Design --- */
.like-button-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    background-color: #fff;
}

/* Assuming your Livewire component renders a button */
.like-button-wrapper button {
    border: 1px solid var(--primary-color);
    background-color: #fff;
    color: var(--primary-color);
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.like-button-wrapper button.liked {
    /* Add a 'liked' class in Livewire */
    background-color: var(--primary-color);
    color: #fff;
}

.like-button-wrapper button:hover {
    transform: scale(1.05);
}

/* --- Main Content --- */
.crop-hero h1 {
    font-family: "Mukta", serif;
    font-size: 1.8rem;
    font-weight: 700;
}

.crop-hero .crop-season {
    font-size: 1.1rem;
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 20px;
}

.crop-hero-image {
    width: 100%; /* Make the image responsive to container width */
    max-height: 450px; /* ** The key property: Adjust this value as needed ** */
    object-fit: cover; /* ** The magic property ** */
    object-position: center;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.content-section {
    padding-top: 60px;
    /* Offset for scroll spy */
    margin-top: -50px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.content-section:last-of-type {
    border-bottom: none;
}

.content-section h2 {
    font-family: "Mukta", serif;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.content-section h2 i {
    margin-right: 15px;
    font-size: 1.8rem;
}

.content-section p,
.content-section ul li {
    line-height: 1.8;
    font-size: 1rem;
    color: var(--text-light);
}

.content-section ul {
    padding-left: 25px;
} 

.content-section h3 {
    font-family: "Mukta", sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-top: 25px;
    margin-bottom: 10px;
}

/* --- Info Cards (For Varieties, Pests) --- */
.info-card {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--primary-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: box-shadow 0.3s ease;
}

.info-card h3 {
    margin-top: 0;
    font-size: 1.25rem;
}

.info-card .badge {
    font-size: 0.8rem;
    font-weight: 700;
}

.badge.bg-pest {
    background-color: var(--secondary-color);
    color: white;
}

.badge.bg-disease {
    background-color: #ff9800;
    color: white;
}

.badge.bg-weed {
    background-color: #795548;
    color: white;
}

/* --- Back Button --- */
.back-button {
    display: inline-block;
    margin-top: 40px;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.back-button:hover {
    background-color: #1b5e20;
    color: #fff;
}

/* ADD THIS NEW CSS to your existing <style> block */

/* --- Minimalist Related Content Section --- */
.related-content-minimal {
    padding: 30px 20px;
    background-color: var(--bg-light-gray);
    border-radius: 12px;
    margin-top: 40px;
    border: 1px solid var(--border-color);
}

.related-content-minimal .section-heading h2 {
    font-family: "Mukta", serif;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--primary-color);
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.related-content-minimal .section-heading h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

/* Tab Navigation for Minimal Design */
.related-content-tabs-minimal {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
}

.related-content-tabs-minimal .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-light);
    font-weight: 700;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    margin-bottom: -1px;
    /* Overlap the main border */
    transition: all 0.3s ease;
}

.related-content-tabs-minimal .nav-link.active,
.related-content-tabs-minimal .nav-link:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: transparent;
}

.related-content-tabs-minimal .nav-link .badge {
    margin-left: 8px;
    background-color: var(--primary-color) !important;
}

/* Related Links List */
.related-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-links-list li {
    border-bottom: 1px solid #eee;
}

.related-links-list li:last-child {
    border-bottom: none;
}

.related-links-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 10px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
    border-radius: 5px;
}

.related-links-list a:hover {
    background-color: #e9ecef;
    color: var(--primary-color);
}

.related-links-list a .link-title {
    display: flex;
    align-items: center;
    gap: 12px;
    /* Space between icon and text */
}

.related-links-list a i {
    color: var(--primary-color);
    font-size: 1.1rem;
    width: 20px;
    /* Ensures consistent alignment */
    text-align: center;
}

.related-links-list .meta-info {
    font-size: 0.85rem;
    color: var(--text-light);
    flex-shrink: 0;
    /* Prevents the date from wrapping */
    padding-left: 15px;
}

.accordion-button:not(.collapsed)::after {
    background-image: var(--bs-accordion-btn-active-icon);
    filter: invert(1);
    transform: var(--bs-accordion-btn-icon-transform);
}

/* --- Responsive Adjustments --- */
@media (max-width: 991.98px) {
    .crop-sidebar {
        position: static;
    }

    .crop-hero h1 {
        font-size: 1.6rem;
    }

    .content-section h2 {
        font-size: 1.2rem;
    }

    .content-section h3 {
        font-size: 1rem;
    }

    .content-section p,
    .content-section ul li {
        line-height: 1.8;
        font-size: 0.9rem;
        color: var(--text-light);
    }
}

@media (min-width: 991.98px) {
    .crop-sidebar-two {
        position: -webkit-sticky;
        position: sticky;
        /*
                     * CRITICAL: Set 'top' to be navbar_height + desired_margin.
                     * Example: 70px (navbar) + 20px (margin) = 90px.
                    */
        top: 90px;
        /* <-- ADJUST THIS VALUE */

        /* Set z-index to be lower than the navbar */
        /* z-index: 99; */
    }
}

@media (min-width: 1300px) {
    .container {
        max-width: 1380px;
    }
}
