/* ==========================================================================
   ANXA 2.0 - CONSULENTI & PROFESSIONISTI (css/consulenti.css)
   UNIFORMATO A SANITÀ, SPORT, DOVE MANGIARE & SHOPPING
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. INTRODUZIONE & BANNER
   -------------------------------------------------------------------------- */
.consulenti-intro-section {
    margin-bottom: 24px;
}

.consulenti-intro-title {
    font-size: 1.75rem;
    font-weight: 900;
    color: #0033A0;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

[data-theme="rossonero"] .consulenti-intro-title {
    color: var(--yellow-anxa);
}

.consulenti-intro-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-main);
    opacity: 0.95;
    margin-bottom: 0;
}

/* Card Promo Professionisti */
.consulenti-promo-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(74, 0, 224, 0.85) 0%, rgba(142, 45, 226, 0.85) 100%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 24px rgba(142, 45, 226, 0.3);
    text-decoration: none;
    color: #ffffff !important;
    margin-bottom: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.consulenti-promo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(142, 45, 226, 0.45);
}

.consulenti-promo-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.consulenti-promo-svg {
    width: 24px;
    height: 24px;
    fill: #ffffff;
}

.consulenti-promo-text {
    flex: 1;
}

.consulenti-promo-title {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 2px;
    color: #ffffff !important;
}

.consulenti-promo-desc {
    font-size: 0.85rem;
    opacity: 0.9;
    line-height: 1.4;
    color: #ffffff !important;
}

.consulenti-promo-arrow {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--yellow-anxa);
}

/* Card Dinamica Offerte JSON */
.consulenti-dynamic-card {
    display: none;
    flex-direction: column;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 16px;
    background: rgba(255, 59, 48, 0.12);
    border: 1px solid rgba(255, 59, 48, 0.4);
    box-shadow: 0 4px 16px rgba(255, 59, 48, 0.2);
    margin-bottom: 24px;
}

.consulenti-dynamic-badge {
    font-size: 0.75rem;
    font-weight: 800;
    color: #ff453a;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.consulenti-dynamic-img {
    display: none;
    width: 100%;
    max-height: 240px;
    object-fit: cover;
    border-radius: 12px;
}

.consulenti-dynamic-text {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text-main);
    white-space: pre-wrap;
}

.consulenti-dynamic-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    opacity: 0.7;
    border-top: 1px dashed rgba(255, 255, 255, 0.15);
    padding-top: 8px;
}

/* --------------------------------------------------------------------------
   2. CATEGORIE PROFESSIONALI - COPERTINE FOTOGRAFICHE (STILE DOVE MANGIARE / SHOPPING)
   -------------------------------------------------------------------------- */
.category-card {
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 20px;
}

.category-card:hover {
    border-color: var(--yellow-anxa);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.category-header {
    position: relative;
    width: 100%;
    min-height: 125px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding: 16px 20px;
    box-sizing: border-box;
    cursor: pointer;
    user-select: none;
    transition: background-size 0.4s ease;
}

.category-header::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.25) 0%, rgba(15, 23, 42, 0.88) 100%);
    z-index: 1;
    transition: background 0.3s ease;
}

.category-header:hover::before {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.15) 0%, rgba(15, 23, 42, 0.94) 100%);
}

.cat-title-group {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.cat-icon-badge {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    color: #0033A0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
}

[data-theme="rossonero"] .cat-icon-badge {
    background: #180505;
    color: var(--yellow-anxa);
    border: 1px solid var(--yellow-anxa);
}

.cat-icon-svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.cat-title {
    font-size: 1.25rem;
    font-weight: 900;
    color: #ffffff !important;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
    line-height: 1.2;
    flex: 1;
}

.chevron {
    position: relative;
    z-index: 2;
    font-size: 0.9rem;
    color: var(--yellow-anxa);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    transition: transform 0.3s ease;
}

.category-card.open .chevron {
    transform: rotate(180deg);
}

.category-content {
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 18px;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
}

.category-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 24px;
    font-size: 0.9rem;
    color: var(--text-main);
    opacity: 0.6;
    font-style: italic;
}

.btn-close-category {
    grid-column: 1 / -1;
    margin: 12px auto 0 auto;
    padding: 8px 20px;
    background: var(--yellow-anxa);
    border: none;
    border-radius: 20px;
    color: #000000;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn-close-category:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

/* --------------------------------------------------------------------------
   3. GRIGLIA & VENUE CARDS (VETRINE)
   -------------------------------------------------------------------------- */
.venue-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
    color: #1a1a1a;
}

[data-theme="rossonero"] .venue-card {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 213, 79, 0.35);
    color: #ffffff;
}

.venue-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
}

.venue-card-img-wrapper {
    position: relative;
    width: 100%;
    height: 150px;
    overflow: hidden;
    background: #ffffff;
}

.venue-card-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.venue-card:hover .venue-card-img {
    transform: scale(1.05);
}

