/**
 * Agri Description - Stili CSS
 * Design minimalista con linee e icone +/-
 */

/* Container principale */
.agri-description-wrapper {
    margin: 20px 0;
    font-family: inherit;
}

/* Testo introduttivo (fuori dalle sezioni) - NO COLLAPSE */
.agri-intro-text {
    margin-bottom: 25px;
    font-size: 15px;
    line-height: 1.8;
    color: #333;
    display: block !important;
    height: auto !important;
    overflow: visible !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.agri-intro-text p,
.agri-outro-text p {
    margin: 0 0 10px 0;
}

.agri-outro-text {
    margin-top: 25px;
    font-size: 15px;
    line-height: 1.8;
    color: #333;
}

/* ================================
   SEZIONI COLLAPSABILI - Design Minimalista
   ================================ */

.agri-collapse-section {
    margin: 0 !important;
    border: none !important;
    border-top: 1px solid #000000 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.agri-collapse-section:last-child {
    border-bottom: 1px solid #000000 !important;
}

.agri-collapse-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 18px 0 !important;
    background: transparent !important;
    cursor: pointer !important;
    transition: opacity 0.2s ease !important;
    user-select: none !important;
}

.agri-collapse-header:hover {
    opacity: 0.7 !important;
}

.agri-collapse-title {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #000000 !important;
    margin: 0 !important;
    letter-spacing: 0.01em !important;
}

/* Icona +/- */
.agri-collapse-icon {
    width: 20px;
    height: 20px;
    position: relative;
    flex-shrink: 0;
}

.agri-collapse-icon::before,
.agri-collapse-icon::after {
    content: '';
    position: absolute;
    background-color: #1a1a1a;
    transition: all 0.25s ease;
}

/* Linea orizzontale (sempre visibile = -) */
.agri-collapse-icon::before {
    width: 14px;
    height: 1.5px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Linea verticale (visibile solo quando chiuso = +) */
.agri-collapse-icon::after {
    width: 1.5px;
    height: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Quando APERTO: nascondi linea verticale (mostra solo -) */
.agri-collapse-header:not(.collapsed) .agri-collapse-icon::after {
    transform: translate(-50%, -50%) scaleY(0);
    opacity: 0;
}

/* Override Bootstrap collapse */
.agri-collapse-content {
    /* Gestito da JS */
}

.agri-collapse-content.collapse:not(.show) {
    display: none;
}

.agri-collapse-content.show {
    display: block;
}

.agri-collapse-body {
    padding: 0 0 20px 0;
    background: transparent;
}

/* ================================
   TIPOGRAFIA
   ================================ */

.agri-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #1a1a1a;
}

.agri-subtitle {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 15px 0 10px 0;
}

.agri-paragraph {
    font-size: 16px;
    line-height: 1.7;
    color: #000000;
    margin: 0 0 12px 0;
}

.agri-paragraph:last-child {
    margin-bottom: 0;
}

/* Liste */
.agri-list {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
}

.agri-list li {
    position: relative;
    padding: 6px 0 6px 20px;
    font-size: 14px;
    color: #555;
}

.agri-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #333;
}

/* Highlight */
.agri-highlight {
    background: #fff3cd;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
}

/* Bold e Italic */
.agri-bold {
    font-weight: 700;
    color: #1a1a1a;
}

.agri-italic {
    font-style: italic;
    color: #666;
}

/* Separatore */
.agri-separator {
    border: none;
    height: 1px;
    background: #e0e0e0;
    margin: 20px 0;
}

/* ================================
   TABELLA NUTRIZIONALE - 2 Colonne, righe alternate
   ================================ */

.agri-nutrition-table {
    width: 100% !important;
    max-width: 380px !important;
    border-collapse: collapse !important;
    margin: 10px 0 !important;
    font-size: 14px !important;
}

.agri-nutrition-table tbody tr {
    border: none !important;
}

/* Righe alternate - dispari (1,3,5...): sfondo grigio chiaro */
.agri-nutrition-table tbody tr:nth-child(odd) {
    background-color: #dddddd !important;
}

/* Righe alternate - pari (2,4,6...): sfondo trasparente */
.agri-nutrition-table tbody tr:nth-child(even) {
    background-color: transparent !important;
}

.agri-nutrition-table tbody tr td {
    padding: 12px 15px !important;
    color: #000000 !important;
}

/* Sotto-righe (di cui...) - indentate */
.agri-nutrition-subrow .agri-nutrition-name {
    padding-left: 20px !important;
    font-weight: 400 !important;
}

/* Colonne */
.agri-nutrition-name {
    text-align: left !important;
    font-weight: 500 !important;
}

.agri-nutrition-value {
    text-align: right !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
}

/* ================================
   RESPONSIVE
   ================================ */

@media (max-width: 768px) {
    .agri-collapse-header {
        padding: 15px 0;
    }
    
    .agri-collapse-title {
        font-size: 14px;
    }
    
    .agri-collapse-body {
        padding: 0 0 15px 0;
    }
    
    .agri-intro-text,
    .agri-outro-text {
        font-size: 14px;
    }
    
    .agri-nutrition-table {
        max-width: 100%;
    }
    
    .agri-nutrition-row td,
    .agri-nutrition-subrow td {
        padding: 10px 12px;
    }
}

/* ================================
   PRINT
   ================================ */

@media print {
    .agri-collapse-section {
        break-inside: avoid;
    }
    
    .agri-collapse-content {
        display: block !important;
        height: auto !important;
    }
    
    .agri-collapse-icon {
        display: none;
    }
}
