@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&display=swap');

:root {
    --bg-dark: #0a0e17;
    /* Deep Midnight Blue/Black */
    --card-bg: rgba(255, 255, 255, 0.03);
    /* Frosted Glass Base */
    --card-hover: rgba(255, 255, 255, 0.06);
    --border-glass: rgba(255, 255, 255, 0.07);
    --border-glow: rgba(6, 182, 212, 0.4);

    --primary: #0ea5e9;
    /* Light Blue */
    --accent: #06b6d4;
    /* Cyan */
    --secondary: #8b5cf6;
    /* Electric Purple */

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
    margin: 0;
    padding: 0;
    /* Ambient Glowing Orbs — no background-attachment:fixed (causes jank on mobile) */
    background-image:
        radial-gradient(circle at 15% 50%, rgba(14, 165, 233, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 50% 90%, rgba(6, 182, 212, 0.06) 0%, transparent 50%);
    z-index: 0;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* --- Container --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

/* --- Typography Utilities --- */
.gradient-text {
    background: linear-gradient(to left, var(--accent), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.section-title {
    font-size: 2.8rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-main);
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 50px;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
    font-family: 'Cairo', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.5);
    transform: translateY(-2px);
}

.btn-glass {
    background: rgba(15, 20, 35, 0.75);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
}

.btn-glass:hover {
    background: var(--card-hover);
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

/* --- Glassmorphism Panel Component (solid bg for performance) --- */
.glass-panel {
    background: rgba(12, 17, 30, 0.85);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.glass-panel:hover {
    background: var(--card-hover);
    border-color: var(--border-glow);
    box-shadow: 0 8px 32px 0 rgba(6, 182, 212, 0.15);
    transform: translateY(-5px);
}

/* --- Sticky Header Wrapper --- */
.sticky-header-wrapper {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
}

/* --- Header & Nav (solid bg for scroll performance) --- */
.header-area {
    position: relative;
    top: 0;
    width: 100%;
    z-index: 100;
    transition: var(--transition);
    background: rgba(10, 14, 23, 0.97);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px 0;
}

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

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    height: 55px;
    background: rgba(250, 250, 250, 0.95);
    /* خلفية بيضاء لإبراز الشعار الداكن */
    padding: 2px 2px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.logo-img:hover {
    background: #ffffff;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
    transform: scale(1.05);
}

.logo-area h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.5px;
}

.main-nav ul {
    display: flex;
    gap: 30px;
}

.main-nav a {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
    position: relative;
    padding-bottom: 5px;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--text-main);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
    left: 0;
}

/* --- Hero Section --- */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    text-align: center;
    position: relative;
    background: url('assets/images/hero-bg.jpg') no-repeat center center/cover;
}

/* Overlay dark glass entirely over the hero image */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(10, 14, 23, 0.9) 0%, rgba(10, 14, 23, 0.7) 50%, rgba(10, 14, 23, 1) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    animation: fadeUp 1s ease-out forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.hero-title {
    font-size: 4.5rem;
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 25px;
    letter-spacing: -1.5px;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-muted);
    max-width: 750px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

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

/* --- Portfolio / Case Studies (Premium Redesign) --- */
.portfolio-section {
    padding: 100px 0;
    position: relative;
    content-visibility: auto;
    contain-intrinsic-size: auto 800px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    margin-top: 50px;
}

.portfolio-card {
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.portfolio-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}
.project-open-modal { display: none; margin-top: 12px; }
body.inline-edit-mode .project-open-modal { display: inline-flex; align-self: flex-start; }

/* Card Cover Area */
.portfolio-card-cover {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(139, 92, 246, 0.12));
    display: flex;
    align-items: center;
    justify-content: center;
}
.portfolio-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    border-radius: 0;
}
.portfolio-card:hover .portfolio-card-cover img {
    transform: scale(1.06);
}
.portfolio-card-cover .portfolio-icon {
    font-size: 3.5rem;
    color: rgba(255,255,255,0.2);
    transition: var(--transition);
}
.portfolio-card:hover .portfolio-card-cover .portfolio-icon {
    color: var(--accent);
    transform: scale(1.15);
}

