/* ========================================
   Adem Plombier Annaba - Modern UI Styles
   ======================================== */

/* CSS Custom Properties */
:root {
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;

    --emerald-400: #34d399;
    --emerald-500: #10b981;
    --emerald-600: #059669;

    --electric-400: #fbbf24;
    --electric-500: #f59e0b;
    --electric-300: #fcd34d;

    --dark-50: #f8fafc;
    --dark-100: #f1f5f9;
    --dark-200: #e2e8f0;
    --dark-300: #cbd5e1;
    --dark-400: #94a3b8;
    --dark-500: #64748b;
    --dark-600: #475569;
    --dark-700: #334155;
    --dark-800: #1e293b;
    --dark-900: #0f172a;

    --bg-primary: white;
    --bg-secondary: var(--dark-50);
    --bg-card: white;
    --text-primary: var(--dark-900);
    --text-secondary: var(--dark-600);
    --text-muted: var(--dark-500);
    --border-color: var(--dark-200);
    --nav-bg: rgba(255, 255, 255, 0.95);
    --input-bg: white;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ========================================
   Loading Screen
   ======================================== */
.loading-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: linear-gradient(135deg, #1e40af 0%, #0f172a 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-logo {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1.5rem;
    letter-spacing: -0.05em;
    animation: loadingPulse 1.5s ease-in-out infinite;
}

.loading-logo-img {
    height: 60px;
    margin-bottom: 1.5rem;
    animation: loadingPulse 1.5s ease-in-out infinite;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #60a5fa;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes loadingPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

/* ========================================
   Active Nav State
   ======================================== */
.nav-link-active {
    color: var(--primary-700) !important;
    font-weight: 600 !important;
    position: relative;
}

.nav-link-active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-500);
    border-radius: 1px;
}

/* Dark Mode */
[data-theme="dark"] {
    --dark-50: #0f172a;
    --dark-100: #1e293b;
    --dark-200: #334155;
    --dark-300: #475569;
    --dark-400: #64748b;
    --dark-500: #94a3b8;
    --dark-600: #cbd5e1;
    --dark-700: #e2e8f0;
    --dark-800: #f1f5f9;
    --dark-900: #f8fafc;

    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --nav-bg: rgba(15, 23, 42, 0.95);
    --input-bg: #1e293b;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.4), 0 8px 10px -6px rgb(0 0 0 / 0.3);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.5);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --dark-50: #0f172a;
        --dark-100: #1e293b;
        --dark-200: #334155;
        --dark-300: #475569;
        --dark-400: #64748b;
        --dark-500: #94a3b8;
        --dark-600: #cbd5e1;
        --dark-700: #e2e8f0;
        --dark-800: #f1f5f9;
        --dark-900: #f8fafc;

        --bg-primary: #0f172a;
        --bg-secondary: #1e293b;
        --bg-card: #1e293b;
        --text-primary: #f1f5f9;
        --text-secondary: #cbd5e1;
        --text-muted: #94a3b8;
        --border-color: #334155;
        --nav-bg: rgba(15, 23, 42, 0.95);
        --input-bg: #1e293b;

        --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
        --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
        --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);
        --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.4), 0 8px 10px -6px rgb(0 0 0 / 0.3);
        --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.5);
    }
}

/* RTL/LTR Support */
html[dir="rtl"] { text-align: right; }
html[dir="ltr"] { text-align: left; }

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

