/* ==========================================================================
   WROOMY HOME PAGE — DriveK Inspired Clean Portal Experience
   ========================================================================== */

:root {
    --wroomy-green: #ACC921;
    --wroomy-green-hover: #bdd832;
    --wroomy-dark: #0f172a;
    --wroomy-navy: #0b1329;
    --wroomy-border: #e2e8f0;
    --wroomy-card-bg: #ffffff;
    --wroomy-text-main: #0f172a;
    --wroomy-text-muted: #64748b;
}

.home-drivek-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--wroomy-text-main);
    background-color: #ffffff;
    width: 100%;
    overflow-x: hidden;
}

/* ──────────────────────────────────────────────────────────────────────────
   1. HERO SECTION
   ────────────────────────────────────────────────────────────────────────── */
.home-hero-section {
    position: relative;
    background: linear-gradient(135deg, #1B2A4A 0%, #2A3E6A 100%);
    max-width: 1440px;
    width: calc(100% - 32px);
    margin: 20px auto 35px auto;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(27, 42, 74, 0.18);
    padding: 55px 30px 65px 30px;
    text-align: center;
    color: #ffffff;
    overflow: hidden;
    box-sizing: border-box;
}

.home-hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 15% 25%, rgba(172, 201, 33, 0.10) 0%, transparent 40%),
        radial-gradient(circle at 85% 75%, rgba(65, 105, 225, 0.15) 0%, transparent 45%);
    pointer-events: none;
}

.home-hero-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    z-index: 2;
}

.home-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(172, 201, 33, 0.15);
    border: 1px solid rgba(172, 201, 33, 0.35);
    color: #d9f99d;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 22px;
}

.home-hero-title {
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 16px 0;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.home-hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: #cbd5e1;
    max-width: 720px;
    margin: 0 auto 40px auto;
    line-height: 1.6;
}

/* Form Chiedi all'AI */
.home-search-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    padding: 12px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.4);
    max-width: 820px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.home-search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}

.home-input-wrap {
    flex: 1 1 340px;
    position: relative;
    display: flex;
    align-items: center;
}

.home-input-icon {
    position: absolute;
    left: 18px;
    color: #94a3b8;
    pointer-events: none;
    z-index: 2;
}

.home-ai-input {
    width: 100%;
    height: 54px;
    background: #ffffff;
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 0 18px 0 62px !important;
    font-size: 1rem;
    color: #0f172a;
    font-family: inherit;
    box-sizing: border-box;
    transition: all 0.2s ease;
    outline: none;
}

.home-ai-input:focus {
    border-color: var(--wroomy-green);
    box-shadow: 0 0 0 4px rgba(172, 201, 33, 0.2);
}

.home-ai-input::placeholder {
    color: #94a3b8;
}

/* Pulsanti Cerca e Ricerca Avanzata */
.home-search-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-home-search {
    box-sizing: border-box;
    height: 54px;
    padding: 0 28px;
    background: var(--wroomy-green);
    color: #0b1329;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.btn-home-search:hover {
    background: var(--wroomy-green-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -4px rgba(172, 201, 33, 0.5);
}

.btn-home-advanced {
    box-sizing: border-box;
    height: 54px;
    padding: 0 22px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-home-advanced:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
    transform: translateY(-2px);
}

/* ──────────────────────────────────────────────────────────────────────────
   2. SEZIONE MARCHE (BRAND GRID)
   ────────────────────────────────────────────────────────────────────────── */
.home-brands-section {
    padding: 70px 20px 80px 20px;
    background: #ffffff;
}

.home-section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px auto;
}

.home-section-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 8px 0;
    letter-spacing: -0.01em;
}

.home-section-subtitle {
    font-size: 1rem;
    color: var(--wroomy-text-muted);
    margin: 0;
}

.home-brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 16px;
    max-width: 1120px;
    margin: 0 auto;
}

.home-brand-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    height: 114px;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.home-brand-card:hover {
    transform: translateY(-4px);
    border-color: var(--wroomy-green);
    box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.08);
}