/* Card Body */
.portfolio-card-body {
    padding: 28px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Card Visuals */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 14px;
    align-self: flex-start;
    letter-spacing: 0.5px;
}

.badge-system {
    background: rgba(14, 165, 233, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.25);
}

.badge-training {
    background: rgba(139, 92, 246, 0.12);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.portfolio-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 25px;
    transition: var(--transition);
}

.portfolio-card h3 {
    font-size: 1.35rem;
    margin-bottom: 10px;
    line-height: 1.5;
    font-weight: 800;
}

.portfolio-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.7;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--accent);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding: 8px 0;
}
.portfolio-card:hover .read-more {
    gap: 14px;
}

/* --- Interactive Modals (solid overlay for performance) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 7, 12, 0.92);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

/* Custom Scrollbar for Modal */
.modal-box::-webkit-scrollbar {
    width: 8px;
}

.modal-box::-webkit-scrollbar-track {
    background: var(--bg-dark);
    border-radius: 10px;
}

.modal-box::-webkit-scrollbar-thumb {
    background: var(--border-glass);
    border-radius: 10px;
}

.modal-box::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.modal-box {
    background: #0f1623;
    border: 1px solid var(--border-glow);
    border-radius: 20px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.modal-overlay.active .modal-box {
    transform: scale(1);
}

.close-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    /* Arabic RTL */
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    transform: rotate(90deg);
}

.modal-header {
    padding: 40px;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.modal-header h2 {
    font-size: 2.2rem;
    margin: 0;
    color: #fff;
}

.modal-body {
    padding: 40px;
}

.modal-gallery {
    width: 100%;
    height: auto;
    min-height: 320px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    border: 1px dashed var(--border-glass);
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    flex-direction: column;
    color: var(--text-muted);
    margin-bottom: 40px;
    padding: 14px;
    gap: 12px;
}

.project-gallery { width: 100%; }
.project-main-image { width: 100%; height: 280px; object-fit: cover; border-radius: 10px; }
.project-no-image { width: 100%; min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.project-thumbs { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.project-thumb { width: 92px; height: 64px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border-glass); opacity: 0.9; cursor: pointer; flex: 0 0 auto; }
.project-thumb.active { border-color: rgba(14, 165, 233, 0.65); opacity: 1; }
.project-add-image { display: none; align-self: flex-start; }
body.inline-edit-mode .project-add-image { display: inline-flex; }
body.inline-edit-mode .project-thumb { cursor: grab; }

.modal-details h3 {
    font-size: 1.6rem;
    color: var(--accent);
    margin-bottom: 20px;
    margin-top: 40px;
}

.modal-details h3:first-child {
    margin-top: 0;
}

.modal-details p {
    color: var(--text-main);
    line-height: 1.9;
    margin-bottom: 25px;
    font-size: 1.1rem;
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.feature-list li {
    background: rgba(255, 255, 255, 0.03);
    padding: 15px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid var(--border-glass);
    transition: var(--transition);
    font-size: 1.05rem;
}

.feature-list li:hover {
    border-color: rgba(14, 165, 233, 0.4);
    background: rgba(14, 165, 233, 0.08);
}

.feature-list i {
    color: var(--primary);
    font-size: 1.4rem;
}

/* User Extra Content Area */
.user-content-area {
    margin-top: 50px;
    padding: 30px;
    background: rgba(139, 92, 246, 0.05);
    /* Soft purple tint */
    border-right: 4px solid var(--secondary);
    border-radius: 10px;
}

.user-content-area h4 {
    margin-bottom: 15px;
    color: var(--secondary);
    font-size: 1.4rem;
}

/* --- Experts / About Us --- */
.experts-section {
    padding: 100px 0;
    content-visibility: auto;
    contain-intrinsic-size: auto 600px;
}

.experts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.expert-card {
    padding: 50px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.expert-card::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 150px;
    background: var(--primary);
    filter: blur(80px);
    opacity: 0.15;
    z-index: 0;
    transition: var(--transition);
}

.expert-card:nth-child(2)::before {
    background: var(--secondary);
}

.expert-card:hover::before {
    opacity: 0.3;
}

.expert-img-wrapper {
    width: 160px;
    height: 160px;
    margin: 0 auto 30px;
    position: relative;
    z-index: 1;
}

.expert-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--border-glass);
    padding: 5px;
    background: var(--bg-dark);
    transition: var(--transition);
}

.expert-card:hover .expert-img {
    border-color: var(--accent);
    transform: scale(1.05);
}

.expert-info {
    position: relative;
    z-index: 1;
}

.expert-info h3 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    color: #fff;
}

