/* Variables CSS */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-color: #64748b;
    --accent-color: #f97316;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --max-width: 1200px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.12), 0 2px 4px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15), 0 5px 10px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.2);
}

/* Reset et Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
    overflow-x: hidden;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
}

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    z-index: 1000;
    width: 100%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
    max-width: var(--max-width);
    margin: 0 auto;
    position: relative;
}

.nav-cta {
    flex: 0 0 auto;
    z-index: 1;
    position: relative;
    margin-left: 2rem;
    overflow: hidden;
}

.logo {
    flex: 0 0 auto;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    white-space: nowrap;
}

.logo img {
    display: block;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-dark);
    font-weight: 500;
    position: relative;
    z-index: 10;
    display: block;
    padding: 8px 4px;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: var(--transition);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-weight: 600;
    text-align: center;
    border-radius: 8px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    position: relative;
    overflow: hidden;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    color: white;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.cta-button {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white !important;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 5;
    display: inline-block;
    text-decoration: none;
}

.cta-button:hover,
.cta-button:focus {
    text-decoration: none;
    color: white !important;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
    pointer-events: none;
    z-index: 1;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.cta-button:hover::before {
    left: 100%;
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(to bottom, var(--bg-white) 0%, var(--bg-light) 100%);
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

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

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero h1 {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-weight: 800;
    animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease-out;
}

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

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    animation: fadeInUp 1.2s ease-out;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 4rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

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

/* Sections */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    color: var(--text-dark);
}

.section-header p {
    font-size: 1.1rem;
    margin-top: 1rem;
}

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

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.2);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    border-radius: 50%;
    padding: 14px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: var(--transition);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.service-icon svg {
    width: 100%;
    height: 100%;
    color: white;
}

.service-card h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.service-features {
    list-style: none;
    margin: 1.5rem 0;
}

.service-features li {
    padding: 0.5rem 0;
    color: var(--text-light);
}

.service-features li::before {
    content: "✓";
    color: var(--success-color);
    font-weight: bold;
    margin-right: 0.5rem;
}

.service-link {
    font-weight: 600;
    color: var(--primary-color);
}

