/* ========================================
   RESET E VARIABLES
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #2c3e50;
    color: #fff;
    padding: 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    animation: slideUp 0.4s ease-out;
}

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

.cookie-banner.hidden {
    display: none;
}

.cookie-content {
    max-width: 1200px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.cookie-text {
    flex: 1;
}

.cookie-text p {
    margin: 0;
    line-height: 1.5;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.cookie-link {
    color: #fff;
    text-decoration: underline;
    font-size: 12px;
    white-space: nowrap;
}

.cookie-link:hover {
    color: #f39c12;
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cookie-buttons {
        justify-content: center;
    }
    
    .cookie-banner {
        padding: 15px;
        font-size: 13px;
    }
}

:root {
    --primary-color: #1e5a96;
    --secondary-color: #27ae60;
    --accent-color: #f39c12;
    --text-dark: #2c3e50;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --success-color: #27ae60;
    --warning-color: #e74c3c;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
}

/* ========================================
   CONTAINER E LAYOUT BASE
   ======================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

/* ========================================
   HEADER E NAVBAR
   ======================================== */

.header {
    background-color: var(--bg-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    padding: 15px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.3rem;
    color: var(--primary-color);
    font-weight: bold;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
    background: linear-gradient(135deg, #f8f9fa 0%, #e8f4f8 100%);
    padding: 80px 20px;
    text-align: center;
}

.hero-title {
    font-size: 2.5rem;
    line-height: 1.2;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-light);
    margin-bottom: 40px;
    font-weight: 400;
}

.benefits-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 40px 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.05rem;
    padding: 12px 15px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
}

.benefit-icon {
    font-size: 1.3rem;
    color: var(--success-color);
    flex-shrink: 0;
}

.cta-section {
    margin-top: 50px;
}

.cta-subtext {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-top: 15px;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    display: inline-block;
    padding: 14px 40px;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #154273;
    box-shadow: 0 4px 12px rgba(30, 90, 150, 0.3);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
    margin-left: 15px;
}

.btn-secondary:hover {
    background-color: #229954;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
    transform: translateY(-2px);
}

.btn-large {
    padding: 16px 50px;
    font-size: 1.1rem;
}

/* ========================================
   SEZIONI GENERICHE
   ======================================== */

section {
    padding: 80px 20px;
}

section h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 700;
}

.intro-text {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 40px;
    line-height: 1.8;
}

/* ========================================
   SEZIONE: PERCHÉ I PREMI AUMENTANO
   ======================================== */

.section-premium {
    background-color: var(--bg-light);
}

.reasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.reason-card {
    background-color: var(--bg-white);
    padding: 30px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.reason-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.reason-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

.reason-card h3 {
    color: var(--text-dark);
    margin-bottom: 12px;
    font-size: 1.2rem;
    font-weight: 600;
}

.reason-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.7;
}

.alert-box {
    background-color: #fff3cd;
    border-left: 4px solid var(--accent-color);
    padding: 20px;
    border-radius: 6px;
    margin-top: 40px;
    color: #856404;
    font-size: 1rem;
    line-height: 1.7;
}

/* ========================================
   SEZIONE: COME FUNZIONANO GLI STRUMENTI
   ======================================== */

.section-comparison {
    background-color: var(--bg-white);
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.step {
    display: flex;
    gap: 20px;
}

.step-number {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.step-content h3 {
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 1.1rem;
    font-weight: 600;
}

.step-content p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

.time-highlight {
    background-color: #e8f4f8;
    border-left: 4px solid var(--primary-color);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
}

.time-highlight h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.time-highlight p {
    color: var(--text-light);
    font-size: 1rem;
}

/* ========================================
   SEZIONE: ESEMPI DI RISPARMIO
   ======================================== */

.section-savings {
    background-color: var(--bg-light);
}

.table-wrapper {
    overflow-x: auto;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.savings-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-white);
}

.savings-table thead {
    background-color: var(--primary-color);
    color: white;
}

.savings-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
}

.savings-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
}

.savings-table tbody tr:hover {
    background-color: #f8f9fa;
}

.savings-table strong {
    color: var(--secondary-color);
    font-weight: 700;
}

.savings-note {
    background-color: #e8f8f5;
    border-left: 4px solid var(--secondary-color);
    padding: 15px 20px;
    border-radius: 6px;
    color: #186a3b;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ========================================
   SEZIONE: FATTORI CHE INFLUENZANO
   ======================================== */

.section-factors {
    background-color: var(--bg-white);
}

.factors-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.factor-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background-color: var(--bg-light);
    border-radius: 8px;
    transition: box-shadow 0.3s ease;
}

.factor-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.factor-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.factor-content h3 {
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 1.05rem;
    font-weight: 600;
}

.factor-content p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ========================================
   SEZIONE: VANTAGGI DEL CONFRONTO
   ======================================== */