.expert-role {
    color: var(--accent);
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.expert-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* --- Contact Section --- */
.contact-section {
    padding: 100px 0;
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(12, 17, 30, 0.9);
    border: 1px solid var(--border-glass);
}

.contact-info {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.05), rgba(139, 92, 246, 0.05));
    padding: 60px;
    border-left: 1px solid var(--border-glass);
}

.contact-info h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.contact-info p {
    color: var(--text-muted);
    margin-bottom: 40px;
    font-size: 1.15rem;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    font-size: 1.15rem;
}

.contact-list i {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--accent);
    font-size: 1.3rem;
    border: 1px solid var(--border-glass);
}

.contact-form {
    padding: 60px;
}

.input-group {
    margin-bottom: 25px;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 18px 20px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    color: #fff;
    font-family: inherit;
    font-size: 1.05rem;
    transition: var(--transition);
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.w-100 {
    width: 100%;
}

/* --- Footer --- */
.main-footer {
    border-top: 1px solid var(--border-glass);
    padding: 50px 0 20px;
    margin-top: 50px;
    background: rgba(10, 14, 23, 0.6);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-brand .footer-logo {
    height: 60px;
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.95);
    padding: 2px 2px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.footer-brand h3 {
    font-size: 1.6rem;
    margin-bottom: 10px;
}

.footer-brand p {
    color: var(--text-muted);
    max-width: 400px;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.social-links {
    display: flex;
    gap: 15px;
}

/* --- Added Utility Classes --- */
.modal-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

.recaptcha-container {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    margin-bottom: 25px;
}

.social-links a {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-main);
    font-size: 1.2rem;
}

.social-links a:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-4px);
}

.newsletter-glass {
    padding: 40px;
}

.newsletter-glass h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.newsletter-glass p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 25px;
}

.newsletter-form {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 20px;
    border-radius: 10px;
    border: 1px solid var(--border-glass);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    height: 50px;
}

.newsletter-form input:focus {
    border-color: var(--accent);
    outline: none;
}

.newsletter-form button {
    padding: 0 25px;
    border-radius: 10px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 1rem;
}
.footer-bottom .edit-link { width: 18px; height: 18px; margin-right: 4px; font-size: 9px; }
.footer-bottom .inline-editable { padding: 0; }


/* =============================================
   NEW SECTIONS: Top Bar, Stats, Why Us,
   Testimonials, WhatsApp Float
   ============================================= */

/* --- Top Info Bar (solid bg for performance) --- */
.top-bar {
    background: rgba(8, 11, 20, 0.98);
    border-bottom: 1px solid rgba(6, 182, 212, 0.15);
    padding: 4px 0;
    font-size: 0.75rem;
    color: var(--text-muted);
    position: relative;
    z-index: 101;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
/* Auto-hide top bar on scroll (applied via JS) */
.top-bar.top-bar-hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    position: absolute;
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    overflow: hidden;
}

.top-bar-right,
.top-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    min-width: 0;
    overflow: hidden;
}
.top-bar-right {
    flex-shrink: 1;
    overflow: hidden;
}

.top-bar-right span,
.top-bar-left span {
    display: flex;
    align-items: center;
    gap: 7px;
}

