/**
 * CEL - Energia Comunitària
 * Paleta: #F8FAFB, #0A2F35, #1B5E63, #00D9A3, #FFB84D, #4FC3DC, #E8F4F5
 */

.cel-page {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #fff;
}

/* ========== HERO ========== */
.cel-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.cel-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.cel-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease-out;
}

.cel-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to bottom right, rgba(10, 47, 53, 0.9) 0%, rgba(27, 94, 99, 0.85) 45%, rgba(10, 47, 53, 0.6) 80%, transparent 100%);
}

.cel-hero-content {
    position: relative;
    z-index: 2;
    max-width: 72rem;
    margin: 0 auto;
    padding: 6rem 1.5rem 5rem;
}

.cel-hero-kicker {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 700;
    color: #A0C9CB;
    margin-bottom: 0.75rem;
}

.cel-hero-title {
    font-size: clamp(2.4rem, 4.6vw, 3.8rem);
    font-weight: 900;
    color: #FFFFFF;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin: 1.5rem 0 1.5rem;
    white-space: nowrap; /* força una sola línia en desktop */
}

/* Contenidor subtítol: només glassmorphism (sense filtre verd) */
.cel-hero-text-card {
    max-width: 56rem;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 1.75rem;
    padding: 1.75rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.cel-hero-text-lead {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0A2F35;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.cel-hero-text-body {
    font-size: 0.98rem;
    color: rgba(10, 47, 53, 0.9);
    line-height: 1.7;
}

/* CTA i fletxa centrats, separació 2rem respecte contenidor i 1,5rem entre CTA i fletxa */
.cel-hero-cta-wrap {
    margin-top: 2rem;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.cel-hero-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 2.4rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #00D9A3, #4FC3DC);
    color: #0A2F35;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    text-decoration: none;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.cel-hero-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 55px rgba(0, 0, 0, 0.75);
    filter: brightness(1.05);
}

.cel-hero-cta-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 9999px;
    border: 1px solid rgba(224, 242, 241, 0.7);
    color: #E0F2F1;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.cel-hero-cta-arrow svg {
    width: 0.9rem;
    height: 0.9rem;
}

.cel-hero-cta-arrow:hover {
    background: rgba(224, 242, 241, 0.12);
    transform: translateY(1px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}

/* ============================
   CEL - REPTE
   ============================ */
.cel-repte .cel-repte-title {
    margin-top: 2rem; /* baixa el títol 2rem dins la secció */
}

.cel-repte-text {
    position: relative;
    margin-top: 1.5rem; /* espai entre títol i contenidor de text */
    padding: 1.75rem 2rem;
    border-radius: 1.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(236, 253, 245, 0.95));
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.08);
    border-left: 6px solid #00D9A3;
}

.cel-repte-text::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at top left, rgba(0, 217, 163, 0.16), transparent 60%);
    pointer-events: none;
    mix-blend-mode: multiply;
}

.cel-repte-stats-grid {
    display: grid;
    gap: 1.25rem;
    margin-top: 1.5rem; /* espai entre el bloc de text i les targetes quan apilen */
}

@media (min-width: 1024px) {
    .cel-repte-stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.cel-repte-stat {
    position: relative;
    border-radius: 1.4rem;
    padding: 1.7rem 1.4rem 1.9rem;
    overflow: hidden;
    text-align: center;
    background: radial-gradient(circle at top, rgba(248, 250, 252, 0.95), rgba(232, 244, 245, 0.9));
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.07);
    border: 1px solid rgba(148, 163, 184, 0.4);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.cel-repte-stat::before {
    content: "";
    position: absolute;
    inset: -40%;
    background: radial-gradient(circle at top, rgba(255, 184, 77, 0.18), transparent 55%);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.cel-repte-stat:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 55px rgba(15, 23, 42, 0.28);
    border-color: rgba(15, 23, 42, 0.45);
}

.cel-repte-stat:hover::before {
    opacity: 1;
}

.cel-repte-icon {
    width: 3.1rem;
    height: 3.1rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.9rem;
    background: radial-gradient(circle at 30% 0, rgba(255, 255, 255, 0.9), transparent 55%);
    box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.45), 0 14px 30px rgba(15, 23, 42, 0.35);
}

.cel-repte-icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

.cel-repte-stat-number {
    font-size: 1.9rem;
    font-weight: 900;
    color: #0A2F35;
    letter-spacing: -0.04em;
    margin-bottom: 0.25rem;
}

.cel-repte-stat-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 700;
    color: #0A2F35;
    margin-bottom: 0.4rem;
}

.cel-repte-stat-text {
    font-size: 0.8rem;
    color: rgba(27, 94, 99, 0.9);
    line-height: 1.6;
}

