﻿:root {
    /* Valores base para navegadores sin soporte de clamp/calc */
    --ep-hero-keys-overlap: 5.55rem;
    --ep-hero-bottom-gap: 1.5rem;
    --ep-under-hero-shadow-height: 4.4rem;
    --ep-keys-raise-base: 0.55rem;
    --ep-keys-raise-mult: 1.2;
    --ep-keys-raise: calc(var(--ep-keys-raise-base) * var(--ep-keys-raise-mult));
    --ep-keys-section-padding-top: 5rem;
    --ep-full-bleed-offset: 0;

    /* Valores fluidos para navegadores modernos */
    --ep-hero-keys-overlap: clamp(5.55rem, 12vw, 6.9rem);
    --ep-hero-bottom-gap: clamp(1.15rem, 3.6vw, 1.85rem);
    --ep-under-hero-shadow-height: clamp(3.6rem, 9vw, 5rem);
    --ep-keys-raise-base: 0.55rem;
    --ep-keys-raise: calc(var(--ep-keys-raise-base) * var(--ep-keys-raise-mult));
    --ep-keys-section-padding-top: calc(var(--ep-hero-keys-overlap) - var(--ep-keys-raise));
    --accent-gradient: radial-gradient(circle at 10% 15%,
            #16bd9c 0%,
            #1a89bc 100%);
    --ep-soft-accent-gradient: linear-gradient(90deg,
            rgba(255, 255, 255, 0.98) 0%,
            rgba(255, 255, 255, 0.94) 14%,
            #1a89bc2e 100%);
    --ep-soft-accent-haze: linear-gradient(180deg,
            #ffffff 0%,
            rgba(255, 255, 255, 0.92) 18%,
            rgba(255, 255, 255, 0.58) 52%,
            rgba(255, 255, 255, 0.16) 82%,
            rgba(255, 255, 255, 0) 100%);
    --ep-flow-accent-gradient: linear-gradient(90deg,
            #1a89bc2e 0%,
            rgba(22, 189, 156, 0.16) 46%,
            rgba(26, 137, 188, 0.1) 100%);
    --ep-flow-soft-veil: linear-gradient(180deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.84) 74%,
            #ffffff 100%);
    --ep-full-bleed-offset: calc((100% - 100vw) / 2);
    --ep-keys-raise-mult: clamp(0.4,
            calc(0.4 + ((100vw - 481px) / 1px) * 0.0009034),
            1.7);
}

.custom-container {
    /* Quitar márgenes/padding del layout para esta vista */
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    /* Evita el corte visual del degradado con el fondo blanco */
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow-x: clip;
}

@supports not (overflow: clip) {
    .custom-container {
        overflow-x: hidden;
    }
}

.hero-pianist,
.hero-musician {
    position: relative;
    color: #fff;
    text-align: center;
    /* full-bleed dentro de container */
    width: 100vw;
    margin-left: clamp(-999rem, var(--ep-full-bleed-offset), 0rem);
    margin-right: clamp(-999rem, var(--ep-full-bleed-offset), 0rem);

    background: var(--accent-gradient);
    overflow: visible;
    z-index: 1;
    box-sizing: border-box;
}

.hero-pianist {
    padding: clamp(5rem, 9vw, 6rem) 1rem calc(var(--ep-hero-bottom-gap) + 1rem);
}

.hero-pianist::before,
.hero-musician::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.45;
    mix-blend-mode: overlay;
    z-index: 0;
}

.hero-pianist::before {
    background-image: url('/assets/images/encuentramusico/heropianista.webp');
    background-size: 130%;
    opacity: 0.42;
}

.hero-musician::before {
    background-image: url('/assets/images/encuentramusico/heromusicobuscador.webp');
    background-position: center 40%;
    opacity: 0.48;
}

.hero-musician[data-hero-state="pianist"]::before {
    background-image: url('/assets/images/encuentramusico/heropianista.webp');
    background-size: 140%;
    background-position: center 45%;
    opacity: 0.42;
}

@media (min-width: 1200px) {

    .hero-pianist::before,
    .hero-musician[data-hero-state="pianist"]::before {
        background-position: center 45%;
    }

    .hero-musician::before {
        background-position: center 35%;
    }
}

.hero-pianist::after,
.hero-musician::after {
    content: none;
}

.hero-pianist .hero-title,
.hero-musician .hero-title {
    font-size: clamp(1.9rem, 4.2vw, 2.6rem);
    line-height: 1.18;
    margin: 0 auto 0.55rem;
    max-width: 900px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
}

.hero-pianist .hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.2;
    margin: 0 auto 0.75rem;
}

.hero-pianist .hero-subtitle,
.hero-musician .hero-subtitle {
    font-size: clamp(1rem, 2.2vw, 1.25rem);
    margin: 0 auto 1.75rem;
    max-width: 760px;
    color: rgba(255, 255, 255, 0.95);
    position: relative;
    z-index: 2;
}

.hero-musician .hero-subtitle {
    margin: 0 auto 1.25rem;
}

.hero-pianist .search-container,
.hero-musician .search-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0;
    position: relative;
    overflow: visible;
    z-index: 3;
    padding-bottom: var(--ep-hero-bottom-gap);
}

.hero-musician {
    min-height: clamp(32rem, 78vh, 46rem);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 0;
    padding-bottom: calc(var(--ep-hero-bottom-gap) + clamp(1rem, 3.5vw, 2rem));
}

.hero-musician .hero-tabs {
    width: 100%;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    position: relative;
    z-index: 3;
    isolation: isolate;
}

.hero-musician .hero-tab {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0.85rem, 3vw, 1.5rem) clamp(1.1rem, 4vw, 2.45rem);
    min-height: clamp(3rem, 10vw, 4.25rem);
    font-weight: 600;
    letter-spacing: 0.01em;
    font-size: clamp(0.95rem, 2.1vw, 1.05rem);
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.88);
    text-transform: none;
    text-align: center;
    background: transparent;
    transition: color .35s ease, background .35s ease, transform .35s ease, box-shadow .35s ease, opacity .35s ease;
    user-select: none;
    cursor: pointer;
    overflow: hidden;
}

.hero-musician .hero-tab::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.9) 100%);
    opacity: 0.94;
    box-shadow: inset 0 -14px 26px rgba(12, 44, 71, 0.12), inset 0 2px 0 rgba(255, 255, 255, 0.72);
    transition: background .35s ease, opacity .35s ease, box-shadow .35s ease;
    z-index: -1;
}

.hero-musician .hero-tab+.hero-tab::before {
    box-shadow:
        inset 0 -14px 26px rgba(12, 44, 71, 0.12),
        inset 0 2px 0 rgba(255, 255, 255, 0.72),
        inset 1px 0 0 rgba(26, 137, 188, 0.12),
        inset 0 -1px 0 rgba(26, 137, 188, 0.08);
}

.hero-musician .hero-tab.is-active {
    color: #fff;
    text-shadow: none;
    box-shadow: none;
    z-index: 1;
}

.hero-musician .hero-tab.is-active::before {
    opacity: 0;
    background: transparent;
    box-shadow: none;
}

.hero-musician .hero-tab:not(.is-active) {
    color: rgba(12, 44, 71, 0.88);
}

.hero-musician .hero-tab:not(.is-active)::before {
    opacity: 1;
}

.hero-musician[data-hero-state="pianist"] .hero-tab.is-active {
    text-shadow: none;
}

.hero-musician .hero-tab:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.6);
    outline-offset: -6px;
}

.hero-musician .hero-tab:not(.is-active):focus-visible {
    outline-color: rgba(26, 137, 188, 0.4);
}

.hero-musician .hero-body {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(1.5rem, 4.5vw, 2.4rem);
    padding-top: clamp(1.75rem, 6vw, 3.5rem);
    padding-bottom: clamp(1.25rem, 4vw, 2.1rem);
    padding-inline: clamp(1.5rem, 5vw, 3rem);
    box-sizing: border-box;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-musician .hero-copy {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: clamp(0.45rem, 1.6vw, 0.85rem);
    width: min(100%, 840px);
    margin: 0 auto;
    z-index: 2;
}

.hero-musician .hero-title,
.hero-musician .hero-subtitle {
    display: grid;
}

.hero-musician [data-hero-copy] {
    grid-area: 1 / 1 / 2 / 2;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: opacity .4s ease, transform .4s ease;
}

.hero-musician[data-hero-state="general"] .hero-title [data-hero-copy="general"],
.hero-musician[data-hero-state="pianist"] .hero-title [data-hero-copy="pianist"],
.hero-musician[data-hero-state="general"] .hero-subtitle [data-hero-copy="general"],
.hero-musician[data-hero-state="pianist"] .hero-subtitle [data-hero-copy="pianist"] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.hero-musician .search-container {
    margin: 0 auto;
    margin-top: 0;
}

.busco-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 3vw, 1.5rem);
    padding: clamp(1.25rem, 3vw, 1.85rem);
    border-radius: clamp(1.2rem, 3.6vw, 1.9rem);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08));
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 22px 40px rgba(3, 9, 24, 0.25);
    backdrop-filter: blur(14px);
    color: #041627;
    overflow: hidden;
}

