/* Enhanced Landing Page Styles - Smooth Migration Global - Modern & Polished */

/* Enhanced Hero Landing Section */
.hero-landing {
    background: var(--gradient-hero), 
                url('../images/pexels-vlada-karpovich-7368191.jpg') center/cover;
    background-blend-mode: overlay;
    color: white;
    position: relative;
    overflow: hidden;
    min-height: 92vh; /* reduce dead space */
    display: flex;
    align-items: flex-start; /* top-align content */
    padding-top: 72px; /* slightly less to lift content */
}

.hero-map-container {
    position: relative;
    z-index: 2;
    max-width: 520px;
    margin-left: auto;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.25));
}

.hero-map-container svg {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 991.98px) {
    .hero-map-container { display: none; }
}

.cube-band .floating-cube-element {
    animation: float 8s ease-in-out infinite;
}

.hero-landing::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Section Styling */
section {
    position: relative;
    padding: 5rem 0;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1rem;
    text-align: center;
    letter-spacing: -0.025em;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-accent);
    border-radius: 2px;
}

.section-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: var(--text-light);
    text-align: center;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}


/* Enhanced Services Snapshot Section */
.services-snapshot {
    background: var(--bg-light);
    position: relative;
    overflow: hidden;
}

/* Decorative services cubes background overlay */
.services-cubes-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.7;
}

.services-cubes-bg svg {
    width: 120%;
    height: auto;
    position: absolute;
    left: 50%;
    top: -10%;
    transform: translateX(-50%);
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.06));
}

@media (max-width: 991.98px) {
    .services-cubes-bg { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .services-cubes-bg svg { animation: none !important; }
}

.services-snapshot::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 30% 30%, rgba(14, 116, 144, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(30, 64, 175, 0.05) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(20px, -20px) rotate(1deg);
    }
    66% {
        transform: translate(-10px, 10px) rotate(-1deg);
    }
}

.services-grid-limited {
    position: relative;
    z-index: 1;
}

/* Enhanced Why Us Section */
.why-us {
    background: var(--bg-white);
    position: relative;
}

.why-us::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: var(--bg-section);
    transform: skewX(-6deg);
    transform-origin: top left;
    z-index: 0;
}

.why-us .container {
    position: relative;
    z-index: 1;
}

/* Enhanced Social Proof Section */
.social-proof {
    background: var(--bg-light);
    position: relative;
}

.stats-row {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
    min-width: 200px;
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-success);
    z-index: 1;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    background: var(--bg-section);
}

.stat-number {
    font-size: 3rem;
    font-weight: 900;
    color: var(--success-color);
    margin-bottom: 0.5rem;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.stat-label {
    color: var(--text-medium);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Enhanced Partners Carousel with Infinite Scroll */
.partners-carousel {
    position: relative;
    z-index: 1;
    margin: 3rem 0;
}

.partners-carousel h3 {
    color: var(--text-dark);
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
}

.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg-section) 100%);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.carousel-container::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 60px;
    background: linear-gradient(to right, var(--bg-white), transparent);
    z-index: 2;
    pointer-events: none;
}

.carousel-container::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 60px;
    background: linear-gradient(to left, var(--bg-white), transparent);
    z-index: 2;
    pointer-events: none;
}

.carousel-track {
    display: flex;
    gap: 2.5rem;
    padding: 0 2rem;
    animation: infiniteScroll 30s linear infinite;
    min-width: 200%;
    will-change: transform;
}

.carousel-track:hover {
    animation-play-state: paused;
}

.carousel-track:focus-within {
    animation-play-state: paused;
}

@keyframes infiniteScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.partner-item {
    flex: 0 0 auto;
    text-align: center;
    padding: 1.5rem;
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 140px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.partner-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.partner-item:hover::before {
    left: 100%;
}

.partner-item:hover,
.partner-item:focus-within {
    transform: translateY(-8px) scale(1.05);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-light);
}

