/* ================================
   IMMAGINE COPERTINA FORZATA ORIZZONTALE
================================ */
.ricetta-icg__immagine-wrapper {
    width: 100%;
    margin-bottom: 25px;
    display: block;
}
.ricetta-icg__immagine-16x9 {
    width: 100%;
    height: 400px;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #f0f0f0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.ricetta-icg__immagine-16x9 img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* ================================
   INFO RICETTA - UNA SOLA RIGA CON BOX AFFIANCATI
================================ */
.ricetta-icg__info {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    margin-bottom: 25px !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    width: 100% !important;
}

.ricetta-icg__info-item {
    flex: 0 0 auto !important;
    min-width: 140px !important;
    max-width: 200px !important;
    padding: 12px 16px !important;
    border-radius: 10px !important;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1) !important;
    transition: transform 0.3s !important;
    white-space: nowrap !important;
    display: inline-block !important;
    float: none !important;
    clear: none !important;
    margin: 0 !important;
}

.ricetta-icg__info-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15) !important;
}

.ricetta-icg__info-item p {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0.9em !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
    line-height: 1.4 !important;
}

.ricetta-icg__info-item strong {
    font-weight: 600 !important;
    display: inline !important;
    color: #fff !important;
}

/* ================================
   INTRO
================================ */
.ricetta-icg__intro {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border-left: 4px solid #667eea;
    font-style: italic;
    color: #555;
}

.ricetta-icg__intro p {
    margin: 0;
}

