/**
 * ============================================================
 * /mediterranea/css/main.css
 * STILI UNIFICATI — Agenzia Immobiliare Mediterranea
 * 20 sezioni numerate
 Compiled by Ruggero Ruggieri - https://www.ruggerocomputer.it/
 * ============================================================
 */

/* ============================================================
   01. VARIABILI CSS
   ============================================================ */
:root {
    /* Palette dal logo */
    --blu-mare: #1a5276;
    --blu-notte: #0f3057;
    --azzurro: #5dade2;
    --oro: #d4a017;
    --oro-scuro: #b8860b;

    /* Sfondo gradiente */
    --sfondo-start: #e8f4f8;
    --sfondo-end: #b8dce8;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.3);
    --glass-bg-hover: rgba(255, 255, 255, 0.45);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-border-hover: rgba(255, 255, 255, 0.7);
    --glass-shadow: 0 8px 32px rgba(26, 82, 118, 0.1);
    --glass-shadow-hover: 0 20px 40px rgba(26, 82, 118, 0.2);

    /* Testo */
    --testo-scuro: #0f3057;
    --testo-medio: #1a5276;
    --testo-chiaro: #5dade2;

    /* Spaziature */
    --spazio: 1rem;
    --raggio: 16px;
}

/* ============================================================
   02. RESET E BASE
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--testo-scuro);
    background: linear-gradient(160deg, var(--sfondo-start) 0%, var(--sfondo-end) 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* ============================================================
   03. TIPOGRAFIA
   ============================================================ */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    color: var(--blu-mare);
    margin-bottom: 2.5rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--oro);
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* ============================================================
   04. LAYOUT — Container
   ============================================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spazio);
}

/* ============================================================
   05. COMPONENTI COMUNI — Link, Bottoni, Glassmorphism
   ============================================================ */
a {
    color: var(--blu-mare);
    transition: color 0.3s;
}

a:hover {
    color: var(--oro);
}

.btn, .hero-cta, .filter-btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--oro);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover, .hero-cta:hover, .filter-btn:hover {
    background: var(--oro-scuro);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 160, 23, 0.3);
}

.glass-card, .immobile-card, .cat-card, .perche-item {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--raggio);
    box-shadow: var(--glass-shadow);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
}

.glass-card:hover, .immobile-card:hover, .cat-card:hover, .perche-item:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    transform: translateY(-8px);
    box-shadow: var(--glass-shadow-hover);
}

.loading, .error, .no-results {
    text-align: center;
    padding: 3rem;
    font-size: 1.1rem;
    color: var(--testo-medio);
}

.error {
    color: #e74c3c;
}

/* ============================================================
   06. HEADER
   ============================================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 48, 87, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 0.8rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo-link {
    display: block;
}

.logo-img {
    height: 50px;
    width: auto;
}

.header-phone {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: color 0.3s;
    white-space: nowrap;
}

.header-phone:hover {
    color: #d4a017;
}

.phone-icon {
    font-size: 1.2rem;
}

.phone-number {
    letter-spacing: 0.5px;
}

/* ============================================================
   07. NAVIGAZIONE
   ============================================================ */
.main-nav {
    display: block;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #d4a017;
    transition: width 0.3s;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: #d4a017;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    background: #fff;
    margin: 5px 0;
    transition: all 0.3s;
    border-radius: 2px;
}

.hamburger.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ============================================================
   08. HERO
   ============================================================ */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        rgba(15, 48, 87, 0.7),
        rgba(15, 48, 87, 0.4)
    );
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    text-align: center;
    color: #fff;
    padding: 2rem;
    max-width: 800px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.4);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.4rem;
    opacity: 0.9;
    margin-bottom: 2.5rem;
}