/* Language Switch Transition */
body.lang-switching [data-i18n] {
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

[data-i18n] {
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Selection */
::selection {
    background-color: var(--primary-500);
    color: white;
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

/* ========================================
   Language Switcher
   ======================================== */
.lang-btn {
    color: var(--dark-500);
    transition: all var(--transition-base);
}

.lang-btn:hover {
    color: var(--primary-700);
    background-color: var(--primary-50);
}

.lang-btn.active {
    background-color: var(--primary-800);
    color: white;
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.3);
}

/* ========================================
   Mobile Menu
   ======================================== */
#mobile-menu {
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

#mobile-menu.open {
    max-height: 500px;
    opacity: 1;
}

/* ========================================
   Scroll Animations
   ======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger delays */
.stagger-1 { transition-delay: 0.05s; }
.stagger-2 { transition-delay: 0.1s; }
.stagger-3 { transition-delay: 0.15s; }
.stagger-4 { transition-delay: 0.2s; }
.stagger-5 { transition-delay: 0.25s; }
.stagger-6 { transition-delay: 0.3s; }

/* ========================================
   Hero Section
   ======================================== */
.hero-bg {
    position: relative;
    overflow: hidden;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 25%, #0f172a 50%, #1e3a8a 75%, #1e40af 100%);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
}

.hero-bg .relative.z-10 {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 50%, rgba(59, 130, 246, 0.2) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 20%, rgba(16, 185, 129, 0.15) 0%, transparent 50%),
                radial-gradient(ellipse at 50% 80%, rgba(251, 191, 36, 0.1) 0%, transparent 50%);
    animation: heroFloat 15s ease-in-out infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes heroFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(2%, -2%) rotate(1deg); }
    50% { transform: translate(-1%, 3%) rotate(-1deg); }
    75% { transform: translate(3%, 1%) rotate(0.5deg); }
}

.hero-pattern {
    position: absolute;
    inset: 0;
    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='%23ffffff' fill-opacity='0.03'%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");
    opacity: 0.5;
}

/* Floating shapes */
.hero-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.15;
    animation: float 15s ease-in-out infinite;
}

.hero-shape-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-400);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.hero-shape-2 {
    width: 300px;
    height: 300px;
    background: var(--emerald-400);
    bottom: -50px;
    left: -50px;
    animation-delay: -5s;
}

.hero-shape-3 {
    width: 200px;
    height: 200px;
    background: var(--electric-400);
    top: 30%;
    left: 20%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ========================================
   Glassmorphism Utility
   ======================================== */
.glass {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.4);
}

/* ========================================
   Gradient Text
   ======================================== */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-400) 50%, var(--emerald-400) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-gold {
    background: linear-gradient(135deg, var(--electric-400) 0%, #f59e0b 50%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   USP Cards
   ======================================== */
.usp-card {
    position: relative;
    padding: 1.5rem;
    border-radius: var(--radius-xl);
    background: white;
    transition: all var(--transition-slow);
    overflow: hidden;
}

.usp-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-500), var(--primary-400));
    transform: scaleX(0);
    transition: transform var(--transition-slow);
}

.usp-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

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

/* ========================================
   About Section Stats
   ======================================== */
.about-stat {
    text-align: center;
    padding: 1.25rem;
    border-radius: var(--radius-xl);
    background: white;
    transition: all var(--transition-slow);
    border: 1px solid var(--dark-200);
}

.about-stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-200);
}

.about-stat-number {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.about-stat-label {
    font-size: 0.875rem;
    color: var(--dark-500);
    font-weight: 500;
}

/* ========================================
   Service Cards
   ======================================== */
.service-card {
    position: relative;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    background: white;
    transition: all var(--transition-slow);
    border: 1px solid var(--dark-200);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-2xl);
}

.service-card-accent {
    height: 4px;
    background: linear-gradient(90deg, var(--primary-600), var(--primary-400));
}

.service-card-accent.electric {
    background: linear-gradient(90deg, var(--electric-500), var(--electric-400));
}

.service-icon {
    width: 4rem;
    height: 4rem;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-slow);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(-3deg);
}

.service-check {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

/* ========================================
   Portfolio Items
   ======================================== */
.portfolio-item {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-slow);
    aspect-ratio: 1;
}

.portfolio-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-2xl);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, transparent 60%);
    opacity: 0;
    transition: opacity var(--transition-slow);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.25rem;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-tag {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
}

.portfolio-tag.plumbing {
    background: rgba(59, 130, 246, 0.8);
    color: white;
}

.portfolio-tag.electrical {
    background: rgba(251, 191, 36, 0.8);
    color: var(--dark-900);
}

.portfolio-tag.combined {
    background: rgba(16, 185, 129, 0.8);
    color: white;
}

/* ========================================
   Portfolio Grid (4 on PC, 2 on mobile)
   ======================================== */
