:root {
    --primary: #4f46e5;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --accent: #7c3aed;
    --bg-dark: #0f172a;
    --glass: rgba(255, 255, 255, 0.05);
    --text-light: #f8fafc;
    --glass-blur: blur(12px);
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    --bg-darker: #020617;
    --skill-color: #38bdf8;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.95);
    --text-accent: var(--primary);
    --heading-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    --name-gradient: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    --card-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.3);
    --card-hover-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.4);
    --gradient-shine: linear-gradient(45deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
}

/* إضافة أنماط اللودر في بداية الملف */
.loader {
    width: 6em;
    height: 6em;
}

.loader-ring {
    animation: ringA 2s linear infinite;
}

.loader-ring-a { stroke: #9708F4; }
.loader-ring-b { 
    animation-name: ringB; 
    stroke: #5E14E4; 
}
.loader-ring-c { 
    animation-name: ringC; 
    stroke: #9708F4; 
}
.loader-ring-d { 
    animation-name: ringD; 
    stroke: #5E14E4; 
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
    color: var(--text-light);
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(circle at 0% 0%, rgba(79, 70, 229, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 100% 0%, rgba(124, 58, 237, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 100%, rgba(56, 189, 248, 0.15) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h100v100H0z' fill='none'/%3E%3Cpath d='M10 10h1v1h-1zm20 0h1v1h-1zm20 0h1v1h-1zm20 0h1v1h-1zm20 0h1v1h-1zM10 30h1v1h-1zm20 0h1v1h-1zm20 0h1v1h-1zm20 0h1v1h-1zm20 0h1v1h-1zM10 50h1v1h-1zm20 0h1v1h-1zm20 0h1v1h-1zm20 0h1v1h-1zm20 0h1v1h-1zM10 70h1v1h-1zm20 0h1v1h-1zm20 0h1v1h-1zm20 0h1v1h-1zm20 0h1v1h-1zM10 90h1v1h-1zm20 0h1v1h-1zm20 0h1v1h-1zm20 0h1v1h-1zm20 0h1v1h-1z' fill='rgba(255,255,255,0.05)'/%3E%3C/svg%3E") repeat;
    pointer-events: none;
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: url('data:image/svg+xml,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><path d="M0 0l200 200M0 200L200 0" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></svg>') repeat;
    z-index: -1;
    opacity: 0.5;
}

header {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

header.scrolled {
    background: rgba(15, 23, 42, 0.95);
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(124, 58, 237, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    position: relative;
}

.brand-logo {
    font-size: 1.8rem;
    font-weight: 800;
    position: relative;
    display: flex;
    align-items: center;
    text-decoration: none;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: transform 0.3s ease;
}

.brand-logo:hover {
    transform: translateY(-2px);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    background: transparent;
    border: none;
    padding: 0;
    backdrop-filter: none;
}

.nav-links li {
    margin: 0;
    padding: 0;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.6rem 1rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 100%;
}

.nav-link i {
    font-size: 1.1rem;
    color: var(--primary-light);
    transition: transform 0.3s ease;
}

.nav-link:hover i,
.nav-link.active i {
    color: var(--accent);
    transform: translateY(-3px);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    transform: translateY(-2px);
}

.nav-link.special {
    background: var(--gradient-primary);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 100px;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.2);
}

.nav-link.special::before {
    display: none;
}

.nav-link.special:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.3);
}

.nav-link.special i {
    color: white;
}

.nav-link.special:hover i {
    transform: rotate(15deg) scale(1.1);
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 1rem;
    }

    .brand-logo {
        font-size: 1.5rem;
    }

    nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: var(--text-light);
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .mobile-menu-toggle:hover {
        background: rgba(255, 255, 255, 0.1);
        transform: translateY(-2px);
    }
}

/* Mobile off-canvas menu */
.mobile-menu {
    position: fixed;
    right: -100%;
    top: 0;
    width: 80%;
    max-width: 360px;
    height: 100vh;
    background: var(--bg-dark);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    z-index: 1100;
    transition: right 0.3s ease;
    padding: 2rem 1.25rem;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mobile-menu ul li a {
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.close-menu {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.hero {
    position: relative;
    height: 100vh;
    background: linear-gradient(to bottom, transparent, var(--bg-dark)),
                radial-gradient(circle at top right, rgba(79, 70, 229, 0.2), transparent 50%),
                radial-gradient(circle at bottom left, rgba(124, 58, 237, 0.2), transparent 50%);
    overflow: hidden;
    color: white;
    text-align: center;
    backdrop-filter: none;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg,
        rgba(99, 102, 241, 0.15) 0%,
        transparent 50%,
        rgba(139, 92, 246, 0.15) 100%);
}

.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at top right, rgba(79, 70, 229, 0.2), transparent 50%),
        radial-gradient(circle at bottom left, rgba(14, 165, 233, 0.2), transparent 50%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: var(--glass-blur);
    padding: 4rem;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 0 50px rgba(99, 102, 241, 0.1);
    transition: background-color 0.3s ease;
}

.hero-content:hover {
    background: rgba(15, 23, 42, 0.8);
}

/* إزالة التأثيرات غير المرغوبة */
.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-weight: 800;
    line-height: 1.3;
    text-shadow: var(--heading-shadow);
    letter-spacing: -0.5px;
}

section {
    padding: 5rem 2rem;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

section h2 {
    text-align: center;
    margin-bottom: 4rem;
    color: var(--text-primary);
    text-shadow: var(--heading-shadow);
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background: rgba(15, 23, 42, 0.8);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    height: 100%;
    max-width: 350px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-shine);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(124, 58, 237, 0.2),
        0 0 20px rgba(124, 58, 237, 0.1);
    border-color: rgba(124, 58, 237, 0.3);
}

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

.project-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.project-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(15, 23, 42, 0.8) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-image::after {
    opacity: 1;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-content {
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.95);
    position: relative;
}

.project-content h3 {
    color: var(--text-primary);
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.project-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    line-height: 1.6;
    opacity: 0.9;
}

.project-technologies {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.tech-tag {
    background: rgba(124, 58, 237, 0.1);
    color: var(--primary-light);
    padding: 0.4rem 0.8rem;
    border-radius: 100px;
    font-size: 0.8rem;
    border: 1px solid rgba(124, 58, 237, 0.2);
    transition: all 0.3s ease;
}

.tech-tag:hover {
    background: rgba(124, 58, 237, 0.2);
    transform: translateY(-2px);
}

.project-links {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.project-btn {
    width: 100%;
    padding: 1rem 2rem;
    border-radius: 12px;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.2);
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    cursor: not-allowed;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.project-btn.loading .btn-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.project-btn.loading i {
    animation: toolRotate 2s infinite;
}

.loading-animation {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 0.5rem;
}

.loading-animation span {
    width: 4px;
    height: 4px;
    background-color: currentColor;
    border-radius: 50%;
    animation: loadingDots 1.4s infinite ease-in-out;
}

.loading-animation span:nth-child(1) {
    animation-delay: 0s;
}

.loading-animation span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-animation span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes toolRotate {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(-20deg); }
    75% { transform: rotate(20deg); }
    100% { transform: rotate(0deg); }
}

@keyframes loadingDots {
    0%, 100% { transform: scale(0.3); opacity: 0.3; }
    50% { transform: scale(1); opacity: 1; }
}

.project-btn:hover {
    background: rgba(124, 58, 237, 0.15);
    border-color: rgba(124, 58, 237, 0.3);
}

@media (max-width: 768px) {
    .projects-grid {
      grid-template-columns: 1fr;
      gap: 1.5rem;
    }

    .project-card {
      max-width: 100%;
      padding: 0;
    }

    .project-image {
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .project-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .project-content {
        padding: 1rem 0.5rem;
    }
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.about-card {
    background: rgba(15, 23, 42, 0.8);
    border-radius: 20px;
    padding: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    opacity: 1;
    visibility: visible;
}
.about-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
}

.about-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.about-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 1.5rem;
}

.about-icon i {
    font-size: 2rem;
    color: white;
}

.about-header h3 {
    color: var(--text-primary);
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: var(--heading-shadow);
}

.about-text {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.1rem;
    text-align: justify;
}

@media (max-width: 768px) {
    .about-card {
        padding: 1.5rem;
    }
    
    .about-header {
        margin-bottom: 1.5rem;
    }
    
    .about-icon {
        width: 50px;
        height: 50px;
        margin-left: 1rem;
    }
    
    .about-header h3 {
        font-size: 1.5rem;
    }
    
    .about-text {
        font-size: 1rem;
    }
}

.about-card {
    background: rgba(15, 23, 42, 0.8);
    border-radius: 20px;
    padding: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

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

.about-header {
    display: flex;
    align-items: center;
    margin-bottom: 2.5rem;
}

.about-icon {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 1.5rem;
    box-shadow: 0 10px 20px rgba(124, 58, 237, 0.2);
}

.about-icon i {
    font-size: 2.5rem;
    color: white;
}

.about-header h3 {
    font-size: 2rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.about-text {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.2rem;
}

.about-highlights {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.highlight-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
}

.highlight-item i {
    color: var(--primary-light);
    font-size: 1.2rem;
}

.highlight-item span {
    color: var(--text-light);
    font-weight: 600;
}

@media (max-width: 768px) {
    .about-card {
        padding: 2rem;
    }
    
    .about-header {
        margin-bottom: 2rem;
    }
    
    .about-icon {
        width: 50px;
        height: 50px;
    }
    
    .about-header h3 {
        font-size: 1.5rem;
    }
    
    .about-text {
        font-size: 1rem;
    }
    
    .about-highlights {
        gap: 1rem;
    }
    
    .highlight-item {
        padding: 0.75rem 1rem;
    }
}

.certifications {
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.certifications h4 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    text-align: right;
    position: relative;
    display: inline-block;
    padding-right: 2rem;
}

.certifications h4::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1.5rem;
    height: 2px;
    background: var(--gradient-primary);
}

.cert-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.cert-item {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cert-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-shine);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cert-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(124, 58, 237, 0.3);
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.1);
}

.cert-item:hover::before {
    opacity: 1;
}

.cert-item i {
    font-size: 2.5rem;
    color: var(--primary-light);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(124, 58, 237, 0.3));
}

.cert-info {
    flex: 1;
}

.cert-info h5 {
    color: var(--text-light);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.cert-info span {
    color: var(--text-secondary);
    font-size: 0.95rem;
    opacity: 0.9;
    line-height: 1.6;
    display: block;
}

@media (max-width: 768px) {
    .certifications h4 {
        font-size: 1.3rem;
        padding-right: 1.5rem;
    }

    .cert-items {
        grid-template-columns: 1fr;
    }

    .cert-item {
        padding: 1.2rem;
    }

    .cert-item i {
        font-size: 2rem;
    }

    .cert-info h5 {
        font-size: 1.1rem;
    }

    .cert-info span {
        font-size: 0.9rem;
    }
}

.certifications {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.certifications h4 {
    color: var(--text-light);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    text-align: right;
}

.cert-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.cert-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.cert-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
}

.cert-item i {
    font-size: 2rem;
    color: var(--primary-light);
    margin-bottom: 0.3rem;
}

.cert-info span {
    color: var(--text-secondary);
    font-size: 0.9rem;
    opacity: 0.8;
}

.partners {
    padding: 7rem 2rem;
    background: linear-gradient(
        to bottom,
        rgba(15, 23, 42, 0.2),
        rgba(15, 23, 42, 0.6)
    );
    position: relative;
    overflow: hidden;
}

.partners::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(124, 58, 237, 0.15) 0%, transparent 70%),
        radial-gradient(circle at 80% 80%, rgba(79, 70, 229, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.partners-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    padding: 2rem;
}

.partner-card {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 24px;
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1);
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    transition: transform 0.3s ease !important;
}

.partner-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: inherit;
    z-index: -2;
}

