/* ========================================
   PROJECT SHOWCASE - PORTFOLIO SECTION
   ======================================== */

.projects-tabs {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.project-tab-btn {
    background: transparent;
    border: 2px solid var(--navy);
    color: var(--navy);
    padding: 12px 32px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Montserrat', sans-serif;
}

.project-tab-btn.active,
.project-tab-btn:hover {
    background: var(--navy);
    color: #fff;
}

.projects-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px;
}

.project-card {
    flex: 0 1 420px;
    min-width: 280px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1px solid rgba(0,0,0,0.02);
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}

.thumbnail-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #e9eef3;
    overflow: hidden;
}

.project-thumb-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
    pointer-events: none;
}

.project-card:hover .project-thumb-video {
    transform: scale(1.02);
}

.thumb-fallback {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    display: none;
}

.project-card.video-fallback .project-thumb-video { display: none; }
.project-card.video-fallback .thumb-fallback { display: block; }

.card-content {
    padding: 20px 18px 24px;
}

.project-category-badge {
    display: inline-block;
    background: var(--turquoise);
    color: var(--navy);
    font-weight: 700;
    font-size: 0.7rem;
    padding: 4px 12px;
    border-radius: 30px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
    font-family: 'Montserrat', sans-serif;
}

.project-short-desc {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ── Project Detail Modal ── */

.project-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.25s ease, visibility 0.25s;
}

.project-modal.active {
    visibility: visible;
    opacity: 1;
}

.project-modal .modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(30,58,95,0.85);
    backdrop-filter: blur(6px);
}

.modal-container {
    position: relative;
    width: min(92vw, 1100px);
    max-height: 90vh;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 25px 50px -8px rgba(0,0,0,0.25);
    overflow-y: auto;
    padding: 40px;
    z-index: 2;
    transform: scale(0.95);
    transition: transform 0.25s ease;
    margin: auto;
}

.project-modal.active .modal-container {
    transform: scale(1);
}

.project-modal .modal-close {
    position: absolute;
    top: 24px;
    right: 28px;
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    color: var(--navy);
    opacity: 0.7;
    transition: all 0.2s;
    z-index: 5;
}

.project-modal .modal-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

.modal-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 8px;
    padding-right: 30px;
    font-family: 'Montserrat', sans-serif;
}

.modal-subtitle {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 24px;
}

.modal-description {
    margin-bottom: 28px;
    color: #333;
    line-height: 1.7;
}

.gallery-title {
    font-weight: 700;
    margin: 24px 0 16px;
    color: var(--navy);
}

.modal-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.gallery-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 12px;
    background: #eef2f6;
    cursor: zoom-in;
    transition: transform 0.2s;
}

.gallery-img:hover {
    transform: scale(1.02);
}

.modal-video-wrapper {
    margin-top: 16px;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
}

.modal-video {
    width: 100%;
    aspect-ratio: 16/9;
    display: block;
}

@media (max-width: 768px) {
    .modal-container { padding: 28px 20px; }
    .modal-title { font-size: 1.6rem; }
}

@media (max-width: 480px) {
    .projects-grid { grid-template-columns: 1fr; }
}
