
.jf-page {
    --jf-dark: #111820;
    --jf-dark-2: #192129;
    --jf-accent: #d7ff3f;
    --jf-accent-dark: #bddf32;
    --jf-white: #ffffff;
    --jf-light: #f3f5f6;
    --jf-text: #202830;
    --jf-muted: #65717c;
    --jf-border: rgba(17,24,32,.10);
    --jf-shadow: 0 22px 60px rgba(17,24,32,.12);
    --jf-radius: 20px;

    width: 100%;
    overflow: hidden;
    color: var(--jf-text);
}

.jf-page,
.jf-page * {
    box-sizing: border-box;
}

.jf-page a {
    text-decoration: none;
}

.jf-container {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
}

.jf-section {
    padding: 100px 0;
}

.jf-eyebrow {
    display: inline-block;
    margin-bottom: 17px;
    color: #65711a;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.jf-title-medium {
    margin: 0 0 22px;
    color: var(--jf-dark);
    font-size: clamp(34px,4vw,50px);
    font-weight: 800;
    line-height: 1.07;
    letter-spacing: -.035em;
}

.jf-lead {
    max-width: 760px;
    margin: 0;
    color: var(--jf-muted);
    font-size: clamp(18px,2vw,21px);
    line-height: 1.7;
}

.jf-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 51px;
    padding: 14px 24px;
    border: 2px solid transparent;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 850;
    line-height: 1;
    text-decoration: none !important;
    transition:
        transform .22s ease,
        background-color .22s ease,
        border-color .22s ease,
        box-shadow .22s ease;
}

.jf-button:hover {
    transform: translateY(-3px);
}

.jf-button-light {
    border-color: rgba(255,255,255,.65);
    color: #ffffff !important;
}

.jf-button-light:hover {
    background: #ffffff;
    color: var(--jf-dark) !important;
}

.jf-button-dark {
    background: var(--jf-dark);
    color: #ffffff !important;
}

.jf-button-dark:hover {
    background: var(--jf-dark-2);
}

/* =========================================================
   HERO
========================================================= */

.jf-hero {
    position: relative;
    min-height: 720px;
    display: flex;
    align-items: center;
    overflow: hidden;

    background:
        linear-gradient(
            90deg,
            rgba(8,13,18,.93) 0%,
            rgba(8,13,18,.78) 48%,
            rgba(8,13,18,.30) 100%
        ),
        url("https://juanfranandreu.wordpress.com/wp-content/uploads/2025/04/nusade-segundo-dia-12-1-1.jpg")
        center 42% / cover no-repeat;

    color: #ffffff;
}

.jf-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 170px;
    background: linear-gradient(
        transparent,
        rgba(7,12,17,.34)
    );
}

.jf-hero-content {
    position: relative;
    z-index: 2;
    max-width: 930px;
    padding: 105px 0 110px;
}

.jf-hero .jf-eyebrow {
    color: var(--jf-accent);
}

.jf-hero h1 {
    max-width: 950px;
    margin: 0 0 27px;
    color: #ffffff;
    font-size: clamp(52px,7vw,86px);
    font-weight: 800;
    line-height: .98;
    letter-spacing: -.055em;
}

.jf-hero-text {
    max-width: 790px;
    margin: 0 0 36px;
    color: rgba(255,255,255,.86);
    font-size: clamp(19px,2.2vw,24px);
    line-height: 1.55;
}

.jf-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.jf-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 50px;
}

.jf-hero-badge {
    display: flex;
    align-items: center;
    gap: 9px;
    color: rgba(255,255,255,.80);
    font-size: 13px;
    font-weight: 750;
}

.jf-hero-badge::before {
    content: "";
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: var(--jf-accent);
    box-shadow: 0 0 0 5px rgba(215,255,63,.12);
}

/* =========================================================
   ESTADÍSTICAS
========================================================= */

.jf-stats {
    position: relative;
    z-index: 5;
    margin-top: -52px;
}

.jf-stats-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--jf-shadow);
}

