/* ========================================
   RESET & GLOBAL - ULTRA PROFESSIONAL
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Cairo', 'Segoe UI', sans-serif;
    background: #050811;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Canvas Dynamic Background */
#matrixCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
}

.container, header, section, footer {
    position: relative;
    z-index: 2;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 28px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0f1a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #00d4ff, #7b2ff7);
    border-radius: 10px;
}

/* ========== HEADER & MOBILE MENU ========== */
header {
    background: rgba(5, 10, 25, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 212, 255, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px 0;
}

.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo h1 {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #00d4ff, #7b2ff7, #ff2d95);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.logo p {
    font-size: 0.7rem;
    color: #9ca3af;
}

.nav-links {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.nav-links a {
    color: #e0e0ff;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    position: relative;
    font-size: 0.95rem;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #00d4ff, #7b2ff7);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: #00d4ff;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #00d4ff;
    background: rgba(0, 212, 255, 0.1);
    width: 45px;
    height: 45px;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.mobile-menu-btn:hover {
    background: rgba(0, 212, 255, 0.2);
}

.mobile-nav {
    display: none;
    flex-direction: column;
    background: rgba(5, 10, 25, 0.95);
    backdrop-filter: blur(20px);
    padding: 20px;
    margin-top: 15px;
    border-radius: 20px;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.mobile-nav a {
    color: #e0e0ff;
    text-decoration: none;
    padding: 12px 0;
    font-weight: 600;
    transition: 0.3s;
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

.mobile-nav a:last-child {
    border-bottom: none;
}

.mobile-nav a:hover {
    color: #00d4ff;
    padding-right: 10px;
}

.mobile-nav.active {
    display: flex;
}

/* Sections */
section {
    padding: 60px 0;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    text-align: center;
    background: linear-gradient(135deg, #ffffff, #a0a0ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 15px;
}

.section-title:after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #00d4ff, #7b2ff7, #ff2d95);
    margin: 15px auto 0;
    border-radius: 4px;
}

.section-subtitle {
    text-align: center;
    color: #9ca3af;
    margin-bottom: 40px;
    font-size: 1rem;
}

/* Hero Section */
.hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
    padding: 20px 0;
}

.hero-content {
    flex: 1;
    min-width: 280px;
}

.hero-badge {
    background: rgba(0, 212, 255, 0.15);
    backdrop-filter: blur(10px);
    display: inline-block;
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.8rem;
    color: #00d4ff;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 212, 255, 0.4);
}

.hero-content h2 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 15px;
}

.hero-content h2 span {
    background: linear-gradient(135deg, #00d4ff, #7b2ff7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-content p {
    color: #cbd5e1;
    font-size: 1rem;
}

.hero-stats {
    display: flex;
    gap: 30px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #00d4ff, #7b2ff7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat div:last-child {
    color: #9ca3af;
    font-size: 0.8rem;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-primary, .btn-outline {
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s;
    font-size: 0.9rem;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(95deg, #00d4ff, #7b2ff7);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn-outline {
    border: 2px solid #00d4ff;
    color: #00d4ff;
    background: transparent;
}

.hero-visual {
    flex: 1;
    text-align: center;
    background: radial-gradient(circle at 30% 20%, rgba(0, 212, 255, 0.1), rgba(10, 12, 25, 0.6));
    backdrop-filter: blur(15px);
    padding: 35px 20px;
    border-radius: 50px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    min-width: 280px;
}

.code-icon {
    font-size: 3.5rem;
    background: linear-gradient(135deg, #00d4ff, #7b2ff7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: float 3s ease infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.tech-icons i {
    font-size: 2rem;
    margin: 0 8px;
    transition: 0.3s;
}

/* Services Cards */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.service-card {
    background: rgba(15, 20, 35, 0.7);
    backdrop-filter: blur(15px);
    padding: 30px 20px;
    border-radius: 28px;
    text-align: center;
    transition: all 0.3s;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.service-icon {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #00d4ff, #7b2ff7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 15px;
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.service-card p {
    font-size: 0.9rem;
    color: #cbd5e1;
}

/* Filter Buttons */
.portfolio-filter {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(15, 20, 35, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: #cbd5e6;
    padding: 8px 22px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-family: 'Cairo', sans-serif;
    font-size: 0.85rem;
}

.filter-btn.active, .filter-btn:hover {
    background: linear-gradient(95deg, #00d4ff, #7b2ff7);
    border-color: transparent;
    color: white;
}

/* Section Content Toggle */
.section-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-content.active {
    display: block;
}

/* All Grid, Logos Grid, Cards Grid, Projects Grid, Websites Grid */
.all-grid, .logos-grid, .cards-grid, .projects-grid, .websites-grid {
    display: grid;
    gap: 25px;
}

.all-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.logos-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.cards-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.projects-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.websites-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* Cards Styling */
.all-item, .logo-item, .card-item, .project-card, .website-card {
    background: rgba(12, 16, 28, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    overflow: hidden;
    transition: 0.3s;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.all-item:hover, .logo-item:hover, .card-item:hover, .project-card:hover, .website-card:hover {
    transform: translateY(-5px);
    border-color: #00d4ff;
}

.all-img, .project-img, .website-img {
    height: 180px;
    background-size: cover;
    background-position: center;
}

.logo-item img, .card-item img {
    width: 100%;
    height: 160px;
    object-fit: contain;
    background: white;
    padding: 15px;
}

.all-info, .project-info, .website-info {
    padding: 18px;
    text-align: center;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
    justify-content: center;
}

.project-tech span {
    background: rgba(0, 212, 255, 0.15);
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.65rem;
    color: #00d4ff;
}

.download-btn, .visit-btn {
    background: linear-gradient(95deg, #00d4ff, #7b2ff7);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    font-family: 'Cairo', sans-serif;
    transition: 0.3s;
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

/* Contact Section */
.contact-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.contact-info, .contact-form {
    flex: 1;
    min-width: 280px;
}

.contact-card, .contact-form {
    background: rgba(12, 16, 28, 0.7);
    backdrop-filter: blur(15px);
    padding: 28px;
    border-radius: 32px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.contact-item i {
    width: 45px;
    height: 45px;
    background: rgba(0, 212, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.2rem;
    color: #00d4ff;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.social-links a {
    background: rgba(30, 41, 59, 0.8);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #b9c8ff;
    transition: 0.3s;
}

.social-links a:hover {
    background: linear-gradient(135deg, #00d4ff, #7b2ff7);
    color: white;
    transform: translateY(-3px);
}

.contact-form input, .contact-form textarea {
    width: 100%;
    background: rgba(26, 31, 46, 0.8);
    border: 1px solid rgba(0, 212, 255, 0.2);
    padding: 12px 16px;
    border-radius: 25px;
    margin-bottom: 15px;
    color: white;
    font-family: 'Cairo', sans-serif;
}

.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: #00d4ff;
}

.btn-submit {
    background: linear-gradient(95deg, #00d4ff, #7b2ff7);
    border: none;
    padding: 12px;
    width: 100%;
    border-radius: 50px;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

footer {
    text-align: center;
    padding: 25px 0;
    border-top: 1px solid rgba(0, 212, 255, 0.2);
    color: #8b9bc2;
    font-size: 0.85rem;
}

/* ========== RESPONSIVE BREAKPOINTS ========== */

/* لاب - 1200px فأقل */
@media (max-width: 1200px) {
    .container {
        padding: 0 25px;
    }
    .hero-content h2 {
        font-size: 2.2rem;
    }
}

/* تابلت - 992px فأقل */
@media (max-width: 992px) {
    section {
        padding: 50px 0;
    }
    .hero {
        flex-direction: column;
        text-align: center;
    }
    .hero-stats {
        justify-content: center;
    }
    .hero-buttons {
        justify-content: center;
    }
    .hero-badge {
        display: block;
        width: fit-content;
        margin: 0 auto 20px auto;
    }
    .section-title {
        font-size: 2rem;
    }
}

/* موبايل - 768px فأقل */
@media (max-width: 768px) {
    .container {
        padding: 0 18px;
    }
    
    /* إخفاء الـ nav-links العادي وإظهار زر القائمة */
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .logo h1 {
        font-size: 1.4rem;
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .hero-stats {
        gap: 20px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .btn-primary, .btn-outline {
        padding: 10px 22px;
        font-size: 0.85rem;
    }
    
    .portfolio-filter {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 6px 16px;
        font-size: 0.75rem;
    }
    
    .all-grid, .logos-grid, .cards-grid, .projects-grid, .websites-grid {
        gap: 18px;
    }
    
    .all-img, .project-img, .website-img {
        height: 160px;
    }
    
    .contact-card, .contact-form {
        padding: 20px;
    }
    
    .contact-item {
        gap: 12px;
    }
    
    .contact-item i {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .social-links a {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
}

/* موبايل صغير - 480px فأقل */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-content h2 {
        font-size: 1.5rem;
    }
    
    .hero-stats {
        gap: 15px;
    }
    
    .stat-number {
        font-size: 1.3rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .section-subtitle {
        font-size: 0.85rem;
    }
    
    .filter-btn {
        padding: 4px 12px;
        font-size: 0.7rem;
    }
    
    .service-card {
        padding: 20px 15px;
    }
    
    .service-icon {
        font-size: 2rem;
    }
    
    .service-card h3 {
        font-size: 1.1rem;
    }
    
    .all-img, .project-img, .website-img {
        height: 140px;
    }
    
    .all-info h4, .project-info h4, .website-info h4 {
        font-size: 1rem;
    }
    
    .download-btn, .visit-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

/* تحسين ظهور أسماء اللوجوهات والكروت */
.logo-name p, .card-name p {
    padding: 15px;
    color: #00d4ff;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    background: linear-gradient(135deg, #ffffff, #a0a0ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 0.5px;
}

.logo-item, .card-item {
    background: rgba(15, 20, 35, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    overflow: hidden;
    transition: 0.3s;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.logo-item:hover, .card-item:hover {
    transform: translateY(-8px);
    border-color: #00d4ff;
    box-shadow: 0 15px 30px -10px rgba(0, 212, 255, 0.3);
}

.logo-item img, .card-item img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    background: white;
    padding: 15px;
    transition: transform 0.3s ease;
}

.logo-item:hover img, .card-item:hover img {
    transform: scale(1.05);
}

/* ========== TECH BADGES STYLES ========== */
.tech-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 20px 0;
}

.tech-badge {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(123, 47, 247, 0.2));
    backdrop-filter: blur(10px);
    padding: 8px 18px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #00d4ff;
    border: 1px solid rgba(0, 212, 255, 0.4);
    transition: all 0.3s ease;
}

.tech-badge:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, #00d4ff, #7b2ff7);
    color: white;
    border-color: transparent;
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

.tech-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.tech-icons i {
    font-size: 2.2rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* أيقونات التقنيات */
.tech-icons .fa-flutter {
    color: #02569B;
}
.tech-icons .fa-html5 {
    color: #E34F26;
}
.tech-icons .fa-css3-alt {
    color: #1572B6;
}
.tech-icons .fa-js {
    color: #F7DF1E;
}
.tech-icons .fa-cuttlefish {
    color: #00599C;
}

.tech-icons i:hover {
    transform: translateY(-5px) scale(1.15);
    filter: drop-shadow(0 0 15px currentColor);
}