/* ========================================
   قسم المواقع الإلكترونية - Websites Section
   الملف: public/web/css/websites.css
======================================== */

/* الخلفية العامة */
.websites-section {
    position: relative;
    padding: 120px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 50%, #f0f4f8 100%);
    overflow: hidden;
}

.websites-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://mohammed-almalgami.com/public/web/img/pattern-3.jpg');
    opacity: 0.02;
    pointer-events: none;
}

/* الأشكال الزخرفية */
.websites-shapes .shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
}

.websites-shapes .shape-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.08), transparent 70%);
    top: -200px;
    right: -200px;
}

.websites-shapes .shape-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 123, 255, 0.05), transparent 70%);
    bottom: -150px;
    left: -150px;
}

.websites-shapes .shape-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(40, 167, 69, 0.05), transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* الأيقونات العائمة */
.websites-shapes .floating-icons {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.websites-shapes .floating-icons i {
    position: absolute;
    font-size: 40px;
    color: rgba(26, 26, 46, 0.03);
    animation: floatIcon 20s ease-in-out infinite;
}

.websites-shapes .floating-icons i:nth-child(1) { top: 10%; left: 5%; animation-delay: 0s; }
.websites-shapes .floating-icons i:nth-child(2) { top: 20%; right: 8%; animation-delay: 4s; }
.websites-shapes .floating-icons i:nth-child(3) { bottom: 30%; left: 10%; animation-delay: 8s; }
.websites-shapes .floating-icons i:nth-child(4) { bottom: 20%; right: 5%; animation-delay: 12s; }
.websites-shapes .floating-icons i:nth-child(5) { top: 50%; left: 3%; animation-delay: 16s; }

@keyframes floatIcon {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.03; }
    50% { transform: translateY(-30px) rotate(15deg); opacity: 0.08; }
}

/* ========================================
   رأس القسم
======================================== */
.websites-section .section-header {
    margin-bottom: 50px;
    position: relative;
    z-index: 2;
}

.websites-section .section-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 14px;
    color: #ffd700;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(26, 26, 46, 0.2);
}

.websites-section .section-badge i {
    font-size: 18px;
}

.websites-section .section-title {
    font-size: 48px;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 20px;
}

.websites-section .section-description {
    font-size: 18px;
    color: #666;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.8;
}

.title-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

.title-decoration .line {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ffd700, transparent);
    border-radius: 3px;
}

.title-decoration i {
    color: #ffd700;
    font-size: 20px;
    animation: codeRotate 5s linear infinite;
}

@keyframes codeRotate {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(10deg); }
    75% { transform: rotate(-10deg); }
    100% { transform: rotate(0deg); }
}

/* ========================================
   إحصائيات المواقع
======================================== */
.websites-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    padding: 35px 50px;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.08);
    margin-bottom: 60px;
    position: relative;
    z-index: 2;
}

.websites-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.websites-stats .stat-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 193, 7, 0.08));
    border-radius: 16px;
    color: #ffd700;
    font-size: 24px;
    transition: all 0.3s ease;
}

.websites-stats .stat-item:hover .stat-icon {
    background: linear-gradient(135deg, #ffd700, #ffab00);
    color: #1a1a2e;
    transform: rotate(10deg) scale(1.1);
}

.websites-stats .stat-info {
    text-align: right;
}

.websites-stats .stat-number {
    font-size: 32px;
    font-weight: 800;
    color: #1a1a2e;
    display: inline;
}

.websites-stats .stat-suffix {
    font-size: 22px;
    color: #ffd700;
    font-weight: 700;
}

.websites-stats .stat-label {
    display: block;
    font-size: 14px;
    color: #888;
    margin-top: 3px;
}

.websites-stats .stat-divider {
    width: 1px;
    height: 50px;
    background: linear-gradient(180deg, transparent, #ddd, transparent);
}

/* ========================================
   شبكة المشاريع - Masonry Grid
======================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    position: relative;
    z-index: 2;
}

/* ========================================
   بطاقة المشروع
======================================== */
.project-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.project-card.large {
    grid-column: span 2;
}

.project-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

/* صورة المشروع */
.project-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.project-card.large .project-image {
    height: 350px;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 40%, rgba(26, 26, 46, 0.8) 100%);
    opacity: 0.7;
    transition: opacity 0.4s ease;
}

.project-card:hover .image-overlay {
    opacity: 0;
}

/* شارة نوع المشروع */
.project-type-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    color: #1a1a2e;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    z-index: 3;
}

