/* ===================================
   Category Pages — Light Minimal Theme
   =================================== */

/* Category Header */
.category-header {
    padding-top: 160px;
    padding-bottom: 100px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.residencial-header {
    background: linear-gradient(160deg, rgba(26,23,20,0.78) 0%, rgba(44,40,37,0.65) 50%, rgba(26,23,20,0.88) 100%),
                url('../images/residencial/res_01.png') center/cover no-repeat;
}
.comercial-header {
    background: linear-gradient(160deg, rgba(26,23,20,0.78) 0%, rgba(44,40,37,0.65) 50%, rgba(26,23,20,0.88) 100%),
                url('../images/comercial/com_01.png') center/cover no-repeat;
}
.corporativo-header {
    background: linear-gradient(160deg, rgba(26,23,20,0.78) 0%, rgba(44,40,37,0.65) 50%, rgba(26,23,20,0.88) 100%),
                url('../images/corporativo/corp_01.png') center/cover no-repeat;
}
.mobiliario-header {
    background: linear-gradient(160deg, rgba(26,23,20,0.78) 0%, rgba(44,40,37,0.65) 50%, rgba(26,23,20,0.88) 100%),
                url('../images/mobiliario/mob_01.png') center/cover no-repeat;
}

.category-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(248,247,245,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(248,247,245,0.03) 1px, transparent 1px);
    background-size: 80px 80px;
    z-index: 0;
}

.category-header-content {
    position: relative;
    z-index: 1;
    max-width: 820px;
    margin: 0 auto;
    padding: 0 2rem;
    animation: fadeInUp 0.9s ease;
}

.back-button {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    margin-bottom: 2rem;
    transition: color 0.3s ease;
}
.back-button:hover { color: var(--color-red-light); }

.category-label {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--color-red-light);
    border: 1px solid rgba(212,36,52,0.45);
    padding: 0.3rem 1rem;
    border-radius: 50px;
    margin-bottom: 1.2rem;
}

.category-header h1 {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 300;
    color: var(--color-white);
    margin: 0.8rem 0 1.5rem;
    line-height: 1.05;
    letter-spacing: -0.01em;
}

.category-intro {
    font-size: 1.0625rem;
    color: rgba(248,247,245,0.6);
    line-height: 1.85;
    max-width: 680px;
    margin: 0 auto 3rem;
    font-weight: 300;
}

/* Stats */
.category-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 300;
    color: var(--color-red-light);
    line-height: 1;
}

.stat-label {
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
}

/* ===================================
   Projects section
   =================================== */
.category-projects {
    background: var(--color-paper);
}

/* Photo-only gallery (no links) */
.category-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--color-border);
    border: 1px solid var(--color-border);
    margin-top: var(--space-xl);
}

.gallery-photo {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--color-light);
    transition: var(--transition-base);
}

.gallery-photo:hover { z-index: 2; }

.gallery-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow), filter var(--transition-slow);
    filter: brightness(0.92) saturate(0.85);
}

.gallery-photo:hover img {
    transform: scale(1.05);
    filter: brightness(1) saturate(1);
}

/* ===================================
   Other Categories
   =================================== */
.other-categories {
    background: var(--color-white);
    border-top: 1px solid var(--color-border);
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
}

.other-categories h3 {
    font-family: var(--font-heading);
    font-size: var(--text-3xl);
    font-weight: 300;
    color: var(--color-dark);
    margin-bottom: 0.5rem;
}


.other-categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--color-border);
    border: 1px solid var(--color-border);
    max-width: 960px;
    margin: 0 auto;
}

.other-cat-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    display: block;
    transition: var(--transition-base);
}

.other-cat-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.55) saturate(0.7);
    transition: transform var(--transition-slow), filter var(--transition-slow);
}

.other-cat-card:hover img {
    transform: scale(1.06);
    filter: brightness(0.38) saturate(0.6);
}

.other-cat-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: var(--space-md);
    background: linear-gradient(to top, rgba(26,23,20,0.75) 0%, transparent 60%);
}

.other-cat-overlay span { display: none; }

.other-cat-overlay h4 {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: 300;
    color: var(--color-white);
    margin: 0;
}

/* Left bar accent on hover */
.other-cat-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0;
    width: 3px; height: 0;
    background: var(--color-red);
    z-index: 3;
    transition: height 0.45s ease;
}
.other-cat-card:hover::before { height: 100%; }

/* ===================================
   Responsive
   =================================== */
@media (max-width: 768px) {
    .category-header { padding-top: 120px; padding-bottom: 60px; }
    .category-stats  { gap: 2rem; }
    .category-gallery { grid-template-columns: 1fr; }
    .other-categories-grid { grid-template-columns: 1fr; max-width: 420px; }
}

@media (max-width: 480px) {
    .stat-number { font-size: 2.25rem; }
    .category-stats { gap: 1.5rem; }
}