.section-advantages {
    background-color: var(--bg-light);
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.advantage-card {
    background-color: var(--bg-white);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.advantage-card:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.advantage-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

.advantage-card h3 {
    color: var(--text-dark);
    margin-bottom: 12px;
    font-size: 1.1rem;
    font-weight: 600;
}

.advantage-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ========================================
   SEZIONE: FAQ
   ======================================== */

.section-faq {
    background-color: var(--bg-white);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: color 0.3s ease;
    user-select: none;
}

.faq-question:hover {
    color: var(--primary-color);
}

.faq-question h3 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin: 0;
    flex-grow: 1;
    font-weight: 600;
}

.faq-toggle {
    font-size: 1.8rem;
    color: var(--primary-color);
    font-weight: 300;
    margin-right: 15px;
    transition: transform 0.3s ease;
    min-width: 30px;
}

.faq-answer {
    display: none;
    margin-top: 15px;
    padding-left: 45px;
    color: var(--text-light);
    line-height: 1.8;
    font-size: 0.95rem;
}

.faq-answer.active {
    display: block;
}

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

/* ========================================
   SEZIONE: CTA FINALE
   ======================================== */

.section-final-cta {
    background: linear-gradient(135deg, #1e5a96 0%, #154273 100%);
    color: white;
    text-align: center;
    padding: 80px 20px;
}

.section-final-cta h2 {
    color: white;
    margin-bottom: 20px;
}

.final-message {
    font-size: 1.15rem;
    margin-bottom: 40px;
    line-height: 1.8;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.final-cta-buttons {
    margin-bottom: 30px;
}

.final-cta-buttons .btn {
    margin: 10px;
}

.final-cta-buttons .btn-primary {
    background-color: white;
    color: var(--primary-color);
}

.final-cta-buttons .btn-primary:hover {
    background-color: #f0f0f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.final-cta-buttons .btn-secondary {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

.final-cta-buttons .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.trust-text {
    font-size: 0.95rem;
    margin: 30px 0;
    opacity: 0.95;
}

.guarantee-box {
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 30px;
    border-radius: 8px;
    margin-top: 40px;
}

.guarantee-box h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.guarantee-box ul {
    list-style: none;
    color: white;
    font-size: 0.95rem;
}

.guarantee-box li {
    padding: 8px 0;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    background-color: #2c3e50;
    color: white;
    padding: 50px 20px 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 40px;
}

.footer-section h4 {
    color: white;
    margin-bottom: 15px;
    font-size: 1rem;
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    padding: 6px 0;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.footer-section p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
}

.footer-bottom {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    line-height: 1.7;
}

.footer-bottom p {
    margin: 10px 0;
}

/* ========================================
   MODAL STYLES
   ======================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.modal-overlay {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: block;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: slideIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content {
    background-color: var(--bg-white);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    background-color: var(--primary-color);
    color: white;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
    color: white;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.modal-close:hover {
    transform: scale(1.2);
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.modal-body h3 {
    color: var(--primary-color);
    margin-top: 25px;
    margin-bottom: 12px;
    font-size: 1.2rem;
    font-weight: 600;
}

.modal-body h3:first-child {
    margin-top: 0;
}

.modal-body p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.modal-body ul {
    list-style-position: inside;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 15px;
    padding-left: 15px;
}

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

.modal-body a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.modal-body a:hover {
    text-decoration: underline;
    color: var(--secondary-color);
}

/* Contact Form Styles */
.contact-form {
    margin-top: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: var(--text-dark);
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 90, 150, 0.1);
}

.form-group textarea {
    resize: vertical;
    font-family: var(--font-sans);
}

/* Scrollbar styling */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: var(--bg-light);
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #154273;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    section h2 {
        font-size: 1.6rem;
    }

    .nav-links {
        gap: 15px;
        font-size: 0.9rem;
    }

    .reasons-grid,
    .advantages-grid,
    .factors-list {
        grid-template-columns: 1fr;
    }

    .steps-container {
        grid-template-columns: 1fr;
    }

    .final-cta-buttons {
        display: flex;
        flex-direction: column;
    }

    .final-cta-buttons .btn {
        width: 100%;
        margin: 10px 0;
    }

    .final-cta-buttons .btn-secondary {
        margin-left: 0;
    }

    .benefits-list {
        max-width: 100%;
    }

    section {
        padding: 50px 20px;
    }

    .savings-table {
        font-size: 0.85rem;
    }

    .savings-table th,
    .savings-table td {
        padding: 10px;
    }

    .modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .modal-header {
        padding: 20px;
    }

    .modal-header h2 {
        font-size: 1.4rem;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-body h3 {
        font-size: 1.05rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 50px 20px;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .btn {
        padding: 12px 25px;
        font-size: 0.9rem;
    }

    .btn-large {
        padding: 14px 30px;
        font-size: 1rem;
    }

    section {
        padding: 40px 15px;
    }

    section h2 {
        font-size: 1.4rem;
    }

    .intro-text {
        font-size: 1rem;
    }

    .navbar .container {
        flex-direction: column;
        gap: 15px;
    }

    .nav-links {
        flex-direction: column;
        gap: 10px;
    }

    .benefit-item {
        font-size: 0.95rem;
    }

    .reason-card,
    .advantage-card {
        padding: 20px;
    }

    .step {
        flex-direction: column;
        align-items: flex-start;
    }
}