.jf-stat {
    padding: 34px 25px;
    border-right: 1px solid var(--jf-border);
    text-align: center;
}

.jf-stat:last-child {
    border-right: none;
}

.jf-stat strong {
    display: block;
    margin-bottom: 8px;
    color: var(--jf-dark);
    font-size: clamp(29px,3vw,41px);
    font-weight: 850;
    line-height: 1;
}

.jf-stat span {
    display: block;
    color: var(--jf-muted);
    font-size: 14px;
    line-height: 1.45;
}

/* =========================================================
   SERVICIOS
========================================================= */

.jf-services {
    padding-top: 120px;
    background: var(--jf-light);
}

.jf-services-heading {
    max-width: 850px;
    margin-bottom: 52px;
}

.jf-service-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 24px;
}

.jf-service-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 405px;
    padding: 36px 32px;
    border: 1px solid var(--jf-border);
    border-radius: var(--jf-radius);
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(17,24,32,.05);

    transition:
        transform .28s ease,
        box-shadow .28s ease;
}

.jf-service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--jf-shadow);
}

.jf-service-number {
    display: grid;
    place-items: center;
    width: 49px;
    height: 49px;
    margin-bottom: 36px;
    border-radius: 50%;
    background: var(--jf-dark);
    color: var(--jf-accent);
    font-size: 13px;
    font-weight: 900;
}

.jf-service-card h3 {
    margin: 0 0 16px;
    color: var(--jf-dark);
    font-size: 28px;
    line-height: 1.15;
}

.jf-service-card p {
    margin: 0 0 23px;
    color: var(--jf-muted);
    font-size: 16px;
    line-height: 1.7;
}

.jf-service-card ul {
    margin: 0 0 28px;
    padding: 0;
    list-style: none;
}

.jf-service-card li {
    position: relative;
    margin-bottom: 11px;
    padding-left: 24px;
    color: #3e4851;
    font-size: 15px;
    line-height: 1.5;
}

.jf-service-card li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #748300;
    font-weight: 900;
}

.jf-service-link {
    margin-top: auto;
    color: var(--jf-dark);
    font-size: 15px;
    font-weight: 850;
}

.jf-service-link:hover {
    color: #748300;
}

/* =========================================================
   CÓMO TRABAJO
========================================================= */

.jf-work {
    background: #ffffff;
}

.jf-work-grid {
    display: grid;
    grid-template-columns: .95fr 1.05fr;
    gap: 75px;
    align-items: center;
}

.jf-work-copy {
    max-width: 600px;
}

.jf-work-copy p {
    margin: 0 0 18px;
    color: var(--jf-muted);
    font-size: 18px;
    line-height: 1.75;
}

.jf-work-copy .jf-button {
    margin-top: 14px;
}

.jf-work-visual {
    position: relative;
    min-height: 570px;
}

.jf-work-image {
    position: absolute;
    inset: 0 90px 40px 0;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: var(--jf-shadow);
}

.jf-work-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.jf-work-mini {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 47%;
    overflow: hidden;
    border: 9px solid #ffffff;
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(17,24,32,.18);
}

.jf-work-mini img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.jf-work-label {
    position: absolute;
    left: 28px;
    bottom: 0;
    max-width: 275px;
    padding: 20px 22px;
    border-radius: 12px;
    background: var(--jf-accent);
    color: var(--jf-dark);
    box-shadow: 0 15px 35px rgba(17,24,32,.16);
}

.jf-work-label strong {
    display: block;
    margin-bottom: 5px;
    font-size: 19px;
}

.jf-work-label span {
    font-size: 13px;
    line-height: 1.5;
}

/* =========================================================
   SEGUIMIENTO
========================================================= */

.jf-process {
    background: var(--jf-dark);
    color: #ffffff;
}

.jf-process .jf-eyebrow {
    color: var(--jf-accent);
}

.jf-process .jf-title-medium {
    color: #ffffff;
}

.jf-process-intro {
    max-width: 760px;
    margin-bottom: 48px;
}

.jf-process-intro .jf-lead {
    color: rgba(255,255,255,.64);
}

