/* ============================================
   Soluzione Casa - Design System 2026
   Con Font Awesome 6
   ============================================ */

:root {
    --blue-50: #eff6ff;
    --blue-100: #dbeafe;
    --blue-200: #bfdbfe;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    
    --teal-500: #14b8a6;
    --teal-600: #0d9488;
    
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    --white: #ffffff;
    --red-500: #ef4444;
    --red-600: #dc2626;
    --green-500: #22c55e;
    --green-600: #16a34a;
    --yellow-500: #eab308;
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 50px rgba(0,0,0,0.15);
    
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    --transition: all 0.2s ease;
    --transition-slow: all 0.3s ease;
}

/* RESET */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--gray-50);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-600); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--blue-700); }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}
@media (min-width: 768px) { .container { padding: 0 24px; } }
@media (min-width: 1024px) { .container { padding: 0 32px; } }

/* ========== HEADER ========== */
.site-header {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 64px;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gray-900);
}

.logo-icon {
    font-size: 1.6rem;
    color: var(--blue-600);
}

.logo-text {
    background: linear-gradient(135deg, var(--blue-600), var(--teal-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-img {
    height: 60px;
    width: auto;
    display: block;
}

/* Se vuoi anche un logo responsive */
@media (max-width: 768px) {
    .logo-img {
        height: 35px;
    }
}


.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.nav-links a {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-700);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-links a:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.nav-links .btn-nav {
    background: var(--blue-600);
    color: white !important;
    font-weight: 600;
}

.nav-links .btn-nav:hover {
    background: var(--blue-700);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    color: var(--gray-700);
}

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 16px;
        box-shadow: var(--shadow-xl);
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }
    .nav-links.active { display: flex; }
}

/* ========== HERO ========== */
.hero {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #0c4a6e 0%, #0369a1 30%, #0284c7 60%, #0ea5e9 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.08)" d="M0,192L48,176C96,160,192,128,288,122.7C384,117,480,139,576,165.3C672,192,768,224,864,218.7C960,213,1056,171,1152,149.3C1248,128,1344,128,1392,128L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"/></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    text-align: center;
    padding: 60px 0;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: white;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 32px;
}

/* Search Box nella Hero */
.search-box {
    background: white;
    border-radius: var(--radius-xl);
    padding: 20px;
    box-shadow: var(--shadow-xl);
    max-width: 900px;
    margin: 0 auto;
}

.search-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 768px) {
    .search-row {
        flex-direction: row;
        align-items: flex-end;
    }
}

.search-field {
    flex: 1;
    min-width: 0;
}

.search-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 4px;
    text-align: left;
}

.search-field input,
.search-field select {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.9rem;
    background: var(--gray-50);
    transition: var(--transition);
}

.search-field input:focus,
.search-field select:focus {
    outline: none;
    border-color: var(--blue-500);
    background: white;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.btn-search {
    height: 44px;
    padding: 0 28px;
    background: var(--gray-900);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-search:hover {
    background: var(--gray-800);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* ========== SECTIONS ========== */
.section {
    padding: 48px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gray-900);
}

/* ========== CARDS GRID ========== */
.cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 640px) {
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
}

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

.card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition-slow);
    display: block;
    color: inherit;
    border: 1px solid var(--gray-100);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    color: inherit;
}

.card-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--gray-200);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.placeholder-img {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 3rem;
    color: var(--gray-400);
    background: var(--gray-200);
}

.card-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.card-cin {
    background: rgba(0,0,0,0.75);
    color: white;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-non-disponibile {
    background: rgba(239,68,68,0.9);
    color: white;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 700;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-type {
    background: rgba(255,255,255,0.9);
    color: var(--gray-700);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-body {
    padding: 16px;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
    line-height: 1.3;
}

.card-location {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100);
}

.card-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--blue-600);
}

.card-price small {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--gray-500);
}

