/* --- PREMIUM PROJECTS GRID --- */

.projects-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
    width: 100%;
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@media (max-width: 768px) {
    .projects-header {
        flex-direction: column;
        gap: 25px;
        text-align: center;
    }
}

.header-title h1 {
    font-size: 2.8rem;
    margin: 0;
    letter-spacing: -1px;
    font-weight: 800;
}

.header-title p {
    color: var(--text-muted);
    margin: 8px 0 0 0;
    font-size: 1.1rem;
    font-weight: 300;
}

/* Base Project Card Style */
.project-card {
    position: relative;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    overflow: hidden; 
    background: rgba(20, 20, 20, 0.4);
    opacity: 0; 
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: flex; 
    flex-direction: column;
    max-width: 100%; /* Force card to stay in screen bounds */
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 46, 84, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(255, 46, 84, 0.1);
}

.project-background {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    filter: brightness(0.4) saturate(1.2); 
    transition: all 0.5s ease;
}

.project-card:hover .project-background {
    transform: scale(1.05); 
    filter: brightness(0.3);
}

/* Text & Button Overlay */
.project-content {
    position: relative;
    z-index: 2; 
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between; 
    align-items: flex-start;
    flex-grow: 1; 
    width: 100%;
}

.project-content h3 {
    margin: 0;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.8);
    color: #fff;
}

.project-content .btn {
    align-self: flex-end; 
    margin-top: 3rem; 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
    position: relative;
    z-index: 10;
    white-space: normal; /* Fixes text cut off in project cards */
    max-width: 100%;
}

.project-grid-tri {
    display: grid;
    /* auto-fit automatically stretches 1 or 2 items to fill the row perfectly */
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
    gap: 2rem; 
    width: 100%;
}

.small {
    min-height: 320px; 
    height: 100%;
}

/* ... keep your .category-section and other styles here ... */

@media (max-width: 1200px) {
    /* Slightly smaller minimum width for tablets before snapping to 1 column */
    .project-grid-tri { 
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    }
}

@media (max-width: 768px) {
    /* Forces strict single column on mobile */
    .project-grid-tri { grid-template-columns: 1fr; }
    .header-title h1 { font-size: 2rem; } 
}

.small {
    min-height: 320px; 
    height: 100%;
}

.category-section {
    margin-bottom: 80px; 
    width: 100%;
}

.section-title {
    font-size: 1.5rem;
    color: #fff;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 15px;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 15px;
    overflow-wrap: break-word;
}

.section-title i {
    color: var(--accent-red);
}

.badge-wip {
    background: rgba(255, 153, 0, 0.15);
    color: #ffb84d;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    text-transform: uppercase;
    border: 1px solid rgba(255, 153, 0, 0.3);
    backdrop-filter: blur(5px);
}
/* --- FEATURED FLAGSHIP CARD --- */
.project-grid-feature {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
}

.project-card.featured {
    min-height: 420px;
}

.project-card.featured .project-background {
    filter: brightness(0.26) saturate(1.1);
    object-position: right top;
}

.project-card.featured .project-content {
    padding: 2.6rem;
    gap: 2rem;
    max-width: 780px;
}

.project-card.featured h3 {
    font-size: 2.6rem;
    margin-bottom: 1rem;
}

.card-blurb {
    color: #d6d6d6;
    font-size: 1.02rem;
    line-height: 1.75;
    margin: 0 0 1.5rem 0;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 20px;
    color: #e5e7eb;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-self: flex-start;
    width: 100%;
}

/* The generic card rule pushes a lone button to the bottom-right; inside an
   action row the buttons sit together on the left instead. */
.card-actions .btn {
    align-self: auto;
    margin-top: 0;
}

.badge-live {
    background: rgba(255, 46, 84, 0.15);
    color: #ff2e54;
    border: 1px solid rgba(255, 46, 84, 0.35);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

@media (max-width: 768px) {
    .project-card.featured .project-content { padding: 1.8rem 1.4rem; }
    .project-card.featured h3 { font-size: 1.9rem; }
    .card-blurb { font-size: 0.95rem; }
    .card-actions .btn { width: 100%; text-align: center; }
    .badge-live { position: static; display: inline-block; margin-bottom: 1rem; }
}

/* --- JUMP NAVIGATION --- */
.jump-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 55px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--glass-border);
}

.jump-nav a {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 0.65rem 1.2rem;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.jump-nav a i { font-size: 0.78rem; }

.jump-nav a:hover {
    color: #fff;
    border-color: rgba(255, 46, 84, 0.45);
    background: rgba(255, 46, 84, 0.08);
    transform: translateY(-2px);
}

/* --- SECTION SUBTITLES --- */
.section-sub {
    margin: -18px 0 30px 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    max-width: 800px;
}

/* --- PLAY / WATCH REEL --- */
.reel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    width: 100%;
}

.reel-card {
    display: flex;
    flex-direction: column;
    padding: 1.6rem;
    border-radius: 18px;
    border: 1px solid var(--glass-border);
    background: rgba(18, 18, 18, 0.55);
    text-decoration: none;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.reel-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 46, 84, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55);
}

.reel-card.reel-play {
    border-color: rgba(74, 222, 128, 0.35);
    background:
        radial-gradient(circle at 85% 12%, rgba(74, 222, 128, 0.10) 0%, transparent 55%),
        rgba(18, 18, 18, 0.55);
}

.reel-card.reel-play:hover {
    border-color: rgba(74, 222, 128, 0.6);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55), inset 0 0 22px rgba(74, 222, 128, 0.06);
}

.reel-tag {
    align-self: flex-start;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 5px 11px;
    border-radius: 20px;
    margin-bottom: 1rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
}

.reel-play .reel-tag {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.12);
    border-color: rgba(74, 222, 128, 0.32);
}

.reel-card h3 {
    margin: 0 0 0.6rem 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.2px;
}

.reel-card p {
    margin: 0 0 1.4rem 0;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.65;
    flex-grow: 1;
}

.reel-cta {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.4px;
}

.reel-cta i { font-size: 0.8rem; transition: transform 0.3s ease; }
.reel-card:hover .reel-cta { color: var(--accent-red); }
.reel-play:hover .reel-cta { color: #4ade80; }
.reel-card:hover .reel-cta i { transform: translateX(4px); }

/* --- PLAYABLE BADGE --- */
.badge-play {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.35);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

@media (max-width: 768px) {
    .jump-nav { gap: 8px; margin-bottom: 40px; }
    .jump-nav a { font-size: 0.75rem; padding: 0.55rem 0.95rem; }
    .reel-grid { grid-template-columns: 1fr; }
}

.header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.header-actions .btn {
    flex: 0 0 auto;
    padding: 0.7rem 1.2rem;
    font-size: 0.78rem;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .header-actions { justify-content: center; }
}

.header-avail {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 12px 0 0 0 !important;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px;
    color: #4ade80 !important;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.28);
}