.jf-process-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 18px;
}

.jf-process-item {
    padding: 30px 27px;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 15px;
    background: rgba(255,255,255,.045);

    transition:
        transform .25s ease,
        background-color .25s ease;
}

.jf-process-item:hover {
    transform: translateY(-6px);
    background: rgba(255,255,255,.075);
}

.jf-process-number {
    display: inline-block;
    margin-bottom: 36px;
    color: var(--jf-accent);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .10em;
}

.jf-process-item h3 {
    margin: 0 0 10px;
    color: #ffffff;
    font-size: 22px;
}

.jf-process-item p {
    margin: 0;
    color: rgba(255,255,255,.62);
    font-size: 15px;
    line-height: 1.65;
}

/* =========================================================
   BLOG
========================================================= */

.jf-blog {
    background: var(--jf-light);
}

.jf-blog-box {
    display: grid;
    grid-template-columns: 1fr .9fr;
    overflow: hidden;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--jf-shadow);
}

.jf-blog-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 65px;
}

.jf-blog-content p {
    margin: 0 0 30px;
    color: var(--jf-muted);
    font-size: 17px;
    line-height: 1.7;
}

.jf-blog-image {
    position: relative;
    min-height: 520px;
    overflow: hidden;
}

.jf-blog-image img {
    position: absolute;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

/* =========================================================
   ASISTENTE WEB — ESCRITORIO
========================================================= */

#jfa-chat-button {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9998;
    display: block;
    padding: 13px 20px;
    border: 0;
    border-radius: 28px;
    background: #7057e8;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 22px rgba(0,0,0,.2);
}

#jfa-chat-window {
    position: fixed;
    right: 20px;
    bottom: 80px;
    z-index: 9999;
    display: none;
    flex-direction: column;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 520px;
    max-height: calc(100vh - 110px);
    padding: 0;
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 42px rgba(0,0,0,.24);
}

#jfa-chat-window,
#jfa-chat-window * {
    box-sizing: border-box;
}

#jfa-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
    padding: 16px;
    background: #7057e8;
    color: #fff;
}

#jfa-chat-header-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

#jfa-chat-title {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

#jfa-chat-subtitle {
    margin-top: 4px;
    color: rgba(255,255,255,.85);
    font-size: 12px;
}

#jfa-chat-close {
    flex-shrink: 0;
    padding: 0 5px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
}

#jfa-chat-log {
    flex: 1 1 auto;
    min-height: 0;
    padding: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    background: #f7f8fa;
    overflow-wrap: anywhere;
}

.jfa-message-row {
    display: flex;
    margin-bottom: 12px;
}

.jfa-message-row.user {
    justify-content: flex-end;
}

.jfa-message-row.assistant {
    justify-content: flex-start;
}

.jfa-message {
    max-width: 88%;
    padding: 10px 13px;
    border-radius: 12px;
    background: #fff;
    color: #202830;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.jfa-message-row.user .jfa-message {
    background: #7057e8;
    color: #fff;
}

#jfa-chat-status {
    display: none;
    flex-shrink: 0;
    padding: 8px 16px;
    color: #68737c;
    background: #fff;
    font-size: 12px;
}

#jfa-chat-input-area {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    width: 100%;
    padding: 12px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
}

#jfa-chat-input {
    flex: 1 1 0;
    width: 0;
    min-width: 0;
    height: 44px;
    padding: 10px 12px;
    border: 1px solid #d6dbe1;
    border-radius: 8px;
    background: #fff;
    color: #101820;
    font-size: 16px;
}

#jfa-chat-send {
    flex: 0 0 auto;
    height: 44px;
    padding: 0 14px;
    border: 0;
    border-radius: 8px;
    background: #7057e8;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

/* =========================================================
   PORTADA RESPONSIVE — TABLET
========================================================= */