.partner-card::after {
    content: '';
    position: absolute;
    inset: 1px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: inherit;
    z-index: -1;
}

.partner-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 
        0 25px 50px -12px rgba(124, 58, 237, 0.25),
        0 0 30px rgba(124, 58, 237, 0.1);
}

.partner-card:hover::before {
    opacity: 1;
}

.partner-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: grayscale(100%) brightness(0.9);
    opacity: 0.7;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1.5rem;
    transform-origin: center;
}

.partner-card:hover img {
    filter: grayscale(0%) brightness(1);
    opacity: 1;
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .partners-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 2rem;
        padding: 1.5rem;
    }

    .partner-card {
        height: 180px;
        padding: 2rem;
    }
}

.partners {
    padding: 6rem 2rem;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.3), rgba(15, 23, 42, 0.6));
    position: relative;
    overflow: hidden;
}

.partners::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 0% 0%, rgba(124, 58, 237, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 100% 100%, rgba(79, 70, 229, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.partners-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    padding: 2rem;
}

.partner-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 180px;
    backdrop-filter: blur(10px);
}

.partner-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-shine);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.partner-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, 
                rgba(124, 58, 237, 0.1) 0%, 
                transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.partner-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(124, 58, 237, 0.15);
    border-color: rgba(124, 58, 237, 0.3);
}