.hero-cta {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: #d4a017;
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.hero-cta:hover {
    background: #b8860b;
    transform: translateY(-3px);
}

/* ============================================================
   09. CARD IMMOBILI
   ============================================================ */
.evidenza {
    padding: 4rem 0;
}

.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.immobile-card,
.card-immobile {
    cursor: pointer;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.immobile-card:hover,
.card-immobile:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.card-image,
.card-foto {
    position: relative;
    width: 100%;
    height: 220px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, var(--azzurro), var(--blu-mare));
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-image img,
.card-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease;
}

.immobile-card:hover .card-image img,
.card-immobile:hover .card-foto img {
    transform: scale(1.05);
}

.card-image img[src*="placeholder"],
.card-foto img[src*="placeholder"] {
    opacity: 0.6;
}

.badge-contratto,
.card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.badge-vendita,
.card-badge.badge-vendita { background: var(--blu-mare); }

.badge-affitto,
.card-badge.badge-affitto { background: var(--azzurro); }

.badge-asta,
.card-badge.badge-asta { background: var(--oro); }

.badge-default,
.card-badge.badge-default { background: #666; }

.card-content,
.card-body {
    padding: 1.5rem;
}

.card-title,
.card-titolo {
    font-size: 1.25rem;
    color: var(--testo-scuro);
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.card-link:hover .card-titolo {
    color: var(--oro);
}

.card-localita {
    color: var(--testo-medio);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.card-tipologia,
.card-tipo {
    color: var(--testo-chiaro);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-details,
.card-caratteristiche {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.card-details span,
.card-caratteristiche span {
    background: rgba(255, 255, 255, 0.5);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    color: var(--testo-medio);
}

.badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    font-size: 0.9rem;
    margin-left: 4px;
}

.prezzo,
.card-prezzo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--oro);
    margin-bottom: 0.5rem;
}

.prezzo.trattativa,
.card-prezzo.trattativa {
    font-size: 0.95rem;
    color: var(--testo-medio);
    font-style: italic;
}

.card-descrizione {
    font-size: 0.9rem;
    color: var(--testo-medio);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.card-footer,
.card-footer-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: rgba(15, 48, 87, 0.05);
    border-top: 1px solid var(--glass-border);
    border-radius: 0 0 12px 12px;
    font-size: 0.8rem;
}

.card-rif {
    font-weight: 600;
    color: var(--blu-mare);
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.stato,
.card-stato {
    color: var(--blu-notte);
    opacity: 0.8;
    font-style: italic;
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.placeholder-img {
    color: #fff;
    font-size: 1.2rem;
    opacity: 0.8;
}

.no-results {
    text-align: center;
    padding: 2rem;
    color: var(--testo-medio);
    font-style: italic;
}

/* ============================================================
   10. SEZIONI GENERICHE — Intro, Categorie, Perché Noi, CTA
   ============================================================ */
section {
    padding: 4rem 0;
}

.intro-card {
    text-align: center;
    padding: 32px 40px;
    max-width: 900px;
    margin: 30px auto 0;
}

.intro-text {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--blu-notte);
    margin: 0;
}

.categorie {
    padding: 4rem 0;
}

.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.cat-card {
    text-align: center;
    padding: 3rem 2rem;
    text-decoration: none;
    color: var(--testo-scuro);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.cat-icon {
    font-size: 3rem;
}

.cat-card h3 {
    font-size: 1.3rem;
    color: var(--blu-mare);
}

.perche-noi {
    padding: 4rem 0;
}

.perche-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.perche-item {
    text-align: center;
    padding: 2.5rem 2rem;
}

.perche-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.perche-item h3 {
    color: var(--blu-mare);
    margin-bottom: 0.5rem;
}

.perche-item p {
    color: var(--testo-medio);
}

.cta-finale {
    text-align: center;
    padding: 5rem 0;
}

.cta-finale h2 {
    font-size: 2.5rem;
    color: var(--blu-mare);
    margin-bottom: 1rem;
}

.cta-finale p {
    font-size: 1.2rem;
    color: var(--testo-medio);
    margin-bottom: 2rem;
}

.page-header {
    background: linear-gradient(135deg, var(--blu-notte), var(--blu-mare));
    color: #fff;
    padding: 6rem 0 3rem;
    text-align: center;
    margin-top: 70px;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ============================================================
   11. PAGINA PROPOSTE — Filtri
   ============================================================ */
.filters-section {
    padding: 2rem 0;
    margin-top: -2rem;
    position: relative;
    z-index: 10;
}

.filters-bar {
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--testo-medio);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-input,
.filter-select {
    padding: 0.8rem 1rem;
    border: 2px solid rgba(26, 82, 118, 0.15);
    border-radius: 12px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.6);
    color: var(--testo-scuro);
    transition: all 0.3s;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--azzurro);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 4px rgba(93, 173, 226, 0.2);
}

.filter-actions {
    display: flex;
    gap: 1rem;
    grid-column: 1 / -1;
}

.btn-primary {
    background: var(--oro);
    color: #fff;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.5);
    color: var(--testo-medio);
    border: 2px solid rgba(26, 82, 118, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.8);
}

.risultati-info {
    text-align: center;
    color: var(--testo-medio);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.immobili-section {
    padding: 2rem 0 4rem;
}

/* ============================================================
   12. PAGINA DETTAGLIO
   ============================================================ */
.dettaglio-galleria {
    padding-top: 2rem;
    margin-top: 70px;
}

.galleria-main {
    position: relative;
    width: 100%;
    height: 600px;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--azzurro), var(--blu-mare));
    box-shadow: var(--glass-shadow);
}

.galleria-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.galleria-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.85);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--blu-mare);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.galleria-nav:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.1);
}

