/*
==================================================
  VALLSIA — SISTEMA DE DISSENY UNIFICAT
==================================================
  Fitxer CSS principal compartit per totes les pàgines
  Inclou: variables, reset, tipografia, nav, footer,
           botons, targetes, seccions, animacions, responsive
==================================================
*/

/* ============================================
   FONTS GOOGLE — afegir al <head>
   <link rel="preconnect" href="https://fonts.googleapis.com">
   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
   <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap" rel="stylesheet">
   ============================================ */

/* ============================================
   VARIABLES GLOBALS
   ============================================ */

:root {
    /* Colors principals */
    --blau-electric: #0066FF;
    --turquesa: #00E5FF;
    --gris-fosc: #1F1F2E;
    --blanc: #FFFFFF;

    /* Colors secundaris */
    --verd-exit: #00C853;
    --taronja: #FF6B00;
    --taronja-fosc: #FF5500;

    /* Tipografia */
    --font-principal: 'Montserrat', sans-serif;

    /* Containers */
    --max-width-container: 1200px;

    /* Ombres */
    --shadow-light: 0 10px 40px rgba(0,0,0,0.08);
    --shadow-medium: 0 20px 60px rgba(0,0,0,0.12);
    --shadow-heavy: 0 30px 80px rgba(0, 102, 255, 0.25);

    /* Transicions */
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.3s ease;
}


/* ============================================
   RESET & BASE
   ============================================ */

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

body {
    font-family: var(--font-principal);
    color: var(--gris-fosc);
    background-color: var(--blanc);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: var(--max-width-container);
    margin: 0 auto;
    padding: 0 20px;
}


/* ============================================
   TIPOGRAFIA
   ============================================ */

.section-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 25px;
    color: var(--gris-fosc);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--blau-electric), var(--turquesa));
    border-radius: 2px;
    animation: lineGrow 2s ease-in-out infinite;
}

.section-subtitle {
    font-size: 1.15rem;
    font-weight: 500;
    color: #555;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    max-width: 700px;
}

.section-subtitle-dark {
    font-size: 1.15rem;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    max-width: 700px;
}

.section-lead {
    font-size: 1.05rem;
    font-weight: 400;
    color: #666;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.section-header {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 80px;
}

/* Text gradient */
.highlight,
.gradient-text {
    background: linear-gradient(135deg, var(--blau-electric), var(--turquesa));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-gold {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-orange {
    background: linear-gradient(135deg, var(--taronja), #FFD700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


/* ============================================
   NAVEGACIÓ
   ============================================ */

nav {
    background-color: rgba(255, 255, 255, 0.98);
    padding: 20px 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

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

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    text-decoration: none;
}

.logo-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--blau-electric);
    transition: var(--transition-fast);
}

.logo-container:hover .logo-avatar {
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(0, 102, 255, 0.4);
}

.logo-text {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--blau-electric), var(--turquesa));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--gris-fosc);
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--blau-electric), var(--turquesa));
    transition: width 0.3s;
}

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

.nav-cta {
    background: linear-gradient(135deg, var(--blau-electric), var(--turquesa));
    color: var(--blanc);
    padding: 12px 28px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-fast);
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.4);
}

/* Hamburger mòbil */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
    position: relative;
    z-index: 1200;
}

.nav-hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--gris-fosc);
    border-radius: 3px;
    transition: var(--transition-fast);
}

/* Animació X quan obert */
.nav-hamburger.is-open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.nav-hamburger.is-open span:nth-child(2) {
    opacity: 0;
}
.nav-hamburger.is-open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Nav expandida com a menú mòbil (evita el problema de backdrop-filter) */
nav.menu-open {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9000;
    background: #ffffff;
    backdrop-filter: none;
    box-shadow: none;
    padding: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

nav.menu-open .container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 100%;
    padding: 0;
}

nav.menu-open .nav-container {
    padding: 18px 24px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    flex-shrink: 0;
}

nav.menu-open .nav-links {
    display: flex !important;
    flex-direction: column;
    flex: 1;
    list-style: none;
    padding: 16px 0 40px;
    margin: 0;
    gap: 0;
}

nav.menu-open .nav-links li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

nav.menu-open .nav-links li a {
    display: block;
    padding: 18px 28px;
    font-size: 19px;
    font-weight: 600;
    color: var(--gris-fosc);
    text-decoration: none;
    -webkit-text-fill-color: initial;
    background: none;
}

nav.menu-open .nav-links li a::after {
    display: none;
}

nav.menu-open .nav-links li a.active {
    color: var(--blau-electric);
    -webkit-text-fill-color: var(--blau-electric);
}

nav.menu-open .nav-links li a:active {
    background: rgba(0, 102, 255, 0.06);
}