.partner-card:hover::before {
    opacity: 1;
}

.partner-card:hover::after {
    opacity: 1;
}

.partner-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: grayscale(100%) brightness(0.8);
    opacity: 0.7;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1rem;
}

.partner-card:hover img {
    filter: grayscale(0%) brightness(1);
    opacity: 1;
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .partners-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
        padding: 1rem;
    }

    .partner-card {
        height: 150px;
        padding: 1.5rem;
    }
}

/* إصلاح المهارات */
.skill-category {
    background: rgba(15, 23, 42, 0.8) !important;
    border-radius: 20px;
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
}

.skill-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
}

.progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 1s ease-in-out;
}

/* تنسيق قسم المهارات الجديد */
.skills-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.skill-category {
    background: rgba(15, 23, 42, 0.85);
    border-radius: 24px;
    padding: 3.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(12px);
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(124, 58, 237, 0.15);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.skill-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-shine);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.skill-item:hover {
    transform: translateY(-8px);
    border-color: rgba(124, 58, 237, 0.3);
    box-shadow: 0 15px 30px rgba(124, 58, 237, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

.skill-item:hover::before {
    opacity: 1;
}

.skill-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.8rem;
}

.skill-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 1.5rem;
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-icon i {
    color: white;
    font-size: 1.8rem;
    transition: transform 0.3s ease;
}

.skill-item:hover .skill-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 25px rgba(124, 58, 237, 0.4);
}