.hero-pianist .busco-wrapper,
.hero-musician .busco-wrapper {
    color: #fff;
}

.busco-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(120% 150% at 80% 0%, rgba(26, 137, 188, 0.16) 0%, rgba(26, 137, 188, 0) 60%),
        radial-gradient(120% 140% at 20% 100%, rgba(22, 189, 156, 0.18) 0%, rgba(22, 189, 156, 0) 65%);
    pointer-events: none;
    opacity: 0.75;
    mix-blend-mode: screen;
    z-index: 0;
}

.busco-wrapper>* {
    position: relative;
    z-index: 1;
}

.busco-wrapper .busco-helper {
    margin: clamp(0.75rem, 2.2vw, 1.35rem) auto 0;
    max-width: 640px;
    text-align: center;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.88);
}

.busco-wrapper .form-label {
    font-size: clamp(.95rem, 1.8vw, 1.05rem);
    margin-bottom: .45rem;
    letter-spacing: .01em;
}

/* HERO PIANISTA MODERN INPUTS FIX */
.hero-pianist .form-select {
    height: 48px;
    border-radius: 50rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding-left: 1.25rem;
    font-size: 1rem;
    background-color: #fff;
    color: #333;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.hero-pianist .btn-primary {
    height: 48px;
    border-radius: 50rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #fff;
    color: var(--accent-color);
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero-pianist .btn-primary:hover {
    background: #f0f9ff;
    transform: translateY(-2px);
}

.hero-pianist .busco-wrapper .form-label,
.hero-musician .busco-wrapper .form-label {
    color: rgba(255, 255, 255, 0.92);
}


.busco-panels {
    width: 100%;
}

.busco-form {
    width: 100%;
}

.busco-form form {
    width: 100%;
}

.busco-wrapper.has-js .busco-panels {
    position: relative;
    overflow: hidden;
    transition: min-height .38s ease;
    min-height: var(--busco-active-height, 0px);
}

@media (min-width: 1200px) {
    .busco-wrapper {
        align-items: center;
    }
}

.community-section {
    background: linear-gradient(180deg, #f7f9fc 0%, #ffffff 100%);
    padding: clamp(3rem, 7vw, 4.75rem) 1rem clamp(3.25rem, 8vw, 5.5rem);
}

.community-inner {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: clamp(1.5rem, 4vw, 2.5rem);
}

.community-title {
    font-size: clamp(1.85rem, 4vw, 2.55rem);
    font-weight: 700;
    color: #0c2c47;
    margin: 0;
}

.community-highlight {
    font-size: clamp(1.05rem, 2.3vw, 1.25rem);
    color: #0f3958;
    margin: 0 auto;
}

.community-highlight strong {
    color: #1a89bc;
}

.community-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: clamp(1rem, 3vw, 1.75rem);
}

.community-card {
    background: #ffffff;
    border-radius: 20px;
    padding: clamp(1.25rem, 3vw, 1.85rem);
    box-shadow: 0 18px 35px rgba(12, 44, 71, 0.08);
    border: 1px solid rgba(26, 137, 188, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}

.community-card__count {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(0.4rem, 2vw, 0.65rem);
}

.community-card__number {
    color: #1a89bc;
    font-weight: 700;
    font-size: clamp(1.55rem, 4vw, 2.2rem);
    line-height: 1.05;
}

.community-card__profession {
    color: #0c2c47;
    font-weight: 600;
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    text-align: center;
}

.community-more {
    margin: clamp(1.5rem, 4vw, 2.25rem) auto clamp(0.5rem, 3vw, 1.2rem);
    max-width: 540px;
    text-align: center;
    color: #1a89bc;
    font-weight: 600;
    font-size: clamp(0.95rem, 2.1vw, 1.15rem);
    line-height: 1.45;
}

.community-description {
    max-width: 860px;
    margin: 0 auto;
    color: #34506a;
    font-size: clamp(0.95rem, 2.1vw, 1.05rem);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .busco-wrapper .busco-helper {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .community-section {
        padding: clamp(2.5rem, 10vw, 3rem) 1rem clamp(3rem, 12vw, 4rem);
    }

    .community-inner {
        gap: clamp(1.1rem, 6vw, 1.8rem);
    }

    .community-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: clamp(0.75rem, 4vw, 1rem);
    }

    .community-card {
        padding: clamp(1rem, 4vw, 1.35rem);
        border-radius: 18px;
    }

    .community-card__count {
        gap: clamp(0.3rem, 3.5vw, 0.55rem);
    }

    .community-card__number {
        font-size: clamp(1.45rem, 6vw, 1.9rem);
    }

    .community-card__profession {
        font-size: clamp(0.92rem, 3.6vw, 1.05rem);
    }

    .community-more {
        max-width: 460px;
        font-size: clamp(0.9rem, 3.5vw, 1.05rem);
    }
}

@media (max-width: 480px) {
    .community-stats {
        gap: clamp(0.6rem, 4vw, 0.75rem);
    }

    .community-card {
        padding: clamp(0.85rem, 5vw, 1.1rem);
    }

    .community-card__number {
        font-size: clamp(1.3rem, 7vw, 1.7rem);
    }

    .community-card__profession {
        font-size: clamp(0.9rem, 4.2vw, 1rem);
    }

    .community-more {
        font-size: clamp(0.88rem, 4vw, 1rem);
        max-width: 380px;
    }
}

@media (max-width: 768px) {
    .community-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
        justify-self: center;
        max-width: 240px;
    }
}

.busco-wrapper.has-js .busco-form {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(18px);
    pointer-events: none;
    visibility: hidden;
}

.busco-wrapper.has-js.is-ready .busco-form {
    transition: opacity .38s ease, transform .38s ease;
}

.busco-wrapper.has-js .busco-form.is-active {
    position: relative;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
}

.busco-wrapper:not(.has-js) .busco-panels {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.busco-wrapper:not(.has-js) .busco-form {
    opacity: 1;
    transform: none;
    pointer-events: auto;
    visibility: visible;
    position: relative;
}

@media (max-width: 768px) {
    .busco-wrapper {
        padding: clamp(1rem, 4vw, 1.4rem);
        border-radius: clamp(1rem, 5vw, 1.6rem);
        gap: clamp(.85rem, 4vw, 1.2rem);
    }
}

.piano-keys-section {
    position: relative;
    background: transparent;
    width: 100vw;
    margin-left: clamp(-999rem, var(--ep-full-bleed-offset), 0rem);
    margin-right: clamp(-999rem, var(--ep-full-bleed-offset), 0rem);
    margin-top: -5.55rem;
    margin-top: calc(-1 * var(--ep-hero-keys-overlap));
    padding: 5rem clamp(1rem, 4vw, 3rem) clamp(2.5rem, 5vw, 4.5rem);
    padding: var(--ep-keys-section-padding-top) clamp(1rem, 4vw, 3rem) clamp(2.5rem, 5vw, 4.5rem);
    z-index: 0;
    overflow: visible;
}

.piano-keys-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: calc((var(--ep-under-hero-shadow-height) + var(--ep-hero-keys-overlap))*0.7);
    background:
        linear-gradient(180deg,
            rgba(8, 15, 29, 0.44) 0%,
            rgba(6, 14, 28, 0.38) 26%,
            rgba(6, 14, 28, 0.26) 52%,
            rgba(6, 14, 28, 0.14) 78%,
            rgba(6, 14, 28, 0.04) 96%,
            rgba(6, 14, 28, 0) 100%);
    filter: drop-shadow(0 26px 34px rgba(4, 10, 22, 0.32));
    opacity: 1;
    pointer-events: none;
    z-index: -1;
}

/* Flow section below keys */
.pianist-flow {
    position: relative;
    width: 100vw;
    margin-left: clamp(-999rem, var(--ep-full-bleed-offset), 0rem);
    margin-right: clamp(-999rem, var(--ep-full-bleed-offset), 0rem);
    margin-top: 0;
    padding: clamp(3rem, 7vw, 5.2rem) clamp(1.5rem, 5vw, 4rem) clamp(4.2rem, 8vw, 6rem);
    background:
        var(--ep-soft-accent-haze),
        var(--ep-soft-accent-gradient),
        var(--ep-flow-soft-veil),
        var(--ep-flow-accent-gradient);
    background-repeat: no-repeat;
    background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%;
    color: #041627;
    isolation: isolate;
    overflow: hidden;
}

.pianist-flow::before {
    content: '';
    position: absolute;
    inset: -32% -40% 65% -40%;
    background: radial-gradient(60% 85% at 50% 0%, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.35) 70%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    z-index: -2;
}

.pianist-flow::after {
    content: '';
    position: absolute;
    inset: 10% -30% -45% -30%;
    background:
        radial-gradient(55% 65% at 12% 25%, rgba(22, 189, 156, 0.1) 0%, transparent 70%),
        radial-gradient(45% 55% at 88% 65%, rgba(26, 137, 188, 0.1) 0%, transparent 68%),
        radial-gradient(60% 80% at 50% 100%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 80%);
    animation: pianistFlowDrift 16s ease-in-out infinite alternate;
    opacity: 0.45;
    pointer-events: none;
    z-index: -1;
}

.pianist-flow__summary {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: clamp(1.6rem, 4vw, 2.6rem);
    align-items: stretch;
}

.pianist-flow__intro-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(1.4rem, 3.5vw, 2.6rem);
    width: 100%;
}