nav.menu-open .nav-cta {
    display: block;
    margin: 24px 28px 0;
    text-align: center;
    padding: 16px;
    font-size: 17px;
    border-radius: 30px;
}


/* ============================================
   BOTONS
   ============================================ */

.btn-primary {
    background: linear-gradient(135deg, var(--blau-electric), var(--turquesa));
    color: var(--blanc);
    padding: 18px 45px;
    border-radius: 35px;
    text-decoration: none;
    font-weight: 800;
    font-size: 18px;
    transition: var(--transition-smooth);
    display: inline-block;
    box-shadow: 0 15px 40px rgba(0, 102, 255, 0.4);
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
    font-family: var(--font-principal);
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--turquesa), var(--blau-electric));
    opacity: 0;
    transition: opacity 0.4s;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary span {
    position: relative;
    z-index: 1;
}

.btn-primary:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 50px rgba(0, 102, 255, 0.6);
}

.btn-secondary {
    background-color: transparent;
    color: var(--blanc);
    padding: 18px 45px;
    border-radius: 35px;
    text-decoration: none;
    font-weight: 800;
    font-size: 18px;
    border: 3px solid var(--blanc);
    transition: var(--transition-smooth);
    display: inline-block;
    cursor: pointer;
    font-family: var(--font-principal);
}

.btn-secondary:hover {
    background-color: var(--blanc);
    color: var(--gris-fosc);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 255, 255, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: var(--blau-electric);
    padding: 14px 35px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    border: 2px solid var(--blau-electric);
    transition: var(--transition-fast);
    display: inline-block;
    cursor: pointer;
    font-family: var(--font-principal);
}

.btn-outline:hover {
    background-color: var(--blau-electric);
    color: var(--blanc);
    transform: translateY(-3px);
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}


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

.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--gris-fosc) 0%, #0a0a15 100%);
}

.hero::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0,229,255,0.08) 0%, transparent 70%);
    top: -50px;
    left: -100px;
    pointer-events: none;
    border-radius: 50%;
    z-index: 0;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 50%, rgba(0, 102, 255, 0.2), rgba(0, 229, 255, 0.2));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: center;
    width: 100%;
}

.hero-text {
    color: var(--blanc);
}

.hero-text h1 {
    font-size: 62px;
    font-weight: 800;
    margin-bottom: 30px;
    line-height: 1.2;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.hero-text p {
    font-size: 22px;
    margin-bottom: 40px;
    opacity: 0.95;
    line-height: 1.7;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.hero-avatar {
    text-align: center;
}

.hero-avatar img,
.avatar-image {
    max-width: 85%;
    height: auto;
    filter: drop-shadow(0 25px 50px rgba(0, 229, 255, 0.5));
}


/* ============================================
   SECCIONS GENÈRIQUES
   ============================================ */

/* Fons clar */
/* ── LAYOUT GLOBAL: Avatar a l'esquerra, Text a la dreta ──
   Quan el DOM té primer el text, order:-1 mou l'avatar a l'esquerra
   sense haver de canviar l'HTML de cada pàgina */
.hero-content .hero-avatar  { order: -1; }
.cta-content  .cta-avatar   { order: -1; }

.section-light {
    padding: 120px 0;
    background: linear-gradient(180deg, #EBF3FF 0%, #f4f8ff 50%, #ffffff 100%);
}

/* Fons blanc */
.section-white {
    padding: 120px 0;
    background: #ffffff;
}

/* Fons fosc (amb imatge de fons) */
.section-dark {
    padding: 120px 0;
    background: linear-gradient(135deg, var(--gris-fosc) 0%, #0a0a15 100%);
    position: relative;
    overflow: hidden;
}

.section-dark .section-title {
    color: var(--blanc);
}

.section-dark .section-title::after {
    background: linear-gradient(90deg, var(--turquesa), var(--blau-electric));
}

.section-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.25;
}

.section-content {
    position: relative;
    z-index: 2;
}


/* ============================================
   TARGETES — PROBLEMA
   ============================================ */

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

.problem-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    padding: 50px 45px;
    border-radius: 25px;
    box-shadow: var(--shadow-light);
    transition: var(--transition-smooth);
    border-left: 5px solid var(--blau-electric);
    border-top: 1px solid rgba(0, 102, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.problem-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 102, 255, 0.03) 0%, transparent 70%);
    transition: all 0.5s;
    opacity: 0;
    pointer-events: none;
}

.problem-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: var(--shadow-heavy);
    border-left-width: 8px;
}

.problem-card:hover::after {
    opacity: 1;
    top: -25%;
    right: -25%;
}

.problem-card h3 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--gris-fosc);
    position: relative;
    z-index: 1;
}

.problem-card p {
    font-size: 16px;
    color: #666;
    line-height: 1.9;
    position: relative;
    z-index: 1;
}


/* ============================================
   TARGETES — FASES / PASSOS
   ============================================ */