.progress-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    margin-top: 1.2rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 20px;
    width: 0;
    transition: width 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.progress::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    animation: shine 2s linear infinite;
}

@keyframes shine {
    to {
        transform: translateX(100%);
    }
}

/* تحسينات الشات بوت */
.chat-button {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 50%;
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 5px 20px rgba(124, 58, 237, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-button i {
    color: white;
    font-size: 24px;
    transition: transform 0.3s ease;
}

.chat-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
}

.chat-button:hover i {
    transform: rotate(15deg);
}

.chat-widget {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    height: 500px;
    background: rgba(15, 23, 42, 0.95);
    border-radius: 20px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 9998;
}

.chat-widget.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.chat-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    padding: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-header span {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.close-chat {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-chat:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* أنماط النافذة المنبثقة للشهادات - تم توحيدها مع التعريف السابق */
/* تم توحيد التعريفات مع القسم السابق لمنع التعارض */

.certificate-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.certificate-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.certificate-modal-close i {
    color: white;
    font-size: 20px;
}

.certificate-modal-image {
    width: 100%;
    margin-bottom: 1.5rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.certificate-modal-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* أنماط سلايدر الشهادات */
.certificate-modal-slider {
    width: 100%;
    margin-bottom: 1.5rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    background: rgba(15, 23, 42, 0.5);
}

.certificate-slider-container {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    height: 100%;
    position: relative;
}

.certificate-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.certificate-slide img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.certificate-slide:hover img {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.certificate-slider-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    width: 100%;
    position: relative;
    z-index: 10;
}

.slider-prev, .slider-next {
    background: rgba(124, 58, 237, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.slider-prev::before, .slider-next::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.slider-prev:hover::before, .slider-next:hover::before {
    opacity: 1;
}

.slider-prev:hover, .slider-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

.slider-prev:active, .slider-next:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider-dots {
    display: flex;
    gap: 0.8rem;
    padding: 0.5rem 1rem;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.slider-dot::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.slider-dot:hover {
    background: rgba(255, 255, 255, 0.5);
}

.slider-dot.active {
    background: var(--primary);
    transform: scale(1.2);
}

.slider-dot.active::before {
    border-color: rgba(124, 58, 237, 0.5);
}

.certificate-modal-info {
    color: var(--text-primary);
}

.certificate-modal-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.certificate-modal-info p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.certificate-modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

.certificate-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(124, 58, 237, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--primary-light);
}

.certificate-meta-item i {
    font-size: 1rem;
    color: var(--primary);
}

/* أنماط قسم الشهادات */
.partners {
    padding: 5rem 0;
}

.partners h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.partner-card {
    background: var(--glass);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: var(--glass-blur);
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    cursor: pointer;
}

.partner-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    border-color: rgba(124, 58, 237, 0.3);
}

.partner-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
}

.partner-card:hover img {
    transform: scale(1.1);
}

.partner-card.has-certificate {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.partner-card.has-certificate::after {
    content: 'عرض الشهادة';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(to top, rgba(124, 58, 237, 0.9), rgba(124, 58, 237, 0.7));
    color: white;
    font-size: 0.9rem;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.partner-card.has-certificate:hover::after {
    transform: translateY(0);
}

.partner-card.has-certificate::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(124, 58, 237, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.partner-card.has-certificate:hover::before {
    opacity: 1;
}

@media (max-width: 768px) {
    .partners-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

.close-chat i {
    color: white;
    font-size: 18px;
}

.chat-messages {
    padding: 1.5rem;
    height: calc(100% - 140px);
    overflow-y: auto;
    scroll-behavior: smooth;
}

.message {
    padding: 0.8rem 1.2rem;
    border-radius: 15px;
    margin-bottom: 1rem;
    max-width: 85%;
    line-height: 1.4;
    position: relative;
    animation: messagePopIn 0.3s ease forwards;
}

.message.bot {
    background: rgba(124, 58, 237, 0.1);
    margin-right: auto;
    border-bottom-left-radius: 5px;
}

.message.user {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

/* تحسين أزرار الخيارات السريعة */
.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 1.2rem 0;
    justify-content: center;
    padding: 0.5rem;
}

.quick-reply-btn {
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 25px;
    padding: 0.7rem 1.2rem;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(4px);
}

.quick-reply-btn:hover {
    background: rgba(124, 58, 237, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(124, 58, 237, 0.25);
}

.quick-reply-btn i, 
.quick-reply-btn span {
    display: inline-block;
    transition: transform 0.3s ease;
}

.quick-reply-btn:hover i {
    transform: scale(1.2);
}

/* تحسين رسائل الشات */
.message {
    padding: 1rem 1.3rem;
    border-radius: 18px;
    margin-bottom: 1rem;
    max-width: 85%;
    line-height: 1.5;
    position: relative;
    font-size: 0.95rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.message.bot {
    background: rgba(124, 58, 237, 0.1);
    margin-right: auto;
    border-bottom-left-radius: 5px;
}

.message.bot i {
    color: var(--primary);
    font-size: 1.2rem;
}

.message.user {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.message.user i {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
}

/* تحسين مؤشر الكتابة */
.typing-indicator {
    display: flex;
    gap: 0.3rem;
    padding: 0.5rem;
    align-items: center;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.chat-input {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    color: white;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.chat-input input:focus {
    outline: none;
    border-color: rgba(124, 58, 237, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

.chat-input button {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-input button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(124, 58, 237, 0.2);
}

.chat-input button i {
    color: white;
    font-size: 1.2rem;
}

@keyframes messagePopIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* تحسينات الموبايل */
@media (max-width: 480px) {
    .chat-widget {
        width: calc(100% - 32px);
        height: 70vh;
        bottom: 90px;
        right: 16px;
        left: 16px;
    }

    .chat-button {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }

    .chat-input {
        padding: 0.8rem;
    }

    .chat-input input {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }

    .chat-input button {
        width: 40px;
        height: 40px;
    }
}

/* تحسين التنسيق عند التمرير */
@media (max-height: 600px) {
    .chat-widget {
        height: 60vh;
        bottom: 80px;
    }
}

/* إضافة الأنيميشن في نهاية الملف */
@keyframes ringA {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes ringB {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes ringC {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes ringD {
    0% { stroke-dasharray: 1, 200; stroke-dashoffset: 0; }
    50% { stroke-dasharray: 89, 200; stroke-dashoffset: -35px; }
    100% { stroke-dasharray: 89, 200; stroke-dashoffset: -124px; }
}

/* قسم معرض الشهادات */
.certificate-gallery {
    padding: 7rem 2rem;
    background: linear-gradient(
        to bottom,
        rgba(15, 23, 42, 0.3),
        rgba(15, 23, 42, 0.6)
    );
    position: relative;
    overflow: hidden;
}

.certificate-gallery::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(124, 58, 237, 0.15) 0%, transparent 70%),
        radial-gradient(circle at 80% 80%, rgba(79, 70, 229, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.certificate-gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.certificate-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    padding: 2rem 0;
}

.certificate-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1);
    position: relative;
}

.certificate-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(124, 58, 237, 0.15);
    border-color: rgba(124, 58, 237, 0.3);
}

.certificate-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-shine);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

.certificate-item:hover::before {
    opacity: 1;
}

.certificate-item-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.certificate-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.certificate-item:hover .certificate-item-image img {
    transform: scale(1.05);
}

.certificate-item-content {
    padding: 1.5rem;
}

.certificate-item-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
    font-weight: 700;
}

.certificate-item-content p {
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.9;
}

.certificate-item-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.certificate-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

.certificate-meta-item i {
    color: var(--primary-light);
}

.certificate-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: var(--gradient-primary);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 15px rgba(124, 58, 237, 0.2);
}

.certificate-view-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(124, 58, 237, 0.3);
}

.certificate-view-btn i {
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .certificate-gallery-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1rem 0;
    }
    
    .certificate-item-image {
        height: 180px;
    }
}
