/* DSB Service Custom Styles */

/* ===== SCROLL SMOOTH ===== */
html {
    scroll-behavior: smooth;
}

/* ===== HERO LOGO ===== */
.hero-logo {
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
    transition: transform 0.3s ease;
    margin-bottom: 25px;
}

.hero-logo:hover {
    transform: scale(1.05);
}

/* Responsive per hero logo */
@media (max-width: 768px) {
    .hero-logo {
        max-width: 250px !important;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .hero-logo {
        max-width: 200px !important;
        margin-bottom: 15px;
    }
}

/* ===== HEADER PERSONALIZZATO DSB ===== */

/* Header fisso */
#header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1030 !important;
    width: 100% !important;
}

/* Compensazione per header fisso */
.main {
    padding-top: 120px;
}

@media (max-width: 991px) {
    .main {
        padding-top: 100px;
    }
}

/* Header con sfondo bianco */
#header .header-body {
    background-color: white !important;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Logo DSB */
.dsb-logo {
    transition: all 0.4s ease;
    max-height: 65px !important;
    height: 65px !important;
}

.dsb-logo:hover {
    transform: scale(1.05);
}

/* Logo più piccolo quando header è sticky */
#header.header-effect-shrink-active .dsb-logo {
    max-height: 45px !important;
    height: 45px !important;
}

/* Link di navigazione DSB */
#header .header-nav-main nav > ul > li > a {
    color: var(--dsb-dark) !important;
    font-family: var(--dsb-font-headings) !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    font-size: 0.9rem !important;
}

#header .header-nav-main nav > ul > li > a:hover,
#header .header-nav-main nav > ul > li > a.active {
    color: var(--dsb-red) !important;
}

/* Header sticky effect */
#header.header-effect-shrink-active .header-body {
    background-color: white !important;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1) !important;
    padding: 10px 0 !important;
}

/* Altezza header normale */
#header .header-body {
    padding: 15px 0;
    transition: all 0.4s ease;
}

/* ===== CONTATTI DSB ===== */

.dsb-contact-item {
    padding: 2rem 1rem;
    transition: transform 0.3s ease;
    border-radius: 8px;
}

.dsb-contact-item:hover {
    transform: translateY(-5px);
    background-color: rgba(214, 62, 45, 0.05);
}

.dsb-contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--dsb-red), #ff4757);
    border-radius: 50%;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(214, 62, 45, 0.3);
}

.dsb-contact-icon i {
    font-size: 2rem;
    color: white;
}

.dsb-contact-item h4 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.dsb-contact-item .dsb-text {
    margin-bottom: 0;
}

/* ===== TITOLI PERSONALIZZATI DSB SERVICE ===== */

/* Font personalizzati DSB */
:root {
    --dsb-font-headings: "Oswald", sans-serif;
    --dsb-font-body: "Lato", Arial, sans-serif;
    --dsb-red: #D63E2D;
    --dsb-dark: #191919;
    --dsb-text: #696969;
}

/* Stile titoli DSB - ispirati al sito DSB Assistance */
.dsb-title {
    font-family: var(--dsb-font-headings) !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: var(--dsb-dark) !important;
    position: relative;
    margin-bottom: 2rem;
}

/* Punto rosso dopo il titolo */
.dsb-title::after {
    content: '•';
    color: var(--dsb-red);
    font-size: 1.2em;
    margin-left: 0.3em;
    font-weight: bold;
}

/* Titolo speciale per hero section */
.hero-section .dsb-title {
    color: white !important;
}

.hero-section .dsb-title::after {
    color: var(--dsb-red);
    text-shadow: 0 0 10px rgba(214, 62, 45, 0.8);
    animation: pulse-red 2s infinite;
}

/* Animazione per il punto rosso nel hero */
@keyframes pulse-red {
    0% {
        text-shadow: 0 0 5px rgba(214, 62, 45, 0.5);
    }
    50% {
        text-shadow: 0 0 20px rgba(214, 62, 45, 1), 0 0 30px rgba(214, 62, 45, 0.8);
    }
    100% {
        text-shadow: 0 0 5px rgba(214, 62, 45, 0.5);
    }
}

/* Varianti dei titoli DSB */
.dsb-title-h1 {
    font-size: 2.5rem !important;
    line-height: 1.2 !important;
    margin-bottom: 2.5rem;
}

.dsb-title-h2 {
    font-size: 2rem !important;
    line-height: 1.3 !important;
    margin-bottom: 2rem;
}

.dsb-title-h3 {
    font-size: 1.5rem !important;
    line-height: 1.4 !important;
    margin-bottom: 1.5rem;
}

.dsb-title-h4 {
    font-size: 1.25rem !important;
    line-height: 1.4 !important;
    margin-bottom: 1rem;
}