.project-type-badge i {
    color: #ffd700;
    font-size: 14px;
}

/* محتوى البطاقة */
.project-content {
    padding: 25px;
}

.project-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.project-card:hover .project-title {
    color: #ffd700;
}

.project-desc {
    font-size: 14px;
    color: #888;
    line-height: 1.7;
    margin-bottom: 15px;
}

/* التقنيات */
.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tag {
    padding: 5px 12px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
}

.project-card:hover .tech-tag {
    background: linear-gradient(135deg, #ffd700, #ffab00);
    color: #1a1a2e;
}

/* ========================================
   طبقة Hover
======================================== */
.project-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(22, 33, 62, 0.95));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 5;
}

.project-card:hover .project-hover {
    opacity: 1;
    visibility: visible;
}

.hover-content {
    text-align: center;
    padding: 30px;
    transform: translateY(30px);
    transition: transform 0.4s ease;
}

.project-card:hover .hover-content {
    transform: translateY(0);
}

.hover-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffd700, #ffab00);
    border-radius: 50%;
    color: #1a1a2e;
    font-size: 28px;
    animation: hoverIconPulse 2s ease-in-out infinite;
}

@keyframes hoverIconPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4); }
    50% { box-shadow: 0 0 0 20px rgba(255, 215, 0, 0); }
}

.hover-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}

.hover-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 25px;
    line-height: 1.7;
}

/* أزرار Hover */
.hover-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn.primary {
    background: linear-gradient(135deg, #ffd700, #ffab00);
    color: #1a1a2e;
}

.action-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.4);
    color: #1a1a2e;
}

.action-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.action-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

/* التقنيات في Hover */
.hover-tech {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hover-tech span {
    padding: 5px 14px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

/* تأثير التوهج */
.project-card .card-glow {
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 1;
}

.project-card:hover .card-glow {
    opacity: 1;
}

/* ========================================
   زر عرض المزيد
======================================== */
.view-more-wrapper {
    text-align: center;
    margin: 60px 0;
}

.view-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 45px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    border-radius: 50px;
    font-size: 17px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.4s ease;
    box-shadow: 0 15px 40px rgba(26, 26, 46, 0.3);
    position: relative;
    overflow: hidden;
}

.view-more-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.3), transparent);
    transition: left 0.5s ease;
}

.view-more-btn:hover::before {
    left: 100%;
}

.view-more-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(26, 26, 46, 0.4);
    color: #ffd700;
}

.view-more-btn i {
    transition: transform 0.3s ease;
}

.view-more-btn:hover i {
    transform: translateX(-5px);
}

/* ========================================
   عرض التقنيات
======================================== */
.tech-showcase {
    background: #fff;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.08);
    margin-bottom: 50px;
}

.tech-header {
    text-align: center;
    margin-bottom: 30px;
}

.tech-header h4 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
}

.tech-logos {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
}

.tech-logo {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 16px;
    font-size: 32px;
    transition: all 0.4s ease;
    cursor: pointer;
}

