/* Google Font */
body {
    font-family: 'Poppins', sans-serif;
    padding-top: 215px; /* Offset for fixed navbar */
}

/* Variables */
:root {
    --primary-color: #28a745;
    --secondary-color: #218838;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
}

/* General Styling */
.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-weight: 600;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 8px auto 0;
}

/* Header & Navigation */
.navbar-brand {
    color: var(--primary-color) !important;
}

.nav-link {
    font-weight: 500;
}
.nav-link.active, .nav-link:hover {
    color: var(--primary-color) !important;
}
.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 70vh;
    /* === UPDATED LINE === */
    background: url('img/new_banner.png') no-repeat center center/cover;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* Quick Navigation */
.quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--dark-color);
    padding: 20px;
    border-radius: 8px;
    transition: background-color 0.3s, transform 0.3s;
}
.quick-link i {
    color: var(--primary-color);
    margin-bottom: 10px;
}
.quick-link:hover {
    background-color: var(--light-color);
    transform: translateY(-5px);
    color: var(--secondary-color);
}

/* Dashboard */
.card-title {
    color: var(--primary-color);
    font-weight: 600;
}

/* =================== DYNAMIC SCROLLING AGRO-ADVISORIES =================== */
#advisory-list-container {
    height: 250px; /* Fixed height for the container */
    overflow: hidden; /* This is crucial, it hides the content that scrolls out */
    position: relative;
}

.advisory-list-scroller {
    /* The animation will be applied here by JavaScript */
    position: absolute;
    width: 100%;
}

.advisory-item {
    border-bottom: 1px solid #e9ecef;
    padding: 15px 5px;
}

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

.advisory-text {
    font-size: 0.95rem;
    color: #343a40;
    line-height: 1.6;
}

/* The animation that scrolls the content up */
@keyframes scroll-up {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-50%); /* Moves the content up by half its total height */
    }
}

.scrolling-animation {
    animation-name: scroll-up;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

/* Crop Calendar */
.nav-pills .nav-link {
    color: var(--dark-color);
}
.nav-pills .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}
.accordion-button:not(.collapsed) {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--dark-color);
}

/* Contact Section */
.map-container {
    overflow: hidden;
    border-radius: 8px;
}
/* Important Links Section */
.link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 15px;
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    text-align: center;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.link-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-color);
    color: var(--primary-color);
}
/* Resources & Downloads Section */
.download-cell {
    text-align: center;
    vertical-align: middle;
}
/* Mandated Activities Section */
.mandate-card {
    background-color: #ffffff;
    padding: 30px 20px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.mandate-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

.mandate-card:hover i {
    color: var(--secondary-color);
}

.mandate-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.mandate-card p {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.6;
}
/* Font Size Controls */
.font-size-controls button {
    line-height: 1; /* Ensures text is centered vertically */
    font-weight: 600;
    font-size: 0.9rem !important; /* Keeps button text size consistent */
}
/* Expert Profile Links */
.expert-profiles {
    display: flex;
    gap: 12px; /* Adds space between icons */
}

.expert-profiles a {
    color: #6c757d; /* A neutral, secondary text color */
    font-size: 1.1rem; /* Adjust icon size as needed */
    text-decoration: none;
    transition: color 0.3s ease;
}

.expert-profiles a:hover {
    color: var(--primary-color); /* Changes to the site's primary green on hover */
}
/* Photo Gallery Section */
.carousel-item {
    height: 550px; /* Sets a consistent height for all slides on larger screens */
    transition: opacity 0.6s ease-in-out; /* Smooths the fade transition */
}

.carousel-item img {
    height: 100%;
    object-fit: cover; /* Ensures images cover the area without distortion */
    width: 100%;
}

.carousel-caption {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%); /* Adds a gradient for readability */
    padding-bottom: 1.5rem;
}

/* Responsive height for smaller screens */
@media (max-width: 768px) {
    .carousel-item {
        height: 300px;
    }
}

/* ================================== */
/* === Improved Visitor Counter === */
/* ================================== */

.visitor-counter-wrapper {
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid #495057; /* A subtle separator line */
    display: flex;
    justify-content: center; /* Horizontally centers the widget */
}

.visitor-counter-box {
    background-color: #343a40; /* A slightly darker shade than the footer */
    border: 1px solid #495057;
    border-radius: 8px; /* Modern rounded corners */
    padding: 10px 20px;
    display: inline-block; /* Makes the box fit its content */
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Adds depth */
}

.visitor-counter-box .counter-title {
    color: #adb5bd; /* Lighter text color */
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase; /* Makes it look like a formal title */
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.visitor-counter-box img.freecounter {
    border-radius: 4px; /* Slightly rounds the corners of the counter image itself */
}

/* =================== NEW HEADER STYLES =================== */
.header-container {
    background-color: #ffffff; /* A solid background for the container */
}

/* Top Bar Styling */
.top-bar {
    background-color: #f8f9fa;
    padding: 8px 0;
    border-bottom: 1px solid #dee2e6;
}

.top-bar .logo-container a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #495057;
}

