/*
 * ibacheca-modern.css — Progressive CSS overrides
 * Additive only: no structural changes, no Bootstrap modifications.
 * Applied after main.css.
 */

/* ── Typography ─────────────────────────────────────────────────────────── */
body {
    font-size: 15px;
}

/* ── A · Navbar: smooth transition on hover ─────────────────────────────── */
#header .header-inner .navigation > li > a {
    transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease !important;
}
#header .header-inner .navigation > li > a.active,
#header .header-inner .navigation > li:hover > a {
    transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease !important;
}
#header .header-inner .navigation > li .regularmenu .regularmenu-inner li a {
    transition: background-color 0.15s ease, color 0.15s ease;
}

/* ── B · Search bar ─────────────────────────────────────────────────────── */
.ricerca-google input[type=text],
.ricerca-google .form-control {
    font-family: Arial, 'Helvetica Neue', sans-serif;
    border-radius: 6px;
}
.ricerca-google button,
.ricerca-google a.btn {
    border-radius: 6px;
    transition: background-color 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
}
.ricerca-google button:hover,
.ricerca-google a.btn:hover {
    transform: scale(1.02);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}

/* ── B · Form controls (global) ─────────────────────────────────────────── */
.form-control {
    border-radius: 6px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.form-control:focus {
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.15);
}

/* ── B · Buttons (global) ───────────────────────────────────────────────── */
.btn {
    border-radius: 6px;
    transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}
.btn-primary-color:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

/* ── C · Regions list: pill style ───────────────────────────────────────── */
#mappaRegioniMete .categories li {
    border-bottom: none !important;
    padding: 3px 0 !important;
}
#mappaRegioniMete .categories li a {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.12);
    transition: background-color 0.18s ease, color 0.18s ease;
}
#mappaRegioniMete .categories li a:hover {
    background-color: #FD5902;
    color: #fff !important;
}
#mappaRegioniMete .categories li i.fa {
    display: none;
}

/* ── C · Feature boxes hover ────────────────────────────────────────────── */
.features-block.block {
    border-radius: 8px;
    overflow: hidden;
}
.feature {
    transition: box-shadow 0.2s ease;
    border-radius: 6px;
}
.feature:hover {
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
}
.feature-icon {
    transition: transform 0.2s ease;
}
.feature:hover .feature-icon {
    transform: scale(1.1);
}

/* ── C · Category boxes: subtle column hover only ───────────────────────── */
/* NOTE: .wrapper uses top:-80px slide + .options height animation on hover.
   overflow:hidden or transform on .picture would break both. Leave intact. */
.category-box {
    transition: opacity 0.2s ease;
}
.category-box:hover {
    opacity: 0.95;
}

/* ── C / E · Price in cards ─────────────────────────────────────────────── */
.block.row-block .row-item .inner .price {
    font-size: 18px !important;
    color: #FD5902 !important;
    font-weight: 700 !important;
}
.grid-item .inner .price {
    font-size: 16px;
    color: #FD5902;
    font-weight: 700;
}
.teaser-item .price {
    font-size: 14px;
    color: #FD5902;
    font-weight: 700;
}

/* ── C · Homepage grid cards (.grid-item > .inner) ──────────────────────── */
.grid-item .inner {
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.grid-item:hover .inner {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.13);
    transform: translateY(-2px);
}
.grid-item .inner h3 {
    font-size: 15px;
    font-weight: 600;
}

/* ── D · Annuncio dettaglio: gallery pre-init clip ───────────────────────── */
/* Prevents second slide showing before bxSlider initializes the viewport */
#gallery-wrapper .gallery {
    overflow: hidden;
    max-height: 380px;
}
/* After bxSlider wraps slides in .bx-viewport, max-height becomes irrelevant */
#gallery-wrapper .gallery .bx-wrapper {
    max-height: none;
}

