/*
 Theme Name:   Agriculture Review Child
 Theme URI:    https://agriculturereview.com
 Description:  GeneratePress Child Theme for Agriculture Review
 Author:       Agriculture Review
 Author URI:   https://agriculturereview.com
 Template:     generatepress
 Version:      1.0.0
*/

/* Add your custom CSS below this line */
/*
Theme Name: Agriculture Review Child
Template: generatepress
Version: 1.0
*/
/* ==========================================================================
   GENERATEPRESS NATIVE SEARCH AJAX UPGRADE (Green & Yellow Theme)
   ========================================================================== */

.gp-live-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 15px 30px rgba(43, 77, 9, 0.15);
    z-index: 999999;
    border: 1px solid #e2e8f0;
    border-top: none;
    overflow: hidden;
}

.gp-live-search-dropdown.hidden {
    display: none;
}

.gp-ajax-results-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.gp-ajax-results-list li {
    border-bottom: 1px solid #f1f5f9;
}

.gp-ajax-results-list li:last-child {
    border-bottom: none;
}

.gp-ajax-results-list li a {
    display: block;
    padding: 14px 20px;
    color: #2b4d09; /* Dark Green Text */
    text-decoration: none !important;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.4;
    transition: background 0.2s, color 0.2s;
}

.gp-ajax-results-list li a:hover {
    background: #f8fafc;
    color: #f7cd0d; /* Bright Yellow Hover */
}

.gp-ajax-message {
    padding: 16px;
    text-align: center;
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 500;
}
/* Prevent GeneratePress from cutting off the dropdown in the header */
.navigation-search, 
form.search-form {
    overflow: visible !important; 
}

/* ==========================================================================
   AGRICULTURE REVIEW - IMAGE-LESS SCROLLABLE MOCK TESTS
   ========================================================================== */

.agri-scroll-section {
    width: 100%;
    max-width: 1200px;
    margin: 60px auto;
    font-family: inherit;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Header Area */
.agri-scroll-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
}

.agri-sh-text h2 {
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 800;
    color: #2b4d09; /* Brand Green */
    margin: 0 0 4px 0;
    letter-spacing: -0.5px;
}

.agri-sh-text p {
    margin: 0;
    color: #64748b;
    font-size: 0.95rem;
}

.agri-sh-btn {
    font-weight: 700;
    color: #2b4d09;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.agri-sh-btn:hover {
    color: #f7cd0d; /* Brand Yellow */
    border-bottom-color: #f7cd0d;
}

/* Horizontal Scrolling Track */
.agri-scroll-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 24px; 
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.agri-scroll-track::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* Image-less Card Design */
.agri-sc-card {
    flex: 0 0 auto;
    width: 280px; 
    scroll-snap-align: start; 
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    box-sizing: border-box;
}

.agri-sc-card:hover {
    border-color: #f7cd0d; /* Border turns Yellow on hover */
    box-shadow: 0 12px 24px rgba(43, 77, 9, 0.08);
    transform: translateY(-4px);
}

/* Premium Document Icon */
.agri-sc-icon {
    width: 50px;
    height: 50px;
    background: rgba(43, 77, 9, 0.05); /* Very light green */
    color: #2b4d09; 
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.agri-sc-card:hover .agri-sc-icon {
    background: #2b4d09;
    color: #f7cd0d; /* Icon turns yellow */
}

/* Content Area */
.agri-sc-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.agri-sc-date {
    display: block;
    font-size: 0.8rem;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.agri-sc-title {
    margin: 0 0 20px 0;
    font-size: 1.15rem;
    line-height: 1.4;
    font-weight: 800;
    color: #0f172a;
    transition: color 0.2s;
}

.agri-sc-card:hover .agri-sc-title {
    color: #2b4d09;
}

/* Action Link */
.agri-sc-action {
    margin-top: auto;
    font-size: 0.95rem;
    font-weight: 700;
    color: #2b4d09;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.agri-sc-card:hover .agri-sc-action {
    transform: translateX(5px); /* Slides arrow right on hover */
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .agri-scroll-section { padding: 0 0 0 20px; }
    .agri-scroll-header { padding-right: 20px; }
    .agri-sc-card { width: 260px; }
}


/* ==========================================================================
   MODERN RELATED POSTS (KADENCE STYLE - OUTSIDE THE BOX)
   ========================================================================== */

/* 1. The Main Wrapper (Pulls it out of the box and aligns it) */
.related-posts {
    margin-top: 40px !important;
    margin-bottom: 40px !important;
    padding-top: 0 !important;
    clear: both;
    width: 100%;
    max-width: 900px !important; /* Matches your post width */
    margin-left: auto !important;
    margin-right: auto !important;
}

/* 2. Responsive Grid Layout */
.related-posts ul {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
    gap: 24px !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}

/* 3. Modern Card Design */
.related-posts li {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 24px !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.02) !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Hover Effects */
.related-posts li:hover {
    transform: translateY(-4px) !important;
    border-color: #2b4d09 !important; /* Brand Dark Green */
    box-shadow: 0 10px 20px rgba(43, 77, 9, 0.08) !important;
}

/* 4. Typography Formatting */
.related-posts a {
    font-family: 'League Spartan', sans-serif !important;
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    color: #0F172A !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
    display: block !important;
}

.related-posts a:hover {
    color: #2b4d09 !important; /* Text turns Brand Green on hover */
}

/* 5. Mobile Responsiveness */
@media (max-width: 600px) {
    .related-posts ul {
        grid-template-columns: 1fr !important; /* Forces single column on phones */
    }
}

/* ==========================================================================
   AGRICULTURE REVIEW - AUTHOR BOX STYLE
   ========================================================================== */
.agri-author-box {
    display: flex;
    align-items: center;
    gap: 24px;
    background: #f8fafc; /* Very light slate/grey */
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 32px;
    margin-top: 50px; /* Space between article text and the box */
    margin-bottom: 10px;
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.02);
}

/* Avatar Styling with Brand Yellow Ring */
.agri-author-avatar img {
    border-radius: 50%;
    width: 90px;
    height: 90px;
    object-fit: cover;
    border: 3px solid #f7cd0d; 
    padding: 3px; /* Creates a white gap between image and border */
    background: #ffffff;
}

.agri-author-info {
    flex: 1;
}

.agri-author-name {
    font-family: 'League Spartan', sans-serif !important;
    font-size: 1.3rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 8px 0 !important;
}

.agri-author-bio {
    font-family: 'Playfair Display', serif !important;
    font-size: 1rem;
    color: #475569;
    margin: 0 0 12px 0 !important;
    line-height: 1.5;
}

/* View All Articles Link */
.agri-author-link {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 800;
    color: #2b4d09 !important; /* Brand Dark Green */
    text-transform: uppercase;
    text-decoration: none !important;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.agri-author-link:hover {
    color: #f7cd0d !important; /* Brand Yellow */
    transform: translateX(4px);
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .agri-author-box {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }
    
    .agri-author-link:hover {
        transform: translateY(-2px); /* Changes hover animation direction for stacked layout */
    }
}