/* Jolen Group - Premium BPO Design System */
:root {
    /* New Premium Palette: White background, Cobalt Blue, Turquoise */
    --jolen-cobalt: #002D72; /* Deep Corporate Cobalt */
    --jolen-cobalt-light: #0047AB; 
    --jolen-turquoise: #00CED1; /* Vibrant Turquoise */
    --jolen-turquoise-glow: rgba(0, 206, 209, 0.4);
    
    --jolen-navy: #001A44; /* Darker navy for intense contrast */
    --jolen-dark: #0A0A0B;
    
    --jolen-light: #F4F7F9; /* Very light cool grey/blue for section contrast */
    --jolen-white: #FFFFFF;
    
    --text-primary: #1E293B;
    --text-muted: #475569;
    --text-footer: #94A3B8;
    
    /* For glassmorphism over white/light backgrounds, we need a light glass */
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(0, 45, 114, 0.1);
    
    /* For dark headers over video */
    --glass-dark-bg: rgba(0, 26, 68, 0.85);

    --gradient-primary: linear-gradient(135deg, #002D72 0%, #0047AB 100%);
    --gradient-accent: linear-gradient(135deg, #00CED1 0%, #008B8B 100%);
    --gradient-dark: linear-gradient(135deg, #001A44 0%, #002D72 100%);
    
    --shadow-premium: 0 20px 40px -10px rgba(0, 45, 114, 0.1);
    --transition-premium: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
    width: 100%;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    color: var(--text-primary);
    background-color: var(--jolen-white);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
    box-sizing: border-box;
}

/* Header & Glass Nav */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 10px 0;
    transition: var(--transition-premium);
}

.header.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    padding: 12px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border-bottom: 1px solid var(--glass-border);
}

.nav-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-width: 0;
}

/* Logo styling for the uploaded image */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}
.logo img {
    height: 100px; /* Adjust based on actual logo proportion */
    width: auto;
    max-width: 200px;
    object-fit: contain;
}
/* When header is initially over a dark video, we might need a white logo. 
   If the logo is black text, we invert it over the video, but remove invert when scrolled. */
.header:not(.scrolled) .logo img.invert-on-dark {
    filter: brightness(0) invert(1);
}
.logo:hover { transform: scale(1.05); }

.main-nav { display: flex; list-style: none; gap: 30px; margin: 0; }
.main-nav a {
    text-decoration: none;
    font-weight: 700;
    color: var(--jolen-white);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s ease;
}

/* When header is scrolled, text becomes dark cobalt */
.header.scrolled .main-nav a {
    color: var(--jolen-cobalt);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--jolen-turquoise);
    transition: width 0.3s ease;
}

.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }

.btn-area {
    background: var(--jolen-cobalt);
    color: var(--jolen-white) !important;
    padding: 16px 36px;
    border-radius: 4px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(0, 45, 114, 0.2);
    transition: var(--transition-premium);
    display: inline-block;
    border: none;
    cursor: pointer;
}

.btn-area:hover { 
    transform: translateY(-3px); 
    background: var(--jolen-cobalt-light);
    box-shadow: 0 15px 30px rgba(0, 45, 114, 0.3); 
}

.btn-outline {
    background: transparent;
    color: var(--jolen-white) !important;
    border: 2px solid var(--jolen-turquoise);
    box-shadow: none;
}
.btn-outline:hover {
    background: var(--jolen-turquoise);
    color: var(--jolen-navy) !important;
}

/* Hero Section */
.hero-v3 {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--jolen-navy); 
    overflow: hidden;
}

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.5) contrast(1.1);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Gradient overlay: dark cobalt to transparent */
    background: linear-gradient(135deg, rgba(0, 26, 68, 0.8) 0%, rgba(0, 45, 114, 0.4) 100%);
    z-index: 2;
}

/* Sub-page Hero */
.hero-sub {
    position: relative;
    padding: 200px 0 120px;
    background: var(--gradient-primary);
    color: white;
    overflow: hidden;
}

.hero-sub .hero-video {
    opacity: 0.2;
}

.hero-content {
    position: relative;
    z-index: 10;
    color: white;
    max-width: 900px;
}

.hero-v3 h1 {
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 30px;
    letter-spacing: -2px;
}

.hero-sub h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
}

.text-gradient {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-v3 p { font-size: 1.4rem; opacity: 0.9; margin-bottom: 50px; font-weight: 400; line-height: 1.7; }

/* Sections */
.section { padding: 120px 0; }
.section-dark { background: var(--gradient-dark); color: white; }
.section-light { background: var(--jolen-light); }
.section-white { background: var(--jolen-white); }

.section-tag {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(0, 206, 209, 0.1);
    color: var(--jolen-turquoise);
    border-radius: 4px;
    font-weight: 800;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 25px;
    border: 1px solid rgba(0, 206, 209, 0.3);
}

.section-title {
    font-size: 3.5rem;
    letter-spacing: -1px;
    color: var(--jolen-cobalt);
    margin-bottom: 30px;
    line-height: 1.2;
}
.section-dark .section-title { color: white; }

/* Grids */
.grid-reveal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.card-v3 {
    background: var(--jolen-white);
    padding: 50px;
    border-radius: 4px;
    box-shadow: var(--shadow-premium);
    border: 1px solid rgba(0, 45, 114, 0.05);
    transition: var(--transition-premium);
    position: relative;
    overflow: hidden;
    color: var(--text-primary);
}

.card-v3:hover { transform: translateY(-10px); box-shadow: 0 25px 50px -12px rgba(0, 45, 114, 0.15); }
.card-v3::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--jolen-turquoise);
    transition: height 0.3s;
}
.card-v3:hover::before { height: 8px; }