.home-brand-logo-wrap {
    width: 74px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.home-brand-logo-wrap img,
.home-brand-logo-wrap svg {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.home-brand-name {
    display: none;
}

/* Toggle per mostrare tutte le marche */
.home-brands-toggle-wrap {
    text-align: center;
    margin-top: 32px;
}

.btn-brands-toggle {
    background: none;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 10px 24px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-brands-toggle:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
}

/* ──────────────────────────────────────────────────────────────────────────
   3. SEZIONE ULTIME NOTIZIE
   ────────────────────────────────────────────────────────────────────────── */
.home-news-section {
    padding: 70px 20px 80px 20px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
}

.home-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
    max-width: 1120px;
    margin: 0 auto 36px auto;
}

.home-news-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.home-news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 30px -8px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.home-news-img-wrap {
    position: relative;
    width: 100%;
    height: 190px;
    background: #e2e8f0;
    overflow: hidden;
}

.home-news-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.home-news-card:hover .home-news-img-wrap img {
    transform: scale(1.04);
}

.home-news-fallback-bg img {
    width: auto !important;
    height: auto !important;
    max-width: 100%;
}

.home-news-cat-pill {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    backdrop-filter: blur(4px);
}

.home-news-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.home-news-date {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.home-news-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.45;
    margin: 0 0 10px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-news-excerpt {
    font-size: 0.88rem;
    color: var(--wroomy-text-muted);
    line-height: 1.6;
    margin: 0 0 16px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.home-news-readmore {
    font-size: 0.85rem;
    font-weight: 700;
    color: #3b82f6;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s ease;
}

.home-news-card:hover .home-news-readmore {
    gap: 8px;
}

.home-center-action {
    text-align: center;
}

.btn-home-see-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-home-see-all:hover {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
    transform: translateY(-2px);
}

/* ──────────────────────────────────────────────────────────────────────────
   4. SEZIONE ULTIMI AFFARI RADAR
   ────────────────────────────────────────────────────────────────────────── */
.home-radar-section {
    padding: 70px 20px 85px 20px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
}

.home-radar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1120px;
    margin: 0 auto 36px auto;
}

.home-radar-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.home-radar-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 30px -8px rgba(0, 0, 0, 0.08);
    border-color: var(--wroomy-green);
}

.home-radar-thumb {
    position: relative;
    width: 100%;
    height: 190px;
    background: #0f172a;
    overflow: hidden;
}

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

.home-radar-fallback-bg img {
    width: auto !important;
    height: auto !important;
    max-width: 120px;
}

.home-radar-live-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #dc2626;
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.home-radar-live-dot {
    width: 7px;
    height: 7px;
    background: #ffffff;
    border-radius: 50%;
    animation: pulseRadar 1.5s infinite;
}

@keyframes pulseRadar {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
    100% { opacity: 1; transform: scale(1); }
}

.home-radar-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.home-radar-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.home-radar-specs {
    display: flex;
    gap: 12px;
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.home-radar-spec-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.home-radar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.home-radar-price {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
}

.btn-radar-view {
    background: var(--wroomy-green);
    color: #0b1329;
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.home-radar-card:hover .btn-radar-view {
    background: var(--wroomy-green-hover);
}

/* ──────────────────────────────────────────────────────────────────────────
   5. RESPONSIVE MEDIA QUERIES
   ────────────────────────────────────────────────────────────────────────── */
@media (max-width: 992px) {
    .home-news-grid,
    .home-radar-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .home-hero-section {
        width: calc(100% - 20px);
        margin: 12px auto 25px auto;
        border-radius: 16px;
        padding: 36px 14px 40px 14px;
        box-sizing: border-box;
    }
    .home-search-card {
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 10px !important;
        overflow: hidden !important;
    }
    .home-search-form {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        box-sizing: border-box !important;
    }
    .home-input-wrap {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        box-sizing: border-box !important;
    }
    .home-ai-input {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        height: 50px !important;
        font-size: 0.92rem !important;
        padding-left: 62px !important;
    }
    .home-search-actions {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    .btn-home-search,
    .btn-home-advanced {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        height: 50px !important;
        padding: 0 16px !important;
        margin: 0 !important;
        border-radius: 12px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }
    .home-brand-grid {
        grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
        gap: 10px;
    }
    .home-brand-card {
        height: 94px;
        padding: 12px 8px;
    }
    .home-brand-logo-wrap {
        width: 60px;
        height: 44px;
    }
    .home-news-grid,
    .home-radar-grid {
        grid-template-columns: 1fr;
    }
}