.venue-heart-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: transform 0.2s ease, background 0.2s ease;
}

.venue-heart-btn:hover {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.75);
}

.venue-heart-btn svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: #ffffff;
    stroke-width: 2.5;
}

.venue-heart-btn.active svg {
    fill: #ff3b30;
    stroke: #ff3b30;
}

.venue-card-details {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 4px;
}

.venue-name {
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.25;
    margin: 0;
    color: #1a1a1a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

[data-theme="rossonero"] .venue-name {
    color: #ffffff;
}

.venue-location {
    font-size: 0.8rem;
    color: #666666;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

[data-theme="rossonero"] .venue-location {
    color: #aaaaaa;
}

.venue-cuisine-price {
    font-size: 0.78rem;
    color: #555555;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

[data-theme="rossonero"] .venue-cuisine-price {
    color: #999999;
}

/* --------------------------------------------------------------------------
   4. DETAIL MODAL DELLE VETRINE (CORRETTA CON SFONDO BIANCO E CONTRASTO ELEVATO)
   -------------------------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* MODALE SEMPRE BIANCA PER MASSIMA LEGGIBILITÀ (SENZA RIGUARDO AL TEMA) */
.modal-content {
    background: #ffffff !important;
    color: #1a1a1a !important;
    border-radius: 20px;
    width: 92%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 51, 160, 0.25);
}

.modal-close-btn {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #ffffff !important;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10002;
    transition: transform 0.2s ease, background 0.2s ease;
}

.modal-close-btn:hover {
    transform: scale(1.08);
    background: rgba(0, 0, 0, 0.85);
}

.modal-gallery {
    position: relative;
    width: 100%;
    height: 230px;
    overflow: hidden;
    background: #000000 !important;
    flex-shrink: 0;
}

.modal-slides-container {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease-in-out;
}

.modal-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
}

.modal-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.65);
    color: #ffffff !important;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10001;
}

.gallery-nav.prev { left: 10px; }
.gallery-nav.next { right: 10px; }

/* BUSTO DELLA MODALE CORRETTO CON TESTI SCURI E BEN CONTRASTATI */
.modal-body {
    background: #ffffff !important;
    color: #1a1a1a !important;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.modal-header-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px dashed #e2e8f0;
    padding-bottom: 12px;
}

.modal-title {
    font-size: 1.45rem;
    font-weight: 900;
    color: #1a1a1a !important;
    margin: 0 0 4px 0;
    line-height: 1.25;
}

.modal-cuisine {
    font-size: 0.88rem;
    color: #4a5568 !important;
    font-weight: 700;
}

.btn-condividi-header {
    background: #0033A0 !important;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    margin-left: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.btn-condividi-header svg {
    width: 18px;
    height: 18px;
    fill: #ffffff !important;
}

.modal-desc {
    font-size: 0.93rem;
    line-height: 1.65;
    color: #2d3748 !important;
    white-space: pre-wrap;
}

.modal-address {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1a1a1a !important;
    background: #f7fafc !important;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #e2e8f0 !important;
    cursor: pointer;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}

.btn-chiama, .btn-whatsapp, .btn-sito, .btn-mappa {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.88rem;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    box-sizing: border-box;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.btn-chiama {
    background: linear-gradient(135deg, #FFE066 0%, #FFB300 100%) !important;
    color: #000000 !important;
    font-weight: 900;
}

.btn-whatsapp {
    background: #25D366 !important;
    color: #ffffff !important;
    font-weight: 900;
}

.btn-sito, .btn-mappa {
    background: #f1f5f9 !important;
    border: 1px solid #0033a0 !important;
    color: #0033a0 !important;
    font-weight: 800;
}

.btn-chiama:hover, .btn-whatsapp:hover, .btn-sito:hover, .btn-mappa:hover {
    transform: translateY(-2px);
}

/* Lightbox */
#lightboxOverlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 20000;
    display: none;
    align-items: center;
    justify-content: center;
}

#lightboxCloseBtn {
    position: absolute;
    top: 20px; right: 20px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    font-size: 28px;
    width: 48px; height: 48px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    z-index: 20010;
}

#lightboxImg {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    border-radius: 8px;
}

/* --------------------------------------------------------------------------
   5. RESPONSIVE DESIGN (SMARTPHONE 2 COLONNE)
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
    .category-content {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
        padding: 12px 10px !important;
    }

    .venue-card-img-wrapper {
        height: 110px !important;
    }

    .venue-card-details {
        padding: 8px 10px !important;
        gap: 2px !important;
    }

    .venue-name {
        font-size: 0.85rem !important;
        line-height: 1.2 !important;
    }

    .venue-location {
        font-size: 0.72rem !important;
    }

    .venue-cuisine-price {
        font-size: 0.7rem !important;
    }

    .venue-heart-btn {
        width: 28px !important;
        height: 28px !important;
        top: 6px !important;
        right: 6px !important;
    }

    .venue-heart-btn svg {
        width: 14px !important;
        height: 14px !important;
    }

    .category-header {
        min-height: 110px !important;
        padding: 14px 16px !important;
    }

    .cat-title {
        font-size: 1.05rem !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .category-content {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}


/* ==========================================================================
   PULSANTI SOCIAL VETRINE CONSULENTI
   ========================================================================== */
