/* ==========================================================================
   KROTAR — Marketing Digital section
   Two-column layout: a vertical list of services acts as a selector on the
   left, a single reused card on the right swaps its content on hover/focus.
   Reuses existing tokens only (--color-cyan, --duration-fast, --ease-premium,
   .glass-card, .service-title, .service-desc, .service-link, .ambient-glow) —
   no new colors, fonts or effects.
   ========================================================================== */

.md-glow-a {
    top: -50px;
    left: -70px;
    width: 480px;
    height: 480px;
}

.md-glow-b {
    bottom: -80px;
    right: -60px;
    width: 500px;
    height: 500px;
}

/* Whole-section reveal on scroll — same fade + translateY the Hero already
   uses on load (krotarCtaEntrance in hero.css), just triggered by
   IntersectionObserver instead of a fixed page-load delay. */
.md-reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.3s var(--ease-premium), transform 0.3s var(--ease-premium);
}

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

.md-layout {
    position: relative;
    display: grid;
    grid-template-columns: minmax(220px, 300px) 1fr;
    gap: var(--space-6);
    align-items: start;
}

.md-service-list {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.md-service-item {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    border-left: 2px solid transparent;
    padding: 0.9rem 1.1rem;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-body);
    cursor: pointer;
    transition: color var(--duration-fast) ease, border-color var(--duration-fast) ease,
        background var(--duration-fast) ease;
}

.md-service-item:hover,
.md-service-item:focus-visible {
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.03);
}

.md-service-item.is-active {
    color: var(--color-text);
    border-left-color: var(--color-cyan);
    background: rgba(255, 255, 255, 0.04);
}

/* El ítem "Reseñas" es un <a>, no un <button> — sin esto heredaría el
   subrayado por defecto de los enlaces. */
.md-service-item[href] {
    text-decoration: none;
}

/* Extra top margin on the card only — .md-layout's align-items:start means
   this pushes just the card down within its grid row, leaving the sidebar
   (.md-service-list, no margin added) at its current position. */
.md-card {
    padding: var(--space-6);
    margin-top: 1rem;
}

.md-card .service-title {
    display: block;
    margin-bottom: var(--space-3);
}

.md-card .service-desc {
    display: block;
    margin-bottom: var(--space-4);
}

.md-card-bullets {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: var(--space-5);
}

.md-card-bullets li {
    position: relative;
    padding-left: 1.2rem;
    font-size: 0.94rem;
    line-height: 1.5;
    color: var(--color-text-body);
}

.md-card-bullets li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-cyan);
}

.md-card .md-card-title,
.md-card .md-card-desc,
.md-card .md-card-bullets,
.md-card .service-link {
    transition: opacity var(--duration-fast) ease, transform var(--duration-fast) ease;
}

/* Real CTA, not a plain text link — bottom-right of the card, with a solid
   filled surface (not a near-transparent tinted border) so it reads
   immediately as a button, not a label. Same strong fill as .btn-cta-accent
   (style.css) and Delivery's .dv-card .service-link — one shared visual
   language for every primary CTA on the page. Scoped to .md-card only —
   the base .service-link (services-grid cards) keeps its plain-link
   treatment. */
.md-card .service-link {
    display: flex;
    width: fit-content;
    margin-left: auto;
    margin-top: var(--space-3);
    padding: 0.75rem 1.4rem;
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #ffffff;
    background:
        linear-gradient(180deg, rgba(0, 145, 255, 0.92) 0%, rgba(0, 61, 150, 0.96) 100%);
    border: 1px solid rgba(0, 217, 255, 0.7);
    border-radius: var(--radius-pill);
    box-shadow:
        inset 0 1px 0 0 rgba(255, 255, 255, 0.24),
        0 8px 22px rgba(0, 20, 90, 0.4),
        0 0 22px rgba(0, 145, 255, 0.25);
    transition: border-color var(--duration-fast) ease, background var(--duration-fast) ease, box-shadow var(--duration-fast) ease, transform var(--duration-fast) ease;
}

.md-card .service-link:hover,
.md-card .service-link:focus-visible {
    color: #ffffff;
    border-color: rgba(0, 217, 255, 0.9);
    background:
        linear-gradient(180deg, rgba(0, 174, 239, 0.98) 0%, rgba(0, 91, 255, 1) 100%);
    box-shadow:
        inset 0 1px 0 0 rgba(255, 255, 255, 0.3),
        0 12px 28px rgba(0, 20, 90, 0.45),
        0 0 34px rgba(0, 174, 239, 0.4);
    transform: translateY(-2px);
}

.md-card.is-updating .md-card-title,
.md-card.is-updating .md-card-desc,
.md-card.is-updating .md-card-bullets,
.md-card.is-updating .service-link {
    opacity: 0;
    transform: translateY(6px);
}

@media (max-width: 860px) {
    .md-layout {
        grid-template-columns: 1fr;
    }
}