.pianist-flow__intro-grid::before {
    content: '';
    position: absolute;
    inset: clamp(2.8rem, 9vw, 4rem) -18% -32% -18%;
    background:
        radial-gradient(50% 60% at 12% 18%, rgba(26, 137, 188, 0.12) 0%, rgba(26, 137, 188, 0) 68%),
        radial-gradient(70% 90% at 88% 82%, rgba(22, 189, 156, 0.12) 0%, rgba(22, 189, 156, 0) 74%);
    filter: blur(28px);
    opacity: 0.65;
    pointer-events: none;
    z-index: -1;
}

.pianist-flow__glow-card {
    position: relative;
    padding: clamp(1.6rem, 3.6vw, 2.4rem);
    border-radius: clamp(1.4rem, 3.6vw, 2rem);
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.96) 0%, rgba(231, 247, 247, 0.9) 55%, rgba(216, 240, 245, 0.82) 100%);
    border: 1px solid rgba(6, 24, 43, 0.08);
    box-shadow: 0 24px 38px rgba(5, 24, 40, 0.12);
    display: flex;
    flex-direction: column;
    gap: clamp(0.7rem, 2vw, 1.1rem);
    min-height: 100%;
    overflow: hidden;
    color: rgba(4, 22, 39, 0.88);
    backdrop-filter: blur(2px);
}

.pianist-flow__glow-card::before,
.pianist-flow__glow-card::after {
    content: '';
    position: absolute;
    inset: -35% -28% 8% -28%;
    background:
        radial-gradient(60% 80% at 18% 22%, rgba(26, 137, 188, 0.22) 0%, rgba(26, 137, 188, 0) 70%),
        radial-gradient(70% 80% at 86% 76%, rgba(22, 189, 156, 0.24) 0%, rgba(22, 189, 156, 0) 74%),
        radial-gradient(55% 70% at 50% 0%, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 70%);
    opacity: 0.7;
    mix-blend-mode: screen;
    animation: pianistGlowShift 16s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

.pianist-flow__glow-card::after {
    inset: -40% -50% -50% -50%;
    background: conic-gradient(from 180deg at 50% 50%, rgba(26, 137, 188, 0.14) 0deg, rgba(22, 189, 156, 0.1) 120deg, rgba(26, 137, 188, 0.18) 240deg, rgba(22, 189, 156, 0.08) 360deg);
    filter: blur(40px);
    opacity: 0.35;
    animation: pianistGlowDrift 20s ease-in-out infinite alternate;
}

.pianist-flow__glow-title {
    margin: 0;
    font-size: clamp(1.2rem, 2.6vw, 1.4rem);
    line-height: 1.45;
    color: #041a32;
    letter-spacing: -0.01em;
    font-weight: 600;
}

.pianist-flow__glow-card--stats {
    padding: clamp(1.8rem, 4.3vw, 2.6rem) clamp(1.7rem, 4vw, 2.8rem);
    display: flex;
    justify-content: center;
}

.pianist-flow__glow-card--stats .pianist-counter {
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0;
    width: 100%;
    gap: clamp(0.8rem, 2vw, 1.1rem);
}

.pianist-flow__glow-card--stats .pianist-counter::before,
.pianist-flow__glow-card--stats .pianist-counter__glow {
    display: none;
}

.pianist-flow__glow-card--stats .pianist-counter__headline {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
}

.pianist-flow__glow-card--stats .pianist-counter__value {
    font-size: clamp(2.4rem, 6vw, 3.4rem);
}

.pianist-flow__glow-card--stats .pianist-counter__suffix {
    font-size: clamp(0.95rem, 2.4vw, 1.15rem);
    color: rgba(4, 22, 39, 0.65);
}

.pianist-flow__glow-card--stats .pianist-counter__total {
    color: rgba(4, 22, 39, 0.58);
}

@keyframes pianistGlowShift {
    0% {
        transform: translate3d(-6%, -4%, 0) rotate(-2deg);
    }

    40% {
        transform: translate3d(4%, 2%, 0) rotate(3deg);
    }

    100% {
        transform: translate3d(-3%, 5%, 0) rotate(-1deg);
    }
}

@keyframes pianistGlowDrift {
    0% {
        transform: translate3d(-8%, -6%, 0) scale(1.02);
    }

    50% {
        transform: translate3d(6%, 4%, 0) scale(1.08);
    }

    100% {
        transform: translate3d(-4%, 8%, 0) scale(1);
    }
}

@keyframes pianistFlowDrift {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }

    100% {
        transform: translate3d(0, -2%, 0) scale(1.03);
    }
}

.pianist-flow__spark {
    position: absolute;
    width: clamp(160px, 22vw, 240px);
    height: clamp(160px, 22vw, 240px);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 60%);
    filter: blur(0.5px);
    pointer-events: none;
    opacity: 0.5;
    mix-blend-mode: screen;
    animation: pianistFlowFloat 18s ease-in-out infinite;
}

.pianist-flow__spark--one {
    top: 18%;
    left: 12%;
    animation-delay: -4s;
}

.pianist-flow__spark--two {
    bottom: 28%;
    right: 10%;
}

@keyframes pianistFlowFloat {
    0% {
        transform: translate3d(0, 0, 0) scale(0.9);
        opacity: 0.45;
    }

    50% {
        transform: translate3d(6%, -6%, 0) scale(1.05);
        opacity: 0.7;
    }

    100% {
        transform: translate3d(-4%, 4%, 0) scale(0.92);
        opacity: 0.5;
    }
}


.pianist-flow__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: clamp(1180px, 95vw, 1480px);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: clamp(1.8rem, 5vw, 3rem);
}

.pianist-flow__tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.95rem;
    border-radius: 999px;
    font-size: 0.78rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    font-weight: 600;
    color: #0c334f;
    background: rgba(26, 137, 188, 0.16);
    margin-bottom: clamp(0.9rem, 2vw, 1.2rem);
}

.pianist-flow__lead {
    margin: 0;
    font-size: clamp(1rem, 2.1vw, 1.15rem);
    line-height: 1.7;
    color: rgba(4, 22, 39, 0.82);
}

.pianist-counter {
    position: relative;
    margin: 0 auto;
    width: min(540px, 100%);
    padding: clamp(1.9rem, 3.8vw, 2.6rem) clamp(1.6rem, 4vw, 2.6rem);
    border-radius: clamp(1.8rem, 4vw, 2.6rem);
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.98) 0%,
            rgba(238, 248, 247, 0.94) 58%,
            rgba(223, 243, 246, 0.9) 100%);
    box-shadow: 0 30px 46px rgba(5, 30, 40, 0.16);
    border: 1px solid rgba(26, 137, 188, 0.16);
    display: flex;
    flex-direction: column;
    gap: clamp(0.8rem, 2vw, 1.2rem);
    text-align: center;
    overflow: hidden;
    isolation: isolate;
}

.pianist-counter::before {
    content: '';
    position: absolute;
    inset: -18% 16% 65% 16%;
    background: radial-gradient(90% 70% at 50% 0%,
            rgba(255, 255, 255, 0.88) 0%,
            rgba(255, 255, 255, 0) 75%);
    opacity: 0.9;
    pointer-events: none;
    z-index: -2;
}

.pianist-counter__glow {
    position: absolute;
    inset: 12% 20% -50% 20%;
    background:
        radial-gradient(70% 60% at 50% 0%, rgba(22, 189, 156, 0.2) 0%, rgba(22, 189, 156, 0) 80%),
        radial-gradient(55% 45% at 50% 100%, rgba(26, 137, 188, 0.24) 0%, rgba(26, 137, 188, 0) 70%);
    filter: blur(0.5px);
    opacity: 0.7;
    pointer-events: none;
    z-index: -1;
}

.pianist-counter__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.28em;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(6, 30, 51, 0.64);
}

.pianist-counter__headline {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    gap: clamp(0.45rem, 1.5vw, 0.75rem);
    font-weight: 600;
    font-size: clamp(1.22rem, 3vw, 1.65rem);
    color: #041627;
    margin: 0;
}

.pianist-counter__prefix,
.pianist-counter__suffix {
    display: inline-block;
    line-height: 1.25;
}

