/* =========================================
   Pearl Dental Clinic - Premium Design System
   ========================================= */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800;900&family=Playfair+Display:wght@400;500;600;700&display=swap');

/* =========================================
   CSS Variables & Design Tokens
   ========================================= */
:root {
    /* Primary Colors - Elegant Teal & Gold */
    --primary: #0D9488;
    --primary-light: #14B8A6;
    --primary-dark: #0F766E;
    --primary-50: #F0FDFA;
    --primary-100: #CCFBF1;
    --primary-200: #99F6E4;

    /* Accent - Warm Gold */
    --accent: #D4A853;
    --accent-light: #E8C878;
    --accent-dark: #B8922E;

    /* Neutrals */
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;

    /* Background */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F9FAFB;
    --bg-tertiary: #F0FDFA;

    /* Text */
    --text-primary: #111827;
    --text-secondary: #4B5563;
    --text-muted: #9CA3AF;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 40px rgba(13, 148, 136, 0.15);

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Font */
    --font-ar: 'Tajawal', sans-serif;
    --font-en: 'Playfair Display', serif;

    /* Spacing */
    --section-padding: 100px 0;
    --container-padding: 0 24px;
}

/* =========================================
   Dark Mode Variables
   ========================================= */
[data-theme="dark"] {
    --bg-primary: #0F172A;
    --bg-secondary: #1E293B;
    --bg-tertiary: #0F2A2A;
    --text-primary: #F1F5F9;
    --text-secondary: #CBD5E1;
    --text-muted: #64748B;
    --gray-50: #1E293B;
    --gray-100: #334155;
    --gray-200: #475569;
    --gray-800: #E2E8F0;
    --gray-900: #F8FAFC;
    --white: #0F172A;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(13, 148, 136, 0.25);
}

/* =========================================
   Global Reset & Base Styles
   ========================================= */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    font-family: var(--font-ar);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    direction: rtl;
    overflow-x: hidden !important;
    transition: background-color var(--transition-base), color var(--transition-base);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

ul,
ol {
    list-style: none;
}

/* =========================================
   Minimal Premium Loader (YouTube Style)
   ========================================= */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-wrapper.loaded {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.youtube-loader {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #ff0000;
    animation: ytRotate 0.8s linear infinite;
}

@keyframes ytRotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* =========================================
   Container
   ========================================= */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: var(--container-padding);
}

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

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

/* =========================================
   Navigation
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: all var(--transition-base);
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.92), rgba(15, 118, 110, 0.95));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 20px rgba(13, 148, 136, 0.2);
}

.navbar.scrolled {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.98), rgba(15, 118, 110, 0.99));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 12px 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .navbar {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(13, 100, 90, 0.85));
}

[data-theme="dark"] .navbar.scrolled {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(13, 100, 90, 0.9));
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1001;
}

.nav-logo-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.3);
}

.nav-logo-text {
    display: flex;
    flex-direction: column;
}

.nav-logo-text .brand {
    font-size: 20px;
    font-weight: 800;
    color: white;
    line-height: 1.2;
}

.nav-logo-text .tagline {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a {
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    border-radius: var(--radius-full);
    position: relative;
    transition: all var(--transition-base);
}

.nav-links a:hover,
.nav-links a.active {
    color: white;
    background: rgba(255, 255, 255, 0.15);
}

.nav-links a.active {
    font-weight: 700;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle {
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    transition: all var(--transition-base);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    transform: rotate(30deg);
}

.btn-nav {
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white !important;
    border: none;
    border-radius: var(--radius-full);
    font-family: var(--font-ar);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.3);
}

.btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13, 148, 136, 0.4);
}

/* Mobile Menu Toggle */
.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    z-index: 1001;
}

.mobile-toggle span {
    width: 22px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all var(--transition-base);
}

.mobile-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* =========================================
   Hero Slider (Swiper)
   ========================================= */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 700px;
    overflow: hidden;
}

.hero-swiper {
    width: 100%;
    height: 100%;
}

.hero-swiper .swiper-slide {
    position: relative;
    overflow: hidden;
}

.hero-slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.1);
    transition: transform 8s ease;
}

.swiper-slide-active .hero-slide-bg {
    transform: scale(1);
}

.hero-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.3) 100%);
}

.hero-slide-content {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 60px;
}

.hero-text-wrapper {
    max-width: 800px;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: var(--radius-full);
    color: var(--accent-light);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-title {
    font-size: clamp(32px, 4.5vw, 58px);
    font-weight: 900;
    color: white;
    line-height: 1.2;
    margin-bottom: 20px;
    white-space: nowrap;
}

.hero-title span {
    color: var(--accent-light);
}

.hero-desc {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    margin-bottom: 36px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-radius: var(--radius-full);
    font-family: var(--font-ar);
    font-size: 16px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: 0 8px 30px rgba(13, 148, 136, 0.4);
}

.btn-hero-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(13, 148, 136, 0.5);
}