/* ================================
   INGREDIENTI - CONTENITORE COLORATO
================================ */
.ricetta-icg__ingredienti {
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    border-left: 5px solid;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.ricetta-icg__ingredienti h2 {
    margin-top: 0;
    font-size: 1.8em;
    margin-bottom: 20px;
    color: inherit;
}

.ricetta-icg__sezione-ingredienti {
    margin-bottom: 20px;
}

.ricetta-icg__sezione-titolo {
    font-size: 1.2em;
    font-weight: bold;
    margin: 15px 0 10px 0;
    opacity: 0.9;
}

.ricetta-icg__sezione-procedimento-titolo {
    font-size: 1.3em;
    font-weight: bold;
    margin: 25px 0 15px 0;
    opacity: 0.9;
}

.ricetta-icg__ingredienti ul {
    list-style-type: none;
    padding-left: 0;
    margin: 10px 0;
}

.ricetta-icg__ingredienti ul li {
    padding: 10px 15px;
    margin-bottom: 8px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    position: relative;
    padding-left: 35px;
    color: #333;
}

.ricetta-icg__ingredienti ul li:before {
    content: "✓";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #4caf50;
    font-weight: bold;
    font-size: 1.2em;
}

/* ================================
   PROCEDIMENTO - CONTENITORE COLORATO
================================ */
.ricetta-icg__procedimento {
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    border-left: 5px solid;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.ricetta-icg__procedimento h2 {
    margin-top: 0;
    font-size: 1.8em;
    margin-bottom: 20px;
    color: inherit;
}

.ricetta-icg__procedimento ol {
    list-style: none;
    padding-left: 0;
    margin: 15px 0 0 0;
}

.ricetta-icg__procedimento ol li {
    margin-bottom: 25px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    position: relative;
}

/* LAYOUT MINIATURE A DESTRA */
.ricetta-icg__passo-content {
    display: flex !important;
    flex-direction: row !important;
    gap: 20px;
    align-items: flex-start;
    justify-content: space-between;
}

.ricetta-icg__passo-testo {
    flex: 1 1 auto !important;
    min-width: 0;
    order: 1;
}

.ricetta-icg__passo-testo p {
    margin: 0;
    line-height: 1.6;
    color: #333;
}

/* MINIATURE LATERALI CLICCABILI */
.ricetta-icg__passo-miniatura {
    width: 150px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    order: 2 !important;
    margin-left: auto !important;
}

.ricetta-icg__passo-miniatura a {
    display: block;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.ricetta-icg__passo-miniatura a:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.ricetta-icg__passo-miniatura img,
.ricetta-icg__passo-miniatura video {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 1;
    object-fit: cover;
}

.ricetta-icg__zoom-icon {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.75);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 14px;
    pointer-events: none;
}

/* ================================
   VIDEO SECTION - MINIATURA CLICCABILE
================================ */
.ricetta-icg__video-section {
    margin-top: 35px;
    padding: 25px;
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    border-radius: 12px;
    border-left: 5px solid #9c27b0;
    box-shadow: 0 3px 10px rgba(156,39,176,0.2);
}

.ricetta-icg__video-section h2 {
    margin-top: 0;
    color: #7b1fa2;
    font-size: 1.6em;
    margin-bottom: 20px;
}

.ricetta-icg__video-miniatura {
    max-width: 400px;
    margin: 0 auto;
}

.ricetta-icg__video-miniatura a {
    display: block;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.ricetta-icg__video-miniatura a:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 28px rgba(0,0,0,0.3);
}

.ricetta-icg__video-miniatura video {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.ricetta-icg__play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 72px;
    color: white;
    text-shadow: 0 4px 12px rgba(0,0,0,0.6);
    opacity: 0.95;
    pointer-events: none;
    transition: opacity 0.3s;
}

.ricetta-icg__video-miniatura a:hover .ricetta-icg__play-icon {
    opacity: 1;
}

/* ================================
   LIGHTBOX
================================ */
.ricetta-icg-lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.ricetta-icg-lightbox-overlay.active {
    display: flex;
}

.ricetta-icg-lightbox-content {
    max-width: 95%;
    max-height: 95%;
    position: relative;
}

.ricetta-icg-lightbox-content img,
.ricetta-icg-lightbox-content video {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.ricetta-icg-lightbox-close {
    position: fixed;
    top: 25px;
    right: 25px;
    color: white;
    font-size: 50px;
    cursor: pointer;
    background: rgba(255,255,255,0.15);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.ricetta-icg-lightbox-close:hover {
    background: rgba(255,255,255,0.25);
    transform: rotate(90deg);
}

/* ================================
   RESPONSIVE
================================ */
@media (max-width: 768px) {
    .ricetta-icg__passo-content {
        flex-direction: column !important;
    }
    .ricetta-icg__passo-miniatura {
        width: 100% !important;
        max-width: 250px;
        margin-left: 0 !important;
    }
    .ricetta-icg__info {
        flex-wrap: wrap;
    }
    .ricetta-icg__info-item {
        flex: 1 1 calc(50% - 6px);
        min-width: 120px;
    }
    .ricetta-icg__immagine-16x9 {
        height: 250px;
    }
}

/* ================================
   NASCONDI FEATURED IMAGE DUPLICATA
================================ */
body.single-ricetta_icg .post-thumbnail,
body.single-ricetta_icg .entry-thumbnail,
body.single-ricetta_icg .featured-image,
body.single-ricetta_icg .wp-post-image:not(.ricetta-icg img) {
    display: none !important;
}

body.single-ricetta_icg .ricetta-icg,
body.single-ricetta_icg .ricetta-icg *,
body.single-ricetta_icg .ricetta-icg img,
body.single-ricetta_icg .ricetta-icg video {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* ================================
   FORM FRONTEND
================================ */
.icg-ricetta-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 35px 25px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.icg-form-row {
    margin-bottom: 25px;
}

.icg-form-row label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
    font-size: 1.05em;
}

.icg-form-row input[type="text"],
.icg-form-row input[type="email"],
.icg-form-row input[type="number"],
.icg-form-row textarea,
.icg-form-row select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    background: #fafafa;
    transition: border 0.3s;
}

.icg-form-row input:focus,
.icg-form-row textarea:focus,
.icg-form-row select:focus {
    outline: none;
    border-color: #667eea;
    background: white;
}

.sezione-ingredienti {
    border: 2px solid #e3f2fd;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 10px;
    background: #f8f9fa;
    cursor: move;
}

.passo-blocco {
    border: 2px solid #fff3e0;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 10px;
    background: #f8f9fa;
    cursor: move;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

button[type="submit"] {
    width: 100%;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(76,175,80,0.3);
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(76,175,80,0.4);
}

.icg-form-success {
    padding: 20px;
    background: #d4edda;
    border: 2px solid #c3e6cb;
    border-radius: 10px;
    color: #155724;
    font-weight: bold;
    margin-bottom: 25px;
}

.drag-handle,
.drag-handle-small {
    cursor: grab;
    color: #999;
    font-size: 18px;
    padding: 5px;
}

.ingrediente-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.ingrediente-row input {
    flex: 1;
}

.passo-blocco {
    position: relative;
    padding-top: 45px;
}

.passo-blocco .drag-handle {
    position: absolute;
    top: 10px;
    left: 10px;
}
/* ================================
   FIX FORZATO BOX INFO ORIZZONTALI
   Aggiungi questo CSS in FONDO al file style.css
================================ */

/* Forza layout orizzontale per i box info */
.ricetta-icg .ricetta-icg__info,
.ricetta-icg__info,
div.ricetta-icg__info {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    margin-bottom: 25px !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    width: 100% !important;
}

/* Forza stile singolo box */
.ricetta-icg .ricetta-icg__info-item,
.ricetta-icg__info-item,
div.ricetta-icg__info-item {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 140px !important;
    max-width: none !important;
    padding: 12px 16px !important;
    border-radius: 10px !important;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1) !important;
    transition: transform 0.3s !important;
    white-space: nowrap !important;
    display: inline-block !important;
    margin: 0 !important;
}

.ricetta-icg__info-item:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15) !important;
}

.ricetta-icg__info-item p,
.ricetta-icg .ricetta-icg__info-item p {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0.9em !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
    line-height: 1.4 !important;
}

.ricetta-icg__info-item strong,
.ricetta-icg__info-item span {
    font-weight: 600 !important;
    display: inline !important;
    color: #fff !important;
}

/* Responsive per mobile */
@media (max-width: 768px) {
    .ricetta-icg__info {
        flex-wrap: wrap !important;
        overflow-x: visible !important;
    }
    .ricetta-icg__info-item {
        flex: 1 1 calc(50% - 6px) !important;
        min-width: 120px !important;
    }
}

/* Sovrascrivi eventuali stili del tema che causano problemi */
.entry-content .ricetta-icg__info,
.post-content .ricetta-icg__info,
article .ricetta-icg__info {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
}

.entry-content .ricetta-icg__info-item,
.post-content .ricetta-icg__info-item,
article .ricetta-icg__info-item {
    display: inline-block !important;
    width: auto !important;
    flex: 0 0 auto !important;
}
/* ================================
   FIX FORZATO BOX INFO ORIZZONTALI
   Aggiungi questo CSS in FONDO al file style.css
================================ */

/* Forza layout orizzontale per i box info */
.ricetta-icg .ricetta-icg__info,
.ricetta-icg__info,
div.ricetta-icg__info {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    margin-bottom: 25px !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    width: 100% !important;
}

/* Forza stile singolo box */
.ricetta-icg .ricetta-icg__info-item,
.ricetta-icg__info-item,
div.ricetta-icg__info-item {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 140px !important;
    max-width: none !important;
    padding: 12px 16px !important;
    border-radius: 10px !important;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1) !important;
    transition: transform 0.3s !important;
    white-space: nowrap !important;
    display: inline-block !important;
    margin: 0 !important;
}

