/* ============================================
   DR. AHMED DENTAL CLINIC - PORTFOLIO STYLES
   Premium Dark Theme with Teal/Gold Accents
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
    /* Primary Colors - Elegant Dark with Teal */
    --color-bg-primary: #0a0e17;
    --color-bg-secondary: #111827;
    --color-bg-tertiary: #1a2332;
    --color-bg-card: #16202e;
    --color-bg-card-hover: #1c2940;

    /* Accent Colors */
    --color-accent: #2dd4bf;
    --color-accent-light: #5eead4;
    --color-accent-dark: #14b8a6;
    --color-accent-glow: rgba(45, 212, 191, 0.15);
    --color-gold: #f59e0b;
    --color-gold-light: #fbbf24;

    /* Text Colors */
    --color-text-primary: #f1f5f9;
    --color-text-secondary: #94a3b8;
    --color-text-muted: #64748b;

    /* Borders & Shadows */
    --color-border: rgba(45, 212, 191, 0.1);
    --color-border-hover: rgba(45, 212, 191, 0.3);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(45, 212, 191, 0.15);

    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-arabic: 'Tajawal', sans-serif;

    /* Spacing */
    --section-padding: 100px 0;
    --container-max: 1200px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 50%;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Arabic Font Override */
html[lang="ar"] body,
html[lang="ar"] *:not(i):not(.fa):not(.fas):not(.fab):not(.far):not(.fal):not(.fad) {
    font-family: var(--font-arabic) !important;
}

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

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

ul {
    list-style: none;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--color-accent-dark);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent);
}

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

/* ============================================
   HEADER / NAVBAR
   ============================================ */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition-smooth);
    background: transparent;
}

#header.scrolled {
    background: rgba(10, 14, 23, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: var(--container-max);
    padding: 16px 24px;
}

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

.logo-img {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    object-fit: contain;
    border: 1px solid var(--color-border);
    transition: var(--transition-normal);
}

.logo-img:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-glow);
}

.logo-text {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-text-primary);
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--color-text-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    border-radius: var(--radius-sm);
    transition: var(--transition-normal);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 20px;
    height: 2px;
    background: var(--color-accent);
    border-radius: 2px;
    transition: var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-accent);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

.location-link {
    color: var(--color-gold);
}

.location-link:hover {
    color: var(--color-gold-light);
}

.location-link::after {
    background: var(--color-gold);
}

.location-link i {
    font-size: 1rem;
}

/* Nav Controls */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1001;
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-accent);
    background: var(--color-accent-glow);
    border: 1px solid var(--color-border-hover);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: var(--transition-normal);
    font-family: var(--font-arabic);
}

.lang-toggle:hover {
    background: rgba(45, 212, 191, 0.25);
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 1001;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text-primary);
    border-radius: 2px;
    transition: var(--transition-normal);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.hamburger {
    top: 50%;
    transform: translate(-50%, -50%);
}

.hamburger::before {
    content: '';
    top: -7px;
}

.hamburger::after {
    content: '';
    top: 7px;
}

.menu-toggle.active .hamburger {
    background: transparent;
}

.menu-toggle.active .hamburger::before {
    top: 0;
    transform: translateX(-50%) rotate(45deg);
}

.menu-toggle.active .hamburger::after {
    top: 0;
    transform: translateX(-50%) rotate(-45deg);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: var(--color-bg-primary);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 80%;
    height: 150%;
    background: radial-gradient(ellipse, rgba(45, 212, 191, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 120px 24px 60px;
    gap: 60px;
    position: relative;
    z-index: 2;
}

.hero-content {
    flex: 1;
    max-width: 560px;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: var(--color-accent-glow);
    border: 1px solid var(--color-border-hover);
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-accent);
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease both;
}

.hero-title {
    font-size: 3.8rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 12px;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.hero-title span {
    background: linear-gradient(135deg, var(--color-text-primary) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--color-accent);
    margin-bottom: 20px;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-description {
    font-size: 1.05rem;
    color: var(--color-text-secondary);
    line-height: 1.8;
    margin-bottom: 32px;
    animation: fadeInUp 0.6s ease 0.3s both;
}

/* Social Media Links */
.hero-socials {
    display: flex;
    gap: 12px;
    margin-bottom: 36px;
    animation: fadeInUp 0.6s ease 0.4s both;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    color: var(--color-text-secondary);
    font-size: 1.1rem;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--color-accent);
    border-radius: var(--radius-full);
    transform: scale(0);
    transition: var(--transition-normal);
}

.social-link:hover {
    color: var(--color-bg-primary);
    border-color: var(--color-accent);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(45, 212, 191, 0.3);
}

.social-link:hover::before {
    transform: scale(1);
}

.social-link i {
    position: relative;
    z-index: 1;
}

/* CTA Button */
.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 36px;
    background: linear-gradient(135deg, var(--color-accent-dark), var(--color-accent));
    color: var(--color-bg-primary);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-xl);
    box-shadow: 0 4px 20px rgba(45, 212, 191, 0.3);
    transition: var(--transition-normal);
    animation: fadeInUp 0.6s ease 0.5s both;
}