/* ── D · Annuncio dettaglio: price & phone ───────────────────────────────── */
.action-buttons .buy-it-financial .price {
    color: #FD5902 !important;
    font-size: 24px !important;
}
.action-buttons .buy-it-financial .price a {
    color: inherit;
    text-decoration: none;
}
.action-buttons .buy-it-financial .price a:hover {
    text-decoration: underline;
}
.action-buttons .buy-it-now .price {
    font-size: 28px !important;
}

/* ── D · Contact "Contatta" button: bigger ───────────────────────────────── */
.btn.contatta {
    font-size: 16px;
    padding: 10px 24px;
    background-color: #FD5902;
    border-color: #FD5902;
    color: #fff;
    border-radius: 6px;
    width: 100%;
    transition: background-color 0.18s ease, box-shadow 0.18s ease;
}
.btn.contatta:hover,
.btn.contatta:focus {
    background-color: #e04e00;
    border-color: #e04e00;
    color: #fff;
    box-shadow: 0 3px 10px rgba(253, 89, 2, 0.35);
}

/* ── Vetrina Evidenziato — badge + card left-border highlight ────────────── */
.vetrina-ev-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    background-color: #FD5902;
    color: #fff !important;
    border-radius: 10px;
    margin-bottom: 4px;
    margin-right: 4px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: middle;
}
.vetrina-ev-badge .fa {
    font-size: 9px;
    margin-right: 2px;
}
.row-item-evidenziato > .inner {
    border-left: 3px solid #FD5902;
}

/* ── Vetrina Top Lista — badge + card left-border highlight ──────────────── */
.vetrina-tl-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    background-color: #1565C0;
    color: #fff !important;
    border-radius: 10px;
    margin-bottom: 4px;
    margin-right: 4px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: middle;
}
.vetrina-tl-badge .fa {
    font-size: 9px;
    margin-right: 2px;
}
.row-item-top-lista > .inner {
    border-left: 3px solid #1565C0;
    background: #f5f8ff;
}

/* ── Vetrina Homepage — badge ────────────────────────────────────────────── */
.vetrina-hp-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    background-color: #2E7D32;
    color: #fff !important;
    border-radius: 10px;
    margin-bottom: 4px;
    margin-right: 4px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: middle;
}
.vetrina-hp-badge .fa {
    font-size: 9px;
    margin-right: 2px;
}

/* ── Vetrina Sidebar widget ──────────────────────────────────────────────── */
.vetrina-sidebar-widget {
    margin-top: 15px;
}
.vetrina-sidebar-item {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}
.vetrina-sidebar-item:last-child {
    border-bottom: none;
}
.vetrina-sb-thumb {
    width: 100%;
    padding-top: 75%;
    display: block;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f5f5f5;
    border-radius: 3px;
}
.vetrina-sb-title {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 3px;
}
.vetrina-sb-title a {
    color: #333;
}
.vetrina-sb-title a:hover {
    color: #FD5902;
}
.vetrina-sb-price {
    font-size: 12px;
    font-weight: 700;
    color: #FD5902;
}

/* ── Vetrina Dettaglio widget (orizzontale) ──────────────────────────────── */
.vetrina-det-item .picture {
    margin-bottom: 4px;
}
.vetrina-det-item .picture img,
.vetrina-det-item .picture .isPreview {
    width: 100%;
    display: block;
}

/* ── Category badge pill ────────────────────────────────────────────────── */
.ib-cat-badge {
    display: inline-block;
    padding: 2px 9px;
    font-size: 11px;
    font-weight: 600;
    background-color: #2980B9;
    color: #fff;
    border-radius: 12px;
    margin-bottom: 5px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    vertical-align: middle;
}

/* ── D · Breadcrumb improvements ────────────────────────────────────────── */
.infobar {
    border-bottom: 1px solid #e8e8e8;
}
.breadcrumb {
    padding: 10px 4px;
    border-radius: 0;
    background: transparent;
    font-size: 13px;
}
.breadcrumb > li + li::before {
    content: '\203A';
    font-size: 16px;
    vertical-align: -1px;
    color: #FD5902;
    padding: 0 6px;
}