.cel-repte-stat--pobresa .cel-repte-icon {
    background: radial-gradient(circle at 30% 0, #FFEDD5, #FDBA74);
    color: #9A3412;
}

.cel-repte-stat--emissions .cel-repte-icon {
    background: radial-gradient(circle at 30% 0, #ECFDF5, #6EE7B7);
    color: #065F46;
}

.cel-repte-stat--radi .cel-repte-icon {
    background: radial-gradient(circle at 30% 0, #E0F2FE, #7DD3FC);
    color: #0C4A6E;
}

.cel-hero-accent {
    background: linear-gradient(to right, #FFB84D, #00D9A3, #4FC3DC);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Partícules energètiques */
.cel-energy-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, #00D9A3 0%, transparent 70%);
    border-radius: 50%;
    animation: cel-float 6s ease-in-out infinite;
    box-shadow: 0 0 20px #00D9A3;
}

@keyframes cel-float {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.6; }
    50% { transform: translateY(-30px) scale(1.2); opacity: 1; }
}

/* ========== REPTE ========== */
.cel-repte-accent {
    background: linear-gradient(to right, #00D9A3, #4FC3DC);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ========== SOLUCIÓ (cards fons fosc) ========== */
.cel-solucio {
    position: relative;
    margin-top: 3.5rem; /* separació clara respecte la secció anterior */
    padding: 4rem 0;
    background-color: #0A2F35; /* assegurem fons fosc encara que la classe bg-[#0A2F35] no existeixi */
    color: #ffffff;
}

.cel-solucio .text-center {
    margin-bottom: 3rem; /* aire entre el text introductori i les cards */
}

.cel-solucio .grid {
    row-gap: 2rem; /* separació vertical extra entre files en mòbil */
}

.cel-solucio-accent {
    background: linear-gradient(to right, #00D9A3, #4FC3DC);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cel-card {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    padding: 1.8rem 1.6rem; /* menys padding per reduir l'alçada total */
    transition: all 0.5s ease;
}

.cel-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 60px rgba(0, 217, 163, 0.3);
}

/* ========== IMPACTE (disseny editorial: capçalera + imatge + barra mètriques) ========== */
.cel-impacte {
    padding: 4rem 0 5rem;
    background: linear-gradient(180deg, #ffffff 0%, #E8F4F5 50%, #ffffff 100%);
}

.cel-impacte-inner {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.cel-impacte-header {
    text-align: center;
    margin-bottom: 3rem;
}

.cel-impacte-title {
    font-size: clamp(2.25rem, 4.5vw, 3.5rem);
    font-weight: 900;
    color: #0A2F35;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 0.75rem;
}

.cel-impacte-accent {
    background: linear-gradient(to right, #00D9A3, #4FC3DC);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cel-impacte-subtitle {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0A2F35;
    max-width: none; /* permet que ocupi l'ample i quedi en una sola línia en desktop */
    margin: 0 auto;
    line-height: 1.5;
}

.cel-impacte-visual {
    margin-bottom: 0;
}

.cel-impacte-img-wrap {
    position: relative;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(10, 47, 53, 0.2);
    aspect-ratio: 21 / 9;
    max-height: 420px;
    max-width: 64rem;   /* mateix ample que la barra de mètriques */
    margin: 0 auto;     /* centra la imatge dins del contenidor */
}

.cel-impacte-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.cel-impacte-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(to top, rgba(10, 47, 53, 0.92), rgba(10, 47, 53, 0.75));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
}

.cel-impacte-caption-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #00D9A3;
}

.cel-impacte-caption-text {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Barra única de mètriques (sense cards) */
.cel-impacte-strip {
    margin-top: 2.5rem; /* deixa d'estar solapat amb la imatge */
    position: relative;
    z-index: 2;
}

.cel-impacte-strip-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    max-width: 64rem;
    margin: 0 auto;
    background: #0A2F35;
    border-radius: 1.25rem;
    padding: 2rem 1.5rem;
    box-shadow: 0 20px 50px rgba(10, 47, 53, 0.35);
}

.cel-impacte-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 1rem;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.cel-impacte-metric:last-child {
    border-right: none;
}

.cel-impacte-metric-value {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 0.25rem;
}

.cel-impacte-metric-value--green { color: #00D9A3; }
.cel-impacte-metric-value--orange { color: #FFB84D; }
.cel-impacte-metric-value--cyan { color: #4FC3DC; }
.cel-impacte-metric-value--dark { color: #ffffff; }

.cel-impacte-metric-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0.2rem;
}

.cel-impacte-metric-desc {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 900px) {
    .cel-impacte-strip-inner {
        grid-template-columns: repeat(2, 1fr);
    }
    .cel-impacte-metric {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        padding: 1.25rem 1rem;
    }
    .cel-impacte-metric:nth-child(odd) { border-right: 1px solid rgba(255, 255, 255, 0.12); }
    .cel-impacte-metric:nth-last-child(-n+2) { border-bottom: none; }
}

@media (max-width: 500px) {
    .cel-impacte-strip-inner {
        grid-template-columns: 1fr;
    }
    .cel-impacte-metric {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    }
    .cel-impacte-metric:nth-child(odd) { border-right: none; }
    .cel-impacte-metric:last-child { border-bottom: none; }
    .cel-impacte-img-wrap {
        aspect-ratio: 4 / 3;
        max-height: none;
    }
}

@media (min-width: 1024px) {
    .cel-impacte-subtitle {
        white-space: nowrap; /* en desktop, forcem una sola línia */
    }
}

/* ========== DIAGRAMA (només infografia, 50% més gran) ========== */
.cel-diagrama {
    padding: 4rem 0 5rem;
    background: #fff;
}

.cel-diagrama-inner {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Infografia ~50% més gran que abans (abans max-w-3xl ≈ 48rem, ara 72rem) */
.cel-diagrama-img-wrap {
    max-width: 72rem;
    margin: 0 auto;
}

.cel-diagrama-img {
    width: 100%;
    height: auto;
    border-radius: 1.25rem;
    box-shadow: 0 24px 60px rgba(10, 47, 53, 0.15);
}

/* ========== CTA (mateix disseny que solverd-cta, paleta CEL) ========== */
.cel-cta {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at top left, #00D9A3 0, #1B5E63 40%, #0A2F35 100%);
    color: #ffffff;
}

.cel-cta::before,
.cel-cta::after {
    content: "";
    position: absolute;
    border-radius: 9999px;
    filter: blur(60px);
    opacity: 0.4;
    pointer-events: none;
}

.cel-cta::before {
    width: 420px;
    height: 420px;
    background: rgba(0, 217, 163, 0.5);
    top: -160px;
    right: -80px;
}

.cel-cta::after {
    width: 380px;
    height: 380px;
    background: rgba(10, 47, 53, 0.8);
    bottom: -160px;
    left: -60px;
}

.cel-cta-inner {
    position: relative;
    z-index: 1;
    max-width: 72rem;
    padding: 4rem 0 5rem;
}

.cel-cta-header {
    text-align: center;
    max-width: 40rem;
    margin: 0 auto 3rem;
}

.cel-cta-kicker {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.75rem;
}

.cel-cta-title {
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin: 0 0 1.25rem;
}

.cel-cta-subtitle {
    font-size: 1.1rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
}

.cel-cta-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.75rem;
    max-width: 52rem;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .cel-cta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.cel-cta-card {
    position: relative;
    overflow: hidden;
    border-radius: 1.75rem;
    padding: 2rem 2.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    text-decoration: none;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
}

.cel-cta-card--donar {
    background: rgba(255, 255, 255, 0.96);
    color: #0A2F35;
}

.cel-cta-card--empresa {
    background: rgba(10, 47, 53, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cel-cta-card-glow {
    position: absolute;
    inset: -40%;
    opacity: 0;
    filter: blur(40px);
    transition: opacity 0.6s ease;
    pointer-events: none;
    z-index: 0;
}

.cel-cta-card-glow--donar {
    background: radial-gradient(circle at top, rgba(0, 217, 163, 0.5), transparent 60%);
}

.cel-cta-card-glow--empresa {
    background: radial-gradient(circle at center, rgba(79, 195, 220, 0.4), transparent 65%);
}

.cel-cta-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.4);
}

.cel-cta-card:hover .cel-cta-card-glow {
    opacity: 1;
}

.cel-cta-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.3rem;
    position: relative;
    z-index: 1;
}

.cel-cta-icon svg {
    width: 1.35rem;
    height: 1.35rem;
}

.cel-cta-icon--donar {
    background: rgba(0, 217, 163, 0.15);
    color: #0A2F35;
}

.cel-cta-icon--empresa {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cel-cta-card-title {
    position: relative;
    z-index: 1;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.cel-cta-card--empresa .cel-cta-card-title {
    color: #f9fafb;
}

.cel-cta-card-text {
    position: relative;
    z-index: 1;
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(10, 47, 53, 0.85);
}

.cel-cta-card--empresa .cel-cta-card-text {
    color: rgba(255, 255, 255, 0.9);
}

.cel-cta-button {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 9999px;
    padding: 0.55rem 1.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    margin-top: 0.4rem;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cel-cta-button svg {
    width: 0.95rem;
    height: 0.95rem;
}

.cel-cta-button--light {
    background: linear-gradient(135deg, #00B386, #00D9A3);
    color: #fff;
}

.cel-cta-button--dark {
    background: #f9fafb;
    color: #0A2F35;
}

.cel-cta-card:hover .cel-cta-button {
    transform: translateY(-1px) translateX(1px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.3);
}

.cel-cta-footer {
    margin-top: 2.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.cel-cta-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    border-radius: 9999px;
    background: rgba(10, 47, 53, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
}

.cel-cta-pill svg {
    width: 0.95rem;
    height: 0.95rem;
}

@media (max-width: 640px) {
    .cel-cta-card {
        padding: 1.6rem 1.7rem;
    }
}

/* ========== LAYOUT I ALINEACIÓ ========== */
.cel-repte .container,
.cel-solucio .container,
.cel-impacte .container,
.cel-diagrama .container,
.cel-cta .container {
    margin-left: auto;
    margin-right: auto;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .cel-hero-content {
        padding-top: 5rem;
        padding-bottom: 4rem;
    }
    .cel-hero-title {
        font-size: 2.25rem;
        white-space: normal; /* permet que trenqui línia en mòbil */
    }
    .cel-repte .cel-repte-title {
        font-size: 2rem;
    }
}

.cel-page [data-aos] {
    transition-duration: 800ms !important;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
}
