/* ============================================
   SAFA PROJECTS PAGE - CINEMATIC DESIGN
   All classes prefixed with .safa-projects- to avoid conflicts
   ============================================ */

/* ========== HERO SECTION - CINEMATIC INTRO ========== */
.safa-projects-hero {
    position: relative;
    height: 75vh;
    min-height: 500px;
    max-height: 800px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 70px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.2);
}

/* Background Image */
.safa-projects-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 1;
    animation: safaProjectsHeroZoom 20s ease-in-out infinite;
    transform: scale(1.1);
    filter: brightness(0.7) contrast(1.1) saturate(1.2);
    will-change: transform;
}

@keyframes safaProjectsHeroZoom {
    0%, 100% {
        transform: scale(1.1);
    }
    50% {
        transform: scale(1.15);
    }
}

/* Overlay - Gold gradient overlay */
.safa-projects-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(202, 165, 109, 0.4) 0%, 
        rgba(30, 30, 30, 0.5) 50%,
        rgba(202, 165, 109, 0.3) 100%);
    z-index: 2;
    animation: safaProjectsOverlayPulse 8s ease-in-out infinite;
}

@keyframes safaProjectsOverlayPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.9;
    }
}

/* Additional Background Effects */
.safa-projects-hero-background-effects {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(202, 165, 109, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(202, 165, 109, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.2) 0%, transparent 70%);
    z-index: 2;
    animation: safaProjectsBackgroundMove 15s ease-in-out infinite;
}

@keyframes safaProjectsBackgroundMove {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.9;
    }
}

/* Hero Content - Cinematic Entrance */
.safa-projects-hero-content {
    text-align: center;
    color: #fff;
    z-index: 3;
    position: relative;
    padding: 0 30px;
    max-width: 1000px;
    animation: safaProjectsContentFadeIn 1.5s ease-out;
    opacity: 0;
    animation-fill-mode: forwards;
}

@keyframes safaProjectsContentFadeIn {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
        filter: blur(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* Hero Badge */
.safa-projects-hero-badge {
    display: inline-block;
    padding: 12px 32px;
    background: linear-gradient(135deg, 
        rgba(202, 165, 109, 0.9) 0%, 
        rgba(184, 133, 74, 0.9) 100%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 25px;
    box-shadow: 
        0 8px 25px rgba(202, 165, 109, 0.4),
        0 4px 12px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    animation: safaProjectsBadgeSlide 1s ease-out 0.3s both;
    position: relative;
    overflow: hidden;
}

.safa-projects-hero-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: safaProjectsBadgeShine 3s ease-in-out infinite;
}

@keyframes safaProjectsBadgeSlide {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes safaProjectsBadgeShine {
    0% {
        left: -100%;
    }
    50%, 100% {
        left: 100%;
    }
}

/* Hero Title - Cinematic Typography */
.safa-projects-hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 30px;
    font-family: 'Poppins', sans-serif;
    letter-spacing: -1.5px;
    line-height: 1.15;
    text-shadow: 
        0 8px 40px rgba(0, 0, 0, 0.5),
        0 4px 20px rgba(0, 0, 0, 0.4),
        0 2px 10px rgba(0, 0, 0, 0.3);
    background: linear-gradient(180deg, #ffffff 0%, #f8f8f8 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: safaProjectsTitleReveal 1.2s ease-out 0.5s both;
    position: relative;
}

.safa-projects-hero-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(202, 165, 109, 0.8), 
        transparent);
    border-radius: 2px;
    animation: safaProjectsTitleUnderline 1s ease-out 1s both;
}

@keyframes safaProjectsTitleReveal {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes safaProjectsTitleUnderline {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 100px;
        opacity: 1;
    }
}

/* Hero Subtitle */
.safa-projects-hero-subtitle {
    font-size: 1.3rem;
    font-weight: 400;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
    max-width: 800px;
    margin: 0 auto;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: safaProjectsSubtitleFade 1.5s ease-out 0.8s both;
}

@keyframes safaProjectsSubtitleFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== FILTER SECTION ========== */
.safa-projects-filter {
    background: linear-gradient(180deg, #f8f8f8 0%, #ffffff 100%);
    padding: 40px 0;
    border-bottom: 1px solid rgba(202, 165, 109, 0.2);
    position: sticky;
    top: 70px;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    scroll-margin-top: 70px;
}

.safa-projects-filter-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.safa-filter-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: #ffffff;
    color: #333;
    border: 2px solid rgba(202, 165, 109, 0.3);
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    letter-spacing: -0.1px;
}

.safa-filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(202, 165, 109, 0.1), transparent);
    transition: left 0.5s ease;
}