.phases-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
}

.phase-card {
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    padding: 50px 40px;
    text-align: center;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.phase-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.1), rgba(0, 229, 255, 0.1));
    opacity: 0;
    transition: all 0.4s;
}

.phase-card:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-12px);
    border-color: var(--turquesa);
}

.phase-card:hover::before {
    opacity: 1;
}

.phase-number {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--blau-electric), var(--turquesa));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    font-size: 36px;
    font-weight: 800;
    color: var(--blanc);
    box-shadow: 0 15px 40px rgba(0, 229, 255, 0.4);
    position: relative;
    z-index: 1;
}

.phase-number::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blau-electric), var(--turquesa));
    opacity: 0.2;
    z-index: -1;
    animation: pulse 2s infinite;
}

.phase-card h3 {
    font-size: 26px;
    font-weight: 800;
    color: var(--blanc);
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.phase-card p {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    position: relative;
    z-index: 1;
}


/* ============================================
   TARGETES — SERVEIS
   ============================================ */

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

.service-card {
    background: linear-gradient(145deg, #ffffff, #f5f7fa);
    border-radius: 30px;
    padding: 55px 40px;
    text-align: center;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-light);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(135deg, var(--blau-electric), var(--turquesa));
}

.service-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 102, 255, 0.03) 0%, transparent 70%);
    transition: all 0.5s;
    opacity: 0;
    pointer-events: none;
}

.service-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 30px 80px rgba(0, 102, 255, 0.2);
    border-color: var(--blau-electric);
}

.service-card:hover::after {
    opacity: 1;
    top: -25%;
    right: -25%;
}

.service-icon {
    width: 110px;
    height: 110px;
    margin: 0 auto 30px;
    transition: var(--transition-smooth);
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 25px rgba(0, 102, 255, 0.2));
}

.service-card h3 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--gris-fosc);
    position: relative;
    z-index: 1;
}

.service-card p {
    font-size: 16px;
    color: #666;
    line-height: 1.9;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.service-link {
    color: var(--blau-electric);
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
    position: relative;
    z-index: 1;
}

.service-link:hover {
    gap: 14px;
    color: var(--turquesa);
}


/* ============================================
   SECCIÓ CTA
   ============================================ */

.cta-section {
    padding: 120px 0;
    background: linear-gradient(135deg, var(--blau-electric) 0%, var(--turquesa) 100%);
    position: relative;
    overflow: hidden;
}

.cta-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.12;
}

.cta-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.cta-avatar {
    text-align: center;
    animation: floatSlow 4s ease-in-out infinite;
}

.cta-avatar img {
    max-width: 90%;
    height: auto;
    filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.3));
}

.cta-text {
    color: var(--blanc);
}

.cta-text h2 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 25px;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.cta-text p {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.95;
    line-height: 1.7;
}

.cta-text .btn-white {
    background-color: var(--blanc);
    color: var(--blau-electric);
    padding: 20px 55px;
    border-radius: 35px;
    text-decoration: none;
    font-weight: 800;
    font-size: 20px;
    display: inline-block;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    transition: var(--transition-smooth);
}

.cta-text .btn-white:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    background-color: var(--gris-fosc);
    color: var(--blanc);
}


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

footer {
    background-color: var(--gris-fosc);
    color: var(--blanc);
    padding: 80px 0 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 50px;
    margin-bottom: 50px;
}

.footer-section h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 25px;
    background: linear-gradient(135deg, var(--blau-electric), var(--turquesa));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    line-height: 1.8;
}

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

.footer-section ul li {
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition-fast);
    font-size: 15px;
}

.footer-section a:hover {
    color: var(--turquesa);
    padding-left: 8px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 35px;
    text-align: center;
    opacity: 0.6;
    font-size: 14px;
}


/* ============================================
   WIDGET ALETA (Chat flotant)
   ============================================ */

#aleta-widget {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9999;
    font-family: var(--font-principal);
}

#aleta-toggle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: white;
    border: 2.5px solid var(--blau-electric);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 24px rgba(0, 102, 255, 0.55);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

#aleta-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 32px rgba(0, 229, 255, 0.65);
}

#aleta-toggle.aleta-active {
    background: linear-gradient(135deg, var(--blau-electric), var(--turquesa));
    border-color: transparent;
}

.aleta-toggle-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    transition: opacity 0.2s;
}

.aleta-close-icon {
    display: none;
    font-size: 22px;
    color: white;
    font-weight: 700;
    line-height: 1;
}

#aleta-toggle.aleta-active .aleta-toggle-icon {
    display: none;
}

#aleta-toggle.aleta-active .aleta-close-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.aleta-notification-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    background: linear-gradient(135deg, #FF6B00, #FFD700);
    border-radius: 50%;
    border: 2px solid white;
    animation: pulseDot 2s ease-in-out infinite;
}

