/* --- DESIGN SYSTEM (AXA Inspired) --- */
:root {
    /* Colors */
    --axa-blue: #00008f;
    --axa-red: #ff1821;
    --axa-red-hover: #d11218;
    --bg-color: #ffffff;
    --bg-light: #f5f5f5;
    --text-main: #333333;
    --text-muted: #666666;
    --wa-green: #25D366;
    /* WhatsApp brand */
    --wa-green-hover: #1da851;

    /* Typography */
    --font-family: 'Public Sans', system-ui, -apple-system, sans-serif;

    /* Spacing */
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- RESET & ACCESSIBILITY --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    color: var(--text-main);
    background-color: var(--bg-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Skip link for keyboard users */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--axa-blue);
    color: white;
    padding: 8px 16px;
    z-index: 1000;
    text-decoration: none;
    font-weight: 600;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 0;
}

/* Strict Focus States (Keyboard Nav) */
:focus-visible {
    outline: 3px solid var(--axa-blue);
    outline-offset: 4px;
}

/* --- UTILITIES --- */
.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.bg-light {
    background-color: var(--bg-light);
}

/* --- COMPONENTS --- */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-family: var(--font-family);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 4px;
    /* Slight rounding, not pill */
    border: 2px solid transparent;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.btn-primary {
    background-color: var(--axa-red);
    color: white;
}

.btn-primary:hover {
    background-color: var(--axa-red-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 24, 33, 0.2);
}

.btn-outline {
    background-color: transparent;
    color: var(--axa-blue);
    border-color: var(--axa-blue);
}

.btn-outline:hover {
    background-color: rgba(0, 0, 143, 0.05);
    transform: translateY(-2px);
}

.bg-green {
    background-color: var(--wa-green) !important;
}

.bg-green:hover {
    background-color: var(--wa-green-hover) !important;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2) !important;
}

/* Header */
.site-header {
    border-bottom: 1px solid #ebebeb;
    background: white;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--axa-blue);
}

.logo-mark {
    width: 32px;
    height: 32px;
    background-color: var(--axa-blue);
    position: relative;
    overflow: hidden;
}

.logo-mark::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 200%;
    height: 200%;
    background-color: var(--axa-red);
    transform: rotate(45deg) translate(20%, -50%);
}

.logo-text {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
}

/* Top Bar */
.top-bar {
    background-color: var(--bg-light);
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 8px 0;
    border-bottom: 1px solid #ebebeb;
}

.top-bar-inner {
    display: flex;
    justify-content: flex-end;
    gap: 24px;
}

.top-link {
    color: var(--text-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.top-link:hover {
    color: var(--axa-blue);
}

.top-link svg {
    width: 14px;
    height: 14px;
}

/* Logo Image */
.logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-family: var(--font-family);
    color: var(--text-main);
    text-decoration: none;
    transition: color var(--transition-fast);
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
}

.nav-title {
    font-size: 1.05rem;
    font-weight: 600;
}

.nav-desc {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-top: 4px;
}

.nav-link:hover .nav-title,
.nav-link:hover .nav-desc {
    color: var(--axa-blue);
}

/* Dropdown Menu (Prodotti) */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    color: var(--text-main);
    font-family: var(--font-family);
}

.dropdown-btn svg {
    margin-left: 6px;
    transition: transform 0.2s ease;
}

.dropdown:hover .dropdown-btn svg {
    transform: rotate(180deg);
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    min-width: 200px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    z-index: 100;
    padding: 12px 0;
    border: 1px solid #f0f0f0;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-item {
    color: var(--text-main);
    padding: 10px 24px;
    text-decoration: none;
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
}

.dropdown-item:hover {
    background-color: var(--bg-light);
    color: var(--axa-blue);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 8px;
    z-index: 101;
    /* Sopra al menu mobile */
}

.menu-toggle svg {
    width: 28px;
    height: 28px;
    transition: transform var(--transition-fast);
}

/* Hero Section */
.hero {
    position: relative;
    padding: calc(var(--space-xl) * 2) 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.75) 55%, rgba(255, 255, 255, 0) 100%), url('Kina%20Landing_4.png');
    background-size: cover;
    background-position: right 20%;
    background-repeat: no-repeat;
}

.hero-layout {
    display: block;
    max-width: 650px;
}

.hero-text {
    flex: 1;
}

.hero-title {
    color: var(--axa-blue);
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: var(--space-md);
    letter-spacing: -1.5px;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.25rem;
    margin-bottom: var(--space-lg);
    max-width: 480px;
}