.safa-filter-btn:hover::before {
    left: 100%;
}

.safa-filter-btn:hover,
.safa-filter-btn.active {
    background: linear-gradient(135deg, rgba(202, 165, 109, 0.1) 0%, rgba(184, 133, 74, 0.1) 100%);
    border-color: rgba(202, 165, 109, 0.6);
    color: #caa56d;
    transform: translateY(-2px) translateZ(0);
    box-shadow: 
        0 6px 20px rgba(202, 165, 109, 0.2),
        0 2px 8px rgba(0, 0, 0, 0.1);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.safa-filter-btn.active {
    background: linear-gradient(135deg, 
        rgba(202, 165, 109, 0.15) 0%, 
        rgba(184, 133, 74, 0.15) 100%);
    border-color: rgba(202, 165, 109, 0.8);
    color: #b8854a;
    font-weight: 700;
    box-shadow: 
        0 4px 15px rgba(202, 165, 109, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.safa-filter-icon {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.safa-filter-text {
    text-decoration: none;
}

/* ========== PROJECTS SECTION ========== */
.safa-projects-section {
    padding: 80px 0;
    background: linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%);
    min-height: 60vh;
}

.safa-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

/* Project Card */
.safa-project-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    border: 2px solid transparent;
}

.safa-project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(135deg, 
        rgba(202, 165, 109, 0.2) 0%, 
        rgba(202, 165, 109, 0.4) 50%,
        rgba(202, 165, 109, 0.2) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

.safa-project-card:hover::before {
    opacity: 1;
}

.safa-project-card:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 12px 40px rgba(202, 165, 109, 0.15),
        0 6px 20px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.05);
    border-color: rgba(202, 165, 109, 0.3);
}

.safa-project-card-image-wrapper {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: #f5f5f5;
}

.safa-project-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.safa-project-card:hover .safa-project-card-image {
    transform: scale(1.08);
}

.safa-project-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.3) 70%,
        rgba(0, 0, 0, 0.5) 100%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
}

.safa-project-card:hover .safa-project-card-overlay {
    opacity: 1;
}

.safa-project-card-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    background: linear-gradient(135deg, 
        rgba(202, 165, 109, 0.95) 0%, 
        rgba(184, 133, 74, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.safa-project-card:hover .safa-project-card-badge {
    opacity: 1;
    transform: translateY(0);
}

.safa-project-card-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 3px solid rgba(202, 165, 109, 0.4);
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.safa-project-card:hover .safa-project-card-border {
    opacity: 1;
}

/* Project Card Content */
.safa-project-card-content {
    padding: 30px;
}

.safa-project-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    color: #1a1a1a;
    margin-bottom: 12px;
    line-height: 1.3;
    text-decoration: none;
    transition: color 0.3s ease;
}

.safa-project-card:hover .safa-project-card-title {
    color: #caa56d;
}

.safa-project-card-description {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #666;
    margin-bottom: 20px;
    text-decoration: none;
}

.safa-project-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid rgba(202, 165, 109, 0.15);
}

.safa-project-location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
}

.safa-project-location i {
    color: rgba(202, 165, 109, 0.8);
    font-size: 1rem;
}

.safa-project-status {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
}

.safa-project-status-current {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15) 0%, rgba(56, 142, 60, 0.15) 100%);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.safa-project-status-completed {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.15) 0%, rgba(25, 118, 210, 0.15) 100%);
    color: #2196f3;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.safa-project-status-past {
    background: linear-gradient(135deg, rgba(158, 158, 158, 0.15) 0%, rgba(117, 117, 117, 0.15) 100%);
    color: #9e9e9e;
    border: 1px solid rgba(158, 158, 158, 0.3);
}

/* Thumbnails row inside project card */
.safa-project-thumbs {
    display: flex;
    gap: 8px;
    margin: 6px 0 14px;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.safa-project-thumbs::-webkit-scrollbar { height: 6px; }
.safa-project-thumbs::-webkit-scrollbar-thumb { background: rgba(0,0,0,.15); border-radius: 4px; }
.safa-project-thumbs::-webkit-scrollbar-track { background: transparent; }

.safa-project-thumb {
    width: 58px;
    height: 58px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
    box-shadow: 0 2px 8px rgba(0,0,0,.06), inset 0 0 0 1px rgba(0,0,0,.05);
    transition: transform .2s ease, box-shadow .2s ease;
}
.safa-project-thumb:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,.12), inset 0 0 0 1px rgba(0,0,0,.06);
}