.pianist-counter__value {
    font-size: clamp(3rem, 7vw, 4.4rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
    color: #011225;
    text-shadow: 0 16px 40px rgba(4, 26, 48, 0.32);
    position: relative;
    padding-right: clamp(0.15rem, 0.6vw, 0.45rem);
    transition: text-shadow 0.45s ease, color 0.45s ease;
}

.pianist-counter__value.is-animating {
    text-shadow: 0 20px 46px rgba(6, 32, 58, 0.42);
    color: #000d1c;
}

.pianist-counter__total {
    margin: 0;
    font-size: clamp(0.95rem, 2.4vw, 1.05rem);
    line-height: 1.6;
    color: rgba(4, 22, 39, 0.68);
}

.pianist-counter__total-value {
    display: inline-block;
    font-weight: 700;
    color: #0b3d5d;
    letter-spacing: -0.01em;
}

.pianist-flow__details {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: clamp(1.4rem, 4vw, 2.6rem);
    margin-top: clamp(2.1rem, 5vw, 3rem);
}

.pianist-flow__card {
    position: relative;
    padding: clamp(1.6rem, 3.6vw, 2.4rem);
    border-radius: clamp(1.4rem, 3.6vw, 2rem);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(230, 247, 246, 0.92) 100%);
    border: 1px solid rgba(6, 24, 43, 0.08);
    box-shadow: 0 18px 32px rgba(4, 18, 39, 0.12);
    display: flex;
    flex-direction: column;
    gap: clamp(0.7rem, 2vw, 1.1rem);
    line-height: 1.7;
    color: rgba(4, 22, 39, 0.82);
    overflow: hidden;
}

.pianist-flow__card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 90% 15%, rgba(26, 137, 188, 0.12) 0%, transparent 55%);
    pointer-events: none;
}

.pianist-flow__card-title {
    font-size: clamp(1.1rem, 2.6vw, 1.4rem);
    font-weight: 600;
    color: #041a32;
    margin: 0;
}

.pianist-flow__card-header {
    display: flex;
    align-items: flex-start;
    gap: clamp(0.8rem, 2vw, 1.2rem);
}

.pianist-flow__card-header .pianist-flow__icon {
    margin-left: auto;
}

.pianist-flow__card--security {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(214, 240, 245, 0.92) 100%);
    border: 1px solid rgba(26, 137, 188, 0.22);
    box-shadow: 0 22px 44px rgba(4, 18, 39, 0.12);
}

.pianist-flow__card--security::after {
    background:
        radial-gradient(circle at 20% 20%, rgba(22, 189, 156, 0.18) 0%, transparent 58%),
        radial-gradient(circle at 80% 80%, rgba(26, 137, 188, 0.18) 0%, transparent 60%);
}

.pianist-flow__icon {
    width: clamp(48px, 7vw, 60px);
    height: clamp(48px, 7vw, 60px);
    border-radius: 18px;
    background: rgba(22, 189, 156, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(22, 189, 156, 0.24);
}

.pianist-flow__icon svg {
    width: 70%;
    height: 70%;
}

.pianist-flow__connector {
    position: relative;
    width: auto;
    min-height: clamp(3.5rem, 9vw, 6rem);
    display: none;
    align-items: center;
    justify-content: center;
    align-self: center;
}

.pianist-flow__connector-line {
    display: block;
    width: clamp(3px, 0.6vw, 8px);
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(16, 141, 150, 0) 0%, rgba(16, 141, 150, 0.85) 50%, rgba(20, 125, 167, 0) 100%);
}

.pianist-flow__connector-glow {
    position: absolute;
    inset: -67% -130%;
    background: radial-gradient(60% 70% at 50% 40%, rgb(255 255 255 / 75%) 0%, rgba(20, 153, 165, 0) 100%);
    filter: blur(22px);
    opacity: 0.85;
}

@media (min-width: 992px) {
    .pianist-flow__intro-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pianist-flow__connector {
        display: flex;
        align-self: center;
    }
}

@media (max-width: 991px) {
    .pianist-flow__summary {
        gap: clamp(1.4rem, 5vw, 2.2rem);
    }
}

@media (max-width: 768px) {
    .pianist-flow {
        padding-left: clamp(1rem, 5vw, 1.8rem);
        padding-right: clamp(1rem, 5vw, 1.8rem);
    }

    .pianist-flow__glow-card,
    .pianist-counter,
    .pianist-flow__card {
        backdrop-filter: none;
    }

    .pianist-flow__spark {
        opacity: 0.35;
    }
}

@media (max-width: 540px) {
    .pianist-counter {
        padding: clamp(1.6rem, 6vw, 2.1rem) clamp(1.3rem, 5vw, 2rem);
    }

    .pianist-flow__details {
        gap: clamp(1.1rem, 6vw, 1.6rem);
    }

    .pianist-flow__card {
        padding: clamp(1.3rem, 5vw, 1.9rem);
    }
}


.piano-keys {
    max-width: 1080px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: clamp(0.8rem, 2.5vw, 2.6rem);
    perspective: 1600px;
    flex-wrap: nowrap;
    transform: translateY(calc(-1 * var(--ep-keys-raise)));
    position: relative;
    z-index: 10;
}

.piano-key {
    display: block;
    flex: 1 1 clamp(160px, 22vw, 240px);
    max-width: clamp(180px, 28vw, 240px);
    min-width: clamp(96px, 30vw, 128px);
    width: auto;
    perspective: 2000px;
    transition: filter 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    border-radius: 32px;
    text-decoration: none;
}

.piano-key::after {
    content: none;
}

.piano-key__wrap {
    display: block;
    position: relative;
    border-radius: 32px;
    overflow: visible;
    padding: clamp(10px, 1.6vw, 14px) clamp(10px, 2vw, 16px) clamp(18px, 3vw, 22px);
    background: transparent;
    box-shadow: none;
    transform-origin: top center;
    transform-style: preserve-3d;
    transform: translateZ(0);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
        box-shadow 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.piano-key__wrap::before,
.piano-key__wrap::after {
    content: none;
}

.piano-key__face {
    position: relative;
    display: block;
    aspect-ratio: 327 / 600;
    border-radius: var(--piano-key-face-radius, 24px 24px 30px 30px);
    overflow: hidden;
    transform: translateZ(12px);
    box-shadow: inset 0 22px 34px rgba(15, 23, 42, 0.24), inset 0 -20px 28px rgba(15, 23, 42, 0.18);
    transition: box-shadow 0.5s ease;
}

.piano-keys--responsive-radius .piano-key__face {
    --piano-key-bottom-radius-min: 20px;
    --piano-key-bottom-radius-max: var(--piano-key-bottom-radius-target, 50px);
    --piano-key-bottom-radius: clamp(var(--piano-key-bottom-radius-min),
            calc(var(--piano-key-bottom-radius-min) + max(0px, 100vw - 320px) * 0.03125),
            var(--piano-key-bottom-radius-max));
    --piano-key-face-radius: 0px 0px var(--piano-key-bottom-radius) var(--piano-key-bottom-radius);
}

.piano-key__face::before,
.piano-key__face::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.piano-key__face::before {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.58) 0%, rgba(255, 255, 255, 0.22) 42%, rgba(255, 255, 255, 0.04) 68%, transparent 100%);
    mix-blend-mode: screen;
    opacity: 0.85;
}

.piano-key__face::after {
    background: linear-gradient(180deg, transparent 0%, rgba(19, 29, 50, 0.25) 68%, rgba(10, 16, 30, 0.38) 100%);
    mix-blend-mode: multiply;
    opacity: 0.72;
}

.piano-key__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
    transition: filter 0.35s ease;
}

.piano-key:hover,
.piano-key:focus-visible {
    filter: none;
}


.piano-key:hover .piano-key__wrap,
.piano-key:focus-visible .piano-key__wrap {
    transform: translateZ(-34px) rotateX(-18deg);
    box-shadow: none;
}

.piano-key:active .piano-key__wrap {
    transform: translateZ(-38px) rotateX(-20deg);
    box-shadow: none;
}

.piano-key:hover .piano-key__face,
.piano-key:focus-visible .piano-key__face {
    box-shadow: inset 0 26px 32px rgba(15, 23, 42, 0.24), inset 0 -18px 26px rgba(15, 23, 42, 0.2);
}

.piano-key:active .piano-key__face {
    box-shadow: inset 0 20px 30px rgba(15, 23, 42, 0.26), inset 0 -20px 24px rgba(15, 23, 42, 0.22);
}

.piano-key:hover .piano-key__face::before,
.piano-key:focus-visible .piano-key__face::before {
    opacity: 0.95;
}

.piano-key:hover .piano-key__face::after,
.piano-key:focus-visible .piano-key__face::after {
    opacity: 0.82;
}

.piano-key:active .piano-key__face::before {
    opacity: 0.88;
}

.piano-key:active .piano-key__face::after {
    opacity: 0.88;
}

.piano-key:hover .piano-key__image,
.piano-key:focus-visible .piano-key__image {
    filter: brightness(0.96) saturate(1.04);
}

.piano-key:focus-visible {
    outline: 3px solid rgba(26, 136, 188, 0.7);
    outline-offset: 12px;
}

.piano-key--how:hover .piano-key__image,
.piano-key--how:focus-visible .piano-key__image {
    content: url('/assets/images/TECLAACTIVA_comofunciona.png');
}