@media screen and (max-width: 1024px) {

    .jf-page .jf-container {
        width: calc(100% - 40px);
        max-width: 100%;
    }

    .jf-page .jf-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .jf-page .jf-service-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .jf-page .jf-work-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 45px;
    }

    .jf-page .jf-process-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .jf-page .jf-blog-box {
        grid-template-columns: minmax(0, 1fr);
    }

    .jf-page .jf-blog-image {
        min-height: 400px;
    }

    .jf-page .jf-work-visual {
        min-height: 520px;
    }
}

/* =========================================================
   PORTADA RESPONSIVE — MÓVIL
========================================================= */

@media screen and (max-width: 767px) {

    .jf-page {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow-x: hidden;
    }

    .jf-page,
    .jf-page * {
        box-sizing: border-box;
    }

    .jf-page .jf-container {
        width: calc(100% - 32px);
        max-width: 100%;
        min-width: 0;
        margin-left: auto;
        margin-right: auto;
    }

    .jf-page .jf-section {
        padding: 64px 0;
    }

    .jf-page .jf-hero {
        min-height: 620px;
        background-position: 60% center;
    }

    .jf-page .jf-hero-content {
        width: 100%;
        min-width: 0;
        padding: 80px 0 90px;
    }

    .jf-page .jf-hero h1 {
        font-size: clamp(36px, 10vw, 50px);
        line-height: 1.06;
    }

    .jf-page .jf-hero-text {
        font-size: 18px;
    }

    .jf-page .jf-hero-actions {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .jf-page .jf-hero-actions .jf-button {
        width: 100%;
    }

    .jf-page .jf-hero-badges {
        gap: 14px;
        margin-top: 30px;
    }

    .jf-page .jf-title-medium {
        font-size: clamp(30px, 8vw, 40px);
    }

    .jf-page .jf-stats {
        margin-top: -28px;
    }

    .jf-page .jf-stats-grid,
    .jf-page .jf-service-grid,
    .jf-page .jf-work-grid,
    .jf-page .jf-process-grid,
    .jf-page .jf-blog-box {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .jf-page .jf-stat,
    .jf-page .jf-service-card,
    .jf-page .jf-process-item,
    .jf-page .jf-work-copy,
    .jf-page .jf-blog-content {
        min-width: 0;
        max-width: 100%;
    }

    .jf-page .jf-stat {
        padding: 24px 18px;
        border-right: 0;
        border-bottom: 1px solid var(--jf-border);
    }

    .jf-page .jf-stat:last-child {
        border-bottom: 0;
    }

    .jf-page .jf-services {
        padding-top: 80px;
    }

    .jf-page .jf-services-heading {
        margin-bottom: 30px;
    }

    .jf-page .jf-service-grid {
        gap: 18px;
    }

    .jf-page .jf-service-card {
        min-height: 0;
        padding: 28px 22px;
    }

    .jf-page .jf-service-number {
        margin-bottom: 24px;
    }

    .jf-page .jf-service-card h3 {
        font-size: clamp(23px, 6vw, 28px);
    }

    .jf-page .jf-work-grid {
        gap: 34px;
    }

    .jf-page .jf-work-visual {
        width: 100%;
        min-height: 380px;
    }

    .jf-page .jf-work-image {
        inset: 0 40px 50px 0;
    }

    .jf-page .jf-work-mini {
        width: 42%;
        border-width: 5px;
    }

    .jf-page .jf-work-label {
        left: 12px;
        bottom: 0;
        max-width: 65%;
        padding: 12px;
    }

    .jf-page .jf-work-label strong {
        font-size: 15px;
    }

    .jf-page .jf-process-grid {
        gap: 14px;
    }

    .jf-page .jf-process-item {
        padding: 25px 22px;
    }

    .jf-page .jf-blog-content {
        padding: 32px 24px;
    }

    .jf-page .jf-blog-image {
        min-height: 280px;
    }

    .jf-page img {
        max-width: 100%;
    }

    .jf-page h1,
    .jf-page h2,
    .jf-page h3,
    .jf-page p,
    .jf-page li {
        overflow-wrap: break-word;
    }

    /* Ocultar chatbot solo en móviles */

    #jfa-chat-button,
    #jfa-chat-window {
        display: none !important;
    }
}