.dsb-title-h5 {
    font-size: 1.1rem !important;
    line-height: 1.4 !important;
    margin-bottom: 0.8rem;
}

/* Sottotitolo DSB */
.dsb-subtitle {
    font-family: var(--dsb-font-body) !important;
    font-size: 1.1rem;
    color: var(--dsb-text);
    margin-bottom: 2rem;
    line-height: 1.6;
    font-weight: 400;
}

/* Titolo sezione con linea */
.dsb-section-title {
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.dsb-section-title::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--dsb-red);
}

/* Responsive per titoli DSB */
@media (max-width: 768px) {
    .dsb-title-h1 {
        font-size: 2rem !important;
    }
    
    .dsb-title-h2 {
        font-size: 1.7rem !important;
    }
    
    .dsb-title-h3 {
        font-size: 1.3rem !important;
    }
    
    .dsb-contact-icon {
        width: 60px;
        height: 60px;
    }
    
    .dsb-contact-icon i {
        font-size: 1.5rem;
    }
}

/* Menu mobile fixes */
@media (max-width: 991px) {
    /* Fix per menu mobile collapse */
    #header .header-nav-main nav {
        background-color: white !important;
        border-top: 1px solid rgba(0,0,0,0.1);
        margin-top: 10px;
        border-radius: 5px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
    
    #header .header-nav-main nav ul {
        padding: 10px 0;
        flex-direction: column !important;
    }
    
    #header .header-nav-main nav ul li {
        width: 100%;
        margin: 0 !important;
    }
    
    #header .header-nav-main nav ul li .nav-link {
        padding: 12px 20px !important;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        color: var(--dsb-dark) !important;
        text-align: left;
        width: 100%;
        border-radius: 0 !important;
        transition: all 0.3s ease;
        display: block;
    }
    
    #header .header-nav-main nav ul li:last-child .nav-link {
        border-bottom: none;
    }
    
    #header .header-nav-main nav ul li .nav-link:hover,
    #header .header-nav-main nav ul li .nav-link.active {
        background-color: rgba(214, 62, 45, 0.1) !important;
        color: var(--dsb-red) !important;
    }
    
    /* Bottone hamburger styling */
    .header-btn-collapse-nav {
        background-color: transparent !important;
        border: 2px solid var(--dsb-red) !important;
        color: var(--dsb-red) !important;
        border-radius: 5px;
        padding: 8px 12px;
        transition: all 0.3s ease;
        position: relative;
        z-index: 1;
    }
    
    .header-btn-collapse-nav:hover,
    .header-btn-collapse-nav:focus,
    .header-btn-collapse-nav:active {
        background-color: var(--dsb-red) !important;
        color: white !important;
        border-color: var(--dsb-red) !important;
        box-shadow: none !important;
    }
    
    .header-btn-collapse-nav i {
        font-size: 1.2rem;
    }
    
    /* Assicura che il collapse funzioni correttamente */
    #header .header-nav-main nav.collapse {
        transition: all 0.35s ease;
    }
    
    #header .header-nav-main nav.collapse:not(.show) {
        display: none;
    }
    
    #header .header-nav-main nav.collapse.show {
        display: block;
    }
}

@media (max-width: 480px) {
    .dsb-title-h1 {
        font-size: 1.8rem !important;
    }
    
    .dsb-title-h2 {
        font-size: 1.5rem !important;
    }
    
    .dsb-title::after {
        font-size: 1em;
        margin-left: 0.2em;
    }
    
    .dsb-contact-item {
        padding: 1.5rem 0.5rem;
    }
}

/* ===== OVERRIDE DEI TITOLI ESISTENTI ===== */

/* Applica lo stile DSB ai titoli h1-h6 se hanno la classe dsb */
h1.dsb, h2.dsb, h3.dsb, h4.dsb, h5.dsb, h6.dsb {
    font-family: var(--dsb-font-headings) !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: var(--dsb-dark) !important;
    position: relative;
}

h1.dsb::after, h2.dsb::after, h3.dsb::after, 
h4.dsb::after, h5.dsb::after, h6.dsb::after {
    content: '•';
    color: var(--dsb-red);
    font-size: 1.2em;
    margin-left: 0.3em;
    font-weight: bold;
}

/* ===== STILI AGGIUNTIVI DSB ===== */

/* Testo principale DSB */
.dsb-text {
    font-family: var(--dsb-font-body) !important;
    color: var(--dsb-text);
    line-height: 1.7;
    font-size: 1rem;
}

