/* ============================================
   RIVENDITORI PAGE - CSS
   Pagina Diventa Rivenditore Zonzini
   ============================================ */
body{
    background-color: var(--color-secondary);
}
/* ============================================
   HERO SECTION
   ============================================ */

.rivenditori-hero {
    min-height: 60vh;
    background: var(--color-cream);
    display: flex;
    align-items: center;
    padding: calc(var(--header-height) + var(--space-4xl)) 0 var(--space-4xl);
}

.rivenditori-hero-content {
    max-width: 800px;
}

.rivenditori-hero h1 {
    color: var(--color-secondary);
    margin-bottom: var(--space-lg);
}

.rivenditori-hero .lead {
    color: var(--color-secondary);
    opacity: 0.8;
    margin-bottom: var(--space-2xl);
}

.rivenditori-hero-actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .rivenditori-hero {
        min-height: auto;
        padding: calc(var(--header-height) + var(--space-2xl)) 0 var(--space-2xl);
    }
}


/* ============================================
   MAPPA SECTION
   ============================================ */

.rivenditori-mappa {
    background: var(--color-cream);
    padding: var(--space-4xl) 0;
}

.mappa-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.mappa-header h2 {
    color: var(--color-secondary);
    margin-bottom: var(--space-md);
}

.mappa-header p {
    color: var(--color-secondary);
    opacity: 0.7;
}

.mappa-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.mappa-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
}

/* Hotspot sulla mappa */
.mappa-hotspot {
    position: absolute;
    left: var(--x);
    top: var(--y);
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    cursor: pointer;
    z-index: 10;
}

.mappa-hotspot .hotspot-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--color-primary);
    border-radius: 50%;
    animation: mapPulse 2s infinite;
}

.mappa-hotspot::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--color-primary);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

@keyframes mapPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(2);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* Tooltip */
.hotspot-tooltip {
    position: absolute;
    bottom: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    min-width: 280px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
}

.hotspot-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 10px solid transparent;
    border-top-color: white;
}

.mappa-hotspot:hover .hotspot-tooltip {
    opacity: 1;
    visibility: visible;
}

.hotspot-tooltip strong {
    display: block;
    font-size: var(--font-size-body);
    color: var(--color-secondary);
    margin-bottom: var(--space-sm);
}

.hotspot-tooltip address,
.hotspot-tooltip p {
    font-size: var(--font-size-small);
    color: var(--color-secondary);
    opacity: 0.8;
    margin-bottom: var(--space-sm);
    font-style: normal;
    line-height: 1.5;
}

.hotspot-tooltip a {
    color: var(--color-primary);
    text-decoration: underline;
}

.hotspot-tooltip a:hover {
    text-decoration: none;
}

/* Mobile: tooltip touch */
@media (max-width: 992px) {
    .mappa-hotspot {
        width: 30px;
        height: 30px;
    }
    
    .hotspot-tooltip {
        position: fixed;
        bottom: auto;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        min-width: 300px;
        max-width: 90vw;
    }
    
    .hotspot-tooltip::after {
        display: none;
    }
    
    .mappa-hotspot.active .hotspot-tooltip {
        opacity: 1;
        visibility: visible;
    }
}


/* ============================================
   STATS SECTION
   ============================================ */

.rivenditori-stats {
    background: var(--color-secondary);
    padding: var(--space-5xl) 0;
    color: white;
}

.stats-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-4xl);
}

.stats-header h2 {
    color: white;
    margin-bottom: var(--space-lg);
}

.stats-header p {
    color: rgba(255, 255, 255, 0.7);
}

.stats-header strong {
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3xl);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: flex;
    align-items: baseline;
    justify-content: center;
    margin-bottom: var(--space-md);
}

.stat-prefix {
    font-family: var(--font-primary);
    font-size: var(--font-size-h3);
    font-weight: 800;
    color: var(--color-primary);
}

.stat-value {
    font-family: var(--font-primary);
    font-size: var(--font-size-h1);
    font-weight: 800;
    color: white;
    line-height: 1;
}

.stat-label {
    font-family: var(--font-primary);
    font-size: var(--font-size-body);
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    margin-bottom: var(--space-md);
}

.stat-desc {
    font-size: var(--font-size-small);
    color: rgba(255, 255, 255, 0.6);
    line-height: var(--line-height-body);
    max-width: 300px;
    margin: 0 auto;
}

@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: var(--space-3xl);
    }
    
    .stat-desc {
        max-width: 100%;
    }
}


/* ============================================
   FORM SECTION - Diventa Rivenditore
   ============================================ */

.rivenditori-form-section {
    background: var(--color-primary);
    padding: var(--space-5xl) 0;
}

.rivenditori-form-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--space-4xl);
    align-items: start;
}