.portfolio-slideshow {
    position: relative;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    background: var(--dark-100);
    box-shadow: var(--shadow-xl);
}

.slideshow-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
}

@media (max-width: 640px) {
    .slideshow-container {
        aspect-ratio: 4/3;
    }
}

.slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slideshow-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-700);
    transition: all var(--transition-base);
    z-index: 10;
    box-shadow: var(--shadow-lg);
}

.slideshow-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.slideshow-prev {
    left: 1rem;
}

.slideshow-next {
    right: 1rem;
}

html[dir="rtl"] .slideshow-prev {
    left: auto;
    right: 1rem;
}

html[dir="rtl"] .slideshow-next {
    right: auto;
    left: 1rem;
}

.slideshow-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.slideshow-dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    padding: 0;
}

.slideshow-dot.active {
    background: white;
    transform: scale(1.3);
}

.slideshow-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* ========================================
   Portfolio Grid (6 photos at a time)
   ======================================== */
.portfolio-grid-wrapper {
    overflow: hidden;
    border-radius: var(--radius-2xl);
    margin-bottom: 1rem;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.portfolio-grid-item {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: var(--radius-lg);
    cursor: pointer;
    background: #1e293b;
    background-size: 200% 200%;
    animation: shimmer 2s ease-in-out infinite;
}

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

@media (max-width: 640px) {
    .portfolio-grid-item {
        aspect-ratio: 1;
    }
}

.portfolio-grid-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    filter: blur(8px);
    transform: scale(1.1);
    transition: opacity 2s ease-in-out, filter 2s ease-in-out, transform 2s ease-in-out;
    will-change: opacity, filter, transform;
}

.portfolio-grid-item img.active {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
}

.portfolio-grid-item:hover {
    transform: scale(1.03);
    z-index: 1;
}

.portfolio-grid-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.portfolio-grid-dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    background: var(--dark-300);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    padding: 0;
}

.portfolio-grid-dot.active {
    background: var(--primary-500);
    transform: scale(1.3);
}

/* ========================================
   FAQ Accordion
   ======================================== */
.faq-item {
    border-radius: var(--radius-xl);
    background: white;
    border: 1px solid var(--dark-200);
    overflow: hidden;
    transition: all var(--transition-slow);
}

.faq-item:hover {
    border-color: var(--primary-200);
}

.faq-item.open {
    border-color: var(--primary-300);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--dark-800);
    text-align: inherit;
    transition: color var(--transition-base);
}

html[dir="rtl"] .faq-question { text-align: right; }
html[dir="ltr"] .faq-question { text-align: left; }

.faq-question:hover { color: var(--primary-700); }

.faq-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    transition: transform var(--transition-slow);
    color: var(--dark-400);
}

.faq-item.open .faq-icon {
    transform: rotate(180deg);
    color: var(--primary-600);
}

.faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.open .faq-answer {
    grid-template-rows: 1fr;
}

.faq-answer > div {
    overflow: hidden;
}

.faq-answer p {
    color: var(--dark-600);
    line-height: 1.8;
    padding: 0 1.5rem 1.25rem;
}

/* ========================================
   Form Styles
   ======================================== */
.form-group { margin-bottom: 1.25rem; }

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-700);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--dark-200);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    transition: all var(--transition-base);
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.form-input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.form-error {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 0.375rem;
    display: none;
}

.form-error.visible { display: block; }

.form-success {
    background-color: #d1fae5;
    color: #065f46;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   Lightbox
   ======================================== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 2rem;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 80vh;
    position: relative;
    text-align: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 70vh;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    color: white;
    margin-top: 1rem;
    font-size: 1.1rem;
    font-weight: 500;
}

.lightbox-close {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-base);
    z-index: 1001;
}

.lightbox-close:hover { background: rgba(255, 255, 255, 0.2); }

html[dir="rtl"] .lightbox-close { right: auto; left: 1.5rem; }

.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-base);
    z-index: 1001;
}

.lightbox-nav:hover { background: rgba(255, 255, 255, 0.2); }

.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

html[dir="rtl"] .lightbox-prev { left: auto; right: 1.5rem; }
html[dir="rtl"] .lightbox-next { right: auto; left: 1.5rem; }