.galleria-prev { left: 1rem; }
.galleria-next { right: 1rem; }

.galleria-counter {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 10;
}

.galleria-thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
}

.galleria-thumbs::-webkit-scrollbar {
    height: 6px;
}

.galleria-thumbs::-webkit-scrollbar-thumb {
    background: var(--azzurro);
    border-radius: 3px;
}

.thumb-item {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
    opacity: 0.7;
}

.thumb-item:hover {
    opacity: 1;
    transform: scale(1.05);
}

.thumb-item.active {
    border-color: var(--oro);
    opacity: 1;
    box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.3);
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dettaglio-info {
    padding: 1rem 0;
}

.info-card {
    padding: 2rem;
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.info-rif {
    font-size: 0.85rem;
    color: var(--testo-chiaro);
    font-weight: 500;
}

.info-stato {
    background: rgba(46, 204, 113, 0.15);
    color: #27ae60;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.info-titolo {
    font-size: 1.6rem;
    color: var(--blu-mare);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.info-localita {
    color: var(--testo-medio);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.info-localita::before {
    content: '\1F4CD';
}

.info-prezzo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--oro);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
}

.prezzo-euro {
    font-size: 1.4rem;
}

.info-prezzo.trattativa {
    font-size: 1.2rem;
    color: var(--testo-medio);
    font-style: italic;
    font-weight: 500;
}

.info-caratteristiche {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(26, 82, 118, 0.1);
    border-bottom: 1px solid rgba(26, 82, 118, 0.1);
}

.info-car {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.3rem;
    min-width: 80px;
    flex: 1;
}

.car-icon {
    font-size: 1.5rem;
    line-height: 1;
    min-height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.car-valore {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--blu-mare);
}

.car-label {
    font-size: 0.8rem;
    color: var(--testo-chiaro);
}

.info-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.info-tag {
    background: rgba(26, 82, 118, 0.08);
    color: var(--blu-mare);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(26, 82, 118, 0.15);
}

.info-contratto {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.info-contratto span {
    background: var(--oro);
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.info-cta {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
}

.dettaglio-info .info-telefoni {
    text-align: center;
    color: var(--testo-chiaro);
    font-size: 0.85rem;
}

.dettaglio-sezione {
    padding: 1rem 0;
}

.sezione-card {
    padding: 2.5rem;
}

.sezione-titolo {
    color: var(--blu-mare);
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--oro);
    display: inline-block;
}

.sezione-contenuto {
    line-height: 1.8;
    color: var(--testo-medio);
}

.sezione-contenuto p {
    margin-bottom: 1rem;
}

.caratteristiche-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.caratteristica-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(26, 82, 118, 0.1);
}

.caratteristica-label {
    color: var(--testo-chiaro);
    font-size: 0.9rem;
}

.caratteristica-valore {
    color: var(--blu-mare);
    font-weight: 600;
    font-size: 0.95rem;
}

/* Proposte simili */
.simili-section {
    margin-top: 3rem;
    padding: 2rem 0;
}

.simili-section h2 {
    text-align: center;
    color: var(--blu-mare);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.simili-section .simili-sottotitolo {
    text-align: center;
    color: var(--testo-medio);
    font-size: 1rem;
    margin-bottom: 2rem;
    opacity: 0.8;
}

.simili-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 0 3rem;
}

.simili-track {
    display: flex;
    gap: 1.5rem;
    transition: transform 0.4s ease-in-out;
    scroll-behavior: smooth;
}

.simili-card {
    flex: 0 0 calc(25% - 1.125rem);
    min-width: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.simili-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(26, 82, 118, 0.2);
}

a.simili-card {
    text-decoration: none;
    color: inherit;
    display: block;
}

.simili-card .simili-img-wrapper {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    position: relative;
}

.simili-card .simili-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.simili-card:hover .simili-img-wrapper img {
    transform: scale(1.08);
}

.simili-card .simili-info {
    padding: 1rem 1.2rem 1.2rem;
}

.simili-card .simili-titolo {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--testo-scuro);
    line-height: 1.3;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.simili-card .simili-prezzo {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--oro);
}

