/* ==========================================================================
   AGRO EXPERT DIRECTORY - FINAL STYLES (v2.2)
   ========================================================================== */
.agro-faq-section {
    margin-top: 40px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
}
.agro-faq-section h2 {
    color: #722431;
    margin-bottom: 20px;
}
.agro-faq-item {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}
.agro-faq-item summary {
    padding: 15px 20px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    list-style: none;
    position: relative;
}
.agro-faq-item summary::-webkit-details-marker { display: none; }
.agro-faq-item summary::after {
    content: '▼';
    position: absolute;
    right: 20px;
    font-size: 0.8em;
    color: #722431;
    transition: 0.3s;
}
.agro-faq-item[open] summary::after {
    transform: rotate(180deg);
}
.agro-faq-item p {
    padding: 0 20px 15px;
    margin: 0;
    color: #334155;
    font-size: 0.95rem;
    line-height: 1.6;
}



.agro-table-wrapper {
    --wp-brand: #722431;      /* Ваш бордовий колір */
    --wp-brand-hover: #5a1c27; 
    --wp-border: #cbd5e1;
    --wp-bg-scroll: #e2e8f0;
    margin: 30px 0;
    position: relative;
    font-family: inherit;
}

/* --- ПОШУК --- */
.agro-search-box {
    position: relative;
    max-width: 500px;
    margin: 0 auto 10px;
}

.agro-search-box input {
    width: 100% !important;
    padding: 12px 45px 12px 20px !important;
    border: 2px solid var(--wp-border) !important;
    border-radius: 25px !important;
    height: 48px !important;
    box-sizing: border-box !important;
    font-size: 16px !important;
}

.agro-search-box input:focus {
    border-color: var(--wp-brand) !important;
    outline: none !important;
}

.agro-clear-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 24px;
    color: #999;
    display: none;
    line-height: 1;
}

.agro-results-count {
    text-align: center;
    font-size: 14px;
    margin-bottom: 15px;
    color: #64748b;
    font-weight: 500;
}

/* --- СКРОЛБАРИ (ОДНАКОВІ ВЕРХНІЙ ТА НИЖНІЙ) --- */
.agro-top-scroll-wrapper, 
.agro-scroll-container {
    width: 100%;
    overflow-x: scroll !important;
    border: 1px solid var(--wp-border);
}

.agro-top-scroll-wrapper { border: none !important; }

/* Кастомний стиль смуги прокрутки */
.agro-top-scroll-wrapper::-webkit-scrollbar,
.agro-scroll-container::-webkit-scrollbar {
    height: 14px !important;
    display: block !important;
}

.agro-top-scroll-wrapper::-webkit-scrollbar-track,
.agro-scroll-container::-webkit-scrollbar-track {
    background: var(--wp-bg-scroll);
}

.agro-top-scroll-wrapper::-webkit-scrollbar-thumb,
.agro-scroll-container::-webkit-scrollbar-thumb {
    background: var(--wp-brand);
    border-radius: 10px;
    border: 3px solid var(--wp-bg-scroll);
}

.agro-top-scroll-wrapper::-webkit-scrollbar-thumb:hover,
.agro-scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--wp-brand-hover);
}

/* --- ТАБЛИЦЯ --- */
.agro-table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    margin: 0 !important;
}

/* Стікі Шапка */
.agro-table th {
    background: var(--wp-brand) !important;
    color: #ffffff !important;
    padding: 14px 35px 14px 18px !important; /* Відступ справа під стрілку */
    text-align: left !important;
    position: sticky !important;
    top: 0;
    z-index: 10;
    cursor: pointer;
    white-space: nowrap !important;
    font-size: 15px !important;
    border-bottom: 2px solid var(--wp-brand-hover) !important;
    user-select: none;
}

/* СТІКІ ПЕРША КОЛОНКА */
.agro-table td:first-child, 
.agro-table th:first-child {
    position: sticky !important;
    left: 0;
    z-index: 5;
    border-right: 2px solid var(--wp-border) !important;
}

.agro-table td:first-child {
    background: #fcfcfc !important;
    font-weight: 600 !important;
    color: var(--wp-brand) !important;
}

.agro-table th:first-child { z-index: 15 !important; }

/* Звичайні комірки */
.agro-table td {
    padding: 12px 18px !important;
    border-bottom: 1px solid var(--wp-border) !important;
    background: #fff !important;
    font-size: 14px !important;
    color: #334155 !important;
    white-space: nowrap !important;
}

/* --- ЯРЛИЧКИ СОРТУВАННЯ (БІЛІ ТА ВЕЛИКІ) --- */
.agro-table th::after {
    content: '\21C5'; /* Стрілка вгору-вниз */
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff;
    opacity: 0.4;
    font-size: 1.2em;
    font-weight: bold;
    transition: opacity 0.2s;
}

.agro-table th:hover::after { opacity: 0.8; }

.agro-table th.sort-asc::after {
    content: '\2191'; /* Стрілка вгору */
    opacity: 1;
    text-shadow: 0 0 5px rgba(255,255,255,0.5);
}

.agro-table th.sort-desc::after {
    content: '\2193'; /* Стрілка вниз */
    opacity: 1;
    text-shadow: 0 0 5px rgba(255,255,255,0.5);
}

/* Посилання */
.agro-table a {
    color: #722431 !important;
    text-decoration: underline !important;
    font-weight: 600 !important;
}

.agro-table a:hover { color: var(--wp-brand) !important; }

@media (max-width: 768px) {
    .agro-table th, .agro-table td { padding: 10px 12px !important; font-size: 13px !important; }
}
