/* css/portfolio.css */

/* --- Hero Section --- */
.page-hero-wrapper {
    position: relative; width: 100%; height: 350px; overflow: hidden;
    display: flex; align-items: center; justify-content: center; text-align: center;
    color: #fff; background-color: #222; border-bottom: 5px solid var(--brand-orange);
}
.hero-img-real {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
    object-fit: cover; z-index: 0; filter: brightness(0.4);
}
.hero-content { position: relative; z-index: 2; padding: 0 20px; }
.hero-content h1 { 
    font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 900; margin: 0; 
    text-shadow: 0 2px 8px rgba(0,0,0,0.6); color: #fff;
}
.hero-content p { 
    font-size: 1.2rem; margin-top: 15px; color: #fff; font-weight: 700; 
    background: var(--brand-orange); display: inline-block; padding: 5px 15px; border-radius: 20px; 
}

/* --- Switcher & Filters --- */
.portfolio-container { padding: 50px 0; }

.switcher-bar { 
    display: flex; justify-content: center; max-width: 450px; 
    margin: 0 auto 40px; background: var(--bg-secondary); /* متغير */
    border-radius: 50px; padding: 5px; 
}
.switch-btn { 
    flex: 1; border: none; padding: 12px; border-radius: 50px; 
    font-family: 'Cairo'; font-weight: 900; cursor: pointer; 
    background: none; color: var(--text-secondary); /* متغير */
    transition: 0.3s;
}
.switch-btn.active { background: var(--brand-orange); color: #fff; }

.filter-buttons { 
    display: flex; justify-content: center; gap: 10px; 
    margin-bottom: 30px; flex-wrap: wrap; 
}
.filter-btn { 
    background: var(--bg-card); /* متغير */
    border: 1px solid var(--border-color); /* متغير */
    padding: 8px 25px; border-radius: 50px; cursor: pointer; 
    font-family: 'Cairo'; font-weight: 700; font-size: 14px; 
    color: var(--text-primary); /* متغير */
    transition: 0.3s;
}
.filter-btn:hover { border-color: var(--brand-orange); color: var(--brand-orange); }
.filter-btn.active { 
    background: var(--brand-orange); color: #fff; border-color: var(--brand-orange); 
}

/* --- Portfolio Grid --- */
.inner-grid { 
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; 
}

.p-item { 
    border-radius: 15px; overflow: hidden; height: 350px; 
    position: relative; background: var(--bg-secondary); 
    cursor: pointer; border: 1px solid var(--border-color); 
    transition: transform 0.3s;
}
.p-item:hover { transform: translateY(-5px); box-shadow: 0 10px 20px var(--shadow-color); }
.p-item img, .p-item video { width: 100%; height: 100%; object-fit: cover; }

/* Reel Badge */
.reel-badge { 
    position: absolute; top: 12px; left: 12px; 
    background: var(--brand-orange); color: #fff; 
    padding: 4px 10px; border-radius: 6px; font-size: 11px; 
    z-index: 10; font-weight: 900; 
}

/* Project Card Style */
.project-card {
    background: var(--bg-card); border-radius: 12px; overflow: hidden; 
    border: 1px solid var(--border-color); height: 350px; 
    display: flex; flex-direction: column; text-decoration: none;
    transition: transform 0.3s;
}
.project-card:hover { transform: translateY(-5px); }
.project-card img { height: 85%; width: 100%; object-fit: cover; }
.project-card .title { 
    padding: 15px; text-align: center; font-weight: 900; 
    color: var(--text-primary); font-size: 14px; 
    background: var(--bg-card); flex-grow: 1; display: flex; align-items: center; justify-content: center;
}

/* --- Viewer Modal --- */
#talalViewer { 
    position: fixed; inset: 0; background: rgba(0,0,0,0.95); 
    z-index: 10000; display: none; flex-direction: column; 
    align-items: center; justify-content: center; backdrop-filter: blur(5px);
}
.viewer-close { 
    position: absolute; top: 20px; right: 20px; color: #fff; 
    font-size: 40px; cursor: pointer; z-index: 10001; 
}
.viewer-content { 
    width: 100%; height: 80%; display: flex; 
    align-items: center; justify-content: center; 
}
.viewer-content img, .viewer-content video { 
    max-width: 90%; max-height: 90%; border-radius: 10px; 
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .inner-grid { grid-template-columns: repeat(2, 1fr); }
    .p-item, .project-card { height: 280px; }
}
@media (max-width: 768px) {
    .inner-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .p-item, .project-card { height: 200px; }
    .page-hero-wrapper { height: 250px; }
    .hero-content h1 { font-size: 1.8rem; }
    .filter-btn { padding: 6px 15px; font-size: 12px; }
}