.tech-logo i.fa-html5 { color: #e34f26; }
.tech-logo i.fa-css3-alt { color: #1572b6; }
.tech-logo i.fa-js-square { color: #f7df1e; }
.tech-logo i.fa-php { color: #777bb4; }
.tech-logo i.fa-laravel { color: #ff2d20; }
.tech-logo i.fa-vuejs { color: #4fc08d; }
.tech-logo i.fa-react { color: #61dafb; }
.tech-logo i.fa-node-js { color: #339933; }
.tech-logo i.fa-wordpress { color: #21759b; }
.tech-logo i.fa-bootstrap { color: #7952b3; }

.tech-logo:hover {
    transform: translateY(-10px) scale(1.1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    background: #fff;
}

/* ========================================
   قسم CTA
======================================== */
.websites-cta {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 50px 60px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 28px;
    overflow: hidden;
}

.websites-cta .cta-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://mohammed-almalgami.com/public/web/img/pattern-3.jpg');
    opacity: 0.03;
    pointer-events: none;
}

.websites-cta .cta-content {
    display: flex;
    align-items: center;
    gap: 30px;
    position: relative;
    z-index: 2;
}

.websites-cta .cta-icon {
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffd700, #ffab00);
    border-radius: 24px;
    color: #1a1a2e;
    font-size: 40px;
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.3);
    animation: ctaIconFloat 3s ease-in-out infinite;
}

@keyframes ctaIconFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

.websites-cta .cta-text h3 {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 10px;
}

.websites-cta .cta-text p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    max-width: 450px;
    line-height: 1.7;
}

.websites-cta .cta-actions {
    display: flex;
    gap: 15px;
    position: relative;
    z-index: 2;
}

.websites-cta .cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.4s ease;
}

.websites-cta .cta-btn.primary {
    background: linear-gradient(135deg, #ffd700, #ffab00);
    color: #1a1a2e;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

.websites-cta .cta-btn.primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(255, 215, 0, 0.4);
    color: #1a1a2e;
}

.websites-cta .cta-btn.whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: #fff;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.3);
}

.websites-cta .cta-btn.whatsapp:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(37, 211, 102, 0.4);
    color: #fff;
}

/* ========================================
   نافذة التفاصيل - Modal
======================================== */
.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.project-modal.active {
    opacity: 1;
    visibility: visible;
}

.project-modal .modal-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.project-modal .modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.4s ease;
}

.project-modal.active .modal-content {
    transform: scale(1);
}

.project-modal .modal-close {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 45px;
    height: 45px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    color: #333;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.project-modal .modal-close:hover {
    background: #ff4757;
    color: #fff;
    transform: rotate(90deg);
}

.project-modal .modal-body {
    display: flex;
}

.project-modal .modal-image {
    flex: 1;
}

.project-modal .modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-modal .modal-info {
    flex: 1;
    padding: 40px;
}

.project-modal .modal-info h3 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 15px;
}

.project-modal .modal-info p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 25px;
}

.project-modal .modal-details {
    margin-bottom: 25px;
}

.project-modal .detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: #888;
}

.project-modal .detail-item i {
    color: #ffd700;
}

.project-modal .modal-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    background: linear-gradient(135deg, #ffd700, #ffab00);
    color: #1a1a2e;
    border-radius: 30px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.project-modal .modal-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.4);
}

/* ========================================
   التجاوب مع الشاشات
======================================== */
@media (max-width: 1199px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .project-card.large {
        grid-column: span 2;
    }
    
    .websites-section .section-title {
        font-size: 40px;
    }
    
    .websites-cta {
        flex-direction: column;
        text-align: center;
        gap: 30px;
        padding: 40px;
    }
    
    .websites-cta .cta-content {
        flex-direction: column;
    }
    
    .websites-cta .cta-text p {
        max-width: 100%;
    }
}

@media (max-width: 991px) {
    .websites-section {
        padding: 80px 0;
    }
    
    .websites-section .section-title {
        font-size: 34px;
    }
    
    .websites-stats {
        flex-wrap: wrap;
        gap: 25px;
        padding: 30px;
    }
    
    .websites-stats .stat-divider {
        display: none;
    }
    
    .websites-stats .stat-item {
        flex: 0 0 45%;
        justify-content: center;
    }
    
    .project-card.large {
        grid-column: span 1;
    }
    
    .project-card.large .project-image {
        height: 250px;
    }
}

@media (max-width: 767px) {
    .websites-section .section-title {
        font-size: 28px;
    }
    
    .websites-section .section-description {
        font-size: 15px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .project-image {
        height: 220px;
    }
    
    .tech-showcase {
        padding: 30px 20px;
    }
    
    .tech-logo {
        width: 55px;
        height: 55px;
        font-size: 26px;
    }
    
    .websites-cta .cta-text h3 {
        font-size: 22px;
    }
    
    .websites-cta .cta-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .websites-cta .cta-btn {
        justify-content: center;
    }
    
    .project-modal .modal-body {
        flex-direction: column;
    }
    
    .project-modal .modal-image {
        height: 250px;
    }
    
    .project-modal .modal-info {
        padding: 25px;
    }
}

@media (max-width: 575px) {
    .websites-section {
        padding: 60px 0;
    }
    
    .websites-section .section-badge {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .websites-stats {
        padding: 25px;
    }
    
    .websites-stats .stat-item {
        flex: 0 0 100%;
    }
    
    .websites-stats .stat-number {
        font-size: 26px;
    }
    
    .project-content {
        padding: 20px;
    }
    
    .project-title {
        font-size: 18px;
    }
    
    .hover-title {
        font-size: 20px;
    }
    
    .hover-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .view-more-btn {
        padding: 15px 35px;
        font-size: 15px;
    }
}