.simili-freccia {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    color: var(--blu-mare);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.simili-freccia:hover {
    background: var(--blu-mare);
    color: #fff;
    transform: translateY(-50%) scale(1.1);
}

.simili-freccia.prev { left: 0; }
.simili-freccia.next { right: 0; }

.simili-freccia:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.simili-dots {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 1.5rem;
}

.simili-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: var(--azzurro);
    opacity: 0.4;
    cursor: pointer;
    transition: all 0.3s ease;
}

.simili-dot.active {
    opacity: 1;
    transform: scale(1.3);
    background: var(--blu-mare);
}

.simili-dot:hover {
    opacity: 0.8;
}

.simili-vuoto {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--testo-medio);
    font-size: 1.1rem;
}

/* ============================================================
   13. PAGINA CHI SIAMO
   ============================================================ */
.chi-siamo-main {
    padding: 3rem 0;
}

.chi-siamo-grid {
    display: grid;
    grid-template-columns: 60% 40%;
    gap: 2rem;
    align-items: start;
}

.chi-siamo-testo {
    padding: 2.5rem;
}

.chi-siamo-testo h2 {
    color: var(--blu-mare);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--oro);
    padding-bottom: 0.5rem;
}

.chi-siamo-lorem p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--testo-medio);
    text-align: justify;
}

.chi-siamo-contatti {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(26, 82, 118, 0.2);
}

.chi-siamo-contatti h3 {
    color: var(--blu-mare);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.contatto-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.contatto-icon {
    font-size: 1.3rem;
    line-height: 1;
    flex-shrink: 0;
}

.contatto-info {
    font-size: 0.95rem;
    color: var(--testo-medio);
}

.contatto-info a {
    color: var(--blu-mare);
    text-decoration: none;
    transition: color 0.3s;
}

.contatto-info a:hover {
    color: var(--oro);
}

.chi-siamo-foto {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.foto-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: 12px;
    overflow: hidden;
}

.placeholder-gradient {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--azzurro), var(--blu-mare));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
}

