/* ==========================================================
   ANÁLISIS DE MERCADO
   Lenguaje analítico / inmobiliario
   Bootstrap para estructura responsive
========================================================== */

.tas-mercado-hero {
    position: relative;
    min-height: calc(100svh - var(--tas-bottom-nav-height));
    padding: clamp(5.2rem, 7vw, 6.5rem) 0 clamp(2rem, 3vw, 3rem);
    overflow: hidden;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    color: var(--tas-white);
}

.tas-mercado-hero-overlay {
    position: absolute;
    z-index: 0;
    inset: 0;
    background: linear-gradient(90deg, rgba(16, 16, 16, .93) 0%, rgba(16, 16, 16, .79) 42%, rgba(16, 16, 16, .40) 72%, rgba(16, 16, 16, .18) 100%);
    pointer-events: none;
}

.tas-mercado-hero .tas-container {
    position: relative;
    z-index: 1;
}

.tas-mercado-hero-layout {
    min-height: 500px;
    border: 1.2px solid rgba(255, 255, 255, .18);
}

.tas-mercado-hero-content {
    display: flex;
    width: min(860px, 100%);
    min-height: 500px;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2rem, 4vw, 3.5rem);
}

.tas-mercado-hero-kicker {
    margin: 0 0 1.5rem;
    color: rgba(255, 255, 255, .58);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.tas-mercado-hero h1 {
    max-width: 14ch;
    margin: 0;
    font-size: clamp(2.7rem, 4.8vw, 5rem);
    font-weight: 520;
    letter-spacing: -.065em;
    line-height: .91;
}

.tas-mercado-hero-content > p:not(.tas-mercado-hero-kicker) {
    max-width: 740px;
    margin: 1.5rem 0 0;
    color: rgba(255, 255, 255, .78);
    font-size: clamp(1.02rem, 1.45vw, 1.25rem);
    line-height: 1.65;
}

.tas-mercado-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    margin-top: 1.8rem;
}

/* Tipografía */

.tas-mercado-intro-heading h2,
.tas-mercado-context-heading h2,
.tas-mercado-comparables-copy h2,
.tas-mercado-signals-heading h2,
.tas-mercado-interpret-heading h2,
.tas-mercado-use-copy h2,
.tas-mercado-faq-heading h2,
.tas-mercado-related-copy h2 {
    margin: 0;
    color: var(--tas-black);
    font-weight: 530;
    letter-spacing: -.055em;
    line-height: .98;
}

.tas-mercado-intro-copy p a,
.tas-mercado-comparables-copy p a,
.tas-mercado-use-copy p a,
.tas-mercado-related-copy p a {
    color: inherit;
    text-decoration-line: underline;
    text-decoration-color: rgba(177, 21, 27, .38);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.tas-mercado-intro-copy p a:hover,
.tas-mercado-comparables-copy p a:hover,
.tas-mercado-use-copy p a:hover,
.tas-mercado-related-copy p a:hover {
    color: var(--tas-red);
}

/* Intro */

.tas-mercado-intro {
    background: #f3f5f6;
}

.tas-mercado-intro-heading {
    padding-right: clamp(0rem, 3vw, 3rem);
}

.tas-mercado-intro-heading h2 {
    max-width: 12ch;
    font-size: clamp(2.6rem, 4.8vw, 5rem);
}

.tas-mercado-intro-copy {
    padding-top: .2rem;
    border-top: 1px solid var(--tas-border);
}

.tas-mercado-intro-copy > p {
    max-width: 830px;
    margin: 1.5rem 0 0;
    color: var(--tas-grey-500);
    line-height: 1.78;
}

/* Contexto */

.tas-mercado-context {
    background: #ffffff;
}

.tas-mercado-context > .tas-container > .row > [class*="col-"] {
    display: flex;
}

.tas-mercado-context-heading {
    display: flex;
    width: 100%;
    min-height: 620px;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2.7rem, 5vw, 5rem);
    background: #111111;
    color: #ffffff;
}

.tas-mercado-context-heading .tas-section-kicker {
    color: var(--tas-red);
}

.tas-mercado-context-heading h2 {
    max-width: 12ch;
    color: #ffffff;
    font-size: clamp(2.35rem, 4.1vw, 4.4rem);
}

.tas-mercado-context-heading > p:not(.tas-section-kicker) {
    margin: 1.4rem 0 0;
    color: rgba(255, 255, 255, .62);
    line-height: 1.7;
}

.tas-mercado-context-body {
    width: 100%;
    height: 100%;
    border-top: 1px solid var(--tas-border);
}

.tas-mercado-context-row {
    padding: clamp(2rem, 3.4vw, 3.2rem);
    border-right: 1px solid var(--tas-border);
    border-bottom: 1px solid var(--tas-border);
    background: #ffffff;
}

.tas-mercado-context-row:nth-child(even) {
    background: #f3f5f6;
}

