/* Smart CTA carousel styles */
.smart-cta {
    --smart-cta-primary: #0c5465;
    --smart-cta-primary-hover: #0f6275;
    --smart-cta-accent: #aee5f6;
    --smart-cta-progress-track: rgba(255, 255, 255, 0.35);
    --smart-cta-icon-bg: #ffffff;
    --smart-cta-icon-shadow: 0 4px 12px rgba(5, 37, 48, 0.35);
    --smart-cta-dot-border: transparent;
    --smart-cta-dot-active: transparent;
    --smart-cta-panel-bg: #ffffff;
    --smart-cta-panel-text: #23353f;
    --smart-cta-shadow: 0 16px 36px rgba(1, 26, 34, 0.5);
    /* Softer panel shadow so it reads as a single card, not a double layer */
    --smart-cta-panel-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
    position: fixed;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    z-index: 1400;
    pointer-events: none;
    font-family: inherit;
}

.smart-cta__pagination,
.smart-cta__control,
.smart-cta__panel {
    pointer-events: auto;
}

.smart-cta__pagination {
    display: none !important;
}

.smart-cta__dot {
    position: relative;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--smart-cta-dot-border);
    background-color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.smart-cta__dot.is-active {
    background-color: var(--smart-cta-dot-active);
    border-color: var(--smart-cta-dot-active);
}

.smart-cta__dot:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(174, 229, 246, 0.9);
}

.smart-cta__dot:hover:not(.is-active) {
    transform: scale(1.1);
    border-color: rgba(12, 84, 101, 0.55);
}

.smart-cta__dot-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    border: 0;
}

.smart-cta__control {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    min-width: 240px;
}

.smart-cta__button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    /* Slightly more compact rectangular button */
    min-height: 34px;
    border: 1px solid rgba(12, 84, 101, 0.45);
    border-radius: 3px;
    /* Fully transparent button; outline + text carry the emphasis */
    background-color: transparent;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-align: center;
    cursor: pointer;
    padding: 0;
    box-shadow: none;
    transition: transform 180ms ease, background-color 180ms ease;
    perspective: 1200px;
}

.smart-cta__button:hover {
    background-color: transparent;
    transform: translateY(-1px);
}

.smart-cta__button:active {
    transform: translateY(1px);
}

.smart-cta__button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(174, 229, 246, 0.9);
}

.smart-cta__button-inner {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 34px;
    padding: 0 14px;
    transform: rotateX(0deg);
    transform-style: preserve-3d;
    transition: transform var(--smart-cta-flip-duration, 420ms) cubic-bezier(0.65, 0, 0.35, 1);
}

.smart-cta__button-inner--flipping {
    transform: rotateX(-180deg);
}

.smart-cta__label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 14px;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

.smart-cta__text {
    white-space: nowrap;
}

/* Slightly smaller label for the longer "Need Buyers or Sellers?" CTA */
.smart-cta__text--buyers {
    font-size: 14px;
}

.smart-cta__icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--smart-cta-icon-bg);
    box-shadow: var(--smart-cta-icon-shadow);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.smart-cta__icon img {
    width: 70%;
    height: 70%;
    object-fit: contain;
    pointer-events: none;
}

/* Make the buyers/sellers icon slightly larger inside its circle */
.smart-cta__icon--buyers img {
    width: 82%;
    height: 82%;
}

.smart-cta__label--back {
    transform: rotateX(180deg);
}

.smart-cta__progress {
    display: none;
}

.smart-cta__panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 12px);
    width: min(340px, calc(100vw - 40px));
    max-width: 340px;
    /* Ensure the panel itself is transparent so only the inner card is visible */
    background: transparent;
    border: 0;
    box-shadow: none;
}

.smart-cta__panel[hidden] {
    display: none !important;
}

.smart-cta__panel::before,
.smart-cta__panel::after {
    /* Disable any legacy speech-bubble shapes or extra card layers */
    content: none !important;
}

.smart-cta__panel-inner {
    position: relative;
    background: var(--smart-cta-panel-bg);
    color: var(--smart-cta-panel-text);
    border-radius: 16px;
    padding: 24px 24px 20px;
    box-shadow: var(--smart-cta-panel-shadow);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.smart-cta__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(12, 84, 101, 0.08);
    color: var(--smart-cta-panel-text);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: background-color 160ms ease, transform 160ms ease;
}

.smart-cta__close:hover {
    background: rgba(12, 84, 101, 0.18);
    transform: scale(1.05);
}

.smart-cta__close:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(174, 229, 246, 0.8);
}

.smart-cta__title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--smart-cta-panel-text);
}

.smart-cta__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.smart-cta__link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--smart-cta-primary);
    font-weight: 600;
    text-decoration: none;
    transition: color 160ms ease;
}

.smart-cta__link:hover {
    color: var(--smart-cta-primary-hover);
    text-decoration: underline;
}

.smart-cta__link i {
    font-size: 15px;
}

.smart-cta__note {
    margin: 4px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(35, 53, 63, 0.85);
}

.smart-cta__note a {
    color: var(--smart-cta-primary);
    font-weight: 600;
}

.smart-cta__note a:hover {
    color: var(--smart-cta-primary-hover);
}

/* Nudge CTA slightly left on typical laptop widths
   (e.g., 1366x768) so the button and panel are
   fully visible while remaining bottom-right fixed. */
@media (max-width: 1400px) and (min-width: 1024px) {
    .smart-cta {
        right: 130px;
    }
    .smart-cta__panel {
        right: 130px;
    }
}

@media (max-width: 768px) {
    .smart-cta {
        right: 12px;
    }
    .smart-cta__control {
        min-width: 220px;
    }
}

@media (max-width: 600px) {
    .smart-cta {
        right: 16px;
        left: auto;
        align-items: flex-end;
    }
    .smart-cta__control {
        min-width: 220px;
        max-width: 280px;
    }
    .smart-cta__text {
        white-space: normal;
    }
    .smart-cta__button-inner {
        padding: 0 24px;
    }
    .smart-cta__icon {
        width: 32px;
        height: 32px;
    }
    .smart-cta__panel {
        position: fixed;
        right: 16px;
        left: auto;
        bottom: calc(84px + env(safe-area-inset-bottom, 0px));
        width: min(320px, calc(100vw - 32px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .smart-cta__button,
    .smart-cta__button-inner,
    .smart-cta__dot,
    .smart-cta__progress-bar,
    .smart-cta__close {
        transition: none !important;
    }
}

/* Remove legacy CTA widgets so only Smart CTA appears */
.contact-cta,
.contact-cta__panel,
.contact-cta__panel-inner,
.scroll-cta,
.scroll-cta__panel,
.scroll-cta__panel-inner {
    display: none !important;
}