/* ========================================
   Sticky Emergency CTA
   ======================================== */
.sticky-cta {
    position: fixed;
    bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
    right: 1.5rem;
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-slow);
}

html[dir="rtl"] .sticky-cta { right: auto; left: 1.5rem; }

.sticky-cta.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sticky-cta-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--emerald-500) 0%, var(--emerald-600) 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.4);
    transition: all var(--transition-slow);
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.sticky-cta-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 50px rgba(16, 185, 129, 0.5);
}

.sticky-cta-pulse {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-full);
    background: var(--emerald-500);
    animation: pulse-ring 2s ease-out infinite;
    z-index: -1;
}

@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* ========================================
   WhatsApp Floating Button
   ======================================== */
.whatsapp-float {
    position: fixed;
    bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
    left: 1.5rem;
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-slow);
}

html[dir="rtl"] .whatsapp-float { left: auto; right: 1.5rem; }

.whatsapp-float.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.whatsapp-float-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: var(--radius-full);
    color: white;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all var(--transition-slow);
    text-decoration: none;
    position: relative;
}

.whatsapp-float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.5);
}

.whatsapp-float-btn::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: var(--radius-full);
    background: #25D366;
    opacity: 0.3;
    animation: whatsapp-pulse 2s ease-in-out infinite;
}

@keyframes whatsapp-pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.15); opacity: 0; }
}

/* ========================================
   Back to Top Button
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
    right: 1.5rem;
    z-index: 899;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-slow);
}

html[dir="rtl"] .back-to-top { right: auto; left: 1.5rem; }

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: white;
    border-radius: var(--radius-full);
    color: var(--primary-700);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-slow);
    text-decoration: none;
    border: 1px solid var(--dark-200);
}

.back-to-top-btn:hover {
    background: var(--primary-50);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

/* ========================================
   Contact Cards
   ======================================== */
.contact-card {
    position: relative;
    border-radius: var(--radius-2xl);
    padding: 2rem;
    text-align: center;
    color: white;
    transition: all var(--transition-slow);
    overflow: hidden;
    text-decoration: none;
    display: block;
}

.contact-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.contact-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-2xl);
}

.contact-card:hover::before { opacity: 1; }

.contact-card-icon {
    width: 4rem;
    height: 4rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    transition: all var(--transition-slow);
}