.piano-key--pianists:hover .piano-key__image,
.piano-key--pianists:focus-visible .piano-key__image {
    content: url('/assets/images/TECLAACTIVA_soypianista.png');
}

.piano-key--verified:hover .piano-key__image,
.piano-key--verified:focus-visible .piano-key__image {
    content: url('/assets/images/TECLAACTIVA_verificado.png');
}

@media (max-width: 991px) {
    :root {
        --ep-hero-keys-overlap: clamp(4.35rem, 10.2vw, 5.1rem);
        --ep-hero-bottom-gap: clamp(1.1rem, 4.6vw, 1.7rem);
        --ep-under-hero-shadow-height: clamp(3.3rem, 9.6vw, 4.6rem);
        --ep-keys-raise-base: 0.6rem;
    }

    .piano-keys {
        gap: clamp(0.75rem, 4.6vw, 2.1rem);
    }
}

@media (max-width: 768px) {
    :root {
        --ep-hero-keys-overlap: clamp(4.05rem, 11.8vw, 4.8rem);
        --ep-hero-bottom-gap: clamp(1rem, 4.4vw, 1.5rem);
        --ep-under-hero-shadow-height: clamp(3rem, 9.8vw, 4.3rem);
        --ep-keys-raise-base: 0.64rem;
    }

    .piano-keys {
        gap: clamp(0.7rem, 4.5vw, 1.6rem);
    }

    .piano-key {
        flex-basis: clamp(140px, 30vw, 200px);
        max-width: clamp(160px, 36vw, 210px);
        min-width: clamp(92px, 28vw, 120px);
    }

    .piano-key:hover .piano-key__wrap,
    .piano-key:focus-visible .piano-key__wrap {
        transform: translateZ(-28px) rotateX(-16deg);
    }
}

@media (max-width: 480px) {
    :root {
        --ep-hero-keys-overlap: clamp(1rem, 12vw, 2.5rem);
        --ep-hero-bottom-gap: clamp(0.5rem, 4vw, 1rem);
        --ep-under-hero-shadow-height: clamp(2.5rem, 9vw, 3.5rem);
        --ep-keys-raise-base: 0.5rem;
    }

    .piano-key {
        flex: 1 1 0;
        min-width: 0;
        max-width: 130px;
    }

    .piano-key__wrap {
        padding: 8px 6px 14px;
    }

    .piano-keys {
        gap: clamp(0.4rem, 2.5vw, 0.8rem);
        transform: none;
        /* Evitamos transformaciones 3D complejas que rompen el layout en móviles muy pequeños */
    }
}

.pianist-search-form .form-select,
.pianist-search-form .form-control {
    height: 48px;
    border-radius: 50rem;
    /* estilo pill completo */
    border: 1px solid rgba(2, 6, 23, 0.10);
    padding: 0 18px;
}

/* Alinear flecha del select nativo y reservar espacio para ella */
.pianist-search-form .form-select {
    padding-right: 2.25rem;
    background-position: right .75rem 50% !important;
    background-position-y: 50% !important;
    background-size: 16px 12px;
}

.pianist-search-form .form-select:focus,
.pianist-search-form .form-control:focus {
    outline: none;
    box-shadow: 0 0 0 0.15rem rgba(26, 136, 188, 0.25);
}

.pianist-search-form .btn-search.btn-primary {
    height: 56px;
    border-radius: 50rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-weight: 600;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.pianist-search-form .btn-search.btn-primary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.pianist-search-form .btn-search.btn-primary:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.35);
}

@media (max-width: 991px) {
    .hero-pianist {
        padding: clamp(4.5rem, 9vw, 5.5rem) 1rem calc(var(--ep-hero-keys-overlap) + clamp(1.2rem, 4.5vw, 1.9rem));
    }

    .hero-musician {
        padding-inline: 0;
        padding-bottom: calc(var(--ep-hero-bottom-gap) + clamp(0.85rem, 4.5vw, 1.75rem));
    }

    .hero-musician .hero-body {
        padding-top: clamp(1.65rem, 7vw, 3.25rem);
        padding-inline: clamp(1rem, 6vw, 2rem);
    }
}

/* Ajustes de imagen del hero para móvil, similar al home */
@media (max-width: 768px) {

    .hero-pianist::before,
    .hero-musician[data-hero-state="pianist"]::before {
        background-size: 160%;
        background-position: 70% 40%;
    }

    .hero-musician::before {
        background-size: 200%;
        background-position: 58% 44%;
    }

    .hero-musician .hero-tabs {
        margin: 0;
    }

    .hero-musician .hero-tab {
        font-size: clamp(0.9rem, 3.2vw, 1.02rem);
        padding: clamp(0.75rem, 3.2vw, 1rem) clamp(0.95rem, 4.6vw, 1.45rem);
        min-height: clamp(2.75rem, 11vw, 3.75rem);
    }

    .hero-musician .hero-body {
        gap: clamp(1.25rem, 6.5vw, 2.2rem);
        padding-top: clamp(1.5rem, 8vw, 3.1rem);
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {

    .hero-pianist::before,
    .hero-musician[data-hero-state="pianist"]::before {
        background-size: 500%;
        background-position: 80% 40%;
    }

    .hero-musician::before {
        background-size: 310%;
        background-position: 65% 48%;
    }

    .hero-musician .hero-tab {
        font-size: clamp(0.82rem, 3.6vw, 0.95rem);
        padding: clamp(0.65rem, 3.5vw, 0.9rem) clamp(0.75rem, 4.6vw, 1.1rem);
        min-height: clamp(2.5rem, 13vw, 3.25rem);
    }

    .hero-musician .hero-body {
        gap: clamp(1.1rem, 7vw, 1.9rem);
        padding-top: clamp(1.3rem, 9vw, 2.6rem);
    }
}

/* Opacidad unificada para todas las resoluciones (definida en el bloque base) */

/* Hacer el bloque del buscador un poco más grande en móvil */
@media (max-width: 768px) {

    .pianist-search-form .form-select,
    .pianist-search-form .form-control {
        height: 42px;
    }

    .pianist-search-form .btn-search.btn-primary {
        height: 42px;
    }
}

.pianist-card {
    border: 1px solid rgba(237, 242, 247, 0.5);
    border-radius: 1rem;
    position: relative;
    background-color: #ffffff;
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.06);
    transition: box-shadow .2s ease, transform .12s ease, background-color .2s ease;
}

.pianist-card:hover {
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.10);
    transform: translateY(-1px);
}

/* Mobile-first minimalist card layout */
.pianist-card__media {
    gap: .5rem;
}

.pianist-card__media .img-div {
    order: 1;
}

.pianist-card__media .pianist-card__badge {
    order: 2;
}

.pianist-card__section {
    margin-top: .5rem;
}

.pianist-card__section+.pianist-card__section {
    border-top: 1px solid rgba(2, 6, 23, 0.06);
    padding-top: .5rem;
}

.pianist-card__cta {
    width: 100%;
}

@media (max-width: 767.98px) {
    .pianist-card .card-title {
        text-align: center;
    }
}

@media (min-width: 768px) {
    .pianist-card__media .pianist-card__badge {
        order: 0;
    }

    .pianist-card__media .img-div {
        order: 1;
    }

    .pianist-card__cta {
        width: auto;
        min-width: 160px;
    }
}

/* Ajuste responsive del solapamiento y sombra del buscador */
@media (max-width: 480px) {

    .hero-pianist .search-container::after,
    .hero-musician .search-container::after {
        width: min(100%, 340px);
        height: clamp(2.5rem, 12vw, 3rem);
        bottom: calc(-1 * clamp(1.75rem, 6vw, 2.5rem));
    }

    .piano-keys-section {
        margin-top: calc(-1 * var(--ep-hero-keys-overlap));
        padding-left: clamp(0.5rem, 3vw, 1rem);
        padding-right: clamp(0.5rem, 3vw, 1rem);
        padding-bottom: clamp(1.5rem, 6vw, 2.5rem);
    }
}

.pianist-card .card-title a {
    color: var(--primary-color);
    text-decoration: none;
}

.pianist-card .card-title a:hover {
    text-decoration: underline;
}

.pianist-card .price {
    color: var(--accent-color);
}

/* Verified badge overlay for profile image */
.pianist-card .verified-icon {
    display: none;
}

/* Match EncuentraPianista avatar sizing */
.pianist-card .img-div {
    position: relative;
    width: 150px;
    height: 150px;
}

.pianist-card img.imgProfile {
    border-radius: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 4px solid rgba(26, 136, 188, 0.15);
    box-shadow: none;
}

@media (max-width: 480px) {

    .pianist-card .img-div,
    .pianist-card img.imgProfile {
        width: 100px;
        height: 100px;
    }
}

.pianist-card .price {
    color: var(--accent-color);
}

.pianist-profile h1 {
    color: var(--primary-color);
}

/* Highlight verified cards */
.pianist-card.pianist-card-verified {
    border-color: rgba(26, 136, 188, 0.48);
    /* azul marca EM */
    /* misma sombra base + anillo azul sutil */
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.06), 0 0 0 2px rgba(26, 136, 188, 0.18);
    background-color: rgba(26, 136, 188, 0.04);
    /* leve tinte azul */
}