.card-guests {
    font-size: 0.85rem;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ========== FOOTER ========== */
.site-footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 48px 0 24px;
    margin-top: 64px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

@media (min-width: 640px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

.footer-col h4 {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-col p, .footer-col a {
    font-size: 0.9rem;
    line-height: 1.7;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-col a {
    display: flex;
    color: var(--gray-400);
    margin-bottom: 4px;
}

.footer-col a:hover { color: white; }

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--gray-800);
    text-align: center;
    font-size: 0.85rem;
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary { background: var(--blue-600); color: white; }
.btn-primary:hover { background: var(--blue-700); color: white; transform: translateY(-1px); }
.btn-secondary { background: var(--gray-200); color: var(--gray-700); }
.btn-secondary:hover { background: var(--gray-300); }
.btn-success { background: var(--green-500); color: white; }
.btn-danger { background: var(--red-500); color: white; }

/* ========== COOKIE BANNER ========== */
.cookie-banner {
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    max-width: 450px;
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-xl);
    z-index: 999;
    border: 1px solid var(--gray-200);
}

.cookie-banner p {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-bottom: 12px;
}

.cookie-buttons {
    display: flex;
    gap: 8px;
}

.cookie-buttons button {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-cookie-accept {
    background: var(--gray-900);
    color: white;
}

.btn-cookie-reject {
    background: white;
    color: var(--gray-600);
    border: 1px solid var(--gray-300) !important;
}

/* ========== SUGGESTIONS ========== */
.suggestions-box {
    position: absolute;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 50;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.suggestion-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.suggestion-item:hover {
    background: var(--blue-50);
}

/* ========== ALERTS ========== */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* ========== UTILITY ========== */
.text-center { text-align: center; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.hidden { display: none !important; }

/* ========== RESPONSIVE ========== */
@media (max-width: 480px) {
    .hero { min-height: 400px; }
    .hero-content { padding: 40px 0; }
    .search-box { padding: 16px; }
}

/* ============================================
   OVERRIDE: Colori da celeste/blu a ROSSO
   + Hero con immagine di sfondo
   ============================================ */

/* 1. Sostituzione variabili colore principali */
:root {
    --blue-500: #dc3545;  /* rosso */
    --blue-600: #dc3545;  /* rosso */
    --blue-700: #b02a37;  /* rosso scuro */
    --teal-500: #dc3545;  /* rosso */
    --teal-600: #b02a37;  /* rosso scuro */
}

/* 2. Hero con IMMAGINE DI SFONDO (sostituisci 'hero-bg.jpg' con il tuo percorso) */
.hero {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #0c4a6e 0%, #0369a1 30%, #0284c7 60%, #0ea5e9 100%);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
/* 3. Testi e link rossi */
a:not(.btn-nav):not(.btn):not(.card) {
    color: #dc3545;
}
a:not(.btn-nav):not(.btn):not(.card):hover {
    color: #b02a37;
}

/* 4. Logo con sfumatura rossa */
.logo-text {
    background: linear-gradient(135deg, #dc3545, #b02a37);
    -webkit-background-clip: text;
    background-clip: text;
}

/* 5. Badge rossi con testo BIANCO (come richiesto) */
.card-cin {
    background: rgba(220, 53, 69, 0.85);
    color: white !important;
}
.card-type {
    background: rgba(220, 53, 69, 0.85);
    color: white !important;
}
.card-non-disponibile {
    background: #6c757d;
    color: white !important;
}

/* 6. Prezzo e icone rosse */
.card-price {
    color: #dc3545 !important;
}
.card-price small {
    color: #6c757d;
}
.card-guests i,
.card-location i,
.section-title i,
.search-field label i {
    color: #dc3545 !important;
}

/* 7. Pulsante Cerca ROSSO */
.btn-search {
    background: #dc3545 !important;
}
.btn-search:hover {
    background: #b02a37 !important;
    transform: translateY(-1px);
}

/* 8. Pulsanti secondari (Vedi tutti) con bordo rosso e testo rosso */
.btn-secondary {
    background: transparent !important;
    border: 2px solid #dc3545 !important;
    color: #dc3545 !important;
}
.btn-secondary:hover {
    background: #dc3545 !important;
    color: white !important;
}

/* 9. Pulsante di navigazione (annuncio) rosso */
.nav-links .btn-nav {
    background: #dc3545 !important;
    color: white !important;
}
.nav-links .btn-nav:hover {
    background: #b02a37 !important;
}

/* 10. Focus su input/select rosso */
.search-field input:focus,
.search-field select:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

/* 11. Icona logo rossa */
.logo-icon {
    color: #dc3545 !important;
}

/* 12. Suggestion hover rosso */
.suggestion-item:hover {
    background: rgba(220, 53, 69, 0.1) !important;
}

/* Torna su */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: #dc3545;
    color: white !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.back-to-top i {
    color: white !important;
    font-size: 1.2rem;
}

.back-to-top:hover {
    background: #b02a37;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.back-to-top:hover i {
    color: white !important;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
    .back-to-top i {
        font-size: 1rem;
    }
}