.btn-hero-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 36px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    border-radius: var(--radius-full);
    font-family: var(--font-ar);
    font-size: 16px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
}

/* Swiper Custom Pagination */
.hero-swiper .swiper-pagination {
    bottom: 40px !important;
}

.hero-swiper .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
    transition: all var(--transition-base);
}

.hero-swiper .swiper-pagination-bullet-active {
    background: var(--accent);
    width: 36px;
    border-radius: 6px;
}

/* Slide Counter */
.hero-counter {
    position: absolute;
    bottom: 40px;
    left: 60px;
    z-index: 20;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
}

.hero-counter .current {
    font-size: 36px;
    font-weight: 800;
    color: white;
}

/* =========================================
   Section Styles
   ========================================= */
.section {
    padding: var(--section-padding);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-50);
    color: var(--primary);
    padding: 8px 20px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
    border: 1px solid var(--primary-100);
}

[data-theme="dark"] .section-badge {
    background: rgba(13, 148, 136, 0.15);
    border-color: rgba(13, 148, 136, 0.3);
}

.section-title {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.3;
}

.section-title span {
    color: var(--primary);
}

.section-subtitle {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

/* =========================================
   Stats Bar
   ========================================= */
.stats-bar {
    background: var(--bg-secondary);
    padding: 0;
    position: relative;
    z-index: 10;
    margin-top: -60px;
}

.stats-inner {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 40px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-200);
}

[data-theme="dark"] .stats-inner {
    border-color: var(--gray-200);
}

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

.stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 50px;
    background: var(--gray-200);
}

.stat-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-50);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    color: var(--primary);
    font-size: 24px;
}

.stat-number {
    font-size: 36px;
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

/* =========================================
   Services Cards
   ========================================= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background: var(--bg-primary);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 40px 30px;
    text-align: center;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-200);
}

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

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 36px;
    color: var(--primary);
    transition: all var(--transition-base);
}

.service-card:hover .service-icon {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    transform: scale(1.1) rotate(5deg);
}

.service-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.service-card p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 600;
    font-size: 15px;
}

.service-link i {
    transition: transform var(--transition-base);
}

.service-link:hover i {
    transform: translateX(-5px);
}

/* =========================================
   About / Why Choose Us
   ========================================= */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-images {
    position: relative;
    height: 500px;
}

.about-img-main {
    width: 80%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

.about-img-float {
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: var(--radius-xl);
    border: 6px solid var(--bg-primary);
    box-shadow: var(--shadow-lg);
}

.about-badge-float {
    position: absolute;
    top: 30px;
    left: 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    padding: 20px 24px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: 0 8px 30px rgba(13, 148, 136, 0.4);
}

.about-badge-float .number {
    font-size: 36px;
    font-weight: 900;
    line-height: 1;
}

.about-badge-float .text {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.9;
}

.about-content h2 {
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.3;
}

.about-content h2 span {
    color: var(--primary);
}

.about-content>p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 30px;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 30px;
}

.about-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.about-feature:hover {
    background: var(--primary-50);
    transform: translateX(-5px);
}

.about-feature i {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.about-feature span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* =========================================
   Team Section
   ========================================= */
.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.team-card {
    background: var(--bg-primary);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-base);
}

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

.team-img-wrapper {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.team-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.team-card:hover .team-img-wrapper img {
    transform: scale(1.08);
}

.team-socials {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    transform: translateY(100%);
    transition: transform var(--transition-base);
}

.team-card:hover .team-socials {
    transform: translateY(0);
}

.team-socials a {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    transition: all var(--transition-base);
}

.team-socials a:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.team-info {
    padding: 24px;
    text-align: center;
}

.team-info h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.team-info .role {
    font-size: 14px;
    color: var(--primary);
    font-weight: 600;
}

.team-info .desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
    line-height: 1.6;
}

.svg-avatar {
    width: 50px;
    height: 50px;
    color: var(--primary);
    background: var(--primary-5);
    padding: 10px;
    border-radius: 50%;
    border: 1px solid var(--primary-10);
    transition: all 0.3s ease;
}

.team-card:hover .svg-avatar {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

/* =========================================
   Testimonials
   ========================================= */
.testimonials-section {
    background: var(--bg-secondary);
}

.testimonial-card {
    background: var(--bg-primary);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 36px;
    position: relative;
}

.testimonial-card::before {
    content: '\201C';
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 80px;
    color: var(--primary-100);
    font-family: serif;
    line-height: 1;
}

.testimonial-stars {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    color: #FBBF24;
    font-size: 16px;
}

.testimonial-text {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 24px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 14px;
}

.testimonial-author img {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 3px solid var(--primary-100);
}

.testimonial-author .svg-avatar {
    width: 45px;
    height: 45px;
    padding: 8px;
}

.testimonial-author .name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.testimonial-author .date {
    font-size: 13px;
    color: var(--text-muted);
}

/* =========================================
   Gallery / Portfolio
   ========================================= */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 40%, rgba(13, 148, 136, 0.85));
    opacity: 0;
    transition: opacity var(--transition-base);
    display: flex;
    align-items: flex-end;
    padding: 24px;
}

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