.top-bar-right i { color: var(--accent); }
.top-bar-left a {
    color: var(--text-muted);
    transition: color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.07);
    font-size: 0.75rem;
}

.top-bar-left a:hover {
    color: #fff;
    border-color: var(--primary);
    background: rgba(14, 165, 233, 0.1);
}

.top-bar-slogan {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.75rem;
}

/* --- Stats Counter Section --- */
.stats-section {
    padding: 70px 0;
    background: linear-gradient(to left, rgba(6,182,212,0.04), rgba(139,92,246,0.04));
    border-top: 1px solid var(--border-glass);
    border-bottom: 1px solid var(--border-glass);
}

.stats-grid-main {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.stat-item p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 14px;
    font-weight: 600;
}

.stat-circle {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
}

.stat-plus { font-size: 2rem; font-weight: 900; }

/* --- Why Us Section --- */
.why-us-section { padding: 90px 0; }

.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-top: 50px;
}

.why-card {
    padding: 35px 28px;
    border-radius: 20px;
    text-align: center;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.why-card:hover {
    transform: translateY(-8px);
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.why-icon {
    width: 65px;
    height: 65px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto 20px;
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent);
    transition: all 0.3s;
}

.why-card:hover .why-icon { transform: scale(1.1) rotate(-5deg); }
.why-icon-purple { background: rgba(139,92,246,0.1); color: var(--secondary); }
.why-icon-green  { background: rgba(16,185,129,0.1);  color: #10b981; }
.why-icon-orange { background: rgba(249,115,22,0.1);  color: #f97316; }
.why-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; }
.why-card p  { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; }

/* --- Testimonials --- */
.testimonials-section {
    padding: 90px 0;
    background: linear-gradient(to left, rgba(139,92,246,0.04), transparent);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 50px;
}

.testimonial-card {
    padding: 35px 30px;
    border-radius: 20px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial-card:hover {
    transform: translateY(-6px);
    border-color: rgba(139,92,246,0.3);
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
}

.stars { color: #f59e0b; font-size: 1.1rem; letter-spacing: 3px; margin-bottom: 18px; }
.testimonial-text { color: var(--text-muted); font-size: 1rem; line-height: 1.8; margin-bottom: 25px; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 14px; }

.author-avatar {
    width: 48px; height: 48px; border-radius: 50%;
    background: rgba(6,182,212,0.15); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; flex-shrink: 0;
}

.author-avatar-purple { background: rgba(139,92,246,0.15); color: var(--secondary); }
.author-avatar-green  { background: rgba(16,185,129,0.15);  color: #10b981; }
.testimonial-author strong { display: block; font-weight: 700; font-size: 0.95rem; }
.testimonial-author span   { color: var(--text-dim); font-size: 0.85rem; }

/* --- WhatsApp Float --- */
.whatsapp-float {
    position: fixed;
    bottom: 30px; left: 30px;
    width: 60px; height: 60px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; color: #fff; text-decoration: none;
    z-index: 999;
    box-shadow: 0 6px 25px rgba(37,211,102,0.45);
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    animation: waBounce 2.5s ease-in-out infinite;
}

/* Smart WhatsApp wrapper — positions the single button + dropdown */
.whatsapp-float-wrapper {
    position: fixed;
    bottom: 30px; left: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}
.whatsapp-float-wrapper .whatsapp-float {
    position: static; /* override fixed — wrapper does positioning */
    bottom: auto; left: auto;
    border: none;
    cursor: pointer;
}

/* WhatsApp number picker menu */
.wa-float-menu {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: rgba(12, 20, 32, 0.95);
    border: 1px solid rgba(37,211,102,0.3);
    border-radius: 14px;
    padding: 10px;
    margin-bottom: 10px;
    min-width: 175px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    order: -1; /* appears ABOVE the button */
}
.wa-float-menu.open { display: flex; }
.wa-float-menu a {
    display: flex; align-items: center; gap: 8px;
    color: #25d366;
    text-decoration: none;
    font-size: 0.85rem;
    padding: 8px 10px;
    border-radius: 8px;
    transition: background 0.2s;
    direction: ltr;
}
.wa-float-menu a:hover {
    background: rgba(37,211,102,0.12);
}

.telegram-float {
    position: fixed;
    bottom: 170px; left: 30px;
    width: 60px; height: 60px;
    background: linear-gradient(135deg, #0088cc, #005580);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; color: #fff; text-decoration: none;
    z-index: 999;
    box-shadow: 0 6px 25px rgba(0,136,204,0.45);
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    animation: waBounce 2.5s ease-in-out infinite;
}

.whatsapp-float:hover, .telegram-float:hover {
    transform: scale(1.15) rotate(10deg);
}

.whatsapp-float:hover {
    box-shadow: 0 10px 35px rgba(37,211,102,0.6);
}

.telegram-float:hover {
    box-shadow: 0 10px 35px rgba(0,136,204,0.6);
}

.whatsapp-tooltip {
    position: absolute; left: 75px;
    background: #075e54; color: #fff;
    padding: 8px 16px; border-radius: 8px;
    font-size: 0.88rem; font-weight: 600;
    white-space: nowrap; pointer-events: none;
    opacity: 0; transform: translateX(-10px);
    transition: all 0.3s;
    font-family: 'Cairo', sans-serif;
}

.whatsapp-tooltip::after {
    content: ''; position: absolute;
    right: 100%; top: 50%; transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: #075e54;
}

.whatsapp-float:hover .whatsapp-tooltip, .telegram-float:hover .whatsapp-tooltip { opacity: 1; transform: translateX(0); }

@keyframes waBounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

/* --- Responsive Adjustments --- */

@media (max-width: 991px) {
    .hero-title {
        font-size: 3.5rem;
    }

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

    .contact-info {
        border-left: none;
        border-bottom: 1px solid var(--border-glass);
    }

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

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

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

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

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    .hero-buttons .btn {
        min-height: 48px;
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .hero-title {
        font-size: 2rem;
        letter-spacing: -0.5px;
    }

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

    .section-title {
        font-size: 1.8rem;
    }
    .section-subtitle {
        font-size: 0.95rem;
        margin-bottom: 30px;
    }

    .experts-grid {
        grid-template-columns: 1fr;
    }
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

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

    .contact-info,
    .contact-form,
    .newsletter-glass {
        padding: 30px 18px;
    }

    .stats-grid-main {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .why-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    /* Top bar: Ultra-compact, single line for Phones + Email ONLY */
    .top-bar {
        font-size: 0.65rem; /* Small enough to fit all 3 items on a 360px screen */
        padding: 5px 0;
    }
    .top-bar-inner {
        flex-direction: row;
        justify-content: center;
        gap: 0;
    }
    .top-bar-right {
        flex-wrap: nowrap;
        justify-content: center;
        gap: 8px; /* Tight gaps */
        width: 100%;
    }
    /* Hide Address entirely */
    .top-bar-right > span:first-child { display: none !important; } 
    /* Hide Left Section (Facebook, Slogan) entirely to free up space */
    .top-bar-left { display: none !important; }
    
    /* Ensure phone and email text is VISIBLE, not just icons */
    .top-bar-right .top-bar-phone .inline-editable,
    .top-bar-right .top-bar-phone .top-bar-text { display: inline !important; }

    /* Compact header - optimized for Nova 5T and narrow screens */
    .header-area { padding: 10px 0; border-bottom: none; }
    .header-container { justify-content: center; } 
    .logo-area { gap: 8px; }
    .logo-area h2 {
        display: block !important;
        font-size: 1.1rem !important; /* Prevent awkward wrapping */
        white-space: nowrap;
    }
    .logo-img { height: 38px !important; }
    .sticky-header-wrapper { position: sticky; top: 0; }

    /* Hide hero slide arrows on mobile — they cover the text */
    .slide-arrow { display: none !important; }

    /* PERFECT FULL-SCREEN HERO: 100svh prevents the "bounce/push" caused by mobile address bars */
    .hero-section {
        min-height: 100svh !important; 
        padding-top: 60px !important;
        padding-bottom: 80px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .hero-content { padding-top: 0; padding-bottom: 0; margin-top: auto; margin-bottom: auto; }
    
    /* Show dots nicely at the bottom */
    .slide-dots { display: flex !important; bottom: 25px !important; }

    /* Disable Ken Burns zoom animation on mobile — causes scroll jitter */
    .slide { transform: none !important; animation: none !important; }
    .slide.active { animation: none !important; transform: none !important; }
    .experts-section,
    .portfolio-section,
    .contact-section,
    .why-us-section,
    .testimonials-section { padding: 60px 0; }
    .stats-section { padding: 40px 0; }

    /* Reduce container padding on mobile for less side gap */
    .container { padding: 0 15px; }

    .stat-circle { font-size: 2.5rem; }
    .stat-plus { font-size: 1.4rem; }

    .whatsapp-float,
    .telegram-float {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }
    .whatsapp-float { bottom: 18px; left: 18px; }
    .telegram-float { bottom: 140px; left: 18px; }

    .expert-card { padding: 30px 20px; }
    .expert-img-wrapper { width: 120px; height: 120px; }
    .expert-info h3 { font-size: 1.3rem; }

    /* Portfolio card cover smaller on mobile */
    .portfolio-card-cover { height: 160px; }
    .portfolio-card-body { padding: 20px; }
    .portfolio-card h3 { font-size: 1.15rem; }

    /* Modal mobile */
    .modal-box { width: 96%; border-radius: 14px; }
    .modal-header { padding: 24px 20px; }
    .modal-header h2 { font-size: 1.5rem; }
    .modal-body { padding: 20px; }
}

/* Small phones */
@media (max-width: 480px) {
    .hero-title { font-size: 1.6rem; }
    .hero-subtitle { font-size: 0.9rem; }
    .section-title { font-size: 1.5rem; }
    .container { padding: 0 15px; }

    .logo-area h2 { font-size: 1.1rem; display: block !important; }

    .btn { padding: 12px 20px; font-size: 0.95rem; }
    .stat-circle { font-size: 2rem; }
    .portfolio-card-cover { height: 140px; }
    .portfolio-card-body { padding: 16px; }
    .portfolio-card h3 { font-size: 1.05rem; }
}

/* =============================================
   HERO SLIDESHOW
   ============================================= */

.hero-slideshow {
    position: relative;
    overflow: hidden;
}

.slideshow-wrapper {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    transform: scale(1.05);
    animation: none;
}

.slide.active {
    opacity: 1;
    animation: kenBurns 8s ease-in-out infinite alternate;
}

@keyframes kenBurns {
    from { transform: scale(1.0); }
    to   { transform: scale(1.08); }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(9, 14, 23, 0.85) 0%,
        rgba(9, 14, 23, 0.55) 50%,
        rgba(9, 14, 23, 0.4) 100%
    );
    z-index: 1;
}

/* Make hero-content sit above overlay */
.hero-slideshow .hero-content {
    position: relative;
    z-index: 2;
}

/* Navigation arrows */
.slide-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-arrow:hover {
    background: rgba(6, 182, 212, 0.35);
    border-color: var(--accent);
    transform: translateY(-50%) scale(1.1);
}

.slide-prev { right: 20px; }
.slide-next { left: 20px; }

/* Dot indicators */
.slide-dots {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
}

.dot.active {
    background: var(--accent);
    width: 28px;
    border-radius: 5px;
    border-color: var(--accent);
}

/* Top bar phone links */
.top-bar-phone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
    font-family: 'Cairo', sans-serif;
    font-size: 0.85rem;
    direction: ltr;
}

.top-bar-phone:hover {
    color: var(--accent);
}

.top-bar-phone .fa-phone { color: var(--accent); }
.top-bar-phone .fa-envelope { color: var(--primary); }