/* Process */
.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.step {
    text-align: center;
    padding: 2rem;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.process-cta {
    text-align: center;
    margin-top: 3rem;
}

/* Portfolio */
.portfolio-preview {
    background: var(--bg-light);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Before/After Slider */
.before-after-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.before-after-slider {
    position: relative;
    width: 100%;
    padding-bottom: 60%;
    overflow: hidden;
    background: #f0f0f0;
    cursor: ew-resize;
}

.before-image,
.after-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.before-image {
    z-index: 1;
}

.after-image {
    z-index: 2;
    clip-path: inset(0 0 0 50%);
}

.image-label {
    position: absolute;
    top: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-weight: 600;
    border-radius: 6px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.before-image .image-label {
    left: 1rem;
}

.after-image .image-label {
    right: 1rem;
}

.slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    transform: translateX(-50%);
    z-index: 3;
    cursor: ew-resize;
}

.handle-line {
    width: 100%;
    height: 100%;
    background: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.handle-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
}

.slider-handle:hover .handle-circle,
.slider-handle.dragging .handle-circle {
    transform: translate(-50%, -50%) scale(1.1);
}

.handle-circle svg {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.placeholder-image {
    width: 100%;
    height: 100%;
    background: #e0e0e0;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Why Us */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.benefit {
    text-align: center;
}

.benefit-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--bg-light);
    color: var(--primary-color);
    border-radius: 50%;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.cta-content h2 {
    color: white;
    margin-bottom: 1rem;
}

.cta-content p {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* Forms */
.audit-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row input,
.form-row textarea {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 16px;
    transition: var(--transition);
}

.form-row input::placeholder,
.form-row textarea::placeholder {
    color: rgba(255,255,255,0.7);
}

.form-row input:focus,
.form-row textarea:focus {
    outline: none;
    border-color: white;
    background: rgba(255,255,255,0.2);
}

.audit-form .btn {
    width: 100%;
    margin-top: 1rem;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    color: white;
    margin-bottom: 1.5rem;
}

.footer-section p {
    color: rgba(255,255,255,0.7);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    padding: 0.5rem 0;
}

.footer-section a {
    color: rgba(255,255,255,0.7);
}

.footer-section a:hover {
    color: white;
}

.footer-contact p {
    margin: 0.5rem 0;
    color: rgba(255,255,255,0.9);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 0.75rem 15px;
    }

    .logo a {
        font-size: 1.2rem;
    }

    .logo a span {
        display: none; /* Cache le texte WebRésonance sur mobile */
    }

    .nav-menu {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background: var(--bg-white);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 2rem;
        transition: var(--transition);
    }

    .nav-menu.active {
        left: 0;
    }

    .mobile-menu-toggle {
        display: flex;
        order: 3;
        margin-left: 10px;
    }

    .nav-cta {
        order: 2;
        margin-left: auto !important;
        margin-right: 10px;
        flex: 0 0 auto;
    }

    .cta-button {
        padding: 8px 16px !important;
        font-size: 0.875rem !important;
    }

    .hero {
        padding: 100px 0 60px;
    }

    .hero-stats {
        gap: 2rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .form-row {
        flex-direction: column;
    }

    .process-steps {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .logo a span {
        display: none; /* Cache complètement le nom sur très petit écran */
    }

    .logo img {
        height: 35px !important;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }

    section {
        padding: 60px 0;
    }
}

/* Styles responsive supplémentaires pour la page services */
@media (max-width: 992px) {
    /* Cartes d'offres en colonne sur tablette portrait */
    .services-grid {
        grid-template-columns: 1fr !important;
        max-width: 600px;
        margin: 2rem auto;
    }
}

@media (max-width: 768px) {
    /* Adaptation mobile pour les sections services */
    .service-detail h3 {
        font-size: 1.25rem;
    }

    .service-detail ol {
        padding-left: 1rem !important;
    }

    /* Cartes de caractéristiques en 2 colonnes sur mobile */
    .services .container > div:first-child > div {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
    }

    /* Stats en 2x2 sur mobile */
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    /* Padding réduit sur mobile */
    .services .container {
        padding: 0 15px;
    }

    /* Cartes d'offres avec moins de padding */
    .service-offer-card {
        padding: 1.5rem !important;
    }

    /* Titre plus petit */
    h3[style*="font-size: 1.75rem"] {
        font-size: 1.25rem !important;
    }

    /* Une seule colonne pour les caractéristiques */
    .services .container > div:first-child > div {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* Ajustement des cartes flottantes sur mobile */
    .floating-card {
        left: var(--position-mobile, var(--position, 50%)) !important;
    }

    .card-content {
        font-size: 8px !important;
        padding: 3px 6px !important;
        gap: 3px !important;
        border-radius: 6px !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
    }

    .card-content span:not(.card-icon) {
        font-size: 8px !important;
    }

    .card-icon {
        font-size: 12px !important;
    }

    @keyframes fallAndLand {
        0% {
            transform: translateY(-100px) rotate(-3deg) scale(0.8);
            opacity: 0;
        }
        15% {
            opacity: 1;
            transform: translateY(-50px) rotate(0deg) scale(0.9);
        }
        85% {
            opacity: 1;
            transform: translateY(calc(85vh - 200px)) rotate(1deg) scale(1);
        }
        90% {
            transform: translateY(calc(85vh - 195px)) rotate(0deg) scale(1);
        }
        100% {
            transform: translateY(calc(85vh - 190px)) rotate(0deg) scale(1);
            opacity: 1;
        }
    }
}

/* ===== ANIMATIONS & EFFECTS ===== */

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Scale in animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Classes for scroll animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.animate-fade-left {
    transform: translateX(-30px);
}

.animate-on-scroll.animate-fade-right {
    transform: translateX(30px);
}

.animate-on-scroll.animate-scale {
    transform: scale(0.9);
}

.animate-on-scroll.visible {
    opacity: 1 !important;
    transform: translateY(0) translateX(0) scale(1) !important;
}

/* Stagger animation delay */
.animate-delay-100 { transition-delay: 0.1s; }
.animate-delay-200 { transition-delay: 0.2s; }
.animate-delay-300 { transition-delay: 0.3s; }
.animate-delay-400 { transition-delay: 0.4s; }
.animate-delay-500 { transition-delay: 0.5s; }

/* Gradient animation for hero */
@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating cards animation */
.floating-cards-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.floating-card {
    position: absolute;
    opacity: 0;
    animation: fallAndLand var(--duration) cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: var(--delay);
    left: var(--position, 50%);
}

.card-content {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #64748b;
    white-space: nowrap;
    transition: transform 0.3s ease;
}

.card-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.card-icon {
    font-size: 20px;
}

@keyframes fallAndLand {
    0% {
        transform: translateY(-150px) rotate(-5deg) scale(0.9);
        opacity: 0;
    }
    15% {
        opacity: 1;
        transform: translateY(-100px) rotate(0deg) scale(1);
    }
    85% {
        opacity: 1;
        transform: translateY(calc(100vh - 250px)) rotate(2deg) scale(1);
    }
    90% {
        transform: translateY(calc(100vh - 240px)) rotate(0deg) scale(1);
    }
    100% {
        opacity: 1;
        transform: translateY(calc(100vh - 250px)) rotate(0deg) scale(1);
    }
}

/* Random positions and landing spots for cards */
.floating-card:nth-child(1) {
    --random: 0.15;
    --duration: 3s;
    --final-bottom: 120px;
}
.floating-card:nth-child(2) {
    --random: 0.35;
    --duration: 3.5s;
    --final-bottom: 180px;
}
.floating-card:nth-child(3) {
    --random: 0.55;
    --duration: 4s;
    --final-bottom: 140px;
}
.floating-card:nth-child(4) {
    --random: 0.75;
    --duration: 4.5s;
    --final-bottom: 200px;
}
.floating-card:nth-child(5) {
    --random: 0.85;
    --duration: 5s;
    --final-bottom: 160px;
}
.floating-card:nth-child(6) {
    --random: 0.25;
    --duration: 5.5s;
    --final-bottom: 220px;
}
.floating-card:nth-child(7) {
    --random: 0.65;
    --duration: 6s;
    --final-bottom: 100px;
}
.floating-card:nth-child(8) {
    --random: 0.45;
    --duration: 6.5s;
    --final-bottom: 240px;
}

/* Stagger the landing positions */
@keyframes fallAndLand1 {
    0% {
        transform: translateY(-150px) rotate(-8deg);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    95% {
        opacity: 1;
        transform: translateY(calc(100vh - 180px)) rotate(3deg);
    }
    100% {
        opacity: 1;
        transform: translateY(calc(100vh - 180px)) rotate(1deg);
    }
}

@keyframes fallAndLand2 {
    0% {
        transform: translateY(-150px) rotate(5deg);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    95% {
        opacity: 1;
        transform: translateY(calc(100vh - 180px)) rotate(-2deg);
    }
    100% {
        opacity: 1;
        transform: translateY(calc(100vh - 180px)) rotate(-1deg);
    }
}

.floating-card:nth-child(odd) {
    animation-name: fallAndLand1;
}

.floating-card:nth-child(even) {
    animation-name: fallAndLand2;
}

/* Enhanced hover effects for cards */
.service-card, .testimonial-card, .benefit {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover, .testimonial-card:hover, .benefit:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Keep original button styles */
.btn-primary, .cta-button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover, .cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Counter animation */
.counter {
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

/* Before/After slider enhancements */
.before-after-container {
    transition: transform 0.3s ease;
}

.before-after-container:hover {
    transform: scale(1.02);
}

.slider-handle {
    transition: box-shadow 0.3s ease;
}

.before-after-container:hover .slider-handle {
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.6);
}

/* Pattern overlay for hero */
.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    background-image: 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='%23000000' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Loading animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}