.gallery-overlay h4 {
    color: white;
    font-size: 18px;
    font-weight: 700;
}

.gallery-overlay p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

/* =========================================
   CTA Section
   ========================================= */
.cta-section {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.cta-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
}

.cta-content {
    text-align: center;
    position: relative;
    z-index: 5;
}

.cta-content h2 {
    font-size: clamp(28px, 4vw, 44px);
    color: white;
    font-weight: 900;
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
    margin: 0 auto 36px;
    line-height: 1.8;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 18px 44px;
    background: white;
    color: var(--primary);
    border-radius: var(--radius-full);
    font-family: var(--font-ar);
    font-size: 17px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.btn-cta:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* =========================================
   Insurance / Pricing
   ========================================= */
.insurance-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-bottom: 60px;
}

.insurance-logo {
    width: 150px;
    height: 80px;
    background: var(--bg-primary);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    transition: all var(--transition-base);
}

.insurance-logo:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.pricing-card {
    background: var(--bg-primary);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 40px 30px;
    text-align: center;
    transition: all var(--transition-base);
    position: relative;
}

.pricing-card.featured {
    border-color: var(--primary);
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.pricing-card.featured::before {
    content: 'الأكثر طلباً';
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    padding: 6px 24px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
}

.pricing-card:hover {
    border-color: var(--primary);
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-8px);
}

.pricing-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-50);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
    color: var(--primary);
}

.pricing-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.pricing-price {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.pricing-price .amount {
    font-size: 40px;
    font-weight: 900;
    color: var(--primary);
}

.pricing-features {
    text-align: right;
    margin-bottom: 30px;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    font-size: 15px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--gray-100);
}

.pricing-features li i {
    color: var(--primary);
    font-size: 14px;
}

.btn-pricing {
    width: 100%;
    padding: 14px;
    background: var(--primary-50);
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: var(--radius-full);
    font-family: var(--font-ar);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-pricing:hover,
.pricing-card.featured .btn-pricing {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 25px rgba(13, 148, 136, 0.3);
}

/* =========================================
   Contact Form
   ========================================= */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-info-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    transition: all var(--transition-base);
}

.contact-info-card:hover {
    background: var(--primary-50);
    transform: translateY(-4px);
}

.contact-info-card i {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 20px;
}

.contact-info-card h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.contact-info-card p {
    font-size: 14px;
    color: var(--text-secondary);
}

.contact-form {
    background: var(--bg-primary);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 40px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-secondary);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-family: var(--font-ar);
    font-size: 15px;
    color: var(--text-primary);
    transition: all var(--transition-base);
    direction: rtl;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1);
    background: var(--bg-primary);
}

.form-group textarea {
    min-height: 140px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-ar);
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13, 148, 136, 0.4);
}

/* =========================================
   Map Section
   ========================================= */
.map-wrapper {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    height: 450px;
    border: 1px solid var(--gray-200);
}

.map-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* =========================================
   Footer
   ========================================= */
.footer {
    background: var(--gray-900);
    color: white;
    padding: 80px 0 0;
}

[data-theme="dark"] .footer {
    background: #0B1120;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 50px;
    padding-bottom: 50px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.footer-brand .logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.footer-brand .logo-text {
    font-size: 22px;
    font-weight: 800;
}

.footer-brand>p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 24px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    transition: all var(--transition-base);
}

.footer-social a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.footer-col h4 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 15px;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-col ul li a:hover {
    color: var(--primary-light);
    padding-right: 8px;
}

.footer-bottom {
    padding: 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

/* =========================================
   SVG Portraits & Avatars
   ========================================= */
.team-img-wrapper svg,
.testimonial-author svg {
    width: 100%;
    height: 100%;
    display: block;
    background: var(--bg-secondary);
    border-radius: 50%;
    transition: var(--transition-bounce);
}

.team-card:hover .team-img-wrapper svg {
    transform: scale(1.05) rotate(2deg);
}

.svg-avatar-bg {
    fill: var(--primary-50);
    transition: fill var(--transition-base);
}

[data-theme="dark"] .svg-avatar-bg {
    fill: var(--bg-secondary);
}

.svg-avatar-accent {
    fill: var(--primary);
}

.svg-avatar-accent-2 {
    fill: var(--accent);
}

/* =========================================
   Back to Top
   ========================================= */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 20px rgba(13, 148, 136, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-base);
    z-index: 999;
}

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

