/*
 * Century Camera Viewer - Main Website Portfolio CSS
 * Version 3.2
 */

/* ==================== Hide Old Portfolio ==================== */
#portfolio.portfolio.section,
section#portfolio,
.portfolio.section {
    display: none !important;
}

/* ==================== Camera Portfolio Grid ==================== */
.cv-portfolio-section {
    background: #000;
    padding: 40px 20px;
    min-height: 100vh;
    display: block !important;
}

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

.cv-header {
    text-align: center;
    margin-bottom: 40px;
}

.cv-header h2 {
    font-size: 42px;
    font-weight: 800;
    background: linear-gradient(135deg, #aa66ff, #ffb400);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    letter-spacing: -1px;
    text-transform: uppercase;
}

.cv-header p {
    font-size: 16px;
    color: #888;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==================== Portfolio Grid ==================== */
.cv-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* عمودين دائماً */
    gap: 15px; /* مسافة أقل */
    max-width: 800px; /* عرض محدود لجعل الأعمال أصغر */
    margin: 0 auto; /* توسيط الشبكة */
}

/* ==================== Portfolio Item - حجم أصغر ==================== */
.cv-item {
    background: #0a0a0a;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    height: auto;
}

.cv-item:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(170, 102, 255, 0.5);
    box-shadow: 
        0 15px 30px rgba(170, 102, 255, 0.25),
        0 0 60px rgba(170, 102, 255, 0.1),
        inset 0 0 15px rgba(170, 102, 255, 0.05);
}

/* الصورة بشكل عمودي - حجم أصغر */
.cv-item-image {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 140%; /* نسبة عالية للشكل العمودي الطويل */
    overflow: hidden;
    background: #111;
}

.cv-item-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.cv-item:hover .cv-item-image img {
    transform: scale(1.08);
}

.cv-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(170, 102, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 8px 20px rgba(170, 102, 255, 0.5),
        inset 0 0 10px rgba(255, 255, 255, 0.2);
    z-index: 3;
}

.cv-item:hover .cv-play-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.cv-play-btn::after {
    content: "";
    width: 0;
    height: 0;
    border-left: 14px solid #fff;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    margin-left: 3px;
}

.cv-item-info {
    padding: 15px;
    background: #0a0a0a;
    position: relative;
    z-index: 1;
    min-height: 70px;
}

.cv-item-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.cv-item:hover .cv-item-title {
    color: #aa66ff;
}

.cv-item-type {
    font-size: 10px;
    font-weight: 700;
    color: #ffb400;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    background: linear-gradient(135deg, rgba(255, 180, 0, 0.15), rgba(255, 180, 0, 0.05));
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-block;
    border: 1px solid rgba(255, 180, 0, 0.2);
}
/* ==================== Hide Item Type ==================== */
.cv-item-type {
    display: none !important;
}
/* ==================== Empty State ==================== */
.cv-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
}

.cv-empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.3;
}

.cv-empty h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #888;
}

.cv-empty p {
    font-size: 14px;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==================== Responsive Design ==================== */
@media (max-width: 768px) {
    .cv-portfolio-section {
        padding: 30px 15px;
    }
    
    .cv-header h2 {
        font-size: 32px;
    }
    
    .cv-header p {
        font-size: 14px;
    }
    
    .cv-grid {
        grid-template-columns: repeat(2, 1fr); /* عمودين حتى في الجوال */
        gap: 12px;
        max-width: 100%;
    }
    
    .cv-item {
        border-radius: 10px;
    }
    
    .cv-item-image {
        padding-bottom: 135%;
    }
    
    .cv-item-info {
        padding: 12px;
        min-height: 65px;
    }
    
    .cv-item-title {
        font-size: 14px;
    }
    
    .cv-item-type {
        font-size: 9px;
        padding: 4px 8px;
    }
    
    .cv-play-btn {
        width: 45px;
        height: 45px;
    }
    
    .cv-play-btn::after {
        border-left-width: 12px;
        border-top-width: 8px;
        border-bottom-width: 8px;
    }
}

/* للشاشات الصغيرة جداً (أقل من 480px) */
@media (max-width: 480px) {
    .cv-grid {
        grid-template-columns: repeat(2, 1fr); /* يبقى عمودين */
        gap: 10px;
    }
    
    .cv-item-image {
        padding-bottom: 130%;
    }
    
    .cv-item-title {
        font-size: 13px;
    }
    
    .cv-item-type {
        font-size: 8px;
        padding: 3px 6px;
    }
    
    .cv-play-btn {
        width: 40px;
        height: 40px;
    }
    
    .cv-play-btn::after {
        border-left-width: 10px;
        border-top-width: 6px;
        border-bottom-width: 6px;
    }
}

/* للشاشات الكبيرة (أكثر من 992px) */
@media (min-width: 992px) {
    .cv-grid {
        max-width: 900px; /* عرض أكبر قليلاً على الشاشات الكبيرة */
        gap: 20px;
    }
    
    .cv-item-image {
        padding-bottom: 145%; /* نسبة أكبر على الشاشات الكبيرة */
    }
}
/* ==================== Desktop: 4 Small Items ==================== */
@media (min-width: 992px) {
    .cv-grid {
        grid-template-columns: repeat(4, 1fr); /* 4 أعمال */
        max-width: 1100px; /* عرض مناسب */
        gap: 15px; /* مسافة صغيرة */
    }

    .cv-item-image {
        padding-bottom: 160%; /* شكل موبايل طويل */
    }

    .cv-item-info {
        padding: 10px;
        min-height: 55px;
    }

    .cv-item-title {
        font-size: 13px;
    }
}