.pianist-card.pianist-card-verified:hover {
    /* conserva el anillo y eleva sombra como las free */
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.10), 0 0 0 2px rgba(26, 136, 188, 0.22);
}

.pianist-card.pianist-card-verified .card-body {
    padding-top: 1rem;
    /* keep default spacing; banner won't overlap */
}

.verified-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-gradient, var(--accent-color));
    color: #fff;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: .85rem;
    line-height: 1;
    white-space: nowrap;
}

.verified-chip img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

@media (max-width: 767.98px) {
    .verified-chip {
        font-size: .8rem;
        padding: 4px 8px;
    }

    .pianist-card .img-div {
        width: 100px;
        height: 100px;
    }

    .pianist-card .btn {
        margin-top: .25rem;
    }
}

/* Select2: estilo suave para sugerencias de localidad */
.select2-encuentra.select2-dropdown {
    border: none;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    background: #ffffff;
    overflow: hidden;
    animation: em-dd-fade-in .18s ease-out;
    z-index: 3000;
    /* sobre el hero */
}

.select2-container--open {
    z-index: 3000;
}

/* Salvaguardas de estilo en contexto del hero por si otras hojas interfieren */
.hero-pianist .pianist-search-form .form-select,
.hero-musician .pianist-search-form .form-select {
    height: 48px !important;
    border-radius: 50rem !important;
    padding-left: 18px !important;
    padding-right: 2.25rem !important;
    /* espacio para la flecha */
    background-position: right .75rem 50% !important;
    background-size: 16px 12px !important;
}

.hero-pianist .select2-container--default .select2-selection--single,
.hero-musician .select2-container--default .select2-selection--single {
    height: 48px !important;
    border-radius: 50rem !important;
    display: flex;
    align-items: center;
    background-image: none !important;
    /* usaremos ::after para posicionar con precisión */
    position: relative;
}

.hero-pianist .select2-encuentra-container .select2-selection--single::after,
.hero-musician .select2-encuentra-container .select2-selection--single::after {
    top: 50% !important;
    transform: translateY(-50%) !important;
}

.hero-pianist .select2-container--default .select2-selection__rendered,
.hero-musician .select2-container--default .select2-selection__rendered {
    line-height: 48px !important;
    padding-left: 18px;
    padding-right: 2.25rem;
}

@media (max-width: 768px) {

    .hero-pianist .pianist-search-form .form-select,
    .hero-musician .pianist-search-form .form-select {
        height: 42px !important;
    }

    .hero-pianist .select2-container--default .select2-selection--single,
    .hero-musician .select2-container--default .select2-selection--single {
        height: 42px !important;
    }

    .hero-pianist .select2-container--default .select2-selection__rendered,
    .hero-musician .select2-container--default .select2-selection__rendered {
        line-height: 42px !important;
    }
}

.select2-encuentra.closing {
    animation: em-dd-fade-out .14s ease-in forwards;
}

@keyframes em-dd-fade-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes em-dd-fade-out {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(6px);
    }
}

.select2-encuentra .select2-search--dropdown .select2-search__field {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(26, 136, 188, 0.25);
    background: #ffffff !important;
    color: #0f172a !important;
    outline: none;
    width: 100% !important;
    box-sizing: border-box;
}

.select2-encuentra .select2-search--dropdown .select2-search__field:focus {
    box-shadow: 0 0 0 0.15rem rgba(26, 136, 188, 0.25);
}

.select2-encuentra .select2-results__options {
    padding: 6px;
}