/* Link DSB */
.dsb-link {
    color: var(--dsb-red);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.dsb-link:hover {
    color: #b8342a;
    text-decoration: underline;
}

/* Button DSB style */
.btn-dsb {
    background-color: var(--dsb-red);
    border-color: var(--dsb-red);
    color: white;
    font-family: var(--dsb-font-headings);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 24px;
    border-radius: 0;
    transition: all 0.3s ease;
}

.btn-dsb:hover {
    background-color: #b8342a;
    border-color: #b8342a;
    color: white;
    transform: translateY(-2px);
}

/* Quote DSB */
.dsb-quote {
    border-left: 4px solid var(--dsb-red);
    padding-left: 1.5rem;
    font-style: italic;
    color: var(--dsb-text);
    margin: 2rem 0;
}

/* Card DSB */
.dsb-card {
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 0;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.dsb-card:hover {
    transform: translateY(-5px);
}

.dsb-card .card-header {
    background-color: var(--dsb-red);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
}

.dsb-card .card-body {
    padding: 1.5rem;
}

/* ===== COOKIE CONSENT BANNER ===== */

.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--dsb-dark) 0%, var(--dsb-red) 100%);
    color: white;
    padding: 20px;
    z-index: 1040;
    transform: translateY(100%);
    transition: transform 0.5s ease;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.3);
}

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

.cookie-consent-banner .row {
    align-items: center;
}

.cookie-consent-banner p {
    margin-bottom: 0;
    font-size: 14px;
    line-height: 1.5;
}

.cookie-consent-banner .btn {
    margin: 5px;
    min-width: 100px;
    font-weight: 500;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.cookie-consent-banner .btn-success {
    background-color: #28a745;
    border-color: #28a745;
}

.cookie-consent-banner .btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
    transform: translateY(-2px);
}

.cookie-consent-banner .btn-outline-light {
    border-color: rgba(255,255,255,0.7);
    color: rgba(255,255,255,0.9);
}

.cookie-consent-banner .btn-outline-light:hover {
    background-color: rgba(255,255,255,0.1);
    border-color: white;
    color: white;
    transform: translateY(-2px);
}

.cookie-consent-banner .btn-link {
    color: rgba(255,255,255,0.8);
    text-decoration: underline;
}

.cookie-consent-banner .btn-link:hover {
    color: white;
    text-decoration: none;
}

/* Styling per scelta precedente */
.cookie-consent-banner .btn-previously-selected {
    position: relative;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.4) !important;
    animation: previousChoicePulse 2s ease-in-out;
}

.cookie-consent-banner .btn-previously-selected::before {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -8px;
    background: rgba(255,255,255,0.9);
    color: var(--dsb-red);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    animation: previousChoiceCheck 0.5s ease-in-out 0.3s both;
    transform: scale(0);
}

.cookie-consent-banner .btn-previously-selected.btn-success::before {
    background: rgba(40,167,69,0.95);
    color: white;
}

.cookie-consent-banner .btn-previously-selected.btn-outline-light::before {
    background: rgba(255,255,255,0.95);
    color: var(--dsb-red);
}

@keyframes previousChoicePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255,255,255,0.4);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(255,255,255,0.2);
    }
    100% {
        box-shadow: 0 0 0 2px rgba(255,255,255,0.4);
    }
}

@keyframes previousChoiceCheck {
    0% {
        transform: scale(0) rotate(-45deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Responsive cookie banner */
@media (max-width: 768px) {
    .cookie-consent-banner {
        padding: 15px;
    }
    
    .cookie-consent-banner p {
        font-size: 13px;
        margin-bottom: 15px;
    }
    
    .cookie-consent-banner .btn {
        width: 100%;
        margin: 5px 0;
        min-width: auto;
    }
    
    /* Adatta il check mark per mobile */
    .cookie-consent-banner .btn-previously-selected::before {
        top: -6px;
        right: -6px;
        width: 18px;
        height: 18px;
        font-size: 11px;
    }
}

/* ===== MODALI PRIVACY E COOKIE ===== */

.modal-header {
    background: linear-gradient(135deg, var(--dsb-dark) 0%, var(--dsb-red) 100%);
    color: white;
    border-bottom: none;
}

.modal-header .btn-close {
    filter: invert(1);
}

.modal-title {
    font-family: var(--dsb-font-headings);
    font-weight: 600;
}

.modal-body {
    padding: 30px;
    line-height: 1.7;
}

.modal-body h6 {
    color: var(--dsb-red);
    font-family: var(--dsb-font-headings);
    font-weight: 600;
    margin-top: 25px;
    margin-bottom: 15px;
}

.modal-body p {
    color: var(--dsb-text);
    margin-bottom: 15px;
}

.modal-body ul {
    color: var(--dsb-text);
    padding-left: 20px;
}

.modal-body ul li {
    margin-bottom: 8px;
}

/* ===== FINE CONFIGURAZIONE DSB SERVICE ===== */