.tas-mercado-context-row-final {
    background: var(--tas-red) !important;
    color: #ffffff;
}

.tas-mercado-context-row span {
    display: block;
    margin-bottom: .7rem;
    color: var(--tas-red);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.tas-mercado-context-row-final span {
    color: rgba(255, 255, 255, .62);
}

.tas-mercado-context-row h3 {
    margin: 0;
    font-size: clamp(1.45rem, 2.2vw, 2.2rem);
    font-weight: 550;
    letter-spacing: -.035em;
    line-height: 1.05;
}

.tas-mercado-context-row p {
    margin: 0;
    color: var(--tas-grey-500);
    line-height: 1.68;
}

.tas-mercado-context-row-final p {
    color: rgba(255, 255, 255, .68);
}

/* Comparables */

.tas-mercado-comparables {
    background: #f3f5f6;
}

.tas-mercado-comparables-media {
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: #e1e5e7;
}

.tas-mercado-comparables-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tas-mercado-comparables-copy {
    padding-left: clamp(0rem, 3vw, 3rem);
}

.tas-mercado-comparables-copy h2 {
    max-width: 12ch;
    font-size: clamp(2.45rem, 4.5vw, 4.8rem);
}

.tas-mercado-comparables-copy > p:not(.tas-section-kicker) {
    margin: 1.4rem 0 0;
    color: var(--tas-grey-500);
    line-height: 1.75;
}

/* Señales */

.tas-mercado-signals {
    background: #ffffff;
}

.tas-mercado-signals-heading h2 {
    max-width: 15ch;
    font-size: clamp(2.4rem, 4.5vw, 4.8rem);
}

.tas-mercado-signals-intro {
    max-width: 560px;
    margin: 0;
    color: var(--tas-grey-500);
    line-height: 1.7;
}

.tas-mercado-signal {
    height: 100%;
    min-height: 285px;
    padding: clamp(1.8rem, 3vw, 2.8rem);
    border: 1px solid var(--tas-border);
    background: #f3f5f6;
}

.tas-mercado-signal-red {
    background: var(--tas-red);
    color: #ffffff;
}

.tas-mercado-signal i {
    display: block;
    margin-bottom: 2.4rem;
    color: var(--tas-red);
    font-size: 2.25rem;
}

.tas-mercado-signal-red i {
    color: #ffffff;
}

.tas-mercado-signal h3 {
    margin: 0;
    font-size: clamp(1.4rem, 2.1vw, 2rem);
    font-weight: 550;
    letter-spacing: -.035em;
}

.tas-mercado-signal p {
    margin: .9rem 0 0;
    color: var(--tas-grey-500);
    line-height: 1.62;
}

.tas-mercado-signal-red p {
    color: rgba(255, 255, 255, .7);
}

/* Statement */

.tas-mercado-statement {
    padding: clamp(4rem, 8vw, 8rem) 0;
    background: var(--tas-red);
    color: #ffffff;
}

.tas-mercado-statement-copy p {
    max-width: 23ch;
    margin: 0;
    font-size: clamp(2.3rem, 4.8vw, 5.2rem);
    font-weight: 510;
    letter-spacing: -.055em;
    line-height: .98;
}

.tas-mercado-statement-line {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, .45);
}

/* Interpretación */

.tas-mercado-interpret {
    background: #f3f5f6;
}

.tas-mercado-interpret-heading {
    padding-right: clamp(0rem, 3vw, 3rem);
}

.tas-mercado-interpret-heading h2 {
    max-width: 12ch;
    font-size: clamp(2.45rem, 4.5vw, 4.8rem);
}

.tas-mercado-interpret-list {
    border-top: 1px solid var(--tas-border);
}

.tas-mercado-interpret-row {
    padding: clamp(2rem, 3.5vw, 3.2rem) 0;
    border-bottom: 1px solid var(--tas-border);
}

.tas-mercado-interpret-row h3 {
    margin: 0;
    font-size: clamp(1.45rem, 2.2vw, 2.2rem);
    font-weight: 550;
    letter-spacing: -.035em;
    line-height: 1.06;
}

.tas-mercado-interpret-row p {
    max-width: 780px;
    margin: .85rem 0 0;
    color: var(--tas-grey-500);
    line-height: 1.7;
}

.tas-mercado-interpret-row-final {
    padding-right: clamp(1.5rem, 3vw, 3rem);
    padding-left: clamp(1.5rem, 3vw, 3rem);
    background: #111111;
    color: #ffffff;
}

.tas-mercado-interpret-row-final p {
    color: rgba(255, 255, 255, .64);
}

/* Uso */

.tas-mercado-use {
    background: #ffffff;
}

.tas-mercado-use-copy h2 {
    max-width: 14ch;
    font-size: clamp(2.45rem, 4.5vw, 4.8rem);
}

