/* ═══════════════════════════════════════════════════════════════════
   PROJECTS SHOWCASE — Cronus Steel
   ═══════════════════════════════════════════════════════════════════ */

/* ── Stats Counter Bar ─────────────────────────────────────────── */
.project-stats {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 40px 0;
    border-bottom: 3px solid #ce2121;
}
.stat-item {
    text-align: center;
    padding: 15px 10px;
}
.stat-number {
    font-size: 42px;
    font-weight: 700;
    color: #ce2121;
    line-height: 1;
    font-family: 'Raleway', sans-serif;
}
.stat-label {
    font-size: 13px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 8px;
}

/* ── Filter Buttons ────────────────────────────────────────────── */
.filter-bar {
    padding: 30px 0 10px;
    text-align: center;
}
.filter-bar .btn-filter {
    background: transparent;
    border: 2px solid #ddd;
    color: #555;
    padding: 8px 22px;
    margin: 0 5px 10px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.filter-bar .btn-filter:hover,
.filter-bar .btn-filter.active {
    background: #ce2121;
    border-color: #ce2121;
    color: #fff;
}

/* ── Project Grid ──────────────────────────────────────────────── */
.projects-grid {
    padding: 20px 0 60px;
}
#projectsGrid {
    display: flex;
    flex-wrap: wrap;
}
.project-card {
    margin-bottom: 30px;
    opacity: 1;
    transition: opacity 0.4s ease, transform 0.4s ease;
    display: flex;
}
.project-card.hidden {
    display: none;
}
.project-card-inner {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: all 0.35s ease;
    width: 100%;
    display: flex;
    flex-direction: column;
}
.project-card-inner:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    transform: translateY(-6px);
}

/* ── Card Image Area ───────────────────────────────────────────── */
.project-thumb {
    position: relative;
    overflow: hidden;
    height: 220px;
    cursor: pointer;
}
.project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.project-card-inner:hover .project-thumb img {
    transform: scale(1.08);
}
.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(206, 33, 33, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease;
}
.project-card-inner:hover .project-overlay {
    opacity: 1;
}
.project-overlay i {
    font-size: 36px;
    color: #fff;
}
.project-category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 3px;
    z-index: 2;
}
.img-count-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 3px;
    z-index: 2;
}

/* ── Card Body ─────────────────────────────────────────────────── */
.project-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.project-info h4 {
    font-size: 16px;
    font-weight: 700;
    color: #222;
    margin: 0 0 12px;
    line-height: 1.35;
    font-family: 'Raleway', sans-serif;
}
.project-meta {
    list-style: none;
    padding: 0;
    margin: 0 0 15px;
    flex: 1;
}
.project-meta li {
    font-size: 13px;
    color: #666;
    padding: 4px 0;
    border-bottom: 1px solid #f2f2f2;
}
.project-meta li:last-child {
    border-bottom: none;
}
.project-meta li i {
    width: 20px;
    color: #ce2121;
    margin-right: 6px;
}
.project-meta li strong {
    color: #333;
}
.btn-view-gallery {
    display: block;
    text-align: center;
    background: #f5f5f5;
    color: #ce2121;
    border: none;
    padding: 10px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0 0 6px 6px;
    width: 100%;
}
.btn-view-gallery:hover {
    background: #ce2121;
    color: #fff;
}

/* ── Lightbox Modal ────────────────────────────────────────────── */
#projectModal .modal-dialog {
    max-width: 900px;
    margin: 30px auto;
}
#projectModal .modal-content {
    background: #111;
    border: none;
    border-radius: 8px;
    overflow: hidden;
}
#projectModal .modal-header {
    background: #1a1a1a;
    border-bottom: 2px solid #ce2121;
    padding: 15px 25px;
}
#projectModal .modal-header .modal-title {
    color: #fff;
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: 18px;
}
#projectModal .modal-header .close {
    color: #fff;
    opacity: 0.8;
    font-size: 28px;
    text-shadow: none;
}
#projectModal .modal-header .close:hover {
    opacity: 1;
}
#projectModal .modal-body {
    padding: 0;
    position: relative;
    background: #000;
}
.modal-gallery-main {
    position: relative;
    text-align: center;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a0a;
}
.modal-gallery-main img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
}
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(206, 33, 33, 0.8);
    color: #fff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.3s;
    z-index: 5;
}
.gallery-nav:hover {
    background: #ce2121;
}
.gallery-nav.prev { left: 15px; }
.gallery-nav.next { right: 15px; }

.gallery-counter {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    letter-spacing: 1px;
}

.modal-gallery-thumbs {
    display: flex;
    gap: 4px;
    padding: 10px;
    background: #1a1a1a;
    overflow-x: auto;
    justify-content: center;
}
.modal-gallery-thumbs img {
    width: 70px;
    height: 50px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.5;
    border: 2px solid transparent;
    border-radius: 3px;
    transition: all 0.25s;
}
.modal-gallery-thumbs img:hover,
.modal-gallery-thumbs img.active {
    opacity: 1;
    border-color: #ce2121;
}

.modal-project-details {
    background: #1a1a1a;
    padding: 15px 25px;
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    border-top: 1px solid #333;
}
.modal-project-details .detail-item {
    font-size: 13px;
    color: #aaa;
}
.modal-project-details .detail-item i {
    color: #ce2121;
    margin-right: 6px;
}
.modal-project-details .detail-item strong {
    color: #fff;
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 991px) {
    .stat-number { font-size: 32px; }
    .project-thumb { height: 190px; }
    #projectModal .modal-dialog { margin: 15px; }
}
@media (max-width: 767px) {
    .stat-number { font-size: 28px; }
    .stat-label { font-size: 11px; }
    .filter-bar .btn-filter { padding: 6px 16px; font-size: 11px; margin: 0 3px 8px; }
    .project-thumb { height: 200px; }
    .gallery-nav { width: 36px; height: 36px; font-size: 16px; }
    .modal-gallery-thumbs img { width: 55px; height: 40px; }
}

/* ── Animate cards on scroll ───────────────────────────────────── */
.project-card {
    animation: fadeInUp 0.5s ease forwards;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.project-card:nth-child(3n+2) { animation-delay: 0.1s; }
.project-card:nth-child(3n+3) { animation-delay: 0.2s; }