/* Colonna intro */
.rivenditori-form-intro {
    color: white;
    position: sticky;
    top: calc(var(--header-height) + var(--space-xl));
}

.rivenditori-badge {
    margin-bottom: var(--space-2xl);
}

.rivenditori-badge img {
    max-width: 120px;
    height: auto;
}

.rivenditori-form-intro h2 {
    color: white;
    margin-bottom: var(--space-md);
}

.rivenditori-form-intro > p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--space-2xl);
}

.rivenditori-requisiti h4 {
    font-size: var(--font-size-body);
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    margin-bottom: var(--space-md);
}

.rivenditori-requisiti ul {
    list-style: none;
    padding: 0;
}

.rivenditori-requisiti li {
    position: relative;
    padding-left: var(--space-lg);
    margin-bottom: var(--space-sm);
    color: rgba(255, 255, 255, 0.9);
}

.rivenditori-requisiti li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-success);
    font-weight: bold;
}

/* Container form */
.rivenditori-form-container {
    background: var(--color-cream);
    border-radius: var(--radius-lg);
    padding: var(--space-3xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* Form styles */
.rivenditori-form .form-row {
    margin-bottom: var(--space-lg);
}

.rivenditori-form .form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.rivenditori-form .form-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rivenditori-form label {
    font-family: var(--font-primary);
    font-size: var(--font-size-small);
    font-weight: 600;
    color: var(--color-secondary);
    text-transform: uppercase;
}

.rivenditori-form input,
.rivenditori-form textarea {
    font-family: var(--font-primary);
    font-size: var(--font-size-body);
    padding: var(--space-sm) 0;
    border: none;
    background: transparent;
    color: var(--color-secondary);
    background-image: radial-gradient(circle, rgba(38, 38, 38, 0.3) 1px, transparent 1px);
    background-size: 8px 4px;
    background-position: bottom left;
    background-repeat: repeat-x;
    resize: none;
    transition: background-image 0.3s ease;
}

.rivenditori-form input::placeholder,
.rivenditori-form textarea::placeholder {
    color: var(--color-secondary);
    opacity: 0.4;
}

.rivenditori-form input:focus,
.rivenditori-form textarea:focus {
    outline: none;
    background-image: radial-gradient(circle, rgba(38, 38, 38, 0.8) 1px, transparent 1px);
}

/* Checkboxes */
.form-checkboxes {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
}

.form-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.form-checkbox label {
    font-size: var(--font-size-small);
    font-weight: 400;
    text-transform: none;
    line-height: 1.4;
    cursor: pointer;
}

.form-checkbox label a {
    color: var(--color-primary);
    text-decoration: underline;
}

/* Submit */
.form-submit {
    margin-top: var(--space-xl);
}

/* Responsive */
@media (max-width: 992px) {
    .rivenditori-form-wrapper {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }
    
    .rivenditori-form-intro {
        position: static;
        text-align: center;
    }
    
    .rivenditori-badge {
        display: flex;
        justify-content: center;
    }
    
    .rivenditori-requisiti {
        text-align: left;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .rivenditori-form-container {
        padding: var(--space-2xl) var(--space-lg);
    }
}

@media (max-width: 576px) {
    .rivenditori-form .form-row-2 {
        grid-template-columns: 1fr;
    }
}



/* Stili per errori form */
.form-field.has-error input,
.form-field.has-error textarea {
    border-color: #D20A11;
    background-image: radial-gradient(circle, rgba(210, 10, 17, 0.5) 1px, transparent 1px);
}

.field-error {
    color: #D20A11;
    font-size: 12px;
    margin-top: 4px;
}

.form-field-checkbox {
    margin-top: var(--space-md);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    cursor: pointer;
    font-size: var(--font-size-small);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
}

.checkbox-label a {
    color: var(--color-primary);
    text-decoration: underline;
}



/* ============================================
   PAGE LIGHT BG - Override header
   ============================================ */

.page-rivenditori .site-header:not(.scrolled) .header-left {
    background-color: transparent;
}

.page-rivenditori .site-header:not(.scrolled) .menu-toggle span,
.page-rivenditori .site-header:not(.scrolled) .menu-line {
    background-color: var(--color-secondary) !important;
}

.page-rivenditori .site-header:not(.scrolled) .site-logo img {
    filter: none !important;
}

.page-rivenditori .site-header:not(.scrolled) .header-contact svg {
    stroke: var(--color-secondary) !important;
}



/* ============================================
   STACKING EFFECT - Sezioni che si sovrappongono
   ============================================ */


.page-rivenditori .rivenditori-stats,
.page-rivenditori .rivenditori-form-section {
    position: sticky;
    top: 0;
}

.page-rivenditori .rivenditori-stats {
    z-index: 30;
}

.page-rivenditori .rivenditori-form-section {
    z-index: 40;
}