/* Features page — Adobe XD */
.page-features {
    /* Gradiente gris oscuro de marca (mismo fondo que redes/ppts) */
    background-color: #14161D;
    background-image:
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 90px),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 90px),
        radial-gradient(1100px 540px at 82% 0%, rgba(126, 138, 170, 0.16), transparent 62%),
        linear-gradient(152deg, #0E1016 0%, #171A22 48%, #2B2F3B 100%);
}

.features-main {
    background: transparent;
    padding: 2.5rem 2rem 4rem;
}

.features-main .wrap {
    max-width: var(--section-max, 1537px);
    margin: 0 auto;
}

.features-title {
    font-size: clamp(2.4rem, 4.5vw, 3.25rem);
    color: #fff;
    font-weight: 800;
    margin: 0 0 1.5rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.tab-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: 1.75rem;
}

.tab-btn {
    appearance: none;
    border: 1.5px solid #FF800D;
    background: transparent;
    color: #FF800D;
    font: 600 1rem/1 "Figtree", system-ui, sans-serif;
    padding: 0.55rem 1.35rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.tab-btn[aria-selected="true"] {
    background: #FF800D;
    color: #fff;
    box-shadow: 0 8px 20px rgba(255, 128, 13, 0.28);
}

.tab-btn:hover {
    transform: translateY(-1px);
}

.features-panel {
    background: #1A1C24;
    border-radius: 28px;
    padding: 1.6rem 1.4rem 1.4rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.features-panel-intro {
    color: rgba(255, 255, 255, 0.92);
    font-size: 1.05rem;
    font-weight: 500;
    margin: 0 0 1.15rem 0.35rem;
}

.features-panel-scroll {
    /* Espacio para ver al menos 3 cards sin scrollear; el scroll aparece si hay más */
    max-height: min(620px, 72vh);
    overflow-y: auto;
    padding-right: 0.55rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.features-panel-scroll::-webkit-scrollbar {
    width: 6px;
}

.features-panel-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.28);
    border-radius: 999px;
}

.features-panel-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.features-cards {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.feature-card {
    display: flex;
    align-items: stretch;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    min-height: 156px;
}

.feature-card__body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.35rem 1.75rem;
}

.feature-card__title {
    color: #FF800D;
    font-weight: 800;
    font-size: clamp(1.2rem, 2vw, 1.45rem);
    line-height: 1.2;
    margin: 0 0 0.7rem;
}

.feature-card__divider {
    width: 100%;
    max-width: none;
    height: 1px;
    background: rgba(255, 128, 13, 0.45);
    border: 0;
    margin: 0 0 0.85rem;
}

.feature-card__desc {
    color: #5A5B66;
    font-size: 1.05rem;
    line-height: 1.45;
    margin: 0;
}

.feature-card__media {
    flex: 0 0 360px;
    width: 360px;
    max-width: 360px;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F5F5F5;
    overflow: hidden;
}

.feature-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

/* Layout Finanzas: cards a la izquierda + foto lateral */
.features-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
    gap: 1.15rem;
    align-items: stretch;
}

.features-split__cards {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-width: 0;
}

.feature-card--text {
    display: block;
    min-height: 156px;
    padding: 1.25rem 1.4rem;
    overflow: visible;
    box-sizing: border-box;
}

.feature-card--text .feature-card__divider {
    max-width: none;
}

.features-split__visual {
    position: relative;
    width: 100%;
    max-width: 360px;
    justify-self: end;
    border-radius: 22px;
    overflow: hidden;
    background: #EDECF2;
    min-height: 0;
    align-self: stretch;
}

.features-split__visual img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

/* Contacto features (mockup blanco) */
.page-features .section-contacto {
    background: #fff;
}

.page-features .contacto-text h2 {
    color: #141824;
}

.page-features .btn-contact.outline {
    background: #fff;
    color: #FF800D;
}

.page-features .btn-contact.outline:hover {
    background: rgba(255, 128, 13, 0.08);
}

@media (max-width: 900px) {
    .features-main {
        padding: 1.75rem 1rem 3rem;
    }

    .tab-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.35rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .tab-row::-webkit-scrollbar { display: none; }

    .tab-btn {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .features-panel {
        border-radius: 20px;
        padding: 1.15rem 0.9rem 0.9rem;
    }

    .features-panel-scroll {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    .feature-card {
        flex-direction: column;
        min-height: 0;
    }

    .feature-card__body {
        padding: 1.25rem 1.2rem;
    }

    .feature-card__media {
        order: -1;
        flex: 0 0 auto;
        width: 100%;
        max-width: none;
        height: 200px;
    }

    .features-split {
        grid-template-columns: 1fr;
    }

    .features-split__visual {
        position: relative;
        height: 280px;
        max-height: 320px;
        order: -1;
    }
}

@media (max-width: 600px) {
    .features-title {
        font-size: 2rem;
    }
}