#detailModal .btn-instagram,
#detailModal .btn-facebook,
#detailModal .btn-whatsapp,
#detailModal .btn-tiktok {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 16px !important;
    border-radius: 12px !important;
    font-weight: 900 !important;
    font-size: 0.88rem !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    color: #ffffff !important;
    cursor: pointer !important;
    transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease !important;
}

#detailModal .btn-instagram {
    background: linear-gradient(
        45deg,
        #FEDA75 0%,
        #FA7E1E 24%,
        #D62976 50%,
        #962FBF 75%,
        #4F5BD5 100%
    ) !important;
    border: none !important;
}

#detailModal .btn-facebook {
    background: #1877F2 !important;
    border: none !important;
}

#detailModal .btn-whatsapp {
    background: #25D366 !important;
    border: none !important;
}

#detailModal .btn-tiktok {
    background: #000000 !important;
    border: 1px solid #25F4EE !important;
    box-shadow: 3px 3px 0 rgba(254, 44, 85, 0.75) !important;
}

#detailModal .btn-instagram:hover,
#detailModal .btn-facebook:hover,
#detailModal .btn-whatsapp:hover,
#detailModal .btn-tiktok:hover {
    transform: translateY(-2px) !important;
    filter: brightness(1.05) !important;
}

/* Messaggio in evidenza sotto la descrizione della vetrina. */
.venue-highlight-quote { margin:22px 0; padding:20px; border-left:5px solid #ffd34d; border-radius:0 14px 14px 0; background:#fff8de; color:#0033a0 !important; font-size:1.1rem; font-weight:800; line-height:1.6; }

/* Copertine illustrate, griglia quadrata su due colonne. */
.consulenti-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start;}
.consulenti-grid>.category-card {min-width:0;margin-bottom:0;}
.consulenti-grid>.category-card>.category-header {aspect-ratio:1 / 1;min-height:0!important;background-size:cover;padding:20px!important;gap:10px;}
.consulenti-grid .category-header::before,.consulenti-grid .category-header:hover::before {background:linear-gradient(180deg,rgba(235,222,245,0) 35%,rgba(243,233,249,.75) 76%,rgba(248,240,251,.97) 100%);}
.consulenti-grid .cat-title {color:#51335f!important;text-shadow:none;font-size:clamp(18px,2vw,25px);}
.consulenti-grid .cat-icon-badge {background:#f8effc;color:#704580;border:1px solid #bda0cb;}
.consulenti-grid .chevron {color:#704580;text-shadow:none;flex-shrink:0;}
.consulenti-grid>.category-card.open {grid-column:1 / -1;}
.consulenti-grid>.category-card.open>.category-header {aspect-ratio:auto;min-height:105px!important;}
.consulenti-grid .category-header:focus-visible {outline:4px solid #9464a5;outline-offset:-4px;}
@media(max-width:700px){
 .consulenti-grid {gap:12px;}
 .consulenti-grid>.category-card>.category-header {padding:12px!important;gap:5px;}
 .consulenti-grid .cat-title-group {flex-direction:column;align-items:flex-start;gap:8px;}
 .consulenti-grid .cat-title {font-size:12px!important;letter-spacing:0;line-height:1.15;}
 .consulenti-grid .cat-icon-badge {width:30px;height:30px;border-radius:9px;}
 .consulenti-grid .cat-icon-svg {width:17px;height:17px;}
 .consulenti-grid .chevron {font-size:11px;}
 .consulenti-grid>.category-card.open .cat-title-group {flex-direction:row;align-items:center;}
}

/* Copertine compatte su una riga: solo desktop. */
@media(min-width:1024px) {
 .consulenti-grid {grid-template-columns:repeat(6,minmax(0,1fr));gap:14px;}
 .consulenti-grid>.category-card:not(.open)>.category-header {padding:10px!important;gap:5px;}
 .consulenti-grid>.category-card:not(.open) .cat-title-group {gap:6px;min-width:0;}
 .consulenti-grid>.category-card:not(.open) .cat-title {font-size:clamp(11px,1vw,15px)!important;line-height:1.15;letter-spacing:0;overflow-wrap:normal;}
 .consulenti-grid>.category-card:not(.open) .cat-icon-badge {width:22px;height:22px;flex:0 0 22px;border-radius:7px;}
 .consulenti-grid>.category-card:not(.open) .cat-icon-svg {width:14px;height:14px;}
 .consulenti-grid>.category-card:not(.open) .chevron {font-size:9px;}
}