.hero-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(45, 212, 191, 0.4);
}

/* Hero Image */
.hero-image-wrapper {
    flex: 0 0 420px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInRight 0.8s ease 0.3s both;
}

.hero-image-bg {
    position: absolute;
    width: 380px;
    height: 380px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, rgba(45, 212, 191, 0.1), rgba(45, 212, 191, 0.03));
    border: 1px solid var(--color-border);
}

.hero-image-glow {
    position: absolute;
    width: 340px;
    height: 340px;
    border-radius: var(--radius-full);
    background: radial-gradient(circle, rgba(45, 212, 191, 0.08), transparent 70%);
    animation: pulseGlow 4s ease-in-out infinite;
}

.hero-image {
    width: 360px;
    height: 360px;
    border-radius: var(--radius-full);
    object-fit: cover;
    object-position: top center;
    position: relative;
    z-index: 2;
    border: 2px solid var(--color-border-hover);
    box-shadow: var(--shadow-lg);
}

/* Hero Decorations */
.hero-decorations {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.decoration-icon {
    position: absolute;
    color: rgba(45, 212, 191, 0.08);
    font-size: 2rem;
    animation: floatIcon 6s ease-in-out infinite;
}

.dec-1 {
    top: 15%;
    right: 10%;
    animation-delay: 0s;
}

.dec-2 {
    bottom: 20%;
    left: 5%;
    animation-delay: 2s;
    font-size: 1.5rem;
}

.dec-3 {
    top: 60%;
    right: 25%;
    animation-delay: 4s;
    font-size: 1.2rem;
}

/* ============================================
   SECTION COMMON STYLES
   ============================================ */
.section-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

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

.section-badge {
    display: inline-block;
    padding: 6px 18px;
    background: var(--color-accent-glow);
    border: 1px solid var(--color-border-hover);
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-accent);
    margin-bottom: 16px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-text-primary);
    margin-bottom: 12px;
}

.section-line {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
    border-radius: 4px;
    margin: 0 auto;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-section {
    padding: var(--section-padding);
    background: var(--color-bg-secondary);
    position: relative;
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
    opacity: 0.3;
}

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

.about-description {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    line-height: 2;
    margin-bottom: 48px;
}

/* Stats */
.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.stat-card {
    padding: 28px 20px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: var(--transition-normal);
}

.stat-card:hover {
    border-color: var(--color-border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--color-accent);
    margin-bottom: 4px;
}

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

/* ============================================
   CERTIFICATES
   ============================================ */
.certificates-section {
    margin-top: 80px;
}

.certificates-title {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 40px;
    position: relative;
}

.certificates-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: var(--color-gold);
    margin: 12px auto 0;
    border-radius: 2px;
}

/* Education Showcase - Single Card */
.education-showcase {
    display: flex;
    justify-content: center;
}

.education-card {
    display: flex;
    align-items: center;
    gap: 36px;
    padding: 40px 48px;
    background: linear-gradient(135deg, var(--color-bg-card) 0%, rgba(45, 212, 191, 0.04) 100%);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    max-width: 680px;
    width: 100%;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.education-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-gold), var(--color-accent), var(--color-gold-light));
}

.education-card:hover {
    border-color: var(--color-border-hover);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(45, 212, 191, 0.12);
}

.education-icon-wrapper {
    position: relative;
    flex-shrink: 0;
}

.education-icon-bg {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(45, 212, 191, 0.1));
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.education-main-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: var(--color-gold);
}

.education-info {
    flex: 1;
}

.education-degree {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 10px;
    line-height: 1.4;
}

.education-divider {
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--color-accent), transparent);
    margin-bottom: 10px;
    border-radius: 2px;
}

.education-university {
    font-size: 1.05rem;
    color: var(--color-accent-light);
    font-weight: 500;
    margin-bottom: 16px;
}

.education-badge-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.education-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: var(--color-accent-glow);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.education-badge i {
    color: var(--color-accent);
    font-size: 0.75rem;
}

/* ============================================
   LATEST WORKS SLIDESHOW
   ============================================ */
