.hero-work {
    text-align: center;
    padding: 1rem 0 0.75rem;
    margin-bottom: 0.75rem;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.filters-work {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
}

.search-panel {
    width: 100%;
    max-width: 1180px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.search-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0,1fr));
    gap: 0.75rem;
}

.search-row.condensed {
    grid-template-columns: repeat(4, minmax(0,1fr));
    margin-top: 0.6rem;
}

.search-input,
.search-select {
    position: relative;
    background: #0f0f0f;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.85rem 0.9rem;
    border-radius: 10px;
    font-weight: 600;
    transition: none;
    width: 100%;
}

.search-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888888' stroke-width='1.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-position: right 12px center;
    background-size: 10px 6px;
    background-repeat: no-repeat;
}

.search-input:hover,
.search-select:hover,
.search-input:focus,
.search-select:focus {
    border-color: var(--border-hover);
    color: var(--text-primary);
    box-shadow: none;
    background: #111;
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-input,
.search-select {
    outline: none;
}


.search-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.85rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.search-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

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

.search-btn:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
    transform: none;
    box-shadow: none;
}

.filter-buttons {
    display: none;
}

.filter-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

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

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

.filter-btn:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.filter-btn.active {
    background: var(--bg-primary);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    animation: pulse 2s infinite;
}

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

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    }
}

/* Compact vertical cards, slightly wider images */
.c-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin: 0 0 3rem;
    align-items: stretch;
    justify-items: start;
    width: 100%;
    padding: 0;
}

.project-card {
    display: block;
    min-height: 0;
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    max-width: 500px;
    justify-self: start;
}

.project-image {
    min-height: 0;
    aspect-ratio: 10 / 7;
}

.project-info {
    padding: 1.2rem;
    gap: 0.35rem;
    justify-content: flex-start;
}

.project-price-row {
    display: none;
}

.project-title {
    font-size: 1.12rem !important;
    font-weight: 700 !important;
    line-height: 1.32;
    margin: 0;
}

.filter-btn:nth-child(1) { animation: slideInUp 0.6s ease-out 0.1s both; }
.filter-btn:nth-child(2) { animation: slideInUp 0.6s ease-out 0.2s both; }
.filter-btn:nth-child(3) { animation: slideInUp 0.6s ease-out 0.3s both; }
.filter-btn:nth-child(4) { animation: slideInUp 0.6s ease-out 0.4s both; }
.filter-btn:nth-child(5) { animation: slideInUp 0.6s ease-out 0.5s both; }

@media (max-width: 1400px) {
.c-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1200px) {
  .c-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .c-grid {
    grid-template-columns: 1fr;
    padding-left: 0;
    padding-right: 0;
    max-width: 100%;
  }
  
  .hero-work {
    padding: 0.75rem 0 0.5rem;
    margin-bottom: 0.5rem;
  }
  
  .hero-title {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .filters-work {
    margin-bottom: 0.75rem;
  }
  
  .search-panel {
    padding: 0.75rem;
    border-radius: 10px;
  }
  
  .search-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .search-row.condensed {
    grid-template-columns: 1fr;
    margin-top: 0.5rem;
  }
  
  .search-input,
  .search-select,
  .search-btn {
    padding: 0.75rem;
    font-size: 0.9rem;
  }
}

.project-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer !important;
    position: relative;
    min-height: 210px;
    display: grid;
    grid-template-columns: 42% 58%;
}

.project-card,
.project-card *,
.project-image,
.project-img,
.project-overlay,
.project-links,
.project-link,
.project-info,
.project-title,
.project-description,
.project-tags,
.tag {
    cursor: pointer !important;
}

.project-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin: 0.4rem 0 0.2rem 0;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.project-meta .badge {
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    font-size: 0.85rem;
    border: 1px solid var(--border);
    background: var(--bg-primary);
}

.listing-type.badge-sale {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent);
    border-color: rgba(59, 130, 246, 0.35);
}

.listing-type.badge-rent {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.35);
}

.property-type {
    color: var(--text-secondary);
}

.project-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.project-price {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1rem;
}

.project-price.muted {
    color: var(--text-muted);
}

.project-location {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: right;
    white-space: nowrap;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
    cursor: pointer !important;
}

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

.project-card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: var(--border-hover);
    border-radius: 10px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.project-image {
    position: relative;
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-primary));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer !important;
    min-height: 220px;
}

.project-image img.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.project-info {
    padding: 1.05rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    justify-content: center;
    position: relative;
    z-index: 2;
}

/* Old rules removed - see DEFINITIVE PROJECT IMAGE RULES above */

.project-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    z-index: 2;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.project-card:hover .project-placeholder {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    pointer-events: none;
    cursor: pointer !important;
}

.project-card:hover .project-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* Alternative: Make the entire card area clickable */
.project-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer !important;
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
}

.project-card:hover,
.project-card:visited,
.project-card:active,
.project-card:focus {
    text-decoration: none;
    color: inherit;
}

.project-card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: var(--border-hover);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.project-image {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-primary));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer !important;
}