.icon-v3 {
    width: 70px;
    height: 70px;
    background: var(--jolen-light);
    color: var(--jolen-cobalt);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 30px;
    transition: var(--transition-premium);
}
.card-v3:hover .icon-v3 { background: var(--jolen-cobalt); color: var(--jolen-white); transform: scale(1.1) rotate(5deg); }

.card-v3 h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--jolen-cobalt);
    font-weight: 800;
}

/* Dark Cards for dark sections */
.section-dark .card-v3 {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
}
.section-dark .card-v3 h3 { color: white; }
.section-dark .icon-v3 { background: rgba(0, 206, 209, 0.1); color: var(--jolen-turquoise); }
.section-dark .card-v3:hover .icon-v3 { background: var(--jolen-turquoise); color: var(--jolen-navy); }

/* Dual Column */
.dual-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

/* Care Box / Info Box */
.care-box {
    background: var(--gradient-primary);
    color: white;
    padding: 80px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
}

.care-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0,206,209,0.15) 0%, transparent 70%);
}

.care-number {
    font-size: 4rem;
    font-weight: 900;
    color: white;
    margin: 20px 0;
    display: block;
    letter-spacing: 2px;
}

/* Footer Grid */
.legal-footer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 60px;
}
.footer-v3 { background: var(--jolen-navy); padding: 100px 0 50px; color: var(--text-footer); }
.footer-v3 h4 { color: white; margin-bottom: 30px; font-size: 1rem; letter-spacing: 2px; text-transform: uppercase; font-weight: 800; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 12px; }
.footer-links li a { color: var(--text-footer); text-decoration: none; transition: 0.3s; font-size: 14px; }
.footer-links li a:hover { color: var(--jolen-turquoise); padding-left: 5px; }

/* Reveal Animations */
.reveal { opacity: 0; transform: translateY(40px); transition: 1s cubic-bezier(0.165, 0.84, 0.44, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* Overflow Guards */
section, footer, header, .hero-v3, .hero-sub, .section { max-width: 100%; overflow-x: hidden; }
img, video, iframe, embed, object { max-width: 100%; height: auto; }

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 6px;
    z-index: 1100;
}
.hamburger span {
    display: block;
    width: 30px;
    height: 3px;
    background: var(--jolen-white);
    transition: all 0.3s ease;
}

/* Hamburger turns dark when scrolled */
.header.scrolled .hamburger span {
    background: var(--jolen-cobalt);
}

.hamburger.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); background: var(--jolen-cobalt); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); background: var(--jolen-cobalt); }


/* Media Queries */
@media (max-width: 1024px) {
    .container { padding: 0 30px; }
    .main-nav { gap: 15px; }
    .main-nav a { font-size: 12px; }
    .hero-v3 h1 { font-size: clamp(2.6rem, 5vw, 4rem); }
    .dual-col { gap: 50px; }
    .section-title { font-size: 2.8rem; }
}

@media (max-width: 768px) {
    .container { padding: 0 20px; }
    .section { padding: 80px 0; }
    .section-title { font-size: 2.2rem; }
    
    .hamburger { display: flex; }
    .nav-cta { display: none; }
    
    nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--glass-bg);
        z-index: 1050;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    nav.open { display: flex; }
    .main-nav { flex-direction: column; gap: 25px; text-align: center; }
    .main-nav a { font-size: 1.5rem; color: var(--jolen-cobalt) !important; }
    
    .dual-col, .grid-reveal, .legal-footer { grid-template-columns: 1fr !important; gap: 40px !important; }
    
    .hero-v3 div[style*="display: flex"] { flex-direction: column; gap: 15px; }
    .btn-area { width: 100%; text-align: center; }
    .care-number { font-size: 2.5rem; }
    .care-box { padding: 50px 20px; }
}
        @media screen and (max-width: 900px) {
            /* Spinge giù tutto il corpo della pagina per fare spazio all'header */
            body {
                padding-top: 80px; /* Cambia questo valore in base all'altezza dell'header */
            }
            
            /* Se l'header su mobile è assoluto/fisso, assicurati che stia sempre in cima */
            .header {
                position: fixed;
                top: 0;
                left: 0;
                width: 100%;
                z-index: 9999;
                background-color: #3d3d3f; /* O il colore scuro che usi per Jolen */
            }
            
            /* Se la hero-v3 usa altezze come 100vh, dobbiamo correggerle */
            .hero-v3 {
                min-height: calc(100vh - 80px);
                margin-top: 0 !important; 
            }
        }