.latest-works-section {
    padding: var(--section-padding);
    background: var(--color-bg-primary);
    position: relative;
}

.latest-works-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
    opacity: 0.3;
}

.slideshow-wrapper {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
}

.slideshow-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.slide {
    min-width: 100%;
    position: relative;
}

.slide img {
    width: 100%;
    height: 500px;
    object-fit: contain;
    display: block;
    background: var(--color-bg-primary);
}

/* Navigation Buttons */
.slide-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 14, 23, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(45, 212, 191, 0.2);
    border-radius: var(--radius-full);
    color: var(--color-accent);
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition-normal);
    opacity: 0.8;
}

.slide-btn:hover {
    background: rgba(45, 212, 191, 0.2);
    border-color: var(--color-accent);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 20px rgba(45, 212, 191, 0.3);
}

.slide-prev {
    left: 16px;
}

.slide-next {
    right: 16px;
}

html[dir="rtl"] .slide-prev {
    left: auto;
    right: 16px;
}

html[dir="rtl"] .slide-next {
    right: auto;
    left: 16px;
}

/* Dots Indicator */
.slide-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
    padding: 8px 16px;
    background: rgba(10, 14, 23, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: var(--transition-normal);
}

.dot:hover {
    background: rgba(255, 255, 255, 0.6);
}

.dot.active {
    background: var(--color-accent);
    box-shadow: 0 0 8px rgba(45, 212, 191, 0.5);
    width: 28px;
    border-radius: 5px;
}

/* ============================================
   SERVICES SECTION
   ============================================ */
.services-section {
    padding: var(--section-padding);
    background: var(--color-bg-primary);
    position: relative;
}

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

.service-card {
    padding: 36px 28px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

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

.service-card:hover {
    border-color: var(--color-border-hover);
    transform: translateY(-6px);
    box-shadow: var(--shadow-glow);
}

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

.service-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    background: var(--color-accent-glow);
    border-radius: var(--radius-md);
    color: var(--color-accent);
    font-size: 1.5rem;
    transition: var(--transition-normal);
}

.service-card:hover .service-icon {
    background: var(--color-accent);
    color: var(--color-bg-primary);
    transform: scale(1.1);
}

.service-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 10px;
}

.service-card p {
    font-size: 0.92rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-section {
    padding: var(--section-padding);
    background: var(--color-bg-secondary);
    position: relative;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
    opacity: 0.3;
}

.contact-content {
    max-width: 700px;
    margin: 0 auto;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
}

.contact-card:hover {
    border-color: var(--color-border-hover);
    transform: translateX(8px);
    box-shadow: var(--shadow-glow);
}

html[dir="rtl"] .contact-card:hover {
    transform: translateX(-8px);
}

.contact-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent-glow);
    border-radius: var(--radius-full);
    color: var(--color-accent);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-details h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 4px;
}

.contact-details p {
    font-size: 0.92rem;
    color: var(--color-text-secondary);
}

.contact-details a {
    color: var(--color-text-secondary);
    transition: var(--transition-fast);
}

.contact-details a:hover {
    color: var(--color-accent);
}

/* Contact Form */
.contact-form-wrapper {
    padding: 36px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.form-group {
    position: relative;
    margin-bottom: 24px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px 20px;
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-primary);
    font-size: 0.95rem;
    font-family: var(--font-primary);
    transition: var(--transition-normal);
    outline: none;
}

html[lang="ar"] .form-group input,
html[lang="ar"] .form-group textarea {
    font-family: var(--font-arabic);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.form-group label {
    position: absolute;
    top: 16px;
    left: 20px;
    font-size: 0.95rem;
    color: var(--color-text-muted);
    pointer-events: none;
    transition: var(--transition-normal);
    background: transparent;
}

html[dir="rtl"] .form-group label {
    left: auto;
    right: 20px;
}

.form-group input:focus~label,
.form-group input:not(:placeholder-shown)~label,
.form-group textarea:focus~label,
.form-group textarea:not(:placeholder-shown)~label {
    top: -10px;
    left: 14px;
    font-size: 0.78rem;
    color: var(--color-accent);
    background: var(--color-bg-card);
    padding: 0 6px;
}

html[dir="rtl"] .form-group input:focus~label,
html[dir="rtl"] .form-group input:not(:placeholder-shown)~label,
html[dir="rtl"] .form-group textarea:focus~label,
html[dir="rtl"] .form-group textarea:not(:placeholder-shown)~label {
    left: auto;
    right: 14px;
}

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

.form-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--color-accent-dark), var(--color-accent));
    color: var(--color-bg-primary);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-normal);
    font-family: var(--font-primary);
}

