/* CSS Personalizzato per RACCONTAMI */

:root {
    --primary-color: #42529b;
    --secondary-color: #f8f9fa;
    --accent-color: #cbda00;
    --text-dark: #343a40;
    --text-light: #6c757d;
}

body {
    font-family: "Gill Sans Nova", "Gill Sans", sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
}

/* Hero section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #42529b 100%);
    color: white;
    padding: 80px 0;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero .lead {
    font-size: 1.3rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    .hero .lead {
        font-size: 1.1rem;
    }
}

/* Sezioni */
.section {
    padding: 80px 0;
}

.section-alt {
    background-color: var(--secondary-color);
}

/* Card personalizzate */
.feature-card {
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
}

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

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), #42529b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
}

/* Processo step */
.process-step {
    position: relative;
    margin-bottom: 3rem;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

/*.step-line {
    position: absolute;
    left: 24px;
    top: 50px;
    width: 2px;
    height: calc(100% + 2rem);
    background: var(--primary-color);
    opacity: 0.3;
}*/

.process-step:last-child .step-line {
    display: none;
}

/* FAQ - Updated with accordion functionality */
.faq-item {
    border: 1px solid #dee2e6;
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.faq-header {
    background: white;
    border: none;
    padding: 1.5rem;
    width: 100%;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.faq-header:hover {
    background: var(--secondary-color);
}

.faq-header:focus {
    box-shadow: none;
    outline: none;
}

.faq-header.active {
    background: var(--primary-color);
    color: white;
}

.faq-header h5 {
    margin: 0;
    flex-grow: 1;
}

.faq-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    margin-left: 1rem;
}

.faq-header.active .faq-icon {
    transform: rotate(45deg);
}

.faq-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    padding: 0 1.5rem;
    color: var(--text-light);
}

.faq-body.active {
    max-height: 1000px;
    padding: 0 1.5rem 1.5rem;
}

.faq-body p, .faq-body ul {
    margin-bottom: 1rem;
}

.faq-body ul {
    padding-left: 1.5rem;
}

.faq-body li {
    margin-bottom: 0.5rem;
}

/* Search functionality for FAQ */
.search-container {
    margin-bottom: 2rem;
}

.highlight {
    background-color: #fff3cd !important;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Category headers for FAQ */
.category-header {
    margin: 3rem 0 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--primary-color);
}

.category-header:first-child {
    margin-top: 0;
}

/* Bottone primario con accent color giallo-verde */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-color), #d4e600);
    border: none;
    color: var(--text-dark);
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #b8c400, var(--accent-color));
    color: var(--text-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(203, 218, 0, 0.4);
}

.btn-primary:focus,
.btn-primary:active {
    background: linear-gradient(135deg, #b8c400, var(--accent-color));
    color: var(--text-dark);
    box-shadow: 0 0 0 0.2rem rgba(203, 218, 0, 0.5);
}

/* Bottone outline con accent color */
.btn-outline-light {
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    background: transparent;
    font-weight: 600;
    padding: 12px 30px;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background: var(--accent-color);
    color: var(--text-dark);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(203, 218, 0, 0.3);
}


/* Form di contatto */
.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.form-control {
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.25);
}

/* Animazioni */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .faq-header {
        padding: 1rem;
    }
    
    .faq-body.active {
        padding: 0 1rem 1rem;
    }
}

/* WhatsApp floating button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    color: white;
    border-radius: 50px;
    text-align: center;
    font-size: 24px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    color: white;
    transform: scale(1.1);
}

/* Loading animation */
.loading {
    display: none;
    text-align: center;
    padding: 2rem;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/*text highlight */
/* Override Bootstrap text-warning con accent color */
.text-warning {
    color: var(--accent-color) !important;
}

.text-warning:hover {
    color: #b8c400 !important; /* Versione più scura per hover */
}

/* Se usi anche link con text-warning */
a.text-warning {
    color: var(--accent-color) !important;
    text-decoration: none;
}

a.text-warning:hover {
    color: #b8c400 !important;
    text-decoration: underline;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-primary:hover {
    color: #3a4788 !important; /* Versione leggermente più scura per hover */
}

/* Alert personalizzati */
.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.contact-card {
    display: flex;
    flex-direction: column;
}

.contact-card .btn {
    margin-top: auto;
}


/* Active navigation link with blue background and white text */
.nav-link.active {
    color: white !important;
    background-color: var(--primary-color);
    border-radius: 25px;
    font-weight: 600;
    padding: 8px 16px !important;
}

/* Hover effect for non-active links */
.nav-link:not(.active):hover {
    color: var(--primary-color);
    background-color: var(--secondary-color);
    border-radius: 25px;
    transition: all 0.3s ease;
    padding: 8px 16px !important;
}

/* Ensure consistent padding for all nav links */
.nav-link {
    padding: 8px 16px !important;
    margin: 0 4px;
    transition: all 0.3s ease;
}

/* Box Offerta Fisso */
.promo-box-fixed {
    position: fixed;
    top: 120px;
    right: 20px;
    width: 280px;
    z-index: 999;
    animation: slideInRight 0.5s ease-out;
}

.promo-box-content {
    background: linear-gradient(135deg, var(--primary-color) 0%, #cbda00 100%);
    color: white;
    padding: 25px 20px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.promo-box-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
}

.promo-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    animation: pulse 2s infinite;
}

.promo-title {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 10px;
    line-height: 1.3;
}

.promo-text {
    font-size: 0.95rem;
    margin-bottom: 0;
    opacity: 0.95;
}

.promo-box-content .btn-light {
    background-color: white;
    color: var(--primary-color);
    font-weight: 600;
    border: none;
    padding: 8px 20px;
    transition: all 0.3s ease;
}

.promo-box-content .btn-light:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    transform: scale(1.05);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Responsive: versione mobile in fondo */
@media (max-width: 992px) {
    .promo-box-fixed {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 0;
        animation: slideInUp 0.5s ease-out;
    }
    
    .promo-box-content {
        border-radius: 15px 15px 0 0;
        padding: 15px 20px;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 10px;
        text-align: center;
    }
    
    .promo-box-content .promo-icon {
        font-size: 1.5rem;
        margin-bottom: 0;
        animation: none;
    }
    
    .promo-box-content .promo-title {
        font-size: 1rem;
        margin-bottom: 0;
        flex: 1;
        min-width: 200px;
    }
    
    .promo-box-content .promo-text {
        display: none;
    }
    
    .promo-box-content .btn {
        margin-top: 0;
    }
    
    .promo-box-close {
        top: 50%;
        transform: translateY(-50%);
        right: 10px;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.promo-box-content {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color) 0%, #cbda00 100%);
    color: white;
    padding: 25px 20px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.promo-box-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.3s ease;
    z-index: 1;
}