/* Empty State - Polished Design */
.safa-projects-empty {
    text-align: center;
    padding: 120px 40px;
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border-radius: 20px;
    border: 2px dashed rgba(202, 165, 109, 0.25);
    box-shadow: 
        0 8px 30px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
    max-width: 700px;
    margin: 60px auto;
}

.safa-projects-empty::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(202, 165, 109, 0.03) 0%, transparent 70%);
    animation: safaProjectsEmptyPulse 8s ease-in-out infinite;
}

@keyframes safaProjectsEmptyPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.safa-projects-empty-icon {
    font-size: 5rem;
    color: rgba(202, 165, 109, 0.4);
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
    animation: safaProjectsEmptyIconFloat 3s ease-in-out infinite;
}

@keyframes safaProjectsEmptyIconFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.safa-projects-empty-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
    position: relative;
    z-index: 1;
    letter-spacing: -0.5px;
}

.safa-projects-empty-text {
    font-size: 1.15rem;
    color: #666;
    margin-bottom: 0;
    line-height: 1.8;
    text-decoration: none;
    position: relative;
    z-index: 1;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 1024px) {
    .safa-projects-hero {
        height: 65vh;
        min-height: 450px;
    }

    .safa-projects-hero-title {
        font-size: 3.5rem;
    }

    .safa-projects-hero-subtitle {
        font-size: 1.1rem;
    }

    .safa-projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .safa-projects-hero {
        height: 55vh;
        min-height: 400px;
        margin-top: 70px;
    }

    .safa-projects-hero-content {
        padding: 0 20px;
        padding-top: 40px;
    }

    .safa-projects-hero-badge {
        padding: 10px 24px;
        font-size: 0.85rem;
        margin-bottom: 15px;
    }

    .safa-projects-hero-title {
        font-size: 2.5rem;
        margin-bottom: 20px;
    }

    .safa-projects-hero-title::after {
        width: 60px;
        height: 3px;
        bottom: -10px;
    }

    .safa-projects-hero-subtitle {
        font-size: 1rem;
    }

    .safa-projects-filter {
        padding: 30px 0;
        top: 70px;
    }

    .safa-projects-filter-wrapper {
        gap: 12px;
    }

    .safa-filter-btn {
        padding: 12px 20px;
        font-size: 0.85rem;
        gap: 8px;
    }

    .safa-filter-icon {
        font-size: 1rem;
    }

    .safa-projects-section {
        padding: 50px 0;
    }

    .safa-projects-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-top: 30px;
    }

    .safa-project-card-image-wrapper {
        height: 240px;
    }

    .safa-project-card-content {
        padding: 25px;
    }

    .safa-project-card-title {
        font-size: 1.3rem;
    }

    .safa-project-card-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .safa-project-thumb {
        width: 52px;
        height: 52px;
    }
}

@media (max-width: 480px) {
    .safa-projects-hero {
        height: 50vh;
        min-height: 350px;
    }

    .safa-projects-hero-content {
        padding: 0 15px;
        padding-top: 30px;
    }

    .safa-projects-hero-badge {
        padding: 8px 20px;
        font-size: 0.75rem;
        letter-spacing: 1.5px;
    }

    .safa-projects-hero-title {
        font-size: 2rem;
        margin-bottom: 15px;
    }

    .safa-projects-hero-subtitle {
        font-size: 0.9rem;
    }

    .safa-projects-filter-wrapper {
        gap: 8px;
        flex-direction: column;
    }

    .safa-filter-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }

    .safa-projects-section {
        padding: 40px 0;
    }

    .safa-projects-grid {
        gap: 25px;
    }

    .safa-project-card-image-wrapper {
        height: 200px;
    }

    .safa-project-card-content {
        padding: 20px;
    }

    .safa-project-card-title {
        font-size: 1.2rem;
    }

    .safa-project-card-description {
        font-size: 0.9rem;
    }
    .safa-project-thumbs {
        margin: 4px 0 10px;
        gap: 6px;
    }
    .safa-project-thumb {
        width: 48px;
        height: 48px;
        border-radius: 7px;
    }

    .safa-projects-empty {
        padding: 80px 25px;
        margin: 40px auto;
        border-radius: 16px;
    }

    .safa-projects-empty-icon {
        font-size: 4rem;
        margin-bottom: 25px;
    }

    .safa-projects-empty-title {
        font-size: 1.6rem;
        margin-bottom: 15px;
    }

    .safa-projects-empty-text {
        font-size: 1rem;
        line-height: 1.7;
    }
}