.top-bar .logo-container img {
    height: 40px;
    margin-right: 10px;
     border: none; /* This line removes the black border */
}

.top-bar .logo-container span {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Main Header Identity Section */
.main-header {
    padding: 15px 0;
}

.logo-section .kvk-building-photo {
    height: 80px;
    width: auto;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-right: 20px;
    object-fit: cover;
}

.logo-section h4 {
    color: var(--primary-color);
    font-weight: 700;
}

.logo-section p {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Main Navigation Bar */
.main-nav {
    background-color: var(--primary-color) !important;
}

.main-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: color 0.3s;
}

.main-nav .nav-link.active,
.main-nav .nav-link:hover {
    color: #ffffff;
}

/* Responsive adjustments for the header */
@media (max-width: 991px) {
    body {
        padding-top: 150px; /* Adjust for smaller header on mobile */
    }
    .top-bar .logo-container span {
        display: none; /* Hide text on smaller screens to save space */
    }
    .main-header {
        flex-direction: column;
    }
    .logo-section {
        margin-bottom: 15px;
    }
}

@media (max-width: 576px) {
    .logo-section {
        flex-direction: column;
        text-align: center;
    }
    .logo-section .kvk-building-photo {
        margin-right: 0;
        margin-bottom: 10px;
    }
}
/* About Us Section (Accordion) */
.accordion-button {
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.accordion-button:not(.collapsed) {
    color: var(--dark-color); /* Keep text dark when open */
    background-color: rgba(40, 167, 69, 0.1); /* Light green background for open item */
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.125);
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(40, 167, 69, 0.25); /* Green focus ring for accessibility */
}

.accordion-body {
    line-height: 1.7; /* Improve readability of the text */
}

/* Last Modified Date in Footer */
.last-modified-container {
    border-top: 1px solid #495057; /* Separator line, matches visitor counter */
    padding-top: 15px;
    margin-top: 15px;
}

.last-modified-container p {
    font-size: 0.85rem; /* Slightly smaller text */
    color: #adb5bd; /* Muted color for meta-information */
}

/* =================== REVAMPED FOOTER SOCIAL ICONS =================== */
.footer-social-section h6 {
    font-size: 1rem;
    font-weight: 500;
    color: #e9ecef; /* A slightly softer white */
    text-transform: uppercase;
    letter-spacing: 1px;
}

.social-icons-container {
    display: flex;
    justify-content: center;
    gap: 15px; /* Space between icons */
}

.social-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: #495057; /* A neutral dark grey */
    border-radius: 50%; /* Makes the icons circular */
    color: #ffffff;
    font-size: 1.25rem;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.social-icon-wrapper:hover {
    transform: translateY(-3px); /* Lifts the icon on hover */
}

/* Brand-specific hover colors */
.social-icon-wrapper.facebook:hover {
    background-color: #1877F2; /* Facebook Blue */
}
.social-icon-wrapper.youtube:hover {
    background-color: #FF0000; /* YouTube Red */
}
.social-icon-wrapper.x-twitter:hover {
    background-color: #14171A; /* X's Dark Color */
}
/* =================== NEW LANGUAGE TOGGLE STYLES =================== */
.lang-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #6c757d; /* Muted color for the inactive language */
    cursor: pointer;
    transition: color 0.3s ease, font-weight 0.3s ease;
}

.lang-label.active {
    color: var(--dark-color); /* Darker, prominent color for the active language */
    font-weight: 700;
}

/* Optional: slightly larger switch for easier clicking */
.language-toggle-container .form-check-input {
    width: 3.5em;
    height: 1.75em;
}

/* ======================================================================= */
/* ============== COMPLETE CSS FOR PRODUCT SALE SECTION ============== */
/* ======================================================================= */

.product-card.simplified {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    display: flex; /* Ensures cards in the same row have equal height */
    flex-direction: column;
    height: 100%; /* Part of the equal height solution */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card.simplified:hover {
    transform: translateY(-5px); /* Adds a subtle lift effect on hover */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.product-card.simplified .product-details {
    padding: 25px;
    flex-grow: 1; /* Makes this section fill the available space */
    display: flex;
    flex-direction: column;
    text-align: center; /* Center-aligns all text and buttons inside */
}

.product-card.simplified .product-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 20px;
    flex-grow: 1; /* Pushes the price and button to the bottom, creating a clean layout */
}

.product-card.simplified .product-stock {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--secondary-color); /* Uses the site's secondary green color */
    margin-bottom: 10px;
}

.product-card.simplified .product-stock.out-of-stock {
    color: #dc3545; /* Uses Bootstrap's standard red "danger" color for out of stock items */
}

.product-card.simplified .product-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color); /* Uses the site's main green color */
    margin-bottom: 20px;
}

/* ======================================================================= */
/* ============== FIX FOR FIXED HEADER SCROLLING OFFSET ============== */
/* ======================================================================= */

/*
 * This rule targets every <section> that has an 'id' attribute.
 * It adds a top margin that is only used when the browser scrolls to it.
 * This pushes the section down from under the fixed header.
*/
section[id] {
    scroll-margin-top: 220px;
}