.back-to-top:hover {
    transform: translateY(-5px);
}

/* =========================================
   WhatsApp Float Button
   ========================================= */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: all var(--transition-base);
    animation: whatsappPulse 2s infinite;
}

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

@keyframes whatsappPulse {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }

    50% {
        box-shadow: 0 4px 30px rgba(37, 211, 102, 0.7);
    }
}

/* =========================================
   Page Header (Inner Pages)
   ========================================= */
.page-header {
    padding: 160px 0 80px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    position: relative;
    overflow: hidden;
    text-align: center;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -15%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
}

.page-header h1 {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 900;
    color: white;
    margin-bottom: 16px;
    position: relative;
    z-index: 5;
}

.page-header .breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    position: relative;
    z-index: 5;
}

.page-header .breadcrumb a {
    color: rgba(255, 255, 255, 0.7);
    transition: color var(--transition-base);
}

.page-header .breadcrumb a:hover {
    color: white;
}

.page-header .breadcrumb .current {
    color: var(--accent-light);
    font-weight: 600;
}

/* =========================================
   Animations (AOS alternative)
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Stagger children */
.stagger-children>* {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.stagger-children.revealed>*:nth-child(1) {
    transition-delay: 0.1s;
}

.stagger-children.revealed>*:nth-child(2) {
    transition-delay: 0.2s;
}

.stagger-children.revealed>*:nth-child(3) {
    transition-delay: 0.3s;
}

.stagger-children.revealed>*:nth-child(4) {
    transition-delay: 0.4s;
}

.stagger-children.revealed>*:nth-child(5) {
    transition-delay: 0.5s;
}

.stagger-children.revealed>*:nth-child(6) {
    transition-delay: 0.6s;
}

.stagger-children.revealed>* {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   Responsive Design
   ========================================= */
@media (max-width: 1024px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 100px 30px 30px;
        box-shadow: var(--shadow-2xl);
        transition: right var(--transition-base);
        gap: 4px;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        width: 100%;
        padding: 14px 20px;
        border-radius: var(--radius-md);
        color: var(--text-primary) !important;
    }

    .nav-links a:hover,
    .nav-links a.active {
        color: var(--primary) !important;
        background: var(--primary-50) !important;
    }

    .mobile-toggle {
        display: flex;
    }

    .btn-nav {
        display: none;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-images {
        height: 400px;
    }

    .stats-inner {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-item:nth-child(2)::after {
        display: none;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-card.featured {
        transform: none;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 70px 0;
    }

    .hero-section {
        min-height: 600px;
    }

    .hero-slide-content {
        padding: 0 24px;
    }

    .hero-title {
        font-size: 32px;
        white-space: normal;
    }

    .hero-desc {
        font-size: 15px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn-hero-primary,
    .btn-hero-secondary {
        justify-content: center;
    }

    .stats-inner {
        grid-template-columns: 1fr 1fr;
        padding: 30px 20px;
        gap: 20px;
    }

    .stat-item::after {
        display: none !important;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-info-cards {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    .hero-counter {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-section {
        min-height: 550px;
    }

    .hero-title {
        font-size: 28px;
        white-space: normal;
    }

    .stats-inner {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .about-images {
        height: 300px;
    }

    .about-img-float {
        width: 150px;
        height: 150px;
    }

    .navbar {
        padding: 0;
    }
}

/* =========================================
   Utility Classes
   ========================================= */
.text-primary {
    color: var(--primary) !important;
}

.text-accent {
    color: var(--accent) !important;
}

.bg-primary-50 {
    background: var(--primary-50) !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mt-60 {
    margin-top: 60px !important;
}

.text-center {
    text-align: center !important;
}

.rounded-xl {
    border-radius: var(--radius-xl) !important;
}

/* Lightbox */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

.lightbox-overlay img {
    max-width: 90%;
    max-height: 85vh;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2xl);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--radius-full);
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all var(--transition-base);
}

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

/* Working Hours Style */
.working-hours {
    background: var(--bg-primary);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 36px;
}

.working-hours h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.working-hours h3 i {
    color: var(--primary);
}

.hours-list li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 15px;
}

.hours-list li:last-child {
    border-bottom: none;
}

.hours-list .day {
    font-weight: 600;
    color: var(--text-primary);
}

.hours-list .time {
    color: var(--text-secondary);
}

.hours-list li.closed .time {
    color: #EF4444;
    font-weight: 600;
}

/* Smooth parallax for sections */
.parallax-bg {
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

/* Number counter animation */
.counter-animated {
    display: inline-block;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

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

/* Spin animation for Bootstrap Icons spinner */
@keyframes spinIcon {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.spin-icon {
    display: inline-block;
    animation: spinIcon 1s linear infinite;
}