/* ── D · Published date chip ────────────────────────────────────────────── */
.note-annuncio .published-ago {
    font-size: 13px;
    color: #777;
    font-style: italic;
}

/* ── E · Listing/search result items (.row-item > .inner) ───────────────── */
.row-item .inner {
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.row-item:hover .inner {
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.14);
    transform: translateY(-2px);
}
.row-item .inner h3 {
    font-size: 15px;
    font-weight: 600;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    text-overflow: ellipsis;
}

/* ── E · Location pin in subtitle ───────────────────────────────────────── */
.row-item .inner .subtitle b::before {
    content: '\f041';
    font-family: FontAwesome;
    margin-right: 3px;
    font-size: 12px;
    color: #FD5902;
}

/* ── F · Footer social links ────────────────────────────────────────────── */
.footer-bottom-social {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 8px;
}
.footer-social-link {
    display: inline-block;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin: 0 4px;
    text-indent: -9999px;
    overflow: hidden;
    vertical-align: middle;
    transition: opacity 0.18s ease, transform 0.15s ease;
}
.footer-social-link:hover {
    opacity: 0.85;
    transform: scale(1.1);
}
.footer-social-link.facebook {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z'/%3E%3C/svg%3E") no-repeat center center #1877F2;
    background-size: 20px 20px;
}
.footer-social-link.twitter {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-4.714-6.231-5.401 6.231H2.746l7.73-8.835L1.254 2.25H8.08l4.256 5.625 5.908-5.625zm-1.161 17.52h1.833L7.084 4.126H5.117z'/%3E%3C/svg%3E") no-repeat center center #000000;
    background-size: 16px 16px;
}
.footer-social-link.instagram {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zM12 0C8.741 0 8.333.014 7.053.072 2.695.272.273 2.69.073 7.052.014 8.333 0 8.741 0 12c0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98C8.333 23.986 8.741 24 12 24c3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98C15.668.014 15.259 0 12 0zm0 5.838a6.162 6.162 0 100 12.324 6.162 6.162 0 000-12.324zM12 16a4 4 0 110-8 4 4 0 010 8zm6.406-11.845a1.44 1.44 0 100 2.881 1.44 1.44 0 000-2.881z'/%3E%3C/svg%3E") no-repeat center center #C13584;
    background-size: 18px 18px;
}

/* ── F · Footer newsletter: inline form ─────────────────────────────────── */
#footer .block form {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}
#footer .block form .form-group {
    flex: 1 1 auto;
    margin-bottom: 0;
    min-width: 0;
}
#footer .block form .form-group:last-child {
    flex: 0 0 auto;
}
#footer .block form .form-control {
    border-radius: 6px;
}
#footer .block form .btn {
    border-radius: 6px;
    white-space: nowrap;
}

/* ── F · Footer block containers ────────────────────────────────────────── */
#footer .block {
    border-radius: 6px;
}

/* ── Header social icons: X and Instagram ───────────────────────────────── */
.social .twitter {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-4.714-6.231-5.401 6.231H2.746l7.73-8.835L1.254 2.25H8.08l4.256 5.625 5.908-5.625zm-1.161 17.52h1.833L7.084 4.126H5.117z'/%3E%3C/svg%3E") no-repeat center center #000000;
    background-size: 16px 16px;
}
.social .twitter:hover {
    background-color: #333333;
}
.social .instagram {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zM12 0C8.741 0 8.333.014 7.053.072 2.695.272.273 2.69.073 7.052.014 8.333 0 8.741 0 12c0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98C8.333 23.986 8.741 24 12 24c3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98C15.668.014 15.259 0 12 0zm0 5.838a6.162 6.162 0 100 12.324 6.162 6.162 0 000-12.324zM12 16a4 4 0 110-8 4 4 0 010 8zm6.406-11.845a1.44 1.44 0 100 2.881 1.44 1.44 0 000-2.881z'/%3E%3C/svg%3E") no-repeat center center #C13584;
    background-size: 18px 18px;
}
.social .instagram:hover {
    background-color: #a02d6e;
}