#aleta-chat-panel {
    position: absolute;
    bottom: 78px;
    right: 0;
    width: 360px;
    max-height: 520px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 102, 255, 0.25);
    border: 1.5px solid rgba(0, 102, 255, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

#aleta-chat-panel.aleta-open {
    display: flex;
}

.aleta-header {
    background: linear-gradient(135deg, var(--blau-electric), var(--turquesa));
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.aleta-header-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.6);
    object-fit: cover;
}

.aleta-header-info h4 {
    color: white;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 2px;
}

.aleta-header-info span {
    color: rgba(255,255,255,0.85);
    font-size: 12px;
}

.aleta-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 320px;
}

.aleta-messages::-webkit-scrollbar {
    width: 4px;
}

.aleta-messages::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 2px;
}

.aleta-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--blau-electric), var(--turquesa));
    border-radius: 2px;
}

.aleta-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.aleta-msg.bot {
    background: linear-gradient(135deg, #EBF3FF, #f0f7ff);
    color: var(--gris-fosc);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(0, 102, 255, 0.08);
}

.aleta-msg.user {
    background: linear-gradient(135deg, var(--blau-electric), var(--turquesa));
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.aleta-typing {
    display: flex;
    gap: 5px;
    padding: 10px 14px;
    background: #EBF3FF;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
    border: 1px solid rgba(0, 102, 255, 0.08);
}

.aleta-typing span {
    width: 7px;
    height: 7px;
    background: var(--blau-electric);
    border-radius: 50%;
    animation: typingBounce 1.2s ease-in-out infinite;
}

.aleta-typing span:nth-child(2) { animation-delay: 0.2s; }
.aleta-typing span:nth-child(3) { animation-delay: 0.4s; }

.aleta-input-area {
    padding: 14px 16px;
    border-top: 1px solid rgba(0, 102, 255, 0.08);
    display: flex;
    gap: 10px;
    align-items: center;
    background: #fafbff;
}

.aleta-input-area input {
    flex: 1;
    border: 1.5px solid rgba(0, 102, 255, 0.2);
    border-radius: 25px;
    padding: 10px 16px;
    font-size: 14px;
    font-family: var(--font-principal);
    outline: none;
    transition: border-color 0.2s;
    background: white;
}

.aleta-input-area input:focus {
    border-color: var(--blau-electric);
}

.aleta-send-btn {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--blau-electric), var(--turquesa));
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.aleta-send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.4);
}

.aleta-send-btn svg {
    width: 16px;
    height: 16px;
    fill: white;
}


/* ============================================
   BADGE / ETIQUETES
   ============================================ */

.badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge-blue {
    background: linear-gradient(135deg, var(--blau-electric), var(--turquesa));
    color: white;
}

.badge-shine {
    background: linear-gradient(90deg, var(--blau-electric) 0%, var(--turquesa) 50%, var(--blau-electric) 100%);
    background-size: 200% auto;
    color: white;
    animation: shine 3s linear infinite;
}


/* ============================================
   ANIMACIONS
   ============================================ */

@keyframes lineGrow {
    0%, 100% { width: 80px; opacity: 1; }
    50% { width: 120px; opacity: 0.7; }
}

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

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

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-25px); }
}

@keyframes floatSlow {
    0%, 100% { transform: translateY(0px) rotate(-2deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}

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

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

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

@keyframes typingBounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-6px); }
}

@keyframes shine {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes discountPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 10px 30px rgba(255, 107, 0, 0.4));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 15px 40px rgba(255, 107, 0, 0.7));
    }
}

.float-animation { animation: float 3s ease-in-out infinite; }
.float-slow-animation { animation: floatSlow 4s ease-in-out infinite; }
.fade-up-animation { animation: fadeUp 0.8s ease-out forwards; }
.discount-text { animation: discountPulse 2s ease-in-out infinite; }


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

@media (max-width: 968px) {
    .hero-content,
    .cta-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 42px;
    }

    .hero-text p {
        font-size: 18px;
    }

    .section-title {
        font-size: 36px;
    }

    .cta-text h2 {
        font-size: 36px;
    }

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

    .nav-links {
        display: none;
    }

    .nav-hamburger {
        display: flex;
    }

    .nav-cta {
        display: none;
    }

    #aleta-chat-panel {
        width: 320px;
    }

    .hero-avatar {
        display: none;
    }
}

@media (max-width: 600px) {
    .hero-text h1 {
        font-size: 32px;
    }

    .section-title {
        font-size: 28px;
    }

    .btn-primary,
    .btn-secondary {
        padding: 14px 30px;
        font-size: 16px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    #aleta-chat-panel {
        width: calc(100vw - 40px);
        right: -10px;
    }
}

/* Preferències d'accessibilitat */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