@media (max-width: 360px) {
    .safa-projects-hero-title {
        font-size: 1.8rem;
    }

    .safa-projects-hero-subtitle {
        font-size: 0.85rem;
    }

    .safa-filter-btn {
        font-size: 0.8rem;
        padding: 12px 16px;
    }
}

/* Remove all text underlines */
.safa-projects-hero-content a,
.safa-filter-btn,
.safa-project-card-title,
.safa-project-card-description,
.safa-project-location,
.safa-project-status,
.safa-projects-empty-title,
.safa-projects-empty-text,
.safa-projects-empty-btn {
    text-decoration: none !important;
}

.safa-project-card-title:hover,
.safa-project-location:hover {
    text-decoration: none !important;
}

/* Smooth scroll behavior - but not for filter clicks */
html {
    scroll-behavior: smooth;
}

/* Prevent scroll jump on filter change */
.safa-projects-filter {
    scroll-margin-top: 70px;
}

/* Ensure filter section stays in viewport */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-padding-top: 70px;
    }
}

/* Loading animation for cards */
@keyframes safaProjectCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.safa-project-card {
    animation: safaProjectCardFadeIn 0.6s ease-out both;
}

/* ===== New V2 Card (full-cover with overlay, bold location) ===== */
.proj-card-v2 {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0,0,0,.08);
    border: 1px solid rgba(202,165,109,.15);
    transform: translate3d(0,0,0);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    will-change: transform;
}
.proj-v2-cover {
    display: block;
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    text-decoration: none;
}
.proj-card-v2:hover {
    box-shadow: 0 14px 36px rgba(0,0,0,.16);
    border-color: rgba(202,165,109,.4);
}
.proj-v2-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(to bottom, rgba(0,0,0,.18) 0%, rgba(0,0,0,.42) 68%, rgba(0,0,0,.62) 100%);
}
.proj-v2-top { display:flex; justify-content:flex-end; padding:16px; }
.proj-v2-badge {
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,.85);
    color: #333;
    font-weight: 700;
    font-size: .8rem;
    letter-spacing: .5px;
    border: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 2px 10px rgba(0,0,0,.12);
}
.proj-v2-bottom {
    padding: 20px 22px;
    color: #fff;
}
.proj-v2-title {
    margin: 0 0 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: -.3px;
}
.proj-v2-location {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.25);
    color: #fff;
    padding: 6px 10px;
    border-radius: 10px;
    font-weight: 700;
}
.proj-v2-location i { color: #ffd18a; }

@media (max-width: 768px) {
    .proj-v2-cover { height: auto; aspect-ratio: 16 / 9; }
    .proj-v2-title { font-size: 1.2rem; }
}
@media (max-width: 480px) {
    .proj-v2-cover { height: auto; aspect-ratio: 16 / 9; }
}

/* Smooth filter transition animations */
.safa-projects-content-fade-out {
    animation: safaProjectsContentFadeOut 0.3s ease-in forwards;
}

.safa-projects-content-fade-in {
    animation: safaProjectsContentFadeIn 0.4s ease-out forwards;
}

@keyframes safaProjectsContentFadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

@keyframes safaProjectsContentFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.safa-projects-grid-fade-in {
    animation: safaProjectsGridFadeIn 0.5s ease-out forwards;
}

.safa-projects-empty-fade-in {
    animation: safaProjectsEmptyFadeIn 0.5s ease-out forwards;
}

@keyframes safaProjectsGridFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes safaProjectsEmptyFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.safa-project-card-fade-in {
    animation: safaProjectCardFadeIn 0.6s ease-out both;
}

/* Focus styles for accessibility */
.safa-filter-btn:focus,
.safa-project-card:focus {
    outline: 2px solid rgba(202, 165, 109, 0.6);
    outline-offset: 4px;
}

.safa-filter-btn:focus-visible,
.safa-project-card:focus-visible {
    outline: 2px solid rgba(202, 165, 109, 0.8);
    outline-offset: 4px;
}

/* Smooth button transition for active state */
.safa-filter-btn.active {
    transform: scale(1.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.safa-filter-btn:not(.active) {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