.placeholder-gradient span {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.foto-alassio {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
    aspect-ratio: 4/3;
}

.chi-siamo-orari {
    padding: 2rem 0;
}

.orari-card {
    padding: 2.5rem;
    max-width: 700px;
    margin: 0 auto;
}

.orari-card h2 {
    color: var(--blu-mare);
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.orari-icon {
    margin-right: 0.5rem;
}

.orari-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.orari-table td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(26, 82, 118, 0.1);
}

.orari-table td:first-child {
    font-weight: 600;
    color: var(--blu-mare);
    width: 30%;
}

.orari-table tr.chiuso td {
    color: #e74c3c;
    font-style: italic;
}

.orari-nota {
    text-align: center;
    color: var(--testo-chiaro);
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* ============================================================
   14. PAGINA CONTATTI
   ============================================================ */
.contatti-main {
    padding: 3rem 0;
}

.contatti-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.contatti-info {
    padding: 2.5rem;
}

.contatti-info h2,
.contatti-form h2 {
    color: var(--blu-mare);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-icon {
    font-size: 1.3rem;
}

.info-block {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(26, 82, 118, 0.1);
}

.info-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.info-indirizzo {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--testo-medio);
}

.info-indirizzo strong {
    color: var(--blu-mare);
    font-size: 1.1rem;
}

.contatti-info .info-telefoni {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.telefono-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.tel-label {
    color: var(--testo-medio);
    font-size: 0.95rem;
}

.tel-numero {
    color: var(--blu-mare);
    font-weight: 600;
    font-size: 1.05rem;
}

.info-email {
    color: var(--blu-mare);
    font-weight: 500;
    font-size: 1.05rem;
}

.email-social-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.email-social-row .info-email {
    color: var(--blu-mare);
    font-weight: 500;
    font-size: 1.05rem;
}

.email-social-row .instagram-link {
    flex-shrink: 0;
    line-height: 0;
}

.email-social-row .social-icon {
    height: 32px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

.email-social-row .instagram-link:hover .social-icon {
    transform: scale(1.1);
}

.orari-table-compatta {
    width: 100%;
    border-collapse: collapse;
}

.orari-table-compatta td {
    padding: 0.5rem 0;
    font-size: 0.95rem;
}

.orari-table-compatta td:first-child {
    font-weight: 600;
    color: var(--blu-mare);
    width: 35%;
}

.orari-table-compatta tr.chiuso td {
    color: #e74c3c;
    font-style: italic;
}

.contatti-form {
    padding: 2.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: var(--blu-mare);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 2px solid rgba(26, 82, 118, 0.15);
    border-radius: 10px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.7);
    color: var(--testo-scuro);
    transition: all 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--azzurro);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 4px rgba(93, 173, 226, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.char-count {
    display: block;
    text-align: right;
    font-size: 0.8rem;
    color: var(--testo-chiaro);
    margin-top: 0.3rem;
}

.honeypot-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

.input-errore {
    border-color: #e74c3c !important;
    background: rgba(231, 76, 60, 0.05) !important;
}

.messaggio-errore {
    display: block;
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

.contact-alert {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-weight: 500;
    animation: alertSlideIn 0.4s ease;
}

@keyframes alertSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: rgba(39, 174, 96, 0.15);
    color: #1e8449;
    border-left: 4px solid #27ae60;
}

.alert-error {
    background: rgba(231, 76, 60, 0.15);
    color: #c0392b;
    border-left: 4px solid #e74c3c;
}

#btn-invia {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

#btn-invia:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.contatti-mappa {
    padding: 2rem 0 4rem;
}

.mappa-card {
    padding: 2rem;
}

.mappa-card h2 {
    color: var(--blu-mare);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mappa-wrapper {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(26, 82, 118, 0.1);
}

.mappa-indirizzo {
    text-align: center;
    margin-top: 1rem;
    color: var(--testo-medio);
    font-size: 1rem;
}

.cta-mobile {
    display: none;
    padding: 2rem 0;
}

.cta-mobile-card {
    text-align: center;
    padding: 2rem;
}

.cta-mobile-card h3 {
    color: var(--blu-mare);
    margin-bottom: 0.5rem;
}

.cta-mobile-numero {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--oro);
    margin-bottom: 0.5rem;
}

.cta-mobile-orari {
    color: var(--testo-chiaro);
    font-size: 0.9rem;
}

/* ============================================================
   15. FOOTER
   ============================================================ */
.site-footer {
    background: #0f3057;
    color: #fff;
    padding: 3rem 0 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: start;
}

.footer-col:nth-child(1) {
    justify-self: start;
    text-align: left;
}

.footer-col:nth-child(2) {
    justify-self: center;
    text-align: center;
}

.footer-col:nth-child(3) {
    justify-self: end;
    text-align: right;
}

.footer-logo {
    height: 40px;
    width: auto;
    margin-bottom: 1rem;
    display: block;
}

.footer-col-title {
    color: #d4a017;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.footer-col p {
    color: #ccc;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #d4a017;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.hidden-admin-link {
    color: #888;
    text-decoration: none;
    cursor: default;
    transition: color 0.3s;
}

.hidden-admin-link:hover {
    color: var(--oro);
    cursor: pointer;
}

.designer-credits {
    margin-top: 0.5rem;
}

.designer-link {
    color: #666;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
}

.designer-link:hover {
    color: var(--oro);
}

/* ============================================================
   16. COOKIE BANNER
   ============================================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 48, 87, 0.95);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 1rem 0;
    z-index: 9998;
    transform: translateY(100%);
    transition: transform 0.5s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.cookie-content p {
    font-size: 0.9rem;
    margin: 0;
}

.cookie-content a {
    color: var(--oro);
    text-decoration: underline;
}

.cookie-btn {
    background: var(--oro);
    color: #fff;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.3s;
}

.cookie-btn:hover {
    background: var(--oro-scuro);
}

/* ============================================================
   17. TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 1.5rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(26, 82, 118, 0.15);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    color: var(--testo-scuro);
    font-size: 1rem;
    max-width: 400px;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55),
                opacity 0.4s ease;
    pointer-events: auto;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-success {
    border-left: 4px solid #27ae60;
}

.toast-error {
    border-left: 4px solid #e74c3c;
}

.toast-warning {
    border-left: 4px solid #f39c12;
}

.toast-info {
    border-left: 4px solid #3498db;
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.toast-message {
    font-weight: 500;
    line-height: 1.4;
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
    color: #999;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
    flex-shrink: 0;
}

.toast-close:hover {
    color: #333;
    background: rgba(0,0,0,0.05);
}

/* ============================================================
   18. W3C VALIDATOR & FIX
   ============================================================ */
.w3c-validator {
    margin-top: 1.5rem;
}

.w3c-title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--oro);
    margin-bottom: 0.6rem;
}

.w3c-validator a {
    display: inline-block;
    line-height: 0;
    border-radius: 2px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.w3c-validator a:hover,
.w3c-validator a:focus {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 4px 12px rgba(0, 90, 156, 0.25);
    outline: none;
}

.w3c-badge {
    display: block;
    border-radius: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.mappa-wrapper iframe {
    width: 100%;
    border: 0;
    border-radius: 12px;
    display: block;
}

/* ============================================================
   19. PAGINA 404
   ============================================================ */
.errore-404 {
    text-align: center;
    padding: 4rem 0;
}

.errore-testo {
    text-align: center;
    font-size: 1.3rem;
    color: var(--blu-mare);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.errore-azioni {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ============================================================
   20. RESPONSIVE
   ============================================================ */

/* --- min-width: 768px --- */
@media (min-width: 768px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- min-width: 1024px --- */
@media (min-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- max-width: 1024px --- */
@media (max-width: 1024px) {
    .simili-card {
        flex: 0 0 calc(33.333% - 1rem);
    }
}

/* --- max-width: 900px --- */
@media (max-width: 900px) {
    .contatti-grid {
        grid-template-columns: 1fr;
    }

    .cta-mobile {
        display: block;
    }

    .chi-siamo-grid {
        grid-template-columns: 1fr;
    }

    .chi-siamo-foto {
        flex-direction: row;
    }

    .foto-placeholder {
        aspect-ratio: 16/9;
    }
}

/* --- max-width: 768px --- */
@media (max-width: 768px) {
    /* Header */
    .hamburger {
        display: block;
    }

    .header-brand {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }

    .header-phone {
        font-size: 0.9rem;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(15, 48, 87, 0.98);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
    }

    .main-nav.open {
        max-height: 300px;
    }

    .nav-list {
        flex-direction: column;
        padding: 1rem 2rem;
        gap: 1rem;
    }

    /* Hero */
    .hero-title { font-size: 2.2rem; }
    .hero-subtitle { font-size: 1.1rem; }

    /* Generico */
    .section-title {
        font-size: 1.8rem;
    }

    .cta-finale h2 {
        font-size: 1.8rem;
    }

    section {
        padding: 3rem 0;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-col:nth-child(1),
    .footer-col:nth-child(2),
    .footer-col:nth-child(3) {
        justify-self: center;
        text-align: center;
    }

    /* Proposte */
    .filters-bar {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        flex-direction: column;
    }

    /* Cookie */
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }

    /* Toast */
    .toast-container {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }

    .toast {
        max-width: 100%;
    }

    /* Simili */
    .simili-container {
        padding: 0 2.5rem;
    }

    .simili-card {
        flex: 0 0 calc(50% - 0.75rem);
    }

    .simili-section h2 {
        font-size: 1.5rem;
    }

    .simili-freccia {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
}

/* --- max-width: 600px --- */
@media (max-width: 600px) {
    .contatti-info,
    .contatti-form,
    .mappa-card {
        padding: 1.5rem;
    }

    .telefono-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }

    .chi-siamo-foto {
        flex-direction: column;
    }

    .chi-siamo-testo,
    .orari-card {
        padding: 1.5rem;
    }

    /* Dettaglio */
    .dettaglio-galleria {
        padding-top: 1rem;
        margin-top: 60px;
    }

    .galleria-main {
        height: 250px;
        border-radius: 12px;
    }

    .galleria-nav {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .galleria-prev { left: 0.5rem; }
    .galleria-next { right: 0.5rem; }

    .galleria-counter {
        font-size: 0.8rem;
        padding: 0.3rem 0.8rem;
    }

    .thumb-item {
        width: 60px;
        height: 45px;
    }

    .info-card {
        padding: 1.2rem;
    }

    .info-titolo {
        font-size: 1.3rem;
    }

    .info-prezzo {
        font-size: 1.5rem;
    }

    .info-caratteristiche {
        gap: 0.8rem;
        padding: 1rem 0;
    }

    .info-car {
        min-width: 60px;
    }

    .car-icon {
        font-size: 1.2rem;
    }

    .car-valore {
        font-size: 1rem;
    }

    .sezione-card {
        padding: 1.5rem;
    }

    .sezione-titolo {
        font-size: 1.2rem;
    }

    .caratteristiche-grid {
        grid-template-columns: 1fr;
    }
}

/* --- max-width: 576px --- */
@media (max-width: 576px) {
    .card-image,
    .card-foto {
        aspect-ratio: 16 / 10;
    }
}

/* --- max-width: 480px --- */
@media (max-width: 480px) {
    .phone-number {
        font-size: 0.85rem;
    }

    .card-footer,
    .card-footer-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .simili-card {
        flex: 0 0 100%;
    }

    .simili-container {
        padding: 0 2rem;
    }
}

/* --- max-width: 400px --- */
@media (max-width: 400px) {
    .galleria-main {
        height: 220px;
    }

    .info-card {
        padding: 1rem;
    }

    .info-titolo {
        font-size: 1.1rem;
    }

    .info-prezzo {
        font-size: 1.3rem;
    }
}