.tas-mercado-use-copy > p:not(.tas-section-kicker) {
    max-width: 850px;
    margin: 1.4rem 0 0;
    color: var(--tas-grey-500);
    line-height: 1.75;
}

.tas-mercado-use-note {
    padding: clamp(2.3rem, 4vw, 3.8rem);
    border-top: 4px solid var(--tas-red);
    background: #f3f5f6;
}

.tas-mercado-use-note h3 {
    max-width: 14ch;
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 3rem);
    font-weight: 540;
    letter-spacing: -.045em;
    line-height: 1.03;
}

.tas-mercado-use-note > p:not(.tas-section-kicker) {
    margin: 1.3rem 0 0;
    color: var(--tas-grey-500);
    line-height: 1.7;
}

/* FAQ */

.tas-mercado-faq {
    background: #f3f5f6;
}

.tas-mercado-faq > .tas-container > .row > [class*="col-"] {
    display: flex;
}

.tas-mercado-faq-heading {
    width: 100%;
    height: 100%;
    padding: clamp(3rem, 6vw, 6rem);
    background: #111111;
    color: #ffffff;
}

.tas-mercado-faq-heading .tas-section-kicker {
    color: var(--tas-red);
}

.tas-mercado-faq-heading h2 {
    max-width: 11ch;
    color: #ffffff;
    font-size: clamp(2.4rem, 4vw, 4.5rem);
}

.tas-mercado-faq-list {
    width: 100%;
    height: 100%;
    padding: clamp(2.5rem, 5vw, 5rem);
    background: #ffffff;
}

.tas-mercado-faq-item {
    border-bottom: 1px solid var(--tas-border);
}

.tas-mercado-faq-item:first-child {
    border-top: 1px solid var(--tas-border);
}

.tas-mercado-faq-item summary {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1.8rem 0;
    cursor: pointer;
    list-style: none;
}

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

.tas-mercado-faq-item summary h3 {
    flex: 1 1 auto;
    margin: 0;
    font-size: clamp(1.15rem, 1.8vw, 1.55rem);
    font-weight: 560;
    letter-spacing: -.025em;
    line-height: 1.2;
}

.tas-mercado-faq-item summary i {
    flex: 0 0 auto;
    color: var(--tas-red);
    font-size: 1.25rem;
    transition: transform .2s ease;
}

.tas-mercado-faq-item[open] summary i {
    transform: rotate(45deg);
}

.tas-mercado-faq-answer {
    padding: 0 0 2rem;
}

.tas-mercado-faq-answer h4 {
    margin: 0 0 .55rem;
    font-size: .92rem;
    font-weight: 700;
}

.tas-mercado-faq-answer p {
    max-width: 760px;
    margin: 0;
    color: var(--tas-grey-500);
    line-height: 1.7;
}

/* Cierre */

.tas-mercado-related {
    background: #ffffff;
}

.tas-mercado-related-copy h2 {
    max-width: 14ch;
    font-size: clamp(2.4rem, 4.5vw, 4.8rem);
}

.tas-mercado-related-copy p {
    max-width: 840px;
    margin: 1.4rem 0 0;
    color: var(--tas-grey-500);
    line-height: 1.72;
}

.tas-mercado-related-link {
    display: inline-flex;
    align-items: center;
    gap: .8rem;
    padding-bottom: .45rem;
    border-bottom: 2px solid var(--tas-red);
    color: var(--tas-black);
    font-size: .86rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.tas-mercado-related-link:hover {
    color: var(--tas-red);
}

/* Animación */

.tas-mercado-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .65s ease, transform .65s cubic-bezier(.22, 1, .36, 1);
}

.tas-mercado-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 991.98px) {
    .tas-mercado-hero {
        padding: 5.4rem 0 2rem;
    }

    .tas-mercado-hero-overlay {
        background: rgba(16, 16, 16, .72);
    }

    .tas-mercado-hero-layout,
    .tas-mercado-hero-content {
        min-height: 460px;
    }

    .tas-mercado-context-heading {
        min-height: auto;
    }

    .tas-mercado-comparables-copy {
        padding-left: 0;
    }
}

@media (max-width: 575.98px) {
    .tas-mercado-hero-layout,
    .tas-mercado-hero-content {
        min-height: 0;
    }

    .tas-mercado-hero h1 {
        font-size: clamp(2.35rem, 11vw, 3.45rem);
    }

    .tas-mercado-hero-content > p:not(.tas-mercado-hero-kicker) {
        margin-top: 1.15rem;
        font-size: .96rem;
        line-height: 1.55;
    }

    .tas-mercado-hero-actions {
        align-items: stretch;
        flex-direction: column;
        margin-top: 1.4rem;
    }

    .tas-mercado-hero-actions .tas-btn {
        width: 100%;
    }

    .tas-mercado-signal {
        min-height: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tas-mercado-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .tas-mercado-faq-item summary i {
        transition: none;
    }
}