.ricetta-icg__info-item:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15) !important;
}

.ricetta-icg__info-item p,
.ricetta-icg .ricetta-icg__info-item p {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0.9em !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
    line-height: 1.4 !important;
}

.ricetta-icg__info-item strong,
.ricetta-icg__info-item span {
    font-weight: 600 !important;
    display: inline !important;
    color: #fff !important;
}

/* Autore ricetta */
.ricetta-icg__autore {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    border-radius: 12px;
    border-left: 5px solid #9c27b0;
    text-align: center;
}

.ricetta-icg__autore p {
    margin: 0;
    font-size: 1.1em;
    color: #6a1b9a;
}

.ricetta-icg__autore strong {
    font-weight: 600;
}

/* Responsive per mobile */
@media (max-width: 768px) {
    .ricetta-icg__info {
        flex-wrap: wrap !important;
        overflow-x: visible !important;
    }
    .ricetta-icg__info-item {
        flex: 1 1 calc(50% - 6px) !important;
        min-width: 120px !important;
    }
}

/* Sovrascrivi eventuali stili del tema che causano problemi */
.entry-content .ricetta-icg__info,
.post-content .ricetta-icg__info,
article .ricetta-icg__info {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
}

.entry-content .ricetta-icg__info-item,
.post-content .ricetta-icg__info-item,
article .ricetta-icg__info-item {
    display: inline-block !important;
    width: auto !important;
    flex: 0 0 auto !important;
}
/* ================================
   FIX FORZATO BOX INFO ORIZZONTALI
   Aggiungi questo CSS in FONDO al file style.css
================================ */