.contact-card:hover .contact-card-icon {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* ========================================
   CTA Section
   ======================================== */
.cta-section {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1e40af 0%, #0f172a 50%, #1e3a8a 100%);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: heroFloat 20s ease-in-out infinite;
}

/* ========================================
   Touch-friendly tap targets (scoped)
   ======================================== */

/* ========================================
   High contrast for outdoor readability
   ======================================== */
@media (prefers-contrast: more) {
    .text-dark-500 { color: #334155 !important; }
}

/* ========================================
   Print styles
   ======================================== */
@media print {
    nav, footer, .no-print, .sticky-cta, .whatsapp-float, .back-to-top {
        display: none !important;
    }
    body { background: white; color: black; }
}

/* ========================================
   Font fallbacks
   ======================================== */
.font-arabic { font-family: 'Noto Kufi Arabic', 'Arial', sans-serif; }
.font-english { font-family: 'Inter', 'Arial', sans-serif; }

/* ========================================
   Reduce motion for users who prefer it
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    .fade-in, .fade-in-left, .fade-in-right {
        transition: none;
        opacity: 1;
        transform: none;
    }
    .animate-pulse { animation: none; }
    .sticky-cta-pulse { animation: none; }
    .whatsapp-float-btn::before { animation: none; }
    .faq-answer { transition: none; }
    .hero-shape { animation: none; }
    .hero-bg::before { animation: none; }
    .loading-logo { animation: none; }
    .loading-spinner { animation: none; }
    .hero-cta-glow { animation: none; }
    body { animation: none; }
    .portfolio-grid-item img { transition: none; }
}

/* ========================================
   Responsive adjustments
   ======================================== */
@media (max-width: 640px) {
    .hero-bg {
        min-height: auto;
        padding: 2rem 0;
    }

    .hero-entrance-2 {
        font-size: 1.75rem;
        line-height: 1.3;
    }

    .hero-entrance-3 {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .sticky-cta-btn span:not(.sr-only) { display: none; }
    .sticky-cta-btn {
        padding: 1rem;
        border-radius: var(--radius-full);
        width: 60px;
        height: 60px;
        justify-content: center;
    }
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    .lightbox-prev { left: 0.5rem; }
    .lightbox-next { right: 0.5rem; }
    html[dir="rtl"] .lightbox-prev { left: auto; right: 0.5rem; }
    html[dir="rtl"] .lightbox-next { right: auto; left: 0.5rem; }

    .hero-shape-1 { width: 200px; height: 200px; }
    .hero-shape-2 { width: 150px; height: 150px; }
    .hero-shape-3 { width: 100px; height: 100px; }
}

/* ========================================
   Lightbox Content Animation
   ======================================== */
.lightbox-content {
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
    opacity: 1;
}

/* ========================================
   CTA Button Glow
   ======================================== */
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(16, 185, 129, 0.3); }
    50% { box-shadow: 0 0 40px rgba(16, 185, 129, 0.5); }
}

.hero-cta-glow {
    animation: glowPulse 3s ease-in-out infinite;
}

/* ========================================
   Dark Mode Element Overrides
   ======================================== */
[data-theme="dark"] body,
body[data-theme="dark"] {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

[data-theme="dark"] nav,
body[data-theme="dark"] nav {
    background: var(--nav-bg);
}

[data-theme="dark"] .bg-white,
body[data-theme="dark"] .bg-white {
    background-color: var(--bg-card);
}

[data-theme="dark"] .bg-dark-50,
body[data-theme="dark"] .bg-dark-50 {
    background-color: var(--bg-secondary);
}

[data-theme="dark"] .text-dark-900,
body[data-theme="dark"] .text-dark-900 {
    color: var(--text-primary);
}

[data-theme="dark"] .text-dark-800,
body[data-theme="dark"] .text-dark-800 {
    color: var(--text-primary);
}

[data-theme="dark"] .text-dark-700,
body[data-theme="dark"] .text-dark-700 {
    color: var(--text-secondary);
}

[data-theme="dark"] .text-dark-600,
body[data-theme="dark"] .text-dark-600 {
    color: var(--text-secondary);
}

[data-theme="dark"] .text-dark-500,
body[data-theme="dark"] .text-dark-500 {
    color: var(--text-muted);
}

[data-theme="dark"] .text-dark-400,
body[data-theme="dark"] .text-dark-400 {
    color: var(--dark-400);
}

[data-theme="dark"] .text-dark-300,
body[data-theme="dark"] .text-dark-300 {
    color: var(--dark-300);
}

[data-theme="dark"] .border-dark-200,
body[data-theme="dark"] .border-dark-200 {
    border-color: var(--border-color);
}

[data-theme="dark"] .form-input,
body[data-theme="dark"] .form-input {
    background: var(--input-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .service-card,
[data-theme="dark"] .review-card,
[data-theme="dark"] .faq-item,
[data-theme="dark"] .about-stat,
body[data-theme="dark"] .service-card,
body[data-theme="dark"] .review-card,
body[data-theme="dark"] .faq-item,
body[data-theme="dark"] .about-stat {
    background: var(--bg-card);
    border-color: var(--border-color);
}

[data-theme="dark"] .bg-dark-100,
body[data-theme="dark"] .bg-dark-100 {
    background-color: var(--bg-secondary);
}

/* USP Section Dark Mode */
[data-theme="dark"] .usp-card,
body[data-theme="dark"] .usp-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .usp-card h3,
body[data-theme="dark"] .usp-card h3 {
    color: var(--text-primary);
}

[data-theme="dark"] .usp-card p,
body[data-theme="dark"] .usp-card p {
    color: var(--text-muted);
}

/* Gradient Text Dark Mode */
[data-theme="dark"] .gradient-text,
body[data-theme="dark"] .gradient-text {
    background: linear-gradient(135deg, var(--primary-400) 0%, var(--primary-300) 50%, var(--emerald-400) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .gradient-text-gold,
body[data-theme="dark"] .gradient-text-gold {
    background: linear-gradient(135deg, var(--electric-300) 0%, var(--electric-400) 50%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   Dark Mode Toggle Button
   ======================================== */
.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark-100);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    color: var(--dark-600);
}

.theme-toggle:hover {
    background: var(--dark-200);
    color: var(--dark-800);
}

[data-theme="dark"] .theme-toggle {
    background: var(--dark-700);
    color: var(--dark-300);
}

[data-theme="dark"] .theme-toggle:hover {
    background: var(--dark-600);
    color: var(--dark-100);
}

/* ========================================
   Dark Mode - Additional Fixes
   ======================================== */
[data-theme="dark"] .glass,
body[data-theme="dark"] .glass {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .form-error,
body[data-theme="dark"] .form-error {
    color: #f87171;
}

[data-theme="dark"] .form-success,
body[data-theme="dark"] .form-success {
    background-color: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

[data-theme="dark"] .bg-dark-200,
body[data-theme="dark"] .bg-dark-200 {
    background-color: var(--dark-200);
}

[data-theme="dark"] .bg-dark-700,
body[data-theme="dark"] .bg-dark-700 {
    background-color: var(--dark-700);
}

[data-theme="dark"] .border-dark-100,
body[data-theme="dark"] .border-dark-100 {
    border-color: var(--border-color);
}

[data-theme="dark"] select.form-input,
body[data-theme="dark"] select.form-input {
    background: var(--input-bg);
    color: var(--text-primary);
}

/* ========================================
   Tablet Breakpoint
   ======================================== */
@media (max-width: 768px) and (min-width: 641px) {
    .hero-entrance-1, .hero-entrance-2, .hero-entrance-3, .hero-entrance-4 {
        animation-duration: 0.6s;
    }

    .portfolio-item {
        aspect-ratio: 4/3;
    }
}

/* ========================================
   Scoped Touch Targets (not all links)
   ======================================== */
.sticky-cta-btn,
.whatsapp-float-btn,
.back-to-top-btn,
.contact-card,
button[type="submit"],
.portfolio-item {
    min-height: 44px;
    min-width: 44px;
}

/* ========================================
   FAQ Open State Enhancement
   ======================================== */
.faq-item.open {
    border-left: 3px solid var(--primary-500);
}

html[dir="rtl"] .faq-item.open {
    border-left: none;
    border-right: 3px solid var(--primary-500);
}

.faq-item.open .faq-question {
    color: var(--primary-700);
}

/* ========================================
   Service Card Hover Enhancement
   ======================================== */
.service-card:hover .service-icon svg {
    transform: rotate(-5deg) scale(1.1);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.service-card .service-icon svg {
    transition: transform 0.3s ease;
}

/* ========================================
   Page Load Animation
   ======================================== */
@keyframes pageLoad {
    from { opacity: 0; }
    to { opacity: 1; }
}

body {
    animation: pageLoad 0.4s ease-out;
}

/* ========================================
   WhatsApp Popup Blocked Message
   ======================================== */
.popup-blocked-msg {
    background: var(--primary-50);
    border: 1px solid var(--primary-200);
    border-radius: var(--radius-lg);
    padding: 1rem;
    text-align: center;
    color: var(--primary-800);
    font-weight: 500;
    margin-top: 0.5rem;
}

/* ========================================
   iPhone Safe Area - Nav
   ======================================== */
nav {
    padding-top: env(safe-area-inset-top, 0px);
}

/* ========================================
   Touch Target Improvements
   ======================================== */
.theme-toggle {
    width: 44px;
    height: 44px;
}

#lang-switcher button {
    min-height: 44px;
    min-width: 44px;
    padding: 0.5rem 0.75rem;
}

#mobile-menu-btn {
    min-height: 44px;
    min-width: 44px;
}

/* Touch action for faster taps */
a, button, [role="button"] {
    touch-action: manipulation;
}

/* ========================================
   Hover Scale Fix for Android
   ======================================== */
@media (hover: hover) and (pointer: fine) {
    .hero-cta-glow:hover {
        transform: scale(1.05);
    }
    .service-card:hover {
        transform: translateY(-4px);
    }
    .portfolio-item:hover {
        transform: translateY(-4px) scale(1.02);
    }
}

/* ========================================
   Mobile Menu Overlay
   ======================================== */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 40;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   Lightbox Overscroll Prevention
   ======================================== */
body.lightbox-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* ========================================
   Hamburger to X Animation
   ======================================== */
.hamburger-line {
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger-open .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-open .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-open .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ========================================
   Landscape Mode Adjustments
   ======================================== */
@media (orientation: landscape) and (max-height: 500px) {
    .hero-bg {
        min-height: 100vh;
    }
    .loading-screen {
        min-height: 100vh;
    }
}

/* ========================================
   Mobile Contact Cards
   ======================================== */
@media (max-width: 640px) {
    .contact-card {
        padding: 1.5rem;
        border-radius: var(--radius-xl);
    }

    .contact-card h3 {
        font-size: 1.125rem;
    }

    .contact-card .text-2xl {
        font-size: 1.25rem;
        word-break: break-all;
    }
}

/* ========================================
   WhatsApp Chat Widget
   ======================================== */
.whatsapp-widget {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 950;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

html[dir="rtl"] .whatsapp-widget {
    left: auto;
    right: 1.5rem;
}

.whatsapp-widget-bubble {
    position: absolute;
    bottom: 70px;
    left: 0;
    width: 320px;
    background: white;
    border-radius: var(--radius-2xl);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

html[dir="rtl"] .whatsapp-widget-bubble {
    left: auto;
    right: 0;
}

.whatsapp-widget-bubble.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.whatsapp-widget-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, #075e54 0%, #128c7e 100%);
    color: white;
}

.whatsapp-widget-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.whatsapp-widget-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.whatsapp-widget-status {
    font-size: 0.75rem;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.whatsapp-widget-status::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #25D366;
    border-radius: 50%;
    display: inline-block;
}

.whatsapp-widget-message {
    padding: 1rem;
    background: #e5ddd5;
    position: relative;
}

.whatsapp-widget-message p {
    background: white;
    padding: 0.75rem 1rem;
    border-radius: 0 0.75rem 0.75rem 0.75rem;
    font-size: 0.9rem;
    color: #303030;
    display: inline-block;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
    line-height: 1.5;
}

.whatsapp-widget-input {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #f0f0f0;
    border-top: 1px solid #e0e0e0;
}

.whatsapp-widget-input input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    background: white;
    outline: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.whatsapp-widget-input button {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: var(--radius-full);
    background: #25D366;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

.whatsapp-widget-input button:hover {
    background: #1da851;
    transform: scale(1.05);
}

.whatsapp-widget-btn {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    background: #25D366;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all var(--transition-slow);
    position: relative;
}

.whatsapp-widget-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.5);
}

.whatsapp-widget-btn::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: var(--radius-full);
    background: #25D366;
    opacity: 0.3;
    animation: whatsapp-pulse 2s ease-in-out infinite;
    z-index: -1;
}

/* Typing animation */
.whatsapp-typing {
    display: inline-flex;
    gap: 4px;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 0 0.75rem 0.75rem 0.75rem;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

.whatsapp-typing span {
    width: 8px;
    height: 8px;
    background: #90949c;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.whatsapp-typing span:nth-child(2) { animation-delay: 0.2s; }
.whatsapp-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-5px); opacity: 1; }
}

/* Mobile-specific */
@media (max-width: 640px) {
    .whatsapp-widget {
        bottom: 5.5rem;
        left: 1rem;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    html[dir="rtl"] .whatsapp-widget {
        left: auto;
        right: 1rem;
    }

    .whatsapp-widget-bubble {
        width: calc(100vw - 2rem);
        max-width: 360px;
        bottom: 68px;
        border-radius: var(--radius-xl);
    }

    html[dir="rtl"] .whatsapp-widget-bubble {
        left: 0;
        right: 0;
    }

    .whatsapp-widget-btn {
        width: 56px;
        height: 56px;
    }

    .whatsapp-widget-btn svg {
        width: 28px;
        height: 28px;
    }

    .whatsapp-widget-bubble {
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    }
}
