/* Custom CSS per TrovoVenditori */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --dark-color: #212529;
    --light-color: #f8f9fa;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Navbar */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    min-height: 400px;
    display: flex;
    align-items: center;
}

/* Cards */
.hover-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

.card {
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
}

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

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

/* Footer */
footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: #fff !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding: 3rem 0 !important;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1rem;
    }
}

/* Utility classes */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Form styles */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* List group custom */
.list-group-item {
    background-color: transparent;
}

/* Spacing utilities */
.section-padding {
    padding: 4rem 0;
}

@media (max-width: 768px) {
    .section-padding {
        padding: 2rem 0;
    }
}

/* ============================================
   LAYOUT CON SIDEBAR PUBBLICITARIE
   ============================================ */

/* Container principale con sidebar */
.layout-with-sidebars {
    display: flex;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    overflow-x: hidden; /* Previene scroll orizzontale */
}

/* Contenuto principale */
.main-content-with-sidebars {
    flex: 1;
    min-width: 0; /* Previene overflow */
    width: 100%;
}

/* Sidebar laterali - solo desktop */
@media (min-width: 1200px) {
    .sidebar-left,
    .sidebar-right {
        width: 160px;
        flex-shrink: 0;
        position: relative;
        background-color: #001f3f; /* Blu navy */
        min-height: 100vh; /* Altezza minima schermo intero */
    }
    
    .sidebar-left {
        margin-right: 15px;
        margin-left: 10px;
    }
    
    .sidebar-right {
        margin-left: 15px;
        margin-right: 10px;
    }
    
    /* Contenuto sticky delle sidebar */
    .sidebar-ads-content {
        position: sticky;
        top: 80px; /* Spazio per navbar fissa */
        padding-top: 20px;
        padding-bottom: 20px;
    }
}

/* Contenitore principale più stretto per lasciare spazio alle sidebar */
@media (min-width: 1200px) {
    .layout-with-sidebars {
        max-width: 1400px;
        margin: 0 auto;
    }
    
    .main-content-with-sidebars .container {
        max-width: 800px;
    }
}

@media (min-width: 1600px) {
    .layout-with-sidebars {
        max-width: 1600px;
    }
    
    .sidebar-left,
    .sidebar-right {
        width: 180px;
        background-color: #001f3f; /* Blu navy */
        min-height: 100vh; /* Altezza minima schermo intero */
    }
    
    .main-content-with-sidebars .container {
        max-width: 1000px;
    }
}

/* Stili per i banner pubblicitari */
.ad-block {
    background: transparent; /* Sfondo trasparente per mostrare il blu navy della sidebar */
    border: none;
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.ad-block:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.ad-banner {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.ad-label {
    padding: 4px 8px;
    background: rgba(0, 31, 63, 0.8); /* Blu navy leggermente trasparente */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ad-label small {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffffff; /* Testo bianco per contrasto */
}

/* Placeholder pubblicitario */
.ad-placeholder {
    border-radius: 4px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ad-placeholder i {
    opacity: 0.3;
}

/* Responsive: nascondi sidebar su tablet e mobile */
@media (max-width: 1199px) {
    .layout-with-sidebars {
        flex-direction: column;
    }
    
    .sidebar-left,
    .sidebar-right {
        display: none !important;
    }
    
    .main-content-with-sidebars {
        width: 100%;
    }
}

/* Ottimizzazione per schermi molto larghi */
@media (min-width: 1600px) {
    .sidebar-left,
    .sidebar-right {
        width: 200px;
    }
    
    .sidebar-left {
        margin-left: 20px;
    }
    
    .sidebar-right {
        margin-right: 20px;
    }
}
