/* ==========================================================================
   NON-CRITICAL CSS - Deferred loading for below-the-fold content
   Animations, carousels, FAQ, pricing, component styles
   ========================================================================== */

/* Smooth reveal for text */
.reveal-text span {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-text.active span {
    opacity: 1;
    transform: translateY(0);
}

/* Value Section Active States */
.value-text {
    opacity: 0.5;
    transform: translateX(-10px);
    transition: all 0.5s ease;
}

@media (max-width: 768px) {
    .value-text {
        opacity: 1 !important;
        transform: none !important;
    }
}

.value-text.active {
    opacity: 1;
    transform: translateX(0);
}

/* Marquee */
.marquee-container {
    display: flex;
    overflow: hidden;
    user-select: none;
}

.marquee-content {
    flex-shrink: 0;
    display: flex;
    gap: 4rem;
    min-width: 100%;
    animation: scroll 30s linear infinite;
}

@keyframes scroll {
    from { transform: translateX(0); }
    to { transform: translateX(calc(-100% - 4rem)); }
}

/* Hide Scrollbar utility */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Testimonial Animation */
.testimonial-enter {
    animation: slideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* Google Reviews Carousel */
.reviews-container {
    display: flex;
    overflow: hidden;
    user-select: none;
}

.reviews-track {
    flex-shrink: 0;
    display: flex;
    gap: 1.5rem;
    animation: scrollReviews 15s linear infinite;
    will-change: transform;
}

.reviews-track:hover,
.reviews-container.paused .reviews-track {
    animation-play-state: paused;
}

@keyframes scrollReviews {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(-50%, 0, 0); }
}

.review-card {
    flex-shrink: 0;
    width: 350px;
    background: white;
    border-radius: 1.5rem;
    padding: 1.5rem;
    border: 1px solid #e7e5e4;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.review-card:hover {
    border-color: #d6d3d1;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.review-stars {
    color: #f97316;
}

.google-badge {
    background: #fff7ed;
    border: 1px solid #fed7aa;
}

/* Contact Section Letter Reveal Animation */
.letter-reveal span {
    display: inline-block;
    opacity: 0;
    transform: translateY(30px) rotateX(-40deg);
    filter: blur(4px);
    transition: none;
}

.letter-reveal.animate span {
    animation: letterReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.letter-reveal span.space {
    width: 0.3em;
}

@keyframes letterReveal {
    0% {
        opacity: 0;
        transform: translateY(30px) rotateX(-40deg);
        filter: blur(4px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0deg);
        filter: blur(0);
    }
}

.letter-reveal .italic-letter {
    transform: translateY(25px) rotateX(-30deg) skewX(-5deg);
}

.letter-reveal.animate .italic-letter {
    animation: letterRevealItalic 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes letterRevealItalic {
    0% {
        opacity: 0;
        transform: translateY(25px) rotateX(-30deg) skewX(-5deg);
        filter: blur(4px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0deg) skewX(0deg);
        filter: blur(0);
    }
}

/* FAQ Accordion */
.faq-item {
    border-bottom: 1px solid #e7e5e4;
}

.faq-question {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    transition: color 0.2s;
}

.faq-question:hover {
    color: #78716c;
}

.faq-icon {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding-bottom: 1.5rem;
}

/* Pricing Tabs */
.pricing-tab {
    padding: 0.75rem 1.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 9999px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pricing-tab.active {
    background: #1c1917;
    color: white;
}

.pricing-tab:not(.active) {
    background: #f5f5f4;
    color: #57534e;
}

.pricing-tab:not(.active):hover {
    background: #e7e5e4;
}

.pricing-content {
    display: none;
}

.pricing-content.active {
    display: grid;
}

/* Process steps on mobile */
@media (max-width: 767px) {
    .process-steps {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    .process-steps .step-card {
        padding: 1.25rem !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    .process-steps .step-number {
        width: 3rem !important;
        height: 3rem !important;
        font-size: 1.25rem !important;
        margin-bottom: 0.75rem !important;
        border-radius: 9999px !important;
    }
    .process-steps .step-line,
    .process-steps .step-icon {
        display: none !important;
    }
    .process-steps .step-title {
        font-size: 1rem !important;
        margin-bottom: 0.25rem !important;
    }
    .process-steps .step-desc {
        font-size: 0.875rem !important;
    }
}

/* About page: Certification cards hover */
.cert-card {
    transition: all 0.3s ease;
}
.cert-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

/* About page: Stat counter animation */
.stat-number {
    background: linear-gradient(135deg, #1c1917 0%, #57534e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================================================
   Contact Form Popup
   ========================================================================== */
.form-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: popupFadeIn 0.25s ease-out;
}

.form-popup-card {
    position: relative;
    background: #fff;
    border-radius: 16px;
    max-width: 420px;
    width: 90%;
    padding: 40px 32px 32px;
    text-align: center;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.15);
    animation: popupScaleIn 0.25s ease-out;
}

.form-popup-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #a1a1aa;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}

.form-popup-close:hover {
    color: #18181b;
}

#form-popup-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    line-height: 1;
}

#form-popup-icon.popup-icon-success {
    background: #dcfce7;
    color: #16a34a;
}

#form-popup-icon.popup-icon-error {
    background: #fee2e2;
    color: #dc2626;
}

#form-popup-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #18181b;
    margin: 0 0 8px;
}

#form-popup-message {
    font-size: 0.95rem;
    color: #52525b;
    margin: 0;
    line-height: 1.5;
}

@keyframes popupFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes popupScaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