/* Forza layout orizzontale per i box info */
.ricetta-icg .ricetta-icg__info,
.ricetta-icg__info,
div.ricetta-icg__info {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    margin-bottom: 25px !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    width: 100% !important;
}

/* Forza stile singolo box */
.ricetta-icg .ricetta-icg__info-item,
.ricetta-icg__info-item,
div.ricetta-icg__info-item {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 140px !important;
    max-width: none !important;
    padding: 12px 16px !important;
    border-radius: 10px !important;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1) !important;
    transition: transform 0.3s !important;
    white-space: nowrap !important;
    display: inline-block !important;
    margin: 0 !important;
}

.ricetta-icg__info-item:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15) !important;
}

.ricetta-icg__info-item p,
.ricetta-icg .ricetta-icg__info-item p {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0.9em !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
    line-height: 1.4 !important;
}

.ricetta-icg__info-item strong,
.ricetta-icg__info-item span {
    font-weight: 600 !important;
    display: inline !important;
    color: #fff !important;
}

/* Responsive per mobile */
@media (max-width: 768px) {
    .ricetta-icg__info {
        flex-wrap: wrap !important;
        overflow-x: visible !important;
    }
    .ricetta-icg__info-item {
        flex: 1 1 calc(50% - 6px) !important;
        min-width: 120px !important;
    }
}

/* Sovrascrivi eventuali stili del tema che causano problemi */
.entry-content .ricetta-icg__info,
.post-content .ricetta-icg__info,
article .ricetta-icg__info {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
}

.entry-content .ricetta-icg__info-item,
.post-content .ricetta-icg__info-item,
article .ricetta-icg__info-item {
    display: inline-block !important;
    width: auto !important;
    flex: 0 0 auto !important;
}

/* ================================
   SEZIONE AUTORE
================================ */
.ricetta-icg__autore {
    margin-top: 30px !important;
    padding: 20px !important;
    background: #f8f9fa !important;
    border-radius: 10px !important;
    border-left: 4px solid #667eea !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
}

.ricetta-icg__autore p {
    margin: 0 !important;
    font-size: 16px !important;
    color: #333 !important;
    line-height: 1.6 !important;
}

.ricetta-icg__autore strong {
    color: #667eea !important;
    font-weight: 600 !important;
}

.ricetta-icg__autore span {
    color: #555 !important;
    font-weight: 500 !important;
}
