/* Explain: Styles for various UI components, including cards, panels, and interactive elements. */
.site-header {
    background: linear-gradient(180deg, rgba(253, 251, 252, 0.94), rgba(251, 246, 248, 0.66));
    border-bottom-color: var(--border-color);
    backdrop-filter: blur(18px);
}

.logo-mark {
    display: inline-flex;
    flex: 0 0 auto;
    align-self: stretch;
    align-items: center;
    justify-content: center;
    min-width: 3rem;
}

.logo-mark img {
    transform-origin: left center;
    animation: logoReveal 820ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
    filter: saturate(1.12) contrast(1.04);
}

@keyframes logoReveal {
    from {
        opacity: 0;
        transform: translateX(-12px) scale(0.84);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.logo-text {
    animation: logoReveal 820ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
    animation-delay: 160ms;
    color: var(--logo-color);
}

/* Marca «albogred» junto al logotipo: entra con un desplazamiento suave y vuelve a desplazarse al pasar por encima */
.logo-brand {
    display: inline-flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    transition: transform 420ms cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
}

.logo-link:hover .logo-brand,
.logo-link:focus-visible .logo-brand,
.logo-link:active .logo-brand {
    transform: translateX(0.4rem);
}

.logo-brand-name {
    animation: logoReveal 820ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
    animation-delay: 160ms;
    color: var(--logo-color);
    font-family: var(--font-logo);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.05;
    transition: letter-spacing 420ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.logo-link:hover .logo-brand-name,
.logo-link:focus-visible .logo-brand-name,
.logo-link:active .logo-brand-name {
    letter-spacing: 0.09em;
}

@media (min-width: 640px) {
    .logo-brand-name {
        font-size: 1.4rem;
    }
}

@media (min-width: 1024px) {
    .logo-brand-name {
        font-size: 1.6rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .logo-brand,
    .logo-brand-name {
        transition: none;
        animation: none;
    }

    .logo-link:hover .logo-brand,
    .logo-link:focus-visible .logo-brand,
    .logo-link:active .logo-brand {
        transform: none;
    }

    .logo-link:hover .logo-brand-name,
    .logo-link:focus-visible .logo-brand-name,
    .logo-link:active .logo-brand-name {
        letter-spacing: 0.01em;
    }
}

/* Instagram en su color de marca original (degradado) */
.ig-brand {
    background: radial-gradient(circle at 30% 107%, #FDF497 0%, #FDF497 5%, #FD5949 45%, #D6249F 60%, #285AEB 90%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

@media (prefers-reduced-motion: reduce) {
    .logo-mark img,
    .logo-text {
        animation: none;
    }
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--sage-dark);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.section-kicker::before {
    display: inline-block;
    width: 2.2rem;
    height: 1px;
    background: linear-gradient(90deg, var(--accent-color), rgba(140, 70, 90, 0.1));
    content: "";
}

.glass-panel {
    border: 1px solid var(--glass-border);
    background: var(--gradient-glass);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

/* Tableros rectos: la familia visual de los tableros de materias, sin inclinación ni vuelo */
.board-panel {
    border: 1px solid var(--glass-border);
    border-radius: 1.7rem;
    background: var(--gradient-card);
    box-shadow: var(--shadow-soft);
    transition: border-color 340ms ease, box-shadow 340ms ease;
}

.board-panel:hover {
    border-color: var(--glass-border);
    box-shadow: 0 16px 38px rgba(95, 55, 65, 0.07);
}

.arch-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    background: var(--gradient-surface);
    box-shadow: var(--shadow-soft);
}

.arch-frame::after {
    position: absolute;
    inset: 1rem;
    border: 1px solid rgba(250, 249, 246, 0.55);
    border-radius: inherit;
    content: "";
    pointer-events: none;
}

.arch-frame-large {
    height: min(68vh, 640px);
    min-height: 440px;
    border-radius: 1.8rem;
}

.arch-frame.arch-frame-flat {
    border-radius: 1.5rem;
}

/* Portada: la fotografía se funde con el fondo mediante bordes difuminados */
.arch-frame.hero-soft {
    border: none;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    transition: transform 340ms cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
}

.arch-frame.hero-soft:hover,
.arch-frame.hero-soft:focus-within {
    z-index: 3;
    transform: translateY(-6px);
}

@media (hover: none) {
    .arch-frame.hero-soft:hover {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .arch-frame.hero-soft {
        transition: none;
    }

    .arch-frame.hero-soft:hover,
    .arch-frame.hero-soft:focus-within {
        transform: none;
    }
}

/* Borde de la fotografía: un matiz ligeramente más oscuro, fundido con el fondo */
.arch-frame.hero-soft::after {
    position: absolute;
    inset: 0;
    z-index: 2;
    border: none;
    background: radial-gradient(125% 125% at 50% 50%, rgba(123, 34, 51, 0) 52%, rgba(123, 34, 51, 0.22) 100%);
    -webkit-mask-image:
        linear-gradient(to right, transparent 0%, #000 13%, #000 87%, transparent 100%),
        linear-gradient(to bottom, transparent 0%, #000 13%, #000 87%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(to right, transparent 0%, #000 13%, #000 87%, transparent 100%),
        linear-gradient(to bottom, transparent 0%, #000 13%, #000 87%, transparent 100%);
    mask-composite: intersect;
    content: "";
    pointer-events: none;
}

.arch-frame.hero-soft::before {
    position: absolute;
    inset: 2rem 1.6rem;
    z-index: 0;
    border-radius: 2.4rem;
    background: radial-gradient(circle at 50% 50%, rgba(150, 55, 78, 0.32), rgba(150, 55, 78, 0) 72%);
    filter: blur(34px);
    content: "";
    pointer-events: none;
}

.hero-soft img {
    position: relative;
    z-index: 1;
    -webkit-mask-image:
        linear-gradient(to right, transparent 0%, #000 13%, #000 87%, transparent 100%),
        linear-gradient(to bottom, transparent 0%, #000 13%, #000 87%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(to right, transparent 0%, #000 13%, #000 87%, transparent 100%),
        linear-gradient(to bottom, transparent 0%, #000 13%, #000 87%, transparent 100%);
    mask-composite: intersect;
}

.arch-frame-medium {
    height: 540px;
    border-radius: 1.8rem;
}

/* Portada: tres fotografías a tamaño completo, sin recortes ni veladuras */
.hero-gallery {
    display: grid;
    gap: 0.85rem;
}

.hero-gallery-wide,
.hero-gallery-item {
    overflow: hidden;
    border: 1px solid var(--glass-border);
    border-radius: 1.6rem;
    background: var(--gradient-surface);
    box-shadow: var(--shadow-soft);
}

.hero-gallery-wide {
    aspect-ratio: 16 / 9;
}

.hero-gallery-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

.hero-gallery-item {
    aspect-ratio: 16 / 9;
}

.hero-gallery-wide img,
.hero-gallery-item img {
    display: block;
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.hero-note {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 0.85rem;
    border-radius: 1.4rem;
    padding: 0.95rem 1.1rem;
    color: var(--text-color);
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.45;
}

.practice-card {
    display: flex;
    min-height: 340px;
    flex-direction: column;
    border-radius: 1.8rem;
    background: var(--gradient-glass);
    padding: 1.6rem;
    transition: transform 300ms ease, border-color 300ms ease, box-shadow 300ms ease;
}

.practice-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 26px 80px rgba(95, 55, 65, 0.11);
    transform: translateY(-5px);
}

.practice-icon {
    display: inline-flex;
    height: 2.8rem;
    width: 2.8rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.95rem;
    background: var(--sage-soft);
    color: var(--sage-dark);
    font-size: 1.05rem;
}

.quiet-detail,
.step-card,
.review-card,
.info-card {
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    background: var(--gradient-card);
    padding: 1.3rem;
}

.quiet-detail span {
    display: inline-flex;
    margin-bottom: 0.7rem;
    color: var(--accent-color);
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
}

.quiet-detail p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.step-card {
    display: flex;
    height: 100%;
    flex-direction: column;
}

.step-number {
    color: var(--accent-color);
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
}

.review-card {
    display: flex;
    height: 100%;
    flex-direction: column;
    box-shadow: var(--shadow-soft);
}

.info-icon {
    display: inline-flex;
    height: 2.4rem;
    width: 2.4rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.85rem;
    background: var(--sage-soft);
    color: var(--sage-dark);
    font-size: 0.9rem;
}

.info-label {
    margin-top: 0.9rem;
    color: var(--text-color);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.info-value {
    margin-top: 0.35rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.65;
    word-break: break-word;
}

.info-value a {
    color: inherit;
    text-decoration: none;
    transition: color 300ms ease;
}

.info-value a:hover {
    color: var(--accent-color);
}

.pill-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: var(--glass-bg);
    padding: 0.5rem 1rem;
    color: var(--text-color);
    font-size: 0.86rem;
    font-weight: 600;
    transition: border-color 300ms ease, background 300ms ease, color 300ms ease;
}

.pill-link:hover {
    border-color: var(--accent-color);
    background: var(--surface-color);
    color: var(--sage-dark);
}

.faq-item {
    border: 1px solid var(--glass-border);
    border-radius: 1.3rem;
    background: var(--gradient-glass);
    padding: 1.05rem 1.3rem;
    transition: border-color 300ms ease, background 300ms ease;
}

.faq-item[open] {
    border-color: var(--glass-border);
    background: linear-gradient(145deg, #F8F1F3 0%, #E9D6DD 100%);
}

.faq-item summary {
    display: flex;
    cursor: pointer;
    list-style: none;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: var(--text-color);
    font-weight: 600;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-chevron {
    color: var(--accent-color);
    font-size: 0.75rem;
    transition: transform 300ms ease;
}

.faq-item[open] .faq-chevron {
    transform: rotate(180deg);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.form-status.success {
    color: var(--sage-dark);
}

.form-status.error {
    color: #A03F52;
}

.contact-panel {
    border-radius: 2.2rem;
    padding: clamp(1.4rem, 3.5vw, 2.2rem);
}

.mobile-cta-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 45;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border-top: 1px solid var(--glass-border);
    background: rgba(252, 250, 250, 0.92);
    padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom));
    backdrop-filter: blur(18px);
}

@media (min-width: 768px) {
    .mobile-cta-bar {
        display: none;
    }
}

@media (max-width: 767px) {
    .section-kicker::before {
        width: 1.6rem;
    }

    .arch-frame-large,
    .arch-frame-medium {
        height: 430px;
        min-height: 0;
        width: min(100%, 400px);
        margin-right: auto;
        margin-left: auto;
    }

    .practice-card {
        min-height: 0;
    }
}

.soft-band {
    background: var(--gradient-surface);
}

.cta-band {
    border: 1px solid var(--glass-border);
    background:
        radial-gradient(circle at 88% 8%, rgba(255, 255, 255, 0.78), transparent 24rem),
        radial-gradient(circle at 0% 100%, rgba(238, 205, 216, 0.9), transparent 26rem),
        var(--gradient-band);
}

.site-footer {
    border-top: 1px solid var(--border-color);
    background: var(--gradient-footer);
}

.pay-block {
    display: block;
}

.pay-block--grid {
    display: grid;
    gap: 0.75rem;
}

.pay-block--flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.pay-block[hidden] {
    display: none;
}

.panel-view[hidden] {
    display: none;
}

.upload-drop {
    display: flex;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    border: 1.5px dashed var(--glass-border);
    border-radius: 1.6rem;
    background: var(--gradient-card);
    padding: 2rem 1.2rem;
    text-align: center;
    transition: border-color 300ms ease, background 300ms ease;
}

.upload-drop.is-over {
    border-color: var(--accent-color);
    background: linear-gradient(150deg, #FFFFFF 0%, #EFE0E5 100%);
}

.upload-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border: 1px solid var(--glass-border);
    border-radius: 1.2rem;
    background: var(--gradient-card);
    padding: 0.9rem 1.1rem;
}

.legal-note {
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.65;
    letter-spacing: 0.01em;
}

.legal-note strong {
    color: var(--text-color);
    font-weight: 700;
}

/* Realce suave de elementos flotantes al pasar por encima */
.lift-card,
.hero-note,
.pill-link,
.quiet-detail,
.info-card,
.step-card,
.review-card {
    transition: transform 340ms cubic-bezier(0.22, 0.61, 0.36, 1),
        border-color 340ms ease,
        background 340ms ease,
        box-shadow 340ms ease,
        color 340ms ease;
    will-change: transform;
}

.lift-card:hover,
.hero-note:hover,
.pill-link:hover,
.quiet-detail:hover,
.info-card:hover,
.step-card:hover,
.review-card:hover {
    border-color: var(--accent-color);
    background: linear-gradient(150deg, #FFFFFF 0%, #EFE0E5 100%);
    box-shadow: 0 26px 56px rgba(95, 55, 65, 0.13);
    transform: translateY(-5px);
}

/* Tarjetas de pasos de la consulta en línea: mismo desplazamiento que el resto de tableros */
.paso-card {
    transition: transform 340ms cubic-bezier(0.22, 0.61, 0.36, 1),
        border-color 340ms ease,
        background 340ms ease,
        box-shadow 340ms ease;
    will-change: transform;
}

.paso-card:hover,
.paso-card:focus-within {
    border-color: var(--accent-color);
    background: linear-gradient(150deg, #FFFFFF 0%, #EFE0E5 100%);
    box-shadow: 0 26px 56px rgba(95, 55, 65, 0.13);
    transform: translateY(-8px);
}

@media (prefers-reduced-motion: reduce) {
    .paso-card {
        transition: none;
    }
}

.pill-link:hover {
    color: var(--sage-dark);
    transform: translateY(-2px);
}

/* La botonera de todo el sitio se eleva suavemente al pasar por encima */
.btn {
    transition: transform 340ms cubic-bezier(0.22, 0.61, 0.36, 1),
        background 340ms ease,
        border-color 340ms ease,
        color 340ms ease,
        box-shadow 340ms ease;
    will-change: transform;
}

.btn:hover,
.btn:focus-visible {
    transform: translateY(-4px);
}



.nav-float {
    transition: transform 340ms cubic-bezier(0.22, 0.61, 0.36, 1),
        color 340ms ease,
        background 340ms ease,
        border-color 340ms ease;
    will-change: transform;
}

.nav-float:hover,
.nav-float:focus-visible {
    transform: translateY(-4px);
    color: var(--accent-color);
}





/* Tablero de solicitudes: cada pedido como una tarjeta resumen al modo Trello */
.board-card {
    display: flex;
    height: 100%;
    flex-direction: column;
    border: 1px solid var(--glass-border);
    border-radius: 1.6rem;
    background: var(--gradient-card);
    padding: 1.4rem;
    box-shadow: var(--shadow-soft);
    transition: transform 340ms cubic-bezier(0.22, 0.61, 0.36, 1),
        border-color 340ms ease,
        box-shadow 340ms ease,
        background 340ms ease;
    will-change: transform;
}

.board-card:hover {
    border-color: var(--accent-color);
    background: linear-gradient(150deg, #FFFFFF 0%, #EFE0E5 100%);
    box-shadow: 0 26px 56px rgba(95, 55, 65, 0.13);
    transform: translateY(-5px);
}



/* Ristra de materias: tableros apilados, un pico invade el de atrás */
.deck-hint {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.6;
    text-align: center;
}

.deck {
    display: flex;
    flex-direction: column;
    padding-bottom: 1.5rem;
}

.deck-card {
    --tilt: 0deg;
    --drop: 0px;
    --lift: 0px;
    position: relative;
    z-index: 1;
    margin-top: -1.5rem;
    border: 1px solid var(--glass-border);
    border-radius: 1.7rem;
    background: var(--gradient-card);
    box-shadow: var(--shadow-soft);
    transform: translateY(calc(var(--drop) + var(--lift))) rotate(var(--tilt));
    transition: margin 360ms cubic-bezier(0.22, 0.61, 0.36, 1),
        flex-basis 460ms cubic-bezier(0.22, 0.61, 0.36, 1),
        transform 460ms cubic-bezier(0.22, 0.61, 0.36, 1),
        border-color 360ms ease,
        box-shadow 360ms ease,
        background 360ms ease;
    will-change: transform;
}

@keyframes deckFront {
    0% {
        transform: translateY(var(--drop)) rotate(var(--tilt)) scale(0.97);
    }
    55% {
        transform: translateY(calc(var(--drop) - 12px)) rotate(2.4deg) scale(1.02);
    }
    100% {
        transform: translateY(calc(var(--drop) + var(--lift))) rotate(0deg) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .deck-card.is-active {
        animation: none;
    }
}

.deck-card:first-child {
    margin-top: 0;
}

.deck-card:hover {
    --lift: -6px;
    border-color: var(--accent-color);
    box-shadow: 0 26px 56px rgba(95, 55, 65, 0.13);
}

.deck-card.is-active {
    z-index: 30;
    --tilt: 0deg;
    --lift: -4px;
    margin-top: 0.9rem;
    animation: deckFront 520ms cubic-bezier(0.22, 0.61, 0.36, 1);
    border-color: var(--accent-color);
    background: linear-gradient(150deg, #FFFFFF 0%, #EFE0E5 100%);
    box-shadow: 0 26px 60px rgba(95, 55, 65, 0.15);
}

.deck-card.is-active:first-child {
    margin-top: 0;
}

.deck-card.is-active + .deck-card {
    margin-top: 0.9rem;
}

.deck-head {
    display: flex;
    width: 100%;
    min-height: 4.4rem;
    align-items: center;
    gap: 1rem;
    border: 0;
    border-radius: 1.7rem;
    background: transparent;
    padding: 1rem 1.4rem;
    color: var(--text-color);
    text-align: left;
    transition: color 300ms ease;
}

.deck-head:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: -2px;
}

.deck-head-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.2rem;
}

.deck-title {
    color: var(--text-color);
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.3;
}

.deck-sub {
    color: var(--sage-dark);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.deck-chevron {
    margin-left: auto;
    color: var(--accent-color);
    font-size: 0.8rem;
    transition: transform 300ms ease;
}

.deck-card.is-active .deck-chevron {
    transform: rotate(180deg);
}

.deck-body {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 520ms cubic-bezier(0.22, 0.61, 0.36, 1), opacity 340ms ease;
}

.deck-card.is-active .deck-body {
    max-height: 3200px;
    opacity: 1;
}

.deck-body-inner {
    padding: 0 1.4rem 1.6rem;
}

.deck-lead {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.75;
}

/* En la materia abierta, el contenido arranca pegado a la cabecera */
.deck-card.is-active .deck-head {
    padding-bottom: 0.1rem;
}



/* Escritorio: las materias se abren en abanico, en fila y sin apilarse */
@media (min-width: 1024px) {
    .deck {
        flex-direction: row;
        align-items: flex-start;
        justify-content: center;
        padding-top: 1.6rem;
    }

    .deck-card {
        flex: 0 1 14rem;
        margin-top: 0;
        margin-left: -1.1rem;
    }

    .deck-card:first-child {
        margin-left: 0;
    }

    .deck-card:nth-child(1) {
        --tilt: -4deg;
        --drop: 18px;
    }

    .deck-card:nth-child(2) {
        --tilt: -2deg;
        --drop: 6px;
    }

    .deck-card:nth-child(3) {
        --tilt: 0deg;
        --drop: 0px;
    }

    .deck-card:nth-child(4) {
        --tilt: 2deg;
        --drop: 6px;
    }

    .deck-card:nth-child(5) {
        --tilt: 4deg;
        --drop: 18px;
    }

    .deck-card:nth-child(n + 6) {
        --tilt: 0deg;
        --drop: 10px;
    }

    .deck-card.is-active {
        z-index: 30;
        --tilt: 0deg;
        --drop: 0px;
        --lift: -4px;
        flex: 0 1 28rem;
        margin-top: 0;
        margin-left: -1.1rem;
        border-color: var(--accent-color);
        background: linear-gradient(150deg, #FFFFFF 0%, #EFE0E5 100%);
        box-shadow: 0 26px 60px rgba(95, 55, 65, 0.15);
    }

    .deck-card.is-active:first-child {
        margin-left: 0;
    }

    .deck-card.is-active + .deck-card {
        margin-top: 0;
    }

    .deck-head {
        min-height: 0;
        flex-direction: column;
        align-items: flex-start;
        justify-content: space-between;
        gap: 0.9rem;
        aspect-ratio: 1 / 1;
        padding: 1.5rem;
    }

    .deck-title {
        font-size: 1.04rem;
    }

    .deck-chevron {
        margin-left: 0;
        align-self: flex-end;
    }

    /* La materia al frente: cabecera en una sola línea, contenido pegado al epígrafe */
    .deck-card.is-active .deck-head {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 0.9rem;
        aspect-ratio: auto;
        padding: 1rem 1.4rem 0;
    }

    .deck-card.is-active .deck-chevron {
        margin-left: auto;
        align-self: center;
    }
}

.aviso-legal-box {
    border: 1px solid var(--glass-border);
    border-radius: 1.4rem;
    background: var(--gradient-card);
    padding: 1.1rem 1.3rem;
}

.aviso-legal-title {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    color: var(--text-color);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    line-height: 1.5;
    text-transform: uppercase;
}

.aviso-legal-title i {
    margin-top: 0.15rem;
    color: var(--accent-color);
}

.aviso-legal-box ul {
    margin: 0.7rem 0 0;
    padding-left: 1.05rem;
    list-style: disc;
}

.aviso-legal-box li {
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.7;
}

.aviso-legal-box li + li {
    margin-top: 0.4rem;
}

.aviso-legal-firm {
    margin-top: 0.8rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 0.7rem;
    color: var(--text-color);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.65;
}

/* Tarjeta flotante con el código QR de la web */
.qr-share {
    position: fixed;
    left: 1rem;
    bottom: calc(5.4rem + env(safe-area-inset-bottom));
    z-index: 44;
    display: flex;
    width: min(16.5rem, calc(100vw - 2rem));
    flex-direction: column;
    align-items: flex-start;
}

.qr-share-panel {
    display: none;
    width: 100%;
    border: 1px solid var(--glass-border);
    border-radius: 1.6rem;
    background: var(--gradient-glass);
    box-shadow: var(--shadow-soft);
    padding: 1rem;
    backdrop-filter: blur(18px);
}

.qr-share-fab {
    display: inline-flex;
    min-height: 3rem;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: var(--glass-bg);
    padding: 0.5rem 1rem;
    color: var(--text-color);
    font-size: 0.86rem;
    font-weight: 600;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
    transition: transform 340ms cubic-bezier(0.22, 0.61, 0.36, 1), border-color 340ms ease, background 340ms ease;
}

.qr-share-fab:hover,
.qr-share-fab:focus-visible {
    border-color: var(--accent-color);
    background: var(--surface-color);
    transform: translateY(-3px);
}

@media (min-width: 1024px) {
    .qr-share {
        left: 1.5rem;
        bottom: 1.5rem;
    }

    .qr-share-panel {
        display: block;
    }

    .qr-share-fab {
        display: none;
    }
}

.qr-share.is-open .qr-share-panel {
    display: block;
}

.qr-share.is-open .qr-share-fab {
    display: none;
}

.qr-share.is-closed .qr-share-panel {
    display: none;
}

.qr-share.is-closed .qr-share-fab {
    display: inline-flex;
}

.qr-share-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.qr-share-title {
    margin: 0;
    color: var(--text-color);
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.3;
}

.qr-share-close {
    display: inline-flex;
    height: 2rem;
    width: 2rem;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: var(--glass-bg);
    color: var(--text-muted);
    font-size: 0.75rem;
    transition: color 300ms ease, border-color 300ms ease;
}

.qr-share-close:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.qr-share-figure {
    display: flex;
    min-height: 10rem;
    align-items: center;
    justify-content: center;
    margin-top: 0.85rem;
    border: 1px solid var(--glass-border);
    border-radius: 1.2rem;
    background: #FFFFFF;
    padding: 0.75rem;
}

.qr-share-image {
    width: 100%;
    max-width: 11.5rem;
    height: auto;
    aspect-ratio: 1 / 1;
}

.qr-share-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.86rem;
    line-height: 1.5;
    text-align: center;
}

.qr-share-hint {
    margin: 0.85rem 0 0;
    color: var(--text-muted);
    font-size: 0.84rem;
    line-height: 1.6;
}

.qr-share-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.qr-share-btn {
    display: inline-flex;
    min-height: 2.75rem;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: 1px solid var(--glass-border);
    border-radius: 0.95rem;
    background: var(--gradient-card);
    color: var(--text-color);
    font-size: 0.86rem;
    font-weight: 600;
    transition: transform 300ms ease, border-color 300ms ease, background 300ms ease, color 300ms ease;
}

.qr-share-btn:hover,
.qr-share-btn:focus-visible {
    border-color: var(--accent-color);
    background: var(--surface-color);
    color: var(--sage-dark);
    transform: translateY(-2px);
}

.qr-share-status {
    margin: 0.6rem 0 0;
    color: var(--sage-dark);
    font-size: 0.82rem;
    line-height: 1.55;
}



@media (prefers-reduced-motion: reduce) {
    .qr-share-fab,
    .qr-share-btn {
        transition: none;
    }
}

/* Desplazamiento y primer plano unificados: tableros, paneles, marcos y tarjetas responden igual al ratón y al tacto */
.board-panel,
.contact-panel,
.glass-panel,
.arch-frame,
.hero-gallery-wide,
.hero-gallery-item,
.faq-item,
.upload-drop,
.upload-row,
.aviso-legal-box,
.info-card,
.quiet-detail,
.step-card,
.review-card,
.practice-card,
.board-card {
    position: relative;
    transition: transform 340ms cubic-bezier(0.22, 0.61, 0.36, 1),
        border-color 340ms ease,
        background 340ms ease,
        box-shadow 340ms ease,
        color 340ms ease;
    will-change: transform;
}

.board-panel:is(:hover, :focus-within, :active),
.contact-panel:is(:hover, :focus-within, :active),
.glass-panel:is(:hover, :focus-within, :active),
.arch-frame:is(:hover, :focus-within, :active),
.hero-gallery-wide:is(:hover, :focus-within, :active),
.hero-gallery-item:is(:hover, :focus-within, :active),
.faq-item:is(:hover, :focus-within, :active),
.upload-drop:is(:hover, :focus-within, :active),
.upload-row:is(:hover, :focus-within, :active),
.aviso-legal-box:is(:hover, :focus-within, :active),
.info-card:is(:hover, :focus-within, :active),
.quiet-detail:is(:hover, :focus-within, :active),
.step-card:is(:hover, :focus-within, :active),
.review-card:is(:hover, :focus-within, :active),
.practice-card:is(:hover, :focus-within, :active),
.board-card:is(:hover, :focus-within, :active) {
    z-index: 5;
    border-color: var(--accent-color);
    box-shadow: 0 26px 56px rgba(95, 55, 65, 0.13);
    transform: translateY(-6px);
}

/* Botoneras: la elevación también se produce al pulsar con el dedo */
.btn:active,
.nav-float:active,
.pill-link:active,
.qr-share-btn:active,
.qr-share-fab:active {
    transform: translateY(-4px);
}

@media (prefers-reduced-motion: reduce) {
    .board-panel,
    .contact-panel,
    .glass-panel,
    .arch-frame,
    .hero-gallery-wide,
    .hero-gallery-item,
    .faq-item,
    .upload-drop,
    .upload-row,
    .aviso-legal-box,
    .info-card,
    .quiet-detail,
    .step-card,
    .review-card,
    .practice-card,
    .board-card {
        transition: none;
    }

    .board-panel:is(:hover, :focus-within, :active),
    .contact-panel:is(:hover, :focus-within, :active),
    .glass-panel:is(:hover, :focus-within, :active),
    .arch-frame:is(:hover, :focus-within, :active),
    .hero-gallery-wide:is(:hover, :focus-within, :active),
    .hero-gallery-item:is(:hover, :focus-within, :active),
    .faq-item:is(:hover, :focus-within, :active),
    .upload-drop:is(:hover, :focus-within, :active),
    .upload-row:is(:hover, :focus-within, :active),
    .aviso-legal-box:is(:hover, :focus-within, :active),
    .info-card:is(:hover, :focus-within, :active),
    .quiet-detail:is(:hover, :focus-within, :active),
    .step-card:is(:hover, :focus-within, :active),
    .review-card:is(:hover, :focus-within, :active),
    .practice-card:is(:hover, :focus-within, :active),
    .board-card:is(:hover, :focus-within, :active) {
        transform: none;
    }
}