/* ════════════════════════════════════════════════════
   PROJECTS PORTFOLIO — Premium Design System
   Eco-compliant Hub Ltd.
   ════════════════════════════════════════════════════ */

/* ── Hero ──────────────────────────────────────────── */
.projects-hero {
    background: linear-gradient(135deg, #0a1628 0%, #1a2d50 50%, #0064ff 100%);
    padding: 140px 0 80px;
    position: relative;
    overflow: hidden;
}
.projects-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.projects-hero::after {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,120,255,0.15), transparent 70%);
    top: -150px; right: -100px;
    animation: heroGlow 8s ease-in-out infinite alternate;
}
.hero-inner { position: relative; z-index: 2; max-width: 700px; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 10px;
    background: rgba(0,120,255,0.15); border: 1px solid rgba(0,120,255,0.3);
    border-radius: 50px; padding: 8px 20px; margin-bottom: 24px;
    color: #60b8ff; font-size: 0.85rem; font-weight: 600;
}
.projects-hero h1 {
    font-size: clamp(2.5rem, 5.5vw, 3.8rem); font-weight: 900;
    color: #fff; line-height: 1.1; margin-bottom: 20px; letter-spacing: -1px;
}
.gradient-text {
    background: linear-gradient(135deg, #60b8ff, #a78bfa);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.projects-hero p { font-size: 1.15rem; color: rgba(255,255,255,0.7); line-height: 1.7; max-width: 560px; }

/* ── Projects Section ──────────────────────────────── */
.projects-section { padding: 60px 0 100px; background: #f8fafc; min-height: 60vh; }

/* ── Filter Toolbar ───────────────────────────────── */
.filter-toolbar {
    display: flex; align-items: center; gap: 16px;
    margin-bottom: 24px; flex-wrap: wrap;
}
.search-box {
    flex: 1; min-width: 260px; display: flex; align-items: center;
    background: #fff; border: 1.5px solid #e2e8f0; border-radius: 14px;
    padding: 0 16px; gap: 10px; transition: all 0.3s;
}
.search-box:focus-within { border-color: #0078ff; box-shadow: 0 0 0 4px rgba(0,120,255,0.08); }
.search-box i { color: #94a3b8; font-size: 0.9rem; }
.search-box input {
    flex: 1; border: none; outline: none; padding: 14px 0;
    font-size: 0.95rem; font-family: inherit; background: transparent;
}
.search-clear {
    width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
    background: #f1f5f9; border-radius: 50%; color: #64748b; font-size: 0.7rem;
    transition: all 0.2s;
}
.search-clear:hover { background: #ef4444; color: #fff; }
.sort-dropdown select {
    padding: 14px 20px; border: 1.5px solid #e2e8f0; border-radius: 14px;
    font-family: inherit; font-size: 0.9rem; font-weight: 600;
    background: #fff; cursor: pointer; color: #1e293b;
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center;
    padding-right: 40px;
}

/* ── Category Filters ─────────────────────────────── */
.category-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.cat-pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 20px; background: #fff; border: 1.5px solid #e2e8f0;
    border-radius: 50px; font-weight: 700; font-size: 0.85rem;
    color: #64748b; text-decoration: none; transition: all 0.3s; cursor: pointer;
}
.cat-pill:hover { border-color: #0078ff; color: #0078ff; background: #eff6ff; }
.cat-pill.active {
    background: linear-gradient(135deg, #0078ff, #0064ff); color: #fff;
    border-color: transparent; box-shadow: 0 6px 20px rgba(0,120,255,0.25);
}
.cat-pill i { font-size: 0.8rem; }

/* ── Results Meta ─────────────────────────────────── */
.results-meta { margin-bottom: 32px; }
.results-meta p { font-size: 0.9rem; color: #64748b; }
.results-meta strong { color: #1e293b; }

/* ── Projects Grid ────────────────────────────────── */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
}

/* ── Project Card ─────────────────────────────────── */
.project-card {
    background: #fff; border-radius: 20px; overflow: hidden;
    border: 1px solid #e2e8f0; display: flex; flex-direction: column;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.08);
    border-color: #0078ff;
}
.project-card-img {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    position: relative;
    background: #f1f5f9;
}
.project-card-img img {
    width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease;
}
.project-card:hover .project-card-img img { transform: scale(1.08); }
.project-card-placeholder {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #1e293b 0%, #0078ff 100%);
    color: rgba(255,255,255,0.25); font-size: 3.5rem;
    position: relative;
}
.project-card-placeholder::after {
    content: 'EcoHub Portfolio';
    position: absolute;
    bottom: 20px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(255,255,255,0.2);
}
.featured-badge {
    position: absolute; top: 14px; left: 14px; z-index: 2;
    background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff;
    font-size: 0.65rem; font-weight: 800; padding: 6px 14px;
    border-radius: 30px; text-transform: uppercase; letter-spacing: 0.1em;
    box-shadow: 0 4px 12px rgba(217,119,6,0.3);
    backdrop-filter: blur(4px);
}
.card-overlay {
    position: absolute; inset: 0; background: rgba(10,22,40,0.85);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: all 0.4s ease;
    backdrop-filter: blur(4px);
}
.project-card:hover .card-overlay { opacity: 1; }
.overlay-btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 32px; background: #fff; color: #0a1628;
    border-radius: 50px; font-weight: 800; font-size: 0.9rem;
    text-decoration: none; transition: all 0.3s;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
.overlay-btn:hover { background: #0078ff; color: #fff; transform: scale(1.05); }
.project-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.project-category {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.7rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.12em; color: #0078ff; margin-bottom: 10px;
}
.project-title {
    font-size: 1.2rem; font-weight: 800; color: #1e293b;
    line-height: 1.35; margin-bottom: 10px; transition: color 0.3s;
}
.project-card:hover .project-title { color: #0078ff; }
.project-desc {
    font-size: 0.9rem; color: #64748b; line-height: 1.6;
    margin-bottom: 16px; flex: 1;
}
.project-market {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.8rem; color: #94a3b8; margin-bottom: 16px;
}
.project-market i { color: #0078ff; font-size: 0.7rem; }
.tech-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tech-tag {
    padding: 4px 10px; background: #f1f5f9; border-radius: 6px;
    font-size: 0.7rem; font-weight: 700; color: #475569;
}
.tech-tag.more { background: #0078ff; color: #fff; }
.view-more-btn {
    display: inline-flex; align-items: center; gap: 8px;
    font-weight: 800; font-size: 0.9rem; color: #1e293b;
    text-decoration: none; margin-top: auto;
}
.view-more-btn i { font-size: 0.75rem; transition: transform 0.3s; }
.project-card:hover .view-more-btn i { transform: translateX(5px); color: #0078ff; }

/* ── Pagination ───────────────────────────────────── */
.pagination {
    display: flex; justify-content: center; gap: 8px;
    margin-top: 48px; padding-top: 32px;
}
.page-btn {
    width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
    background: #fff; border: 1.5px solid #e2e8f0; border-radius: 12px;
    color: #64748b; font-weight: 700; font-size: 0.9rem;
    text-decoration: none; transition: all 0.3s;
}
.page-btn:hover { border-color: #0078ff; color: #0078ff; }
.page-btn.active {
    background: #0078ff; color: #fff; border-color: #0078ff;
    box-shadow: 0 4px 14px rgba(0,120,255,0.3);
}

/* ── Empty State ──────────────────────────────────── */
.empty-state {
    text-align: center; padding: 100px 40px;
    background: #fff; border-radius: 24px; border: 2px dashed #e2e8f0;
}
.empty-icon { font-size: 4rem; color: #e2e8f0; margin-bottom: 24px; }
.empty-state h3 { font-size: 1.5rem; font-weight: 900; margin-bottom: 12px; }
.empty-state p { color: #64748b; margin-bottom: 24px; max-width: 400px; margin-left: auto; margin-right: auto; }

/* ── CTA Banner ───────────────────────────────────── */
.projects-cta {
    margin-top: 80px; background: linear-gradient(135deg, #0a1628 0%, #1a2d50 100%);
    border-radius: 28px; padding: 80px 60px; text-align: center;
    position: relative; overflow: hidden;
}
.cta-glow {
    position: absolute; width: 400px; height: 400px; border-radius: 50%;
    background: radial-gradient(circle, rgba(0,120,255,0.15), transparent 70%);
    top: -150px; right: -100px;
}
.cta-inner { position: relative; z-index: 1; }
.projects-cta h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 900;
    color: #fff; margin-bottom: 16px;
}
.projects-cta p {
    font-size: 1.1rem; color: rgba(255,255,255,0.7);
    max-width: 500px; margin: 0 auto 36px; line-height: 1.8;
}
.cta-actions { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

/* ══════════════════════════════════════════════════════
   PROJECT DETAIL PAGE
   ══════════════════════════════════════════════════════ */

.project-detail-hero {
    background: linear-gradient(135deg, #0a1628 0%, #1a2d50 50%, #0064ff 100%);
    padding: 140px 0 60px; position: relative; overflow: hidden;
}
.project-detail-hero::before {
    content: ''; position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.detail-hero-inner { position: relative; z-index: 2; max-width: 800px; }
.detail-category-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(0,120,255,0.2); border: 1px solid rgba(0,120,255,0.3);
    border-radius: 50px; padding: 8px 18px; margin-bottom: 20px;
    color: #60b8ff; font-size: 0.8rem; font-weight: 700;
}
.project-detail-hero h1 {
    font-size: clamp(2rem, 5vw, 3rem); font-weight: 900;
    color: #fff; margin-bottom: 16px; line-height: 1.15;
}
.detail-subtitle { font-size: 1.1rem; color: rgba(255,255,255,0.7); line-height: 1.7; margin-bottom: 20px; }
.detail-hero-meta { display: flex; flex-wrap: wrap; gap: 20px; }
.meta-item {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.85rem; color: rgba(255,255,255,0.6);
}
.meta-item i { color: #60b8ff; }

/* ── Detail Layout ────────────────────────────────── */
.project-detail-body { padding: 60px 0 100px; background: #f8fafc; }
.detail-layout { display: grid; grid-template-columns: 1fr 360px; gap: 40px; }

/* ── Main Content ─────────────────────────────────── */
.detail-featured-img {
    border-radius: 20px; overflow: hidden; margin-bottom: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08); cursor: pointer;
}
.detail-featured-img img { width: 100%; display: block; transition: transform 0.4s; }
.detail-featured-img:hover img { transform: scale(1.02); }
.detail-description {
    background: #fff; border-radius: 20px; padding: 40px;
    border: 1px solid #e2e8f0; margin-bottom: 40px;
}
.detail-description h2 {
    display: flex; align-items: center; gap: 10px;
    font-size: 1.3rem; font-weight: 800; margin-bottom: 24px; color: #1e293b;
}
.detail-description h2 i { color: #0078ff; }
.desc-content { font-size: 1rem; color: #475569; line-height: 1.9; }
.desc-content p { margin-bottom: 16px; }

/* ── Gallery ──────────────────────────────────────── */
.detail-gallery {
    background: #fff; border-radius: 20px; padding: 40px;
    border: 1px solid #e2e8f0; margin-bottom: 40px;
}
.detail-gallery h2 {
    display: flex; align-items: center; gap: 10px;
    font-size: 1.3rem; font-weight: 800; margin-bottom: 24px; color: #1e293b;
}
.detail-gallery h2 i { color: #0078ff; }
.gallery-slider {
    position: relative; border-radius: 16px; overflow: hidden;
    background: #f1f5f9; aspect-ratio: 16/10;
}
.gallery-track {
    display: flex; height: 100%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.gallery-slide { min-width: 100%; height: 100%; }
.gallery-slide img {
    width: 100%; height: 100%; object-fit: contain;
    background: #f1f5f9; cursor: pointer;
}
.slider-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(255,255,255,0.9); border: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 0.9rem; color: #1e293b;
    box-shadow: 0 4px 14px rgba(0,0,0,0.1); transition: all 0.3s; z-index: 5;
}
.slider-btn:hover { background: #0078ff; color: #fff; transform: translateY(-50%) scale(1.1); }
.slider-prev { left: 16px; }
.slider-next { right: 16px; }
.gallery-dots {
    position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 8px; z-index: 5;
}
.dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: rgba(255,255,255,0.5); border: none;
    cursor: pointer; transition: all 0.3s;
}
.dot.active { background: #0078ff; transform: scale(1.3); }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 16px; overflow-x: auto; padding-bottom: 4px; }
.thumb {
    width: 72px; height: 52px; border-radius: 10px; overflow: hidden;
    border: 2px solid transparent; cursor: pointer; flex-shrink: 0;
    transition: all 0.3s; background: none; padding: 0;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.active, .thumb:hover { border-color: #0078ff; }

/* ── Sidebar ──────────────────────────────────────── */
.sidebar-card {
    background: #fff; border-radius: 18px; padding: 28px;
    border: 1px solid #e2e8f0; margin-bottom: 24px;
}
.sidebar-card h4 {
    display: flex; align-items: center; gap: 10px;
    font-size: 1rem; font-weight: 800; margin-bottom: 20px; color: #1e293b;
}
.sidebar-card h4 i { color: #0078ff; font-size: 0.9rem; }
.action-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 14px; border-radius: 12px; font-weight: 700;
    font-size: 0.9rem; text-decoration: none; transition: all 0.3s;
    margin-bottom: 10px; width: 100%;
}
.action-btn:last-child { margin-bottom: 0; }
.action-btn.primary {
    background: linear-gradient(135deg, #0078ff, #0064ff); color: #fff;
    box-shadow: 0 4px 14px rgba(0,120,255,0.3);
}
.action-btn.primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,120,255,0.4); }
.action-btn.outline {
    background: transparent; color: #1e293b;
    border: 1.5px solid #e2e8f0;
}
.action-btn.outline:hover { border-color: #0078ff; color: #0078ff; }
.action-btn.ghost { background: #f8fafc; color: #64748b; }
.action-btn.ghost:hover { background: #eff6ff; color: #0078ff; }
.info-list { display: flex; flex-direction: column; gap: 14px; }
.info-row { display: flex; justify-content: space-between; align-items: center; }
.info-label { font-size: 0.8rem; font-weight: 600; color: #94a3b8; }
.info-value { font-size: 0.85rem; font-weight: 700; color: #1e293b; text-align: right; }
.tech-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tech-item {
    padding: 6px 14px; background: #f1f5f9; border-radius: 8px;
    font-size: 0.8rem; font-weight: 700; color: #475569;
    transition: all 0.2s;
}
.tech-item:hover { background: #0078ff; color: #fff; }
.share-buttons { display: flex; gap: 10px; }
.share-btn {
    width: 42px; height: 42px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; text-decoration: none; transition: all 0.3s;
    color: #fff;
}
.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.linkedin { background: #0a66c2; }
.share-btn.whatsapp { background: #25d366; }
.share-btn:hover { transform: translateY(-3px); opacity: 0.9; }

/* ── Related Projects ─────────────────────────────── */
.related-projects { margin-top: 64px; padding-top: 48px; border-top: 1px solid #e2e8f0; }
.related-projects .section-title { font-size: 1.8rem; margin-bottom: 32px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.project-card.mini .project-card-img { height: 180px; }

/* ── Lightbox ─────────────────────────────────────── */
.lightbox-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.92);
    z-index: 10000; display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: all 0.3s;
    padding: 40px; cursor: zoom-out;
}
.lightbox-overlay.active { opacity: 1; visibility: visible; }
.lightbox-overlay img {
    max-width: 90%; max-height: 90vh; border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5); cursor: default;
}
.lightbox-close {
    position: absolute; top: 24px; right: 24px;
    width: 48px; height: 48px; border-radius: 50%;
    background: rgba(255,255,255,0.1); border: none;
    color: #fff; font-size: 1.2rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s;
}
.lightbox-close:hover { background: #ef4444; }

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 1100px) {
    .projects-grid { grid-template-columns: repeat(2, 1fr); }
    .detail-layout { grid-template-columns: 1fr; }
    .detail-sidebar { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .detail-sidebar .sidebar-card { margin-bottom: 0; }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .projects-hero { padding: 120px 0 60px; }
    .projects-hero h1 { font-size: 2.2rem; }
    .projects-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
    .filter-toolbar { flex-direction: column; }
    .search-box { min-width: 100%; }
    .detail-sidebar { grid-template-columns: 1fr; }
    .related-grid { grid-template-columns: 1fr; }
    .projects-cta { padding: 50px 24px; }
    .detail-description, .detail-gallery { padding: 24px; }
    .project-detail-hero { padding: 120px 0 40px; }
}
