/* ==========================================
   CodeCaps Landing Page - Stylesheet
   ========================================== */

:root {
    --primary: #00d084;
    --primary-dark: #00b873;
    --primary-glow: rgba(0, 208, 132, 0.3);
    --bg: #0a0e17;
    --bg-light: #0f1525;
    --bg-card: #111827;
    --bg-card-hover: #161f32;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(0, 208, 132, 0.2);
    --radius: 16px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(0, 208, 132, 0.15);
}

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

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

body {
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    white-space: nowrap;
}

.btn svg {
    flex-shrink: 0;
}

.btn-primary {
    background: var(--primary);
    color: var(--bg);
    box-shadow: 0 4px 20px rgba(0, 208, 132, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 208, 132, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1.5px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 208, 132, 0.05);
}

.btn-lg {
    padding: 16px 36px;
    font-size: 16px;
    border-radius: 14px;
}

.btn-full {
    width: 100%;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;  /* ← الجديد */
    gap: 24px;
}

/* اللوجو على اليمين */
.logo {
    margin-left: auto;  /* ← يدفع اللوجو لليمين */
}

/* القائمة في المنتصف */
.nav-links {
    margin: 0 auto;  /* ← توسيط القائمة */
}

/* زر الواتساب على اليسار */
.nav-cta {
    margin-right: auto;  /* ← يدفع الزر لليسار */
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-icon {
    width: 40px;
    height: 28px;
}

.logo-icon svg {
    width: 100%;
    height: 100%;
}

.logo-text {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.nav-link {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: 8px;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background: rgba(0, 208, 132, 0.08);
}

.nav-cta {
    padding: 10px 20px;
    font-size: 14px;
}

/* Mobile Nav Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(0, 208, 132, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 208, 132, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 208, 132, 0.08) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(0, 208, 132, 0.1);
    border: 1px solid rgba(0, 208, 132, 0.2);
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 32px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.hero-title {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, #00ff9d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: clamp(16px, 2.5vw, 20px);
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

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

.stat-number {
    display: block;
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 6px;
    display: block;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

.hero-scroll {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-indicator {
    display: block;
    width: 24px;
    height: 40px;
    border: 2px solid var(--text-dim);
    border-radius: 12px;
    position: relative;
}

.scroll-indicator span {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--primary);
    border-radius: 2px;
    animation: scrollDown 2s infinite;
}

@keyframes scrollDown {
    0% { top: 8px; opacity: 1; }
    100% { top: 20px; opacity: 0; }
}

/* Section Common */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

.section-tag {
    display: inline-block;
    padding: 6px 18px;
    background: rgba(0, 208, 132, 0.1);
    border: 1px solid rgba(0, 208, 132, 0.2);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
}

.section-desc {
    font-size: 17px;
    color: var(--text-muted);
    line-height: 1.7;
}

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

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

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px 32px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), transparent);
    opacity: 0;
    transition: var(--transition);
}

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

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

.service-card.featured {
    border-color: rgba(0, 208, 132, 0.3);
    background: linear-gradient(180deg, var(--bg-card) 0%, rgba(0, 208, 132, 0.03) 100%);
}

.service-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 4px 12px;
    background: var(--primary);
    color: var(--bg);
    font-size: 11px;
    font-weight: 700;
    border-radius: 100px;
}

.service-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 208, 132, 0.1);
    border-radius: 16px;
    color: var(--primary);
    margin-bottom: 24px;
}

.service-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.service-desc {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 24px;
}

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

.service-link:hover {
    gap: 10px;
}

/* Portfolio */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.portfolio-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    display: block;
}

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

.portfolio-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.portfolio-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
}

.placeholder-content span {
    font-size: 14px;
    font-weight: 600;
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 208, 132, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: var(--transition);
    color: var(--bg);
    font-weight: 700;
}

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

.portfolio-info {
    padding: 20px 24px;
}

.portfolio-info h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 4px;
}