.select2-encuentra .select2-results>.select2-results__options {
    max-height: min(34vh, 200px);
    max-height: min(34dvh, 200px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.select2-encuentra--location .select2-results>.select2-results__options {
    max-height: min(36vh, 220px);
    max-height: min(36dvh, 220px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Especialidades (con optgroups): scroll solo en el listado principal, nunca en el UL anidado */
.select2-encuentra--specialty .select2-results>.select2-results__options {
    /* Mantener el listado siempre “usable” en móviles: que nunca se coma la pantalla */
    max-height: min(36vh, 220px);
    max-height: min(36dvh, 220px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* Permite scroll chaining: al llegar al final, seguir deslizando desplaza la página (móvil) */
    overscroll-behavior-y: auto;
}

.select2-encuentra--specialty .select2-results__options--nested {
    max-height: none !important;
    overflow: visible !important;
}

.select2-encuentra .select2-results__option {
    border-radius: 8px;
    margin: 2px 0;
    padding: 10px 12px;
    color: #0f172a !important;
    transition: background-color .15s ease, color .15s ease, transform .12s ease;
}

.select2-encuentra .select2-results__message {
    color: rgba(15, 23, 42, 0.75) !important;
}

.select2-encuentra .select2-results__option--highlighted {
    background: rgba(26, 136, 188, 0.12);
    color: #0b3d54;
}

.select2-encuentra .select2-results__option[aria-selected="true"] {
    background: rgba(26, 136, 188, 0.2);
    color: #0b3d54;
}

.select2-encuentra-container {
    width: 100% !important;
}

.select2-encuentra-container .select2-selection--single {
    height: 48px;
    /* igual que .form-select en desktop */
    border-radius: 50rem;
    border: 1px solid rgba(2, 6, 23, 0.10);
    background-color: #fff;
    display: flex;
    align-items: center;
    padding: 0 8px;
    /* se gestiona el relleno del texto abajo */
    box-shadow: 0 0 0 0 rgba(26, 136, 188, 0);
    transition: box-shadow .2s ease;
    background-image: none;
    /* sustituimos por ::after para centrar perfecto */
    position: relative;
}

.select2-encuentra-container .select2-selection--single::after {
    content: '';
    position: absolute;
    right: .75rem;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 16px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-size: 16px 12px;
    pointer-events: none;
}

.select2-encuentra-container .select2-selection__rendered {
    line-height: 48px;
    padding-left: 16px;
    /* igual que los otros campos */
    padding-right: 2.25rem;
    /* espacio para la flecha como .form-select */
    color: #0f172a !important;
    font-size: 1rem;
    font-family: inherit;
}

/* Ocultar la flecha de Select2 y usar la de fondo para igualar .form-select */
.select2-encuentra-container .select2-selection__arrow {
    display: none;
}

.select2-encuentra-container .select2-selection__placeholder {
    color: rgba(15, 23, 42, 0.55) !important;
}

.select2-encuentra-container.select2-container--focus .select2-selection--single {
    box-shadow: 0 0 0 0.15rem rgba(26, 136, 188, 0.25);
}

/* En móvil, aumenta la altura como el resto del formulario */
@media (max-width: 768px) {
    .select2-encuentra-container .select2-selection--single {
        height: 42px;
    }

    .select2-encuentra-container .select2-selection__rendered {
        line-height: 42px;
    }

    .select2-encuentra-container .select2-selection__arrow {
        height: 42px;
    }
}

/* Limitar ancho en móviles para campos y botón (centrados) */
@media (max-width: 768px) {

    .pianist-search-form .form-select,
    .pianist-search-form .form-control,
    .pianist-search-form .btn-search,
    .select2-encuentra-container {
        max-width: 420px;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 480px) {

    .pianist-search-form .form-select,
    .pianist-search-form .form-control,
    .pianist-search-form .btn-search,
    .select2-encuentra-container {
        max-width: 360px;
    }
}

/* Transición elaborada para mostrar/ocultar la columna de especialidad */
[data-specialty-wrapper],
#specialtyWrapper {
    transition: flex-basis .28s ease, max-width .28s ease, padding .28s ease, margin .28s ease,
        opacity .22s ease, transform .28s ease, max-height .28s ease;
    will-change: max-width, max-height, opacity, transform;
    overflow: hidden;
    max-height: 200px;
    /* suficiente para un control */
}

[data-specialty-wrapper].specialty-hidden,
#specialtyWrapper.specialty-hidden {
    flex-basis: 0 !important;
    max-width: 0 !important;
    max-height: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 !important;
    opacity: 0 !important;
    transform: translateY(-6px);
    pointer-events: none;
}

/* --- Fix centrado flecha Select2 (forzar después de reglas anteriores) --- */
.select2-encuentra-container .select2-selection--single::after {
    content: none !important;
}

.select2-encuentra-container .select2-selection__arrow {
    display: block !important;
    position: absolute;
    top: 0 !important;
    right: 0 !important;
    height: 100% !important;
    width: 2.25rem !important;
}

.select2-encuentra-container .select2-selection__arrow b {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 5px 0 5px;
    border-color: #6c757d transparent transparent transparent;
}

/* Fallback general por si falta la clase de contenedor custom */
.select2-container--default .select2-selection--single .select2-selection__arrow {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    height: 100% !important;
    width: 2.25rem !important;
    display: block !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
}

/* Botón en tarjeta: estilo EncuentraMusico */
.pianist-card .btn-primary {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}

.pianist-card .btn-primary:hover {
    background: var(--btn-primary-hover-bg);
    border-color: var(--btn-primary-hover-bg);
}

/* =======================
   Perfil Pianista (Show)
   ======================= */
.profile-card {
    border: 1.5px solid rgba(26, 136, 188, 0.18);
    border-radius: 16px;
    padding: 1.25rem 1.25rem;
    background: #fbfdff;
    box-shadow: 0 10px 28px rgba(2, 6, 23, 0.10);
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .profile-card {
        padding: 1.5rem 1.75rem;
    }
}

.avatar-wrapper {
    position: relative;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(26, 136, 188, 0.15);
    box-shadow: none;
    /* sin sombreado para igualar estilo */
}

.avatar-wrapper.no-photo {
    display: grid;
    place-items: center;
    color: #94a3b8;
    background: #f8fafc;
}

.avatar-wrapper.no-photo i {
    font-size: 4rem;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    box-shadow: none;
}

.verified-badge {
    position: absolute;
    right: 6px;
    bottom: 6px;
    background: var(--accent-gradient);
    color: #fff;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    box-shadow: 0 6px 16px rgba(26, 136, 188, 0.4);
}

.profile-name {
    font-size: clamp(1.4rem, 4vw, 2rem);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Override global .custom-container h1 flex-centering for profile title */
.profile-card .profile-name {
    display: block;
    /* cancel display:flex from .custom-container h1 */
}

.profile-location {
    font-size: .95rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: #f1f5f9;
    color: #0f172a;
    border-radius: 999px;
    padding: .35rem .7rem;
    font-size: .85rem;
    font-weight: 600;
}

.chip-soft {
    background: rgba(26, 136, 188, 0.08);
    color: #161f22;
    border: 1px solid rgba(26, 136, 188, 0.12);
}



.section-card {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 28px;
    overflow: hidden;
    box-shadow:
        0 15px 35px rgba(15, 23, 42, 0.05),
        inset 0 0 0 1px rgba(255, 255, 255, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section-card:hover {
    box-shadow:
        0 20px 45px rgba(15, 23, 42, 0.08),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.section-card+.section-card {
    margin-top: 2rem;
}

.section-card__header {
    padding: 1.5rem 1.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    background: transparent;
}

.section-card__body {
    padding: 1rem 1.75rem 1.75rem;
}

.section-title {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.2rem, 3vw, 1.45rem);
    font-weight: 800;
    color: #161f22;
    display: inline-flex;
    align-items: center;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.section-title i {
    color: var(--accent-color);
    font-size: 1.25em;
    margin-right: 0.65rem;
    opacity: 0.9;
}

.section-subtitle {
    font-weight: 700;
    color: #334155;
    margin-bottom: .25rem;
}

.item-card {
    border: 1px dashed rgba(2, 6, 23, 0.12);
    border-radius: 12px;
    padding: .6rem .75rem;
    background: #fff;
}

.item-card .price {
    color: var(--accent-color);
    font-weight: 700;
}

.prose {
    line-height: 1.75;
    font-size: 1rem;
    color: #0f172a;
}

.prose p {
    margin-bottom: .75rem;
}

@media (max-width: 480px) {
    .avatar-wrapper {
        width: 116px;
        height: 116px;
    }
}

/* Verified chip styling is handled in profile views for dynamic gradients */

/* Collapsible helpers */
.collapsible .is-collapsed {
    display: none !important;
}

.collapse-toggle {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--accent-color);
    font-weight: 700;
    text-decoration: none;
    background: rgba(26, 136, 188, 0.08);
    border: 1px solid rgba(26, 136, 188, 0.15);
    border-radius: 999px;
    padding: .4rem .8rem !important;
    /* anula px-0 si existiera */
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, transform .15s ease, box-shadow .2s ease, border-color .2s ease, min-width .25s ease;
}

.collapse-toggle:hover {
    text-decoration: none;
    background: rgba(26, 136, 188, 0.14);
    color: var(--accent-color);
    border-color: rgba(26, 136, 188, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 136, 188, 0.15);
}

.collapse-toggle:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(26, 136, 188, 0.12);
    color: var(--accent-color);
}

.collapse-toggle:focus {
    color: var(--accent-color);
}

.collapse-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 0.15rem rgba(26, 136, 188, 0.25);
    color: var(--accent-color);
}

/* Fuerza color consistente del texto en todos los estados */
.collapse-toggle,
.collapse-toggle:hover,
.collapse-toggle:active,
.collapse-toggle:focus,
.collapse-toggle:focus-visible {
    color: var(--accent-color) !important;
}

.collapse-toggle::after {
    content: '';
    width: 12px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%231a88bc' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 6l6 6 6-6'/%3e%3c/svg%3e");
    background-size: 12px 12px;
    background-repeat: no-repeat;
    transition: transform .2s ease;
}

.collapse-toggle[aria-expanded='true']::after {
    transform: rotate(180deg);
}

.collapsible {
    overflow: hidden;
    transition: max-height 0.42s cubic-bezier(0.2, 0, 0, 1), opacity 0.25s ease;
    will-change: max-height;
}

/* Etiqueta del toggle con animación sutil al cambiar texto */
.collapse-toggle .toggle-label {
    display: inline-block;
    transition: opacity .18s ease, transform .22s cubic-bezier(0.2, 0, 0, 1);
}

.collapse-toggle .toggle-label.is-changing {
    opacity: 0;
    transform: translateY(-4px);
}

/* Animaciones de entrada/salida para chips de colapsable */
.collapsible-item {
    transition: opacity .28s ease, transform .34s cubic-bezier(0.2, 0, 0, 1);
    will-change: opacity, transform;
}

.collapsible-item.collapsing-in {
    opacity: 0;
    transform: translateY(6px);
}

.collapsible-item.collapsing-out {
    opacity: 0;
    transform: translateY(-6px);
}

/* Respeto a usuarios con motion reducido */
@media (prefers-reduced-motion: reduce) {

    .collapsible,
    .collapsible-item,
    .collapse-toggle,
    .collapse-toggle .toggle-label {
        transition: none !important;
    }
}

/* Centrado del avatar en móviles */
@media (max-width: 767.98px) {
    .profile-card .avatar-wrapper {
        margin-left: auto;
        margin-right: auto;
    }
}

/* Utilidad responsive para ancho auto en md+ */
@media (min-width: 768px) {
    .w-md-auto {
        width: auto !important;
    }
}

/* CTA del encabezado del perfil */
.profile-card .profile-cta,
.profile-cta--sticky {
    /* Use solid color for smooth color transitions (avoid gradient -> color jumps) */
    background-color: var(--accent-color);
    border-color: transparent;
    color: #fff;
    font-weight: 700;
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(26, 136, 188, 0.24);
    transition: background-color .2s ease, box-shadow .2s ease, transform .15s ease;
    -webkit-tap-highlight-color: transparent;
    /* evitar destello azul en móviles */
    text-decoration: none;
    /* evitar subrayado si fuese <a> */
}

.profile-card .profile-cta:hover,
.profile-cta--sticky:hover {
    background-color: var(--btn-primary-hover-bg, #147aa1);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 12px 28px rgba(26, 136, 188, 0.28);
    transform: translateY(-1px);
}

.profile-card .profile-cta:active,
.profile-cta--sticky:active {
    background-color: var(--accent-color);
    transform: translateY(0);
    box-shadow: 0 8px 20px rgba(26, 136, 188, 0.20);
}

.profile-card .profile-cta:focus-visible,
.profile-cta--sticky:focus-visible {
    outline: none;
    box-shadow: 0 0 0 0.15rem rgba(26, 136, 188, 0.25), 0 10px 24px rgba(26, 136, 188, 0.24);
}

/* Header: centrar en móviles; alinear a la izquierda en ≥ md (menos saltos) */
@media (max-width: 767.98px) {
    .profile-card .profile-name {
        text-align: center;
    }

    .profile-card .verified-line {
        text-align: center;
    }

    .profile-card .verified-line .verified-chip {
        margin-left: auto;
        margin-right: auto;
    }

    .profile-card .profile-location {
        text-align: center;
    }

    .profile-card .profile-cta {
        display: inline-flex;
    }
}

/* Correcciones sticky CTA: fijar al borde inferior del viewport en móviles */
button.profile-cta--sticky,
.profile-cta--sticky {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    border-radius: 0 !important;
    transform: translateY(100%) !important;
    z-index: 1045 !important;
    /* sobre contenido, por debajo de modales */
}

.profile-cta--sticky.is-visible {
    transform: translateY(0) !important;
}

@supports (padding-bottom: max(0px)) {
    .profile-cta--sticky {
        padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
    }
}

body.modal-open .profile-cta--sticky {
    display: none !important;
}

/* Sticky CTA en móvil (aparece cuando el CTA principal sale de vista) */
.profile-cta--sticky {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 1040;
    /* sobre el contenido habitual */
    border-radius: 12px;
    /* más cuadrado que el pill */
    box-shadow: 0 10px 28px rgba(2, 6, 23, 0.15), 0 6px 12px rgba(2, 6, 23, 0.08);
    transform: translateY(16px);
    opacity: 0;
    pointer-events: none;
    transition: transform .28s ease, opacity .2s ease, box-shadow .2s ease;
}

.profile-cta--sticky.is-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

@supports (padding-bottom: max(0px)) {
    .profile-cta--sticky {
        padding-bottom: max(0px, env(safe-area-inset-bottom, 0px));
    }
}

@media (min-width: 768px) {
    .profile-cta--sticky {
        display: none !important;
    }
}

@media (min-width: 768px) {

    /* Alinear bloque de texto (nombre, verificado, provincia) a la izquierda en md+ */
    .profile-card .profile-name-block,
    .profile-card .profile-name,
    .profile-card .verified-line,
    .profile-card .profile-location {
        text-align: left !important;
    }

    .profile-card .verified-line .verified-chip {
        margin-left: 0;
        margin-right: 0;
    }

    /* CTA se alinea a la derecha según la columna del grid (Bootstrap) */
    .profile-card .profile-cta-col {
        text-align: end;
    }
}

/* Ajuste específico para tablets: 768px–991.98px */
@media (min-width: 768px) and (max-width: 991.98px) {

    /* Centrar nombre, verificado y provincia */
    .profile-card .profile-name-block,
    .profile-card .profile-name,
    .profile-card .verified-line,
    .profile-card .profile-location {
        text-align: center !important;
    }

    .profile-card .verified-line .verified-chip {
        margin-left: auto;
        margin-right: auto;
    }

    /* Centrar el botón de solicitud ocupando toda la fila */
    .profile-card .profile-cta-col {
        text-align: center !important;
        flex: 0 0 100%;
        max-width: 100%;
    }

    .profile-card .profile-cta {
        display: inline-flex;
    }
}

/* ---- Inline edit additions ---- */
/* Align edit buttons to the right in all headers */
.section-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.section-card__header .section-title {
    margin-bottom: 0;
}

.section-edit-btn {
    border: 1px solid rgba(26, 137, 188, 0.2);
    background: rgba(26, 137, 188, 0.05);
    color: var(--accent-color);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 700;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    font-size: 0.82rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-edit-btn:hover {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 137, 188, 0.2);
    text-decoration: none;
    opacity: 1;
}

.section-edit-btn--outline {
    background: transparent;
    border-color: rgba(26, 137, 188, 0.4);
}

.section-edit-btn--outline:hover {
    background: rgba(26, 137, 188, 0.05);
    color: var(--accent-color);
}

.section-edit-btn i {
    font-size: 1.1em;
}

.profile-location__edit {
    background: rgba(255, 255, 255, 0.65);
    color: var(--accent-color);
    border: 1px solid rgba(26, 136, 188, 0.25);
    border-radius: 999px;
    padding: 0.45rem 1.1rem;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 700;
    font-size: 0.82rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.profile-location__edit:hover {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 137, 188, 0.2);
    text-decoration: none;
}

.collapse-toggle {
    border: 1px solid rgba(26, 137, 188, 0.15);
    background: rgba(255, 255, 255, 0.5);
    color: var(--accent-color);
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    transition: all 0.2s ease;
    cursor: pointer;
    margin-top: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.collapse-toggle:hover {
    background: #fff;
    border-color: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Avatar floating edit button */
.avatar-edit-fab {
    position: absolute;
    left: 50%;
    bottom: 8px;
    transform: translateX(-50%);
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    color: #fff;
    background: var(--accent-gradient, var(--accent-color));
    box-shadow: 0 10px 24px rgba(26, 136, 188, 0.35), 0 2px 6px rgba(2, 6, 23, 0.15);
    transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease;
}

.avatar-edit-fab i {
    font-size: 1.05rem;
    line-height: 1;
}

.avatar-edit-fab:hover {
    transform: translateX(-50%) translateY(-1px);
    box-shadow: 0 12px 28px rgba(26, 136, 188, 0.4), 0 4px 10px rgba(2, 6, 23, 0.14);
}

.avatar-edit-fab:active {
    transform: translateX(-50%) translateY(0);
}

.avatar-edit-fab:focus-visible {
    outline: none;
    box-shadow: 0 0 0 0.15rem rgba(26, 136, 188, 0.25), 0 10px 24px rgba(26, 136, 188, 0.35);
}

@media (max-width: 480px) {
    .avatar-edit-fab {
        width: 36px;
        height: 36px;
        bottom: 6px;
    }

    .avatar-edit-fab i {
        font-size: .95rem;
    }
}


/* Avatar bottom band edit button inside circle */
.avatar-edit-band {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 35%;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    border: 0;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.5);
    color: #0f172a;
    backdrop-filter: blur(6px) saturate(170%);
    -webkit-backdrop-filter: blur(6px) saturate(170%);
    transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.04);
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    opacity: 0.95;
}

.avatar-edit-band:hover {
    background: rgba(255, 255, 255, 0.85);
    color: #1a89bc;
    opacity: 1;
}

.avatar-edit-band:active {
    transform: scale(0.98);
}

.avatar-edit-band:focus-visible {
    outline: none;
    box-shadow: 0 0 0 0.15rem rgba(26, 136, 188, 0.28)
}

.avatar-edit-band i {
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .25s ease;
}

.avatar-edit-band:hover i {
    transform: scale(1.1);
}

@media (max-width:480px) {
    .avatar-edit-band {
        min-height: 38px;
        height: 38%;
    }

    .avatar-edit-band i {
        font-size: 1.05rem;
    }
}


/* Overrides for avatar edit band sizes (always visible on mobile too) */
.avatar-edit-band {
    gap: .3rem
}

.avatar-edit-band i {
    font-size: .95rem
}

.avatar-edit-band .edit-label {
    font-size: .88rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}

@media (max-width:480px) {
    .avatar-edit-band i {
        font-size: 1rem;
    }

    .avatar-edit-band .edit-label {
        font-size: 0.82rem;
    }
}

/* Bloques de titulaciones */
.education-groups {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.education-group {
    --education-text-color: #0f172a;
    --education-muted-color: #4b5563;
    --education-icon-color: var(--accent-color);
    --education-divider-color: rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: var(--education-text-color);
}

.education-group--verified {
    --education-muted-color: #46607a;
    --education-icon-color: var(--accent-color);
    --education-divider-color: rgba(26, 136, 188, 0.14);
}

.education-group--unverified {
    --education-text-color: #4b5563;
    --education-muted-color: #6b7280;
    --education-icon-color: #64748b;
    --education-divider-color: rgba(148, 163, 184, 0.28);
}

.education-group__header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-start;
}

.education-group__flag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0.3rem 0.75rem;
    line-height: 1;
    white-space: nowrap;
    background: rgba(148, 163, 184, 0.18);
    color: #334155;
    box-shadow: none;
    align-self: flex-start;
}

.education-group__flag img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.education-group__flag--verified {
    background: var(--accent-gradient, var(--accent-color));
    color: #fff;
    box-shadow: 0 8px 20px rgba(26, 136, 188, 0.18);
}

.education-group__flag--unverified {
    background: rgba(148, 163, 184, 0.22);
    color: #475569;
}

.education-group__note {
    margin: 0;
    font-size: 0.68rem;
    color: var(--education-muted-color);
    font-weight: 500;
}

.education-entry-list {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    gap: 0.15rem;
}

.education-entry {
    list-style: none;
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--education-divider-color);
    color: inherit;
}

.education-entry:first-child {
    padding-top: 0;
}

.education-entry:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.education-entry__icon {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: transparent;
    color: var(--education-icon-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex: 0 0 auto;
    margin-top: 0.05rem;
}

.education-entry__content {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.education-entry__title {
    font-weight: 600;
    font-size: 0.87rem;
    color: inherit;
    line-height: 1.25;
}

.education-entry__detail {
    font-size: 0.75rem;
    color: var(--education-muted-color);
    line-height: 1.35;
}

.education-entry__meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: flex-start;
    column-gap: 0.75rem;
    row-gap: 0.15rem;
    font-size: 0.68rem;
    color: var(--education-muted-color);
    font-weight: 500;
}

.education-entry__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
}

.education-entry__meta-item--institution {
    grid-column: 1 / 2;
}

.education-entry__meta-item--year {
    grid-column: 2 / 3;
    justify-self: end;
    white-space: nowrap;
}

.education-entry__meta-item:only-child {
    grid-column: 1 / -1;
    justify-self: start;
}

.education-entry__meta-item i {
    font-size: 0.8rem;
    color: inherit;
}

@media (max-width: 575.98px) {
    .education-groups {
        gap: 1.1rem;
    }

    .education-entry {
        gap: 0.5rem;
        padding: 0.4rem 0;
    }

    .education-entry:first-child {
        padding-top: 0.25rem;
    }

    .education-entry__meta {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }

    .education-entry__meta-item {
        justify-content: flex-start;
        width: 100%;
    }

    .education-entry__meta-item--year {
        justify-content: flex-start;
        white-space: normal;
    }
}