.partner-link {
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 0.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.partner-link:hover,
.partner-link:focus {
    text-decoration: none;
    color: inherit;
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.partner-logo {
    width: 90px;
    height: 70px;
    object-fit: contain;
    margin-bottom: 0.75rem;
    border-radius: 8px;
    filter: grayscale(70%) opacity(0.8) brightness(1.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.partner-item:hover .partner-logo,
.partner-link:focus .partner-logo {
    filter: grayscale(0%) opacity(1) brightness(1);
    transform: scale(1.1) translateY(-2px);
}

.partner-name {
    font-size: 0.9rem;
    color: var(--text-medium);
    font-weight: 600;
    display: block;
    margin-top: 0.75rem;
    line-height: 1.3;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.partner-item:hover .partner-name,
.partner-link:focus .partner-name {
    color: var(--primary-color);
}

.partner-placeholder {
    width: 90px;
    height: 70px;
    background: var(--bg-lighter);
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--text-lighter);
    margin: 0 auto 0.75rem;
    border: 2px dashed var(--border-light);
    transition: all 0.3s ease;
}

.partner-item:hover .partner-placeholder {
    background: var(--primary-lighter);
    border-color: var(--primary-light);
    color: var(--primary-color);
}

/* Responsive carousel adjustments */
@media (max-width: 1024px) {
    .carousel-track {
        animation-duration: 25s;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .carousel-container {
        padding: 2rem 0;
    }
    
    .carousel-container::before,
    .carousel-container::after {
        width: 40px;
    }
    
    .carousel-track {
        gap: 1.5rem;
        padding: 0 1.5rem;
        animation-duration: 20s;
    }
    
    .partner-item {
        min-width: 110px;
        padding: 1rem 0.75rem;
    }
    
    .partner-logo {
        width: 75px;
        height: 55px;
    }
    
    .partner-name {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .carousel-track {
        animation-duration: 15s;
        gap: 1rem;
    }
    
    .partner-item {
        min-width: 90px;
        padding: 0.75rem 0.5rem;
    }
    
    .partner-logo {
        width: 60px;
        height: 45px;
    }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .carousel-track {
        animation: none;
    }
    
    .partner-item {
        animation: none;
    }
    
    .partner-item::before {
        display: none;
    }
}

/* Enhanced About Snippet Section */
.about-snippet {
    background: var(--bg-white);
    position: relative;
}

.about-snippet::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(135deg, transparent 0%, var(--primary-lighter) 0.5%, transparent 1%),
        linear-gradient(45deg, transparent 0%, var(--secondary-lighter) 0.3%, transparent 0.8%);
    opacity: 0.4;
    pointer-events: none;
}

.story-content {
    position: relative;
    z-index: 1;
}

.story-content p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-medium);
    margin-bottom: 1.5rem;
}

/* Enhanced Resources Section */
.resources-section {
    background: var(--bg-light);
    position: relative;
}

.resources-section::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: var(--gradient-primary);
    opacity: 0.03;
    pointer-events: none;
}

.resource-options {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.resource-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.resource-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-accent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.resource-item:hover::before {
    opacity: 1;
}

.resource-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    background: var(--bg-section);
}

.resource-icon {
    font-size: 2.5rem;
    min-width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-accent);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.resource-content h4 {
    color: var(--text-dark);
    font-weight: 700;
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

.resource-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Enhanced Resources Card */
.resources-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 3rem 2.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.resources-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: var(--gradient-secondary);
    opacity: 0.05;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.resources-card:hover::before {
    opacity: 0.08;
    transform: scale(1.1);
}

.resources-title {
    color: var(--text-dark);
    font-weight: 800;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.resources-description {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.resources-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.resource-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-section);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.resource-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.05;
    transition: left 0.4s ease;
}

.resource-link:hover::before {
    left: 0;
}

.resource-link:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    color: inherit;
    background: var(--bg-white);
}

.resource-link-icon {
    font-size: 1.5rem;
    min-width: 40px;
    text-align: center;
    background: var(--gradient-secondary);
    border-radius: var(--border-radius);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.resource-link-content strong {
    color: var(--text-dark);
    font-weight: 600;
    display: block;
    margin-bottom: 0.2rem;
}

.resource-link-content small {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Animation classes for scroll reveals */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 992px) {
    .stats-row {
        gap: 2rem;
    }
    
    .resource-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .why-us::before {
        display: none;
    }
}

@media (max-width: 768px) {
    section {
        padding: 3rem 0;
    }
    
    .stats-row {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .stat-item {
        min-width: auto;
        width: 100%;
        max-width: 280px;
    }
    
    .carousel-track {
        padding: 0 1rem;
        gap: 1rem;
    }
    
    .partner-item {
        min-width: 100px;
    }
    
    .resources-card {
        padding: 2rem 1.5rem;
    }
}

/* Interactive Cards */
.interactive-card {
    cursor: pointer;
    transition: all 0.3s ease;
}

.interactive-card:hover,
.interactive-card:focus {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.interactive-card:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* Step Cards with Pulse Effect */
.step-card.interactive-card:hover .step-number {
    animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Limited Services Grid */
.services-grid-limited {
    max-width: 900px;
    margin: 0 auto;
}

/* Partners Carousel */
.partners-carousel {
    overflow: hidden;
    position: relative;
}

.carousel-container {
    overflow: hidden;
    position: relative;
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem 0;
    box-shadow: var(--shadow-sm);
}

.carousel-track {
    display: flex;
    gap: 2rem;
    padding: 0 2rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.partner-item {
    flex: 0 0 auto;
    text-align: center;
    min-width: 120px;
}

.partner-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.partner-link:hover {
    transform: translateY(-3px);
    text-decoration: none;
    color: var(--primary-color);
}

.partner-logo {
    max-width: 80px;
    max-height: 60px;
    object-fit: contain;
    margin-bottom: 0.5rem;
    border-radius: 4px;
}

.partner-name {
    display: block;
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
}

.partner-placeholder {
    width: 80px;
    height: 60px;
    background: var(--bg-light);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    border: 2px dashed var(--border-light);
}

/* Resources & Next Steps Section */
.resources-section {
    background: var(--bg-light);
}

.resource-options {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.resource-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.resource-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.resource-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
    width: 60px;
    text-align: center;
}

.resource-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.resource-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.resource-content .btn {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    text-decoration: none;
}

/* Resources Card */
.resources-card {
    background: white;
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    height: 100%;
}

.resources-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.resources-description {
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.resources-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.resource-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.resource-link:hover {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    transform: translateX(5px);
}

/* Ensure nested text/icons remain readable on hover */
.resource-link:hover .resource-link-content strong,
.resource-link:hover .resource-link-content small,
.resource-link:hover .resource-link-icon {
    color: #ffffff;
    opacity: 0.95;
}

/* Improve outline button hover contrast where used */
.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

.resource-link-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 40px;
    text-align: center;
}

.resource-link-content strong {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.resource-link-content small {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Section Titles and Spacing */
.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}


/* Services Snapshot Section */
.services-snapshot {
    background: var(--bg-light);
}

.service-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.service-card-link:hover {
    text-decoration: none;
    color: inherit;
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid var(--border-light);
    cursor: pointer;
}
.service-image { position: relative; border-radius: var(--border-radius); overflow: hidden; }
.service-image img { width: 100%; height: 220px; object-fit: cover; display: block; }
.service-overlay { position: absolute; left: 0; right: 0; bottom: 0; padding: .5rem .75rem; background: linear-gradient(180deg, rgba(0,0,0,.0) 0%, rgba(0,0,0,.6) 100%); color: #fff; }
.timeline-badge { display: inline-block; background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.2); border-radius: 8px; padding: .25rem .5rem; font-size: .85rem; }

/* Highlighted core service card (center Realtor Locator) */
.service-card--core {
    border: 2px solid var(--primary-light);
    box-shadow: 0 10px 25px -10px rgba(30,64,175,0.35), var(--shadow-lg);
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
.service-card--core .core-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--gradient-primary);
    color: #fff;
    font-weight: 700;
    font-size: .75rem;
    padding: .25rem .5rem;
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
}
.service-card--core .service-title { color: var(--primary-color); }
.service-card--core .service-image img { height: 240px; }
.service-card--core:hover { transform: translateY(-7px); box-shadow: var(--shadow-2xl); }

/* Simple icon / illustration blocks for services when images are disabled */
.service-illustration {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 160px;
    border-radius: 12px;
    background: var(--bg-section);
    border: 1px solid var(--border-light);
    margin-bottom: 1rem;
}
.service-illustration i { font-size: 48px; color: var(--primary-color); opacity: .9; }
.service-card--core .service-illustration { background: linear-gradient(180deg,#f8fbff 0%,#eef5ff 100%); border-color: var(--primary-light); }


.service-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.service-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.service-description { color: var(--text-light); font-size: 0.95rem; line-height: 1.5; }
.services-snapshot .service-description { 
    /* Removed fixed max-height to prevent text truncation */
    min-height: 3.6em; 
    /* Allow text to wrap naturally */
}

/* Why Us Section */
.why-us {
    background: white;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: var(--bg-light);
    transform: translateX(5px);
}

.feature-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
    width: 60px;
    text-align: center;
}

.feature-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.feature-content p {
    color: var(--text-light);
    margin-bottom: 0;
    line-height: 1.5;
}

/* Social Proof Section */
.social-proof {
    background: var(--bg-light);
}

.stats-row {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 500;
}

.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    height: 100%;
    border-left: 4px solid var(--primary-color);
}

.testimonial-text {
    font-style: italic;
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.testimonial-author {
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.95rem;
}

/* About Snippet Section */
.about-snippet {
    background: white;
}

.story-content p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-landing {
        padding-top: 100px; /* More space for mobile header */
        min-height: calc(100vh - 20px); /* Prevent clipping */
    }
    
    .hero-cta-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .hero-cta-group .btn {
        min-width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .stats-row {
        gap: 2rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .feature-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .feature-icon {
        align-self: center;
    }
    
    .carousel-track {
        padding: 0 1rem;
        gap: 1rem;
    }
    
    /* Resources section mobile styles */
    .resources-section .row {
        flex-direction: column-reverse;
    }
    
    .resource-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .resource-icon {
        align-self: center;
    }
    
    .resources-card {
        padding: 2rem;
        margin-bottom: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-landing {
        padding-top: 120px; /* Even more space for smaller screens */
        min-height: calc(100vh - 40px);
    }
    
    .hero-headline {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-subheadline {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .step-card,
    .service-card {
        padding: 1.5rem;
    }
    
    .partner-item {
        min-width: 100px;
    }
    
    .partner-logo {
        max-width: 60px;
        max-height: 45px;
    }
    
    /* Small screen resources adjustments */
    .resources-card {
        padding: 1.5rem;
    }
    
    .resource-item {
        padding: 1rem;
    }
    
    .resource-link {
        padding: 0.75rem;
    }
    
    .resource-link-icon {
        width: 35px;
        font-size: 1.25rem;
    }
}

/* Accessibility Improvements */
.btn:focus,
.form-control:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip link for screen readers */
.skip-link {
    position: absolute;
    left: -9999px;
    z-index: 999999;
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    font-weight: 600;
}

.skip-link:focus {
    left: 6px;
    top: 7px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hero-landing {
        background: #000;
        color: #fff;
    }
    
    .btn-primary {
        background: #fff;
        color: #000;
        border: 2px solid #000;
    }
    
    .service-card,
    .step-card,
    .testimonial-card {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .step-card:hover,
    .service-card:hover,
    .feature-item:hover,
    .interactive-card:hover {
        transform: none;
    }
    
    .scroll-cue {
        animation: none;
    }
}

/* Focus visible for better keyboard navigation */
.btn:focus-visible,
.service-card:focus-visible,
.step-card:focus-visible,
.interactive-card:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* Screen reader only content */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Ensure proper contrast ratios */
.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Loading animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-card,
.service-card,
.feature-item,
.testimonial-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Print styles */
@media print {
    .hero-landing {
        background: white !important;
        color: black !important;
        min-height: auto;
    }
    
    .btn {
        border: 2px solid black !important;
        background: white !important;
        color: black !important;
    }
    
    .carousel-track {
        display: block;
        overflow: visible;
    }
    
    .partner-item {
        display: inline-block;
        margin: 0.5rem;
    }
}

/* Sticky Consult Toast (80/20 layout with dedicated close area) */
.consult-toast {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: var(--bs-toast-border-radius, 0.75rem);
    /* Glassmorphism without gradients */
    background: rgba(17,24,39,0.45);
    -webkit-backdrop-filter: saturate(200%) blur(22px);
    backdrop-filter: saturate(200%) blur(22px);
    box-shadow: 0 12px 34px rgba(0,0,0,0.18);
}

/* Remove gradient overlay */
.consult-toast::before { display: none; }

.consult-toast-body {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(64px, 1fr);
    align-items: stretch;
    padding: 0; /* override .toast-body default to allow full-height close area */
}

.consult-toast-left {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px 12px 14px;
    min-width: 0; /* allow text to truncate gracefully */
}

/* Sheen animation removed */

.consult-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.consult-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    color: #ffffff;
}

.consult-title {
    color: #ffffff;
}

.consult-subtitle { color: #ffffff !important; font-weight: 600; }

.consult-cta {
    margin-left: auto;
    white-space: nowrap;
}

.consult-toast-right {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 48px;
    padding: 0;
    margin: 0;
    background: transparent;
    border: 0;
    border-left: 1px solid rgba(255,255,255,0.6);
    cursor: pointer;
    transition: background-color 0.15s ease;
    color: #ffffff; /* for platforms that use currentColor */
}

.consult-x {
    font-size: 22px;
    line-height: 1;
    color: #ffffff; /* default white X */
    transition: color 0.15s ease, transform 0.15s ease;
}

.consult-toast-right:hover,
.consult-toast-right:focus {
    background: rgba(0,0,0,0.06); /* glass-friendly hover */
}

.consult-toast-right:hover .consult-x,
.consult-toast-right:focus .consult-x {
    color: #dc3545; /* red X on hover/focus */
}

.consult-toast-right:active .consult-x {
    transform: scale(0.95);
}

.consult-toast-right:focus-visible {
    outline: 3px solid var(--accent-color, #2563eb);
    outline-offset: -3px; /* keep outline inside the button area */
}

/* Support reduced motion */
@media (prefers-reduced-motion: reduce) {
    .consult-toast-right,
    .consult-x {
        transition: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .consult-toast-right:hover,
    .consult-toast-right:focus {
        background: #d1d5db;
    }
}

/* Fallback for browsers without backdrop-filter support */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .consult-toast {
        background: rgba(17,24,39,0.90);
        border: 1px solid rgba(255,255,255,0.18);
        box-shadow: 0 10px 24px rgba(0,0,0,0.35);
    }
}

/* Dark mode refinement for glass */
@media (prefers-color-scheme: dark) {
    .consult-toast {
        background: rgba(17,24,39,0.55);
        border-color: rgba(255,255,255,0.18);
        box-shadow: 0 10px 30px rgba(0,0,0,0.45);
    }
    .consult-title { color: #F9FAFB; }
    .consult-subtitle { color: rgba(249,250,251,0.85); }
    .consult-toast-right { border-left-color: rgba(255,255,255,0.12); }
    .consult-toast-right:hover,
    .consult-toast-right:focus { background: rgba(255,255,255,0.06); }
    .consult-x { color: #ffffff; }
}

/* ========================================
   Sprint 2.1 - Enhanced Counter Animations
   ======================================== */

/* Counter animation states */
.counter-animating {
    color: var(--primary-color);
    font-weight: 700;
    position: relative;
    transform: scale(1.02);
    transition: all 0.3s ease;
}

.counter-animating::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: linear-gradient(45deg, 
        transparent, 
        var(--primary-light), 
        transparent, 
        var(--secondary-light), 
        transparent);
    border-radius: inherit;
    z-index: -1;
    opacity: 0.6;
    animation: counter-glow 2.5s ease-out;
    filter: blur(2px);
}

@keyframes counter-glow {
    0% { 
        opacity: 0;
        transform: scale(0.8);
    }
    50% { 
        opacity: 0.8;
        transform: scale(1.1);
    }
    100% { 
        opacity: 0;
        transform: scale(1);
    }
}

.counter-animated {
    color: var(--primary-color);
    font-weight: 700;
    position: relative;
}

.counter-animated::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
    opacity: 0.1;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

/* Enhanced stat numbers with better visual hierarchy */
.stat-number {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    position: relative;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Additional counter selectors with consistent styling */
[data-counter],
.counter-value,
.metric-number {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    position: relative;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Enhanced stat item hover effects */
.stat-item:hover .stat-number,
.stat-item:hover [data-counter],
.stat-item:hover .counter-value,
.stat-item:hover .metric-number {
    transform: scale(1.05);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Accessibility: Reduce motion preferences */
@media (prefers-reduced-motion: reduce) {
    .counter-animating::after,
    .counter-glow {
        animation: none;
        opacity: 0;
    }
    
    .counter-animating {
        transform: none;
    }
    
    .stat-item:hover .stat-number,
    .stat-item:hover [data-counter],
    .stat-item:hover .counter-value,
    .stat-item:hover .metric-number {
        transform: none;
    }
}

/* Performance optimization for counter animations */
.counter-animating,
.counter-animated,
.stat-number,
[data-counter],
.counter-value,
.metric-number {
    will-change: transform, opacity;
}

/* Remove will-change after animation completes */
.counter-animated {
    will-change: auto;
}