html[lang="ar"] .form-submit {
    font-family: var(--font-arabic);
}

.form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(45, 212, 191, 0.4);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    padding: 40px 0;
    background: var(--color-bg-primary);
    border-top: 1px solid var(--color-border);
}

.footer-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

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

.footer-logo {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    object-fit: contain;
}

.footer-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.footer-socials {
    display: flex;
    gap: 16px;
}

.footer-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    transition: var(--transition-normal);
}

.footer-socials a:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
    transform: translateY(-2px);
}

.footer-copy {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* ============================================
   SCROLL TO TOP
   ============================================ */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent);
    color: var(--color-bg-primary);
    border: none;
    border-radius: var(--radius-full);
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition-normal);
    z-index: 999;
    box-shadow: 0 4px 20px rgba(45, 212, 191, 0.3);
}

html[dir="rtl"] .scroll-top {
    right: auto;
    left: 30px;
}

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

.scroll-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(45, 212, 191, 0.5);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulseGlow {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.7;
    }
}

@keyframes floatIcon {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-15px) rotate(10deg);
    }
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* ------- Tablets & Small Laptops (≤1024px) ------- */
@media (max-width: 1024px) {
    :root {
        --section-padding: 80px 0;
    }

    .hero-container {
        flex-direction: column;
        text-align: center;
        gap: 40px;
        padding: 100px 24px 60px;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-title {
        font-size: 3.2rem;
    }

    .hero-socials {
        justify-content: center;
    }

    .hero-cta {
        margin: 0 auto;
    }

    .hero-image-wrapper {
        flex: none;
    }

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

    .contact-content {
        max-width: 100%;
    }

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

/* ------- Mobile Landscape & Small Tablets (≤768px) ------- */
@media (max-width: 768px) {
    :root {
        --section-padding: 60px 0;
    }

    /* Mobile Nav */
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        background: rgba(10, 14, 23, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 12px;
        opacity: 0;
        visibility: hidden;
        transition: var(--transition-smooth);
        z-index: 1000;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
    }

    .nav-link {
        font-size: 1.2rem;
        padding: 14px 28px;
    }

    .menu-toggle {
        display: block;
    }

    /* Logo */
    .logo-text {
        font-size: 1.1rem;
    }

    /* Hero */
    .hero-container {
        padding: 90px 20px 40px;
        gap: 32px;
    }

    .hero-title {
        font-size: 2.6rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        letter-spacing: 1px;
    }

    .hero-description {
        font-size: 0.95rem;
        margin-bottom: 24px;
    }

    .hero-badge {
        font-size: 0.8rem;
        padding: 6px 16px;
    }

    .hero-image-wrapper {
        width: 280px;
    }

    .hero-image-bg {
        width: 280px;
        height: 280px;
    }

    .hero-image-glow {
        width: 260px;
        height: 260px;
    }

    .hero-image {
        width: 270px;
        height: 270px;
    }

    /* Section Titles */
    .section-title {
        font-size: 2rem;
    }

    .section-header {
        margin-bottom: 40px;
    }

    /* About */
    .about-description {
        font-size: 1rem;
        line-height: 1.8;
    }

    .about-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

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

    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .service-card {
        padding: 28px 24px;
    }

    /* Certificates / Education */
    .certificates-section {
        margin-top: 50px;
    }

    .certificates-title {
        font-size: 1.3rem;
    }

    .education-card {
        flex-direction: column;
        text-align: center;
        padding: 28px 24px;
        gap: 20px;
    }

    .education-badge-row {
        justify-content: center;
    }

    /* Slideshow */
    .slide img {
        height: 350px;
    }

    .slide-btn {
        width: 40px;
        height: 40px;
        font-size: 0.95rem;
    }

    /* Contact */
    .contact-info {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .contact-card {
        padding: 20px;
        gap: 16px;
    }

    /* Disable hover translate on touch devices */
    .contact-card:hover {
        transform: none;
    }

    html[dir="rtl"] .contact-card:hover {
        transform: none;
    }

    /* Footer */
    .footer {
        padding: 30px 0;
    }

    .footer-brand {
        flex-direction: column;
        gap: 8px;
    }

    .footer-name {
        font-size: 1rem;
        text-align: center;
    }

    .footer-copy {
        font-size: 0.8rem;
        padding: 0 16px;
    }

    /* Scroll to Top */
    .scroll-top {
        width: 42px;
        height: 42px;
        bottom: 20px;
        right: 20px;
        font-size: 1rem;
    }

    html[dir="rtl"] .scroll-top {
        right: auto;
        left: 20px;
    }
}

/* ------- Mobile Portrait (≤480px) ------- */
@media (max-width: 480px) {
    :root {
        --section-padding: 50px 0;
    }

    .nav-container {
        padding: 12px 16px;
    }

    .logo-text {
        font-size: 1rem;
    }

    .logo-img {
        width: 38px;
        height: 38px;
    }

    .lang-toggle {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    /* Hero */
    .hero-container {
        padding: 80px 16px 32px;
        gap: 28px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-description {
        font-size: 0.9rem;
        line-height: 1.7;
    }

    .hero-socials {
        gap: 10px;
    }

    .social-link {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }

    .hero-image-wrapper {
        width: 240px;
    }

    .hero-image-bg {
        width: 230px;
        height: 230px;
    }

    .hero-image-glow {
        width: 210px;
        height: 210px;
    }

    .hero-image {
        width: 220px;
        height: 220px;
    }

    /* Sections */
    .section-container {
        padding: 0 16px;
    }

    .section-title {
        font-size: 1.7rem;
    }

    .section-badge {
        font-size: 0.8rem;
        padding: 5px 14px;
    }

    /* About */
    .about-description {
        font-size: 0.95rem;
        margin-bottom: 32px;
    }

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

    .stat-card {
        padding: 20px;
    }

    /* Services */
    .service-card {
        padding: 24px 20px;
    }

    .service-icon {
        width: 56px;
        height: 56px;
        font-size: 1.3rem;
        margin-bottom: 16px;
    }

    .service-card h3 {
        font-size: 1.05rem;
    }

    .service-card p {
        font-size: 0.88rem;
    }

    /* Certificates / Education */
    .certificates-section {
        margin-top: 40px;
    }

    .certificates-title {
        font-size: 1.2rem;
        margin-bottom: 28px;
    }

    .education-icon-bg {
        width: 64px;
        height: 64px;
    }

    .education-main-icon {
        font-size: 1.5rem;
    }

    .education-degree {
        font-size: 1.05rem;
    }

    .education-university {
        font-size: 0.92rem;
    }

    /* Slideshow */
    .slide img {
        height: 280px;
    }

    .slide-btn {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }

    .slide-dots {
        padding: 6px 12px;
        gap: 8px;
    }

    .dot {
        width: 8px;
        height: 8px;
    }

    .dot.active {
        width: 22px;
    }

    /* Contact */
    .contact-card {
        padding: 18px 16px;
        gap: 14px;
    }

    .contact-icon {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    .contact-details h4 {
        font-size: 0.85rem;
    }

    .contact-details p {
        font-size: 0.85rem;
    }

    .contact-form-wrapper {
        padding: 24px 16px;
    }

    /* Footer */
    .footer-socials a {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }

    .footer-copy {
        font-size: 0.75rem;
    }
}

/* ------- Very Small Phones (≤360px) ------- */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.85rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .hero-description {
        font-size: 0.85rem;
    }

    .hero-image-wrapper {
        width: 200px;
    }

    .hero-image-bg {
        width: 195px;
        height: 195px;
    }

    .hero-image-glow {
        width: 180px;
        height: 180px;
    }

    .hero-image {
        width: 190px;
        height: 190px;
    }

    .logo-text {
        font-size: 0.9rem;
    }

    .logo-img {
        width: 34px;
        height: 34px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .contact-card {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .footer-name {
        font-size: 0.9rem;
    }
}

/* ------- Touch Device Optimizations ------- */
@media (hover: none) and (pointer: coarse) {
    .contact-card:hover {
        transform: none;
    }

    html[dir="rtl"] .contact-card:hover {
        transform: none;
    }

    .service-card:hover {
        transform: none;
    }

    .stat-card:hover {
        transform: none;
    }

    .certificate-card:hover {
        transform: none;
    }

    .education-card:hover {
        transform: none;
    }

    .social-link:hover {
        transform: none;
    }

    .footer-socials a:hover {
        transform: none;
    }
}

/* ============================================
   RTL SUPPORT (Arabic)
   ============================================ */
html[dir="rtl"] {
    direction: rtl;
}

html[dir="rtl"] .nav-link::after {
    left: 50%;
    right: auto;
}

html[dir="rtl"] .hero-cta {
    flex-direction: row-reverse;
}

html[dir="rtl"] .contact-card:hover {
    transform: translateX(-8px);
}

html[dir="rtl"] .certificate-card,
html[dir="rtl"] .service-card,
html[dir="rtl"] .stat-card {
    text-align: center;
}