.project-info {
    padding: 1.2rem;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.project-title {
    font-size: 1.2rem !important;
    font-weight: 400 !important;
    font-family: 'Inter', Arial, sans-serif !important;
    letter-spacing: 0.01em !important;
    margin-bottom: 0.2rem;
}

.project-card:hover .project-title {
    color: var(--accent);
}

.project-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.project-card:hover .tag {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transform: translateY(-1px);
}
.project-links {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}

/* Pricing Packages Styling */
.pricing-packages {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.pricing-title {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-align: center;
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.5rem;
}

.package-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 0.5rem;
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.package-item:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

.package-name {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    text-transform: capitalize;
}

.package-price {
    color: var(--accent);
    font-size: 1rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.2);
}

.project-card:hover .package-price {
    color: var(--text-primary);
    text-shadow: 0 2px 15px rgba(255, 255, 255, 0.3);
}

.project-card:hover .package-item {
    background: var(--bg-secondary);
}

/* Remove old price styling */

.project-code-link {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 0.75rem;
    border-radius: 50%;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
}

.project-code-link:hover {
    background: var(--accent);
    color: var(--bg-primary);
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.project-link {
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer !important;
}

.project-link:hover {
    background: var(--text-secondary);
    transform: scale(1.05);
}

.project-info {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border);
}

.nav-item.active {
    color: var(--text-primary);
    font-weight: 600;
}

.project-card {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }
.project-card:nth-child(5) { animation-delay: 0.5s; }
.project-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .project-img {
        object-fit: cover;
        background-color: var(--bg-secondary);
        filter: none;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .filter-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .project-links {
        flex-direction: column;
        align-items: center;
    }
}

.project-card.hidden {
    display: none;
}

.project-card.show {
    display: block;
}

/* DEFINITIVE PROJECT IMAGE RULES - NO BLUR ALLOWED */
.project-card .project-image .project-img,
.c-grid .project-card .project-image .project-img,
body .project-card .project-img,
.project-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 8px;
    transition: transform 0.3s ease;
    filter: none !important;
    opacity: 1 !important;
    -webkit-filter: none !important;
    -moz-filter: none !important;
    -ms-filter: none !important;
    -o-filter: none !important;
    image-rendering: auto !important;
    image-rendering: crisp-edges !important;
    image-rendering: -webkit-optimize-contrast !important;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.project-card:hover .project-img,
.project-image:hover .project-img,
.c-grid .project-card:hover .project-img,
body .project-card:hover .project-img {
    transform: scale(1.05) !important;
    filter: none !important;
    opacity: 1 !important;
    -webkit-filter: none !important;
    -moz-filter: none !important;
    -ms-filter: none !important;
    -o-filter: none !important;
}

.project-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    z-index: 2;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.project-card:hover .project-placeholder {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
}

.project-image {
    position: relative;
    min-height: 200px;
    overflow: hidden;
}

@media (max-width: 768px) {
    .project-img {
        object-fit: cover;
        background-color: var(--bg-secondary);
        filter: none;
    }
}

.project-image {
    min-height: 200px;
    position: relative;
    overflow: hidden;
}

.project-image {
    height: 240px !important;
    min-height: 240px !important;
}

.price-label {
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
    opacity: 0.8;
}

.price-value {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
}

/* Pricing packages display in work cards */
.pricing-packages {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    z-index: 3;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.project-card:hover .pricing-packages {
    opacity: 1;
    transform: translateY(0);
    transform: scale(1.02);
}

.pricing-title {
    display: none;
}

.packages-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
    justify-content: flex-end;
}

.package-item {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    min-width: fit-content;
}

.package-item:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.package-name {
    display: none;
}

.package-price {
    color: var(--text-primary);
    font-size: 0.7rem;
    font-weight: 600;
}

.project-info {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
.project-title {
    margin-top: 0.50rem !important;
    margin-bottom: 0 !important;
}

.purchase-btn {
    display: block;
    width: 100%;
    margin: 0.7rem 0 0 0;
    padding: 0.58rem 0;
    background: #18191d;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.04rem;
    font-family: 'Inter', Arial, sans-serif;
    font-weight: 400;
    text-align: center;
    cursor: pointer;
    transition: background 0.25s, color 0.25s, box-shadow 0.25s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
}
.purchase-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.13), transparent);
    transition: left 0.6s cubic-bezier(0.4,0,0.2,1);
    pointer-events: none;
    z-index: 1;
}
.purchase-btn:hover, .purchase-btn:focus {
    background: #23242a;
    color: #3b82f6;
    box-shadow: 0 4px 16px rgba(59,130,246,0.10);
}
.purchase-btn:hover::before, .purchase-btn:focus::before {
    left: 100%;
}

/* Card layout fixes */
.c-grid .project-card {
    display: flex !important;
    flex-direction: column;
    grid-template-columns: unset !important;
    width: 100%;
}

.project-image {
    width: 100%;
    height: 240px;
    min-height: 240px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-primary));
    flex-shrink: 0;
}

.project-image .project-img {
    object-fit: cover;
    object-position: center;
    width: 100%;
    height: 100%;
    border-radius: 0;
    display: block;
}

.project-price-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 0.45rem 0.85rem;
    background: rgba(0,0,0,0.8);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.35);
    z-index: 3;
}

.project-info {
    padding: 1rem 1rem 1.1rem !important;
    gap: 0.35rem;
}

.project-info-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.project-price-row {
    display: none !important;
}

.project-location {
    text-align: right;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .project-info-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .project-location {
        text-align: left;
    }
}
