/**
 * Estilos Frontend — Resultados Solo Elementor
 * Cores TMF Fertilizantes e Design Responsivo
 */

:root {
    --rse-primary: #2e7d32;
    --rse-primary-hover: #1b5e20;
    --rse-accent: #4caf50;
    --rse-light-green: #e8f5e9;
    --rse-dark: #1f2937;
    --rse-gray-text: #4b5563;
    --rse-gray-bg: #f3f4f6;
    --rse-border: #e5e7eb;
    --rse-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --rse-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* === FILTROS DO GRID === */
.rse-grid-container {
    width: 100%;
    margin: 0 auto;
    font-family: inherit;
}

.rse-filters-bar {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rse-type-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    border-bottom: 2px solid var(--rse-border);
    padding-bottom: 12px;
}

.rse-tab-btn {
    background: #fff;
    color: var(--rse-dark);
    border: 1px solid var(--rse-border);
    padding: 10px 22px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.rse-tab-btn:hover {
    background: var(--rse-light-green);
    border-color: var(--rse-primary);
    color: var(--rse-primary);
}

.rse-tab-btn.active {
    background: var(--rse-primary);
    color: #fff;
    border-color: var(--rse-primary);
    box-shadow: 0 2px 4px rgba(46, 125, 50, 0.25);
}

.rse-secondary-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.rse-filter-select-wrap select,
.rse-filter-search-wrap input {
    background: #fff;
    border: 1px solid var(--rse-border);
    padding: 9px 15px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--rse-dark);
    outline: none;
    transition: border-color 0.2s;
}

.rse-filter-select-wrap select:focus,
.rse-filter-search-wrap input:focus {
    border-color: var(--rse-primary);
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.15);
}

.rse-filter-search-wrap input {
    min-width: 240px;
}

/* === GRID DE CARDS === */
.rse-cards-grid {
    display: grid;
    gap: 24px;
}

.rse-cols-1 { grid-template-columns: 1fr; }
.rse-cols-2 { grid-template-columns: repeat(2, 1fr); }
.rse-cols-3 { grid-template-columns: repeat(3, 1fr); }
.rse-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
    .rse-cols-3, .rse-cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .rse-cols-2, .rse-cols-3, .rse-cols-4 { grid-template-columns: 1fr; }
    .rse-secondary-filters { flex-direction: column; align-items: stretch; }
    .rse-filter-search-wrap input { width: 100%; min-width: auto; }
}

/* === CARD INDIVIDUAL === */
.rse-card-item {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.rse-card-item.rse-hidden {
    display: none !important;
}

.rse-card {
    display: block;
    text-decoration: none !important;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    padding: 24px;
    box-shadow: var(--rse-shadow);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
    box-sizing: border-box;
}

.rse-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--rse-shadow-hover);
    border-color: rgba(46, 125, 50, 0.2);
}

.rse-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.rse-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.rse-cult-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--rse-light-green);
    color: var(--rse-primary);
    padding: 4px 12px 4px 6px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.rse-cult-thumb {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-block;
    vertical-align: middle;
}

.rse-card-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--rse-dark);
    margin: 6px 0 14px 0;
    line-height: 1.3;
}

.rse-card-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
    flex-grow: 1;
}

.rse-meta-line {
    font-size: 14px;
    color: var(--rse-gray-text);
    display: flex;
    gap: 5px;
}

.rse-meta-line strong {
    color: var(--rse-dark);
}

.rse-card-badge {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px dashed var(--rse-border);
}

.rse-badge-fertilidade {
    display: inline-block;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rse-badge-produtividade {
    display: inline-block;
    background: #e3f2fd;
    color: #1565c0;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
}

.rse-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    background: var(--rse-gray-bg);
    border-radius: 10px;
    color: var(--rse-gray-text);
}

/* === TABELAS COMPARATIVAS === */
.rse-results-tables-wrap {
    margin: 25px 0;
    font-family: inherit;
}

.rse-table-block {
    margin-bottom: 30px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--rse-border);
    overflow: hidden;
    box-shadow: var(--rse-shadow);
}

.rse-table-title {
    background: #f8fafc;
    padding: 14px 20px;
    border-bottom: 1px solid var(--rse-border);
    font-weight: 700;
    font-size: 15px;
    color: var(--rse-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rse-table-responsive {
    overflow-x: auto;
}

.rse-comparison-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}

.rse-comparison-table th {
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
}

.rse-col-default {
    background-color: #374151 !important;
}

.rse-col-highlight {
    background-color: var(--rse-primary) !important;
}

.rse-comparison-table td {
    padding: 14px 16px;
    font-size: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.rse-cell-default {
    color: #374151;
}

.rse-cell-highlight {
    background-color: #f1f8e9;
    color: #2e7d32;
    font-weight: 700;
}

/* === SINGLE RESULT VIEW === */
.rse-site-main {
    background: #ffffff;
    min-height: 70vh;
}

.rse-single-page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    box-sizing: border-box;
}

.rse-single-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 0;
}

.rse-single-header {
    margin-bottom: 25px;
}

.rse-safra-tag {
    display: inline-block;
    background: var(--rse-light-green);
    color: var(--rse-primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.rse-single-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--rse-dark);
    margin: 5px 0 0 0;
}

.rse-single-gallery {
    margin: 25px 0 35px 0;
}

.rse-gallery-slider {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}

.rse-gallery-item {
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #000;
    box-shadow: var(--rse-shadow);
}

.rse-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.rse-gallery-item img:hover {
    transform: scale(1.05);
}

.rse-single-badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 35px;
}

.rse-detail-box {
    background: #fff;
    border: 1px solid var(--rse-border);
    padding: 14px 18px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.rse-detail-box.rse-box-highlight {
    background: var(--rse-light-green);
    border-color: var(--rse-primary);
}

.rse-box-label {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    color: #6b7280;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.rse-box-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--rse-dark);
}

.rse-detail-box.rse-box-highlight .rse-box-value {
    color: var(--rse-primary);
}

/* === GALLERY LIGHTBOX MODAL === */
.rse-lightbox-trigger {
    position: relative;
    cursor: pointer;
}

.rse-gallery-zoom-icon {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.rse-lightbox-trigger:hover .rse-gallery-zoom-icon {
    opacity: 1;
    transform: scale(1.1);
}

/* Modal Overlay */
.rse-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.rse-modal.rse-modal-active {
    opacity: 1;
    visibility: visible;
}

.rse-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.rse-modal-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 90vh;
}

.rse-modal-image-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#rse-modal-img {
    max-width: 85vw;
    max-height: 82vh;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    object-fit: contain;
    background: #000;
}

.rse-modal-counter {
    margin-top: 10px;
    color: #f3f4f6;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Close & Navigation Buttons */
.rse-modal-close {
    position: fixed;
    top: 24px;
    right: 28px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    font-size: 32px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    line-height: 1;
    z-index: 10;
}

.rse-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.08);
}

.rse-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    font-size: 26px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    z-index: 5;
    user-select: none;
}

.rse-modal-nav:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.rse-modal-prev {
    left: -70px;
}

.rse-modal-next {
    right: -70px;
}

@media (max-width: 768px) {
    .rse-modal-prev {
        left: 10px;
    }
    .rse-modal-next {
        right: 10px;
    }
    .rse-modal-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
        background: rgba(0, 0, 0, 0.5);
    }
    #rse-modal-img {
        max-width: 94vw;
        max-height: 75vh;
    }
}