/* Policies / Solutions Section */
.policies {
    padding: var(--space-xl) 0;
    background-color: var(--bg-color);
    /* Bianco per stacco dal light del contact */
}

.policies-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.policies-header h2 {
    color: var(--axa-blue);
    font-size: 2.5rem;
    margin-bottom: var(--space-sm);
}

.policies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.policy-card {
    background: white;
    padding: var(--space-lg);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.policy-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 143, 0.1);
    border-color: rgba(0, 0, 143, 0.1);
}

.policy-icon {
    width: 56px;
    height: 56px;
    background-color: rgba(0, 0, 143, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
    color: var(--axa-blue);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.policy-icon svg {
    width: 28px;
    height: 28px;
}

.policy-card:hover .policy-icon {
    background-color: var(--axa-blue);
    color: white;
}

.policy-card h3 {
    color: var(--axa-blue);
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
}

.policy-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: var(--space-md);
    line-height: 1.5;
}

.policy-desc em {
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
    color: #999;
}

.policy-features {
    list-style: none;
    margin-bottom: var(--space-lg);
    flex-grow: 1;
    /* Spinge il bottone in fondo */
}

.policy-features li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-main);
}

.policy-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--axa-red);
    font-weight: bold;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
    align-self: flex-start;
}

/* Review Promo Section */
.review-promo {
    padding: var(--space-xl) 0 var(--space-lg) 0;
}

.review-box {
    background: linear-gradient(135deg, rgba(66, 133, 244, 0.05) 0%, rgba(52, 168, 83, 0.05) 100%);
    border: 2px dashed rgba(66, 133, 244, 0.3);
    border-radius: 12px;
    padding: var(--space-xl);
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.review-content h2 {
    color: var(--text-main);
    font-size: 2rem;
    margin-bottom: var(--space-sm);
    letter-spacing: -0.5px;
}

.review-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.review-content strong {
    color: var(--axa-red);
}

.review-terms {
    font-size: 0.85rem !important;
    margin-top: 16px !important;
    opacity: 0.7;
}

/* Contact Section */
.contact {
    padding: var(--space-xl) 0;
}

.contact-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.contact-header h2 {
    color: var(--axa-blue);
    font-size: 2.5rem;
    margin-bottom: var(--space-sm);
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    max-width: 800px;
    margin: 0 auto;
}

.contact-card {
    background: white;
    padding: var(--space-lg);
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    transition: transform var(--transition-fast);
}

.contact-card:hover {
    transform: translateY(-5px);
}

.card-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--space-md);
    color: var(--axa-blue);
}

.card-icon.text-green {
    color: var(--wa-green);
}

.icon-svg {
    width: 100%;
    height: 100%;
}

.contact-card h3 {
    color: var(--axa-blue);
    margin-bottom: var(--space-sm);
    font-size: 1.25rem;
}

.contact-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: var(--space-lg);
    min-height: 44px;
}

/* Footer */
.site-footer {
    background-color: var(--axa-blue);
    color: white;
    padding: var(--space-lg) 0;
    font-size: 0.875rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links a {
    color: white;
    text-decoration: none;
    margin-left: var(--space-md);
    opacity: 0.8;
}

.footer-links a:hover {
    text-decoration: underline;
    opacity: 1;
}

/* --- ANIMATIONS (Intersection Observer) --- */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-smooth), transform var(--transition-smooth);
}

.fade-in {
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.delay-200 {
    transition-delay: 0.2s;
}

.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        top: 80px;
        /* Altezza header */
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        align-items: center;
        padding: var(--space-lg) 0;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        gap: 24px;

        /* Animazione comparsa */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all var(--transition-fast);
    }

    .main-nav.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* Adattamento Dropdown su Mobile */
    .dropdown {
        width: 100%;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .dropdown-btn {
        width: 100%;
        justify-content: center;
    }

    .dropdown-content {
        position: relative;
        left: 0;
        top: 0;
        transform: none;
        box-shadow: none;
        border: none;
        background-color: transparent;
        padding: 10px 0 0 0;
    }

    .dropdown-item {
        padding: 8px 24px;
        font-size: 1rem;
    }

    .hero {
        background-image: linear-gradient(rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.88)), url('Kina%20Landing_4.png');
        background-position: center 20%;
        padding: var(--space-xl) 0;
        min-height: 70vh;
    }

    .hero-layout {
        text-align: center;
        max-width: 100%;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        margin: 0 auto var(--space-lg);
    }

    .abstract-shape {
        width: 280px;
        height: 280px;
    }

    .footer-content {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
}