/* ── G · Modern no-preview placeholder ──────────────────────────────────── */
img.isPreview[style*="no-preview"] {
    background-color: #f2f4f6 !important;
}

/* ── Homepage sidebar: uniform card style ───────────────────────────────── */
.sidebar .block.block-shadow {
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}
.sidebar .block-title h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    padding: 12px 16px;
    border-bottom: 2px solid #FD5902;
}
.sidebar .item-wrapper .item,
.sidebar .teaser-item-wrapper .teaser-item {
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.15s ease;
}
.sidebar .item-wrapper .item:hover,
.sidebar .teaser-item-wrapper .teaser-item:hover {
    background-color: #fafafa;
}
.sidebar .item-wrapper .item .title a,
.sidebar .teaser-item-wrapper .teaser-item .title a {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}
.sidebar .item-wrapper .item .date,
.sidebar .item-wrapper .item .description p,
.sidebar .teaser-item-wrapper .teaser-item .subtitle {
    font-size: 12px;
    color: #777;
    margin: 2px 0 0;
}
.sidebar .item-wrapper img,
.sidebar .teaser-item-wrapper .picture img {
    width: 100%;
    border-radius: 4px;
    object-fit: cover;
}

/* ── Homepage: categories collapsible list ───────────────────────────────── */
#cat-list-wrap.cat-list-collapsed {
    max-height: 210px;
    overflow: hidden;
    position: relative;
}
#cat-list-wrap.cat-list-collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(to bottom, transparent, #fff);
    pointer-events: none;
}
.cat-toggle-wrap {
    padding: 4px 0 6px;
    border-top: 1px solid #f0f0f0;
}
.cat-toggle-wrap a {
    font-size: 12px;
    color: #FD5902;
}

/* ── Homepage regions section ────────────────────────────────────────────── */
#mappaRegioniMete {
    align-items: flex-start;
}
#mappaRegioniMete .categories {
    padding: 4px 0;
}

/* ── Mobile xs fixes ────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .grid-item,
    .row-item {
        margin-bottom: 12px;
    }
    .contact.pull-right {
        float: none !important;
        margin-top: 8px;
    }
    #footer .block form {
        flex-direction: column;
    }
    #footer .block form .form-group:last-child {
        width: 100%;
    }
}

/* ── Navbar — padding compatto per far stare tutto su una riga ───────────── */
#header .header-inner .navigation > li > a,
#header .header-inner .navigation > li > a.active,
#header .header-inner .navigation > li:hover > a {
    padding: 8px 10px;
    font-size: 15px;
}

/* ── Vetrina Premium — navbar ────────────────────────────────────────────── */
#header .header-inner .navigation > li.nav-vetrina > a {
    color: #c96800;
    font-weight: 600;
    padding: 8px 10px;
}
#header .header-inner .navigation > li.nav-vetrina > a:hover {
    background-color: #e07b00;
    color: #fff;
}
/* Badge "NEW" accanto alla voce */
.nav-vetrina-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: #e07b00;
    color: #fff;
    border-radius: 3px;
    padding: 2px 4px;
    margin-left: 4px;
    vertical-align: middle;
    position: relative;
    top: -1px;
}
#header .header-inner .navigation > li.nav-vetrina > a:hover .nav-vetrina-badge {
    background: #fff;
    color: #e07b00;
}
/* Mobile: mantieni stile coerente */
@media (max-width: 991px) {
    #header .header-inner .navigation > li.nav-vetrina > a {
        border-left: 3px solid #e07b00;
    }
}