.portfolio-info p {
    font-size: 14px;
    color: var(--text-muted);
}

.portfolio-cta {
    text-align: center;
}

/* Why Us */
.why-us {
    background: var(--bg-light);
}

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

.why-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    transition: var(--transition);
}

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

.why-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 208, 132, 0.1);
    border-radius: 14px;
    color: var(--primary);
    margin: 0 auto 20px;
}

.why-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.why-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* CTA Banner */
.cta-banner {
    padding: 80px 0;
    background: linear-gradient(135deg, rgba(0, 208, 132, 0.1) 0%, rgba(0, 208, 132, 0.02) 100%);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.cta-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(0, 208, 132, 0.05) 0%, transparent 50%);
    animation: rotate 20s linear infinite;
}

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

.cta-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 800;
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 17px;
    color: var(--text-muted);
    margin-bottom: 32px;
    line-height: 1.7;
}

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-content .section-tag {
    margin-bottom: 16px;
}

.about-content .section-title {
    margin-bottom: 32px;
}

.about-block {
    margin-bottom: 32px;
}

.about-block:last-child {
    margin-bottom: 0;
}

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

.about-block h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--primary);
    border-radius: 2px;
}

.about-block p {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 12px;
}

.about-visual {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    position: sticky;
    top: 100px;
}

.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    transition: var(--transition);
}

.about-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.about-card:nth-child(3) {
    grid-column: span 2;
}

.about-card-icon {
    margin-bottom: 16px;
}

.about-card-number {
    display: block;
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 8px;
}

.about-card-label {
    font-size: 14px;
    color: var(--text-muted);
}
/* Contact */
.contact {
    background: var(--bg-light);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
    align-items: start;
}

.contact-form-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.form-group input,
.form-group textarea {
    padding: 14px 18px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    transition: var(--transition);
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 208, 132, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-dim);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.contact-card:hover {
    border-color: var(--border-hover);
}

.contact-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 208, 132, 0.1);
    border-radius: 12px;
    color: var(--primary);
    flex-shrink: 0;
}

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

.contact-details a {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    transition: var(--transition);
}

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

.contact-whatsapp-cta {
    margin-top: 8px;
}

/* Footer */
.footer {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 48px;
}

.footer-brand .logo {
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 280px;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text);
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    font-size: 14px;
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-contact a {
    font-size: 14px;
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-contact a:hover {
    color: var(--primary);
}

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

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-social a:hover {
    background: rgba(0, 208, 132, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 24px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: var(--text-dim);
}

/* Floating WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: var(--transition);
    animation: whatsappPulse 2s infinite;
}

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

@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.6), 0 0 0 10px rgba(37, 211, 102, 0.1); }
}

/* Responsive */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .why-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .about-visual {
        position: static;
        grid-template-columns: repeat(3, 1fr);
    }
    
    .about-card:nth-child(3) {
        grid-column: span 1;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(10, 14, 23, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 40px 24px;
        gap: 8px;
        transition: var(--transition);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-link {
        font-size: 18px;
        padding: 12px 20px;
        width: 100%;
        text-align: center;
    }
    
    .nav-cta {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
        margin: 0 auto 40px;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .hero-stats {
        gap: 24px;
    }
    
    .stat-divider {
        display: none;
    }
    
    .services-grid,
    .portfolio-grid,
    .why-grid {
        grid-template-columns: 1fr;
    }
    
    .about-visual {
        grid-template-columns: 1fr;
    }
    
    .about-card:nth-child(3) {
        grid-column: span 1;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .contact-form-wrapper {
        padding: 28px;
    }
    
    section {
        padding: 60px 0;
    }
    
    .whatsapp-float {
        width: 52px;
        height: 52px;
        bottom: 20px;
        left: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .section-title {
        font-size: 26px;
    }
    
    .service-card,
    .contact-form-wrapper {
        padding: 28px 20px;
    }
}

/* Scroll Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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