/* Custom styles that override or extend Tailwind can go here */
body {
    /* Smooth scrolling */
    scroll-behavior: smooth;
}

/* Capitalize service names and headings */
.capitalize-words {
    text-transform: capitalize;
}

/* Service cards - capitalize names */
.service-card h3,
.service-name,
h3.service-title {
    text-transform: capitalize;
}

/* General service list capitalization */
section h3 a,
section h3 span {
    text-transform: capitalize;
}

/* Location service grid items */
.grid a h3 {
    text-transform: capitalize;
}

/* Footer service list */
footer ul li a {
    text-transform: capitalize;
}

/* Break long words/zip codes */
.break-words {
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Truncate text with ellipsis */
.truncate-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Multi-line truncation */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Neighborhood pills */
.neighborhood-pill {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #f3f4f6;
    border-radius: 9999px;
    font-size: 0.875rem;
    color: #374151;
    margin: 0.25rem;
}

/* ========== CALL BUTTON ANIMATIONS ========== */

@keyframes callPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 color-mix(in oklch, var(--brand-accent, #f2a426) 55%, transparent);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 10px color-mix(in oklch, var(--brand-accent, #f2a426) 0%, transparent);
        transform: scale(1.03);
    }
}

@keyframes callShimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes callBarSlideUp {
    from { opacity: 0; transform: translateY(100%); }
    to { opacity: 1; transform: translateY(0); }
}

.btn-call {
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.btn-call:hover {
    transform: scale(1.05);
}

.btn-call:focus-visible {
    outline: 2px solid var(--brand-accent, #f2a426);
    outline-offset: 2px;
}

.btn-call--pulse {
    animation: callPulse 2s ease-in-out infinite;
}

.btn-call--icon {
    transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.btn-call--card {
    background-size: 200% auto;
}

.btn-call--card:hover {
    background-image: linear-gradient(
        90deg,
        var(--brand-dark, var(--brand, #3022ce)) 0%,
        var(--brand-accent, var(--brand-light, var(--brand, #4a3ae6))) 50%,
        var(--brand, #3022ce) 100%
    );
    animation: callShimmer 2.5s linear infinite, callPulse 2s ease-in-out infinite;
}

.btn-call--bar {
    animation: callBarSlideUp 0.45s ease-out both;
}

.floating-cta-wrap {
    position: fixed;
    bottom: 1rem;
    left: 0.75rem;
    right: 0.75rem;
    z-index: 50;
    display: flex;
    justify-content: center;
    pointer-events: none;
    animation: callBarSlideUp 0.45s ease-out both;
}

@media (min-width: 768px) {
    .floating-cta-wrap {
        bottom: 1.5rem;
        left: 0;
        right: 0;
    }
}

/* Mobile sticky call bar: slide icon right → ring → wait 2s → ring → repeat */
@keyframes mobilePhoneTravel {
    0%, 100% {
        right: calc(100% - 4.25rem);
        transform: translateY(-50%) scale(1);
    }
    8%, 55% {
        right: 1rem;
        transform: translateY(-50%) scale(1);
    }
    10%, 12% {
        right: 1rem;
        transform: translateY(-50%) scale(1.12);
    }
    41%, 43% {
        right: 1rem;
        transform: translateY(-50%) scale(1.12);
    }
}

@keyframes mobileCallRingBurst {
    /* 8s loop: ring → 2s pause → ring → reset */
    0%, 7%, 9%, 16%, 40%, 42%, 50%, 58%, 100% {
        opacity: 0;
        transform: scale(0.9);
    }
    8%, 10% {
        opacity: 0.9;
        transform: scale(1);
    }
    15% {
        opacity: 0;
        transform: scale(1.85);
    }
    41%, 43% {
        opacity: 0.9;
        transform: scale(1);
    }
    49% {
        opacity: 0;
        transform: scale(1.85);
    }
}

.floating-cta-pill-link,
.floating-cta-mobile-link {
    position: relative;
    display: block;
    width: 100%;
    max-width: min(22rem, 100%);
    min-height: 3.75rem;
    padding: 0.875rem 1.125rem;
    overflow: visible;
    pointer-events: auto;
    background-color: var(--brand, #3022ce);
    border-radius: 9999px;
    box-shadow: 0 8px 28px rgba(48, 34, 206, 0.45), 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (min-width: 768px) {
    .floating-cta-pill-link,
    .floating-cta-mobile-link {
        max-width: 26rem;
        min-height: 4rem;
        padding: 1rem 1.25rem;
    }
}

.floating-cta-phone-stage {
    position: absolute;
    top: 50%;
    right: 1rem;
    width: 3.25rem;
    height: 3.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: mobilePhoneTravel 8s ease-in-out infinite;
}

.floating-cta-phone-icon {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-cta-ring {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.75);
    pointer-events: none;
    animation: mobileCallRingBurst 8s ease-out infinite;
}

.floating-cta-ring--delay {
    animation-delay: 0.12s;
}

.floating-cta-icon-pulse {
    animation: callPulse 2s ease-in-out infinite;
}

/* ========== SERVICE PREVIEW CARD (What We Do) ========== */

@keyframes callAttention {
    0%, 100% {
        transform: scale(1) translateY(0);
        box-shadow:
            0 4px 16px color-mix(in oklch, var(--brand, #3022ce) 45%, transparent),
            0 0 0 0 color-mix(in oklch, var(--brand-accent, var(--brand, #3022ce)) 35%, transparent);
    }
    50% {
        transform: scale(1.05) translateY(-1px);
        box-shadow:
            0 8px 24px color-mix(in oklch, var(--brand, #3022ce) 55%, transparent),
            0 0 0 10px color-mix(in oklch, var(--brand-accent, var(--brand, #3022ce)) 0%, transparent);
    }
}

@keyframes callGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.12); }
}

.service-preview-card {
    display: block;
    min-height: 320px;
    height: 100%;
}

.service-preview-card .service-card-media {
    transition: transform 0.7s ease;
}

.service-preview-card:hover .service-card-media {
    transform: scale(1.05);
}

.service-card-body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    padding-top: 4rem;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.92) 0%,
        rgba(0, 0, 0, 0.65) 45%,
        transparent 100%
    );
}

.service-card-body h3 {
    margin-bottom: 0.375rem;
}

.service-card-body p {
    margin-bottom: 0;
}

.service-card-actions {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-shrink: 0;
}

.service-card-learn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.625rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 0.625rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.service-card-learn:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.55);
    transform: translateY(-1px);
}

.service-card-call {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.625rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(
        135deg,
        var(--brand-dark, var(--brand, #3022ce)) 0%,
        var(--brand-accent, var(--brand-light, var(--brand, #4a3ae6))) 50%,
        var(--brand, #3022ce) 100%
    );
    background-size: 200% auto;
    border-radius: 0.625rem;
    box-shadow: 0 4px 16px color-mix(in oklch, var(--brand, #3022ce) 45%, transparent);
    animation: callAttention 1.75s ease-in-out infinite, callGlow 2.5s ease-in-out infinite;
    transition: transform 0.2s ease;
}

.service-card-call:hover {
    animation: callShimmer 1.2s linear infinite, callAttention 1.75s ease-in-out infinite;
    transform: scale(1.06);
}

.service-card-call svg {
    flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
    .btn-call--pulse,
    .btn-call--card:hover,
    .btn-call--bar,
    .floating-cta-wrap,
    .floating-cta-bar,
    .floating-cta-icon-pulse,
    .floating-cta-phone-stage,
    .floating-cta-ring,
    .service-card-call,
    .service-card-call:hover {
        animation: none !important;
    }
    .floating-cta-phone-stage {
        right: 1rem;
        transform: translateY(-50%);
    }
    .btn-call:hover {
        transform: none;
    }
}

/* ========== MOBILE BOTTOM PADDING ========== */

@media (max-width: 767px) {
    body { padding-bottom: 5.5rem; }
}

@media (min-width: 768px) {
    body { padding-bottom: 5rem; }
}
