.obras-main {
    max-width: var(--site-max-width, 1280px);
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

.obras-det-page .obras-main {
    padding-top: 0;
}

.obras-hero h1 {
    margin: 0 0 0.35rem;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
}

.obras-lead {
    margin: 0;
    color: #64748b;
    font-size: 1.05rem;
}

.obras-cat-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.25rem 0 0.5rem;
}

.obras-cat-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.9rem;
    text-decoration: none;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.obras-cat-pill:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.obras-cat-pill.is-active {
    background: #4f46e5;
    color: #fff;
    border-color: #4f46e5;
}

.obras-card-cat {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6366f1;
    margin-bottom: 0.25rem;
}

.obras-det-cat {
    margin: 0 0 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #6366f1;
}

.obras-empty {
    color: #64748b;
    padding: 2rem 0;
}

.obras-grid {
    list-style: none;
    margin: 2rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
    align-items: stretch;
}

.obras-card {
    margin: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.obras-card-badge {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    z-index: 2;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
}

.obras-card-static {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    flex: 1;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #fff;
    position: relative;
}

.obras-card-btn-row {
    display: flex;
    width: 100%;
    margin-top: auto;
    padding-top: 0.85rem;
}

.obras-card-btn-row--left {
    justify-content: flex-start;
}

.obras-card-btn-row--center {
    justify-content: center;
}

.obras-card-btn-row--right {
    justify-content: flex-end;
}

.obras-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 7rem;
    padding: 0.58rem 1.15rem;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.obras-card-btn--full {
    width: 100%;
    min-width: 0;
}

.obras-card-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

.obras-card-link {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    flex: 1;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.obras-card-link:hover {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

.obras-card-img-wrap {
    aspect-ratio: 16 / 10;
    background: #f1f5f9;
    overflow: hidden;
}

.obras-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.obras-card-body {
    flex: 1;
    padding: 1rem 1.1rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-height: 0;
}

.obras-card-title {
    font-weight: 600;
    font-size: 1.05rem;
}

.obras-card-desc {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.4;
}

.obras-back {
    margin: 0 0 1rem;
}

.obras-back--bottom {
    margin: 2.5rem 0 0;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.obras-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.58rem 1.15rem;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.obras-back-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

.obras-cover {
    margin: 0 0 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    background: #f1f5f9;
}

.obras-det-page .obras-cover {
    margin-top: calc(var(--lb-fixed-header-h, 72px) + 3rem);
    margin-bottom: 3.5rem;
}

.obras-cover img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 420px;
    object-fit: cover;
}

.obras-det-header h1 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.6rem, 3.5vw, 2rem);
}

.obras-det-desc {
    color: #334155;
    line-height: 1.55;
    font-size: 1.05rem;
}

.obras-det-body {
    margin-top: 1.25rem;
    color: #475569;
    line-height: 1.65;
}

.obras-fotos-section {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.obras-fotos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
}

.obras-fotos-cell {
    margin: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    aspect-ratio: 16 / 10;
}

.obras-fotos-cell > img,
.obras-fotos-trigger-media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.obras-fotos-grid--lightbox .obras-fotos-trigger {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background: #f8fafc;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.obras-fotos-trigger-media {
    position: relative;
    display: block;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

.obras-fotos-trigger-media img {
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.obras-fotos-trigger-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.08) 0%, rgba(15, 23, 42, 0.52) 100%);
    opacity: 0;
    transition: opacity 0.28s ease;
}

.obras-fotos-trigger-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.65rem;
    height: 2.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    color: #0f172a;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.22);
    transform: scale(0.82);
    opacity: 0;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

.obras-fotos-grid--lightbox .obras-fotos-trigger:hover,
.obras-fotos-grid--lightbox .obras-fotos-trigger:focus-visible {
    border-color: #cbd5e1;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
    outline: none;
}

.obras-fotos-grid--lightbox .obras-fotos-trigger:hover .obras-fotos-trigger-overlay,
.obras-fotos-grid--lightbox .obras-fotos-trigger:focus-visible .obras-fotos-trigger-overlay {
    opacity: 1;
}

.obras-fotos-grid--lightbox .obras-fotos-trigger:hover .obras-fotos-trigger-icon,
.obras-fotos-grid--lightbox .obras-fotos-trigger:focus-visible .obras-fotos-trigger-icon {
    transform: scale(1);
    opacity: 1;
}

.obras-fotos-grid--lightbox .obras-fotos-trigger:hover .obras-fotos-trigger-media img,
.obras-fotos-grid--lightbox .obras-fotos-trigger:focus-visible .obras-fotos-trigger-media img {
    transform: scale(1.06);
}

.obras-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(4px);
}

.obras-lightbox[hidden] {
    display: none !important;
}

body.obras-lightbox-open {
    overflow: hidden;
}

.obras-lightbox-stage {
    max-width: min(1200px, 96vw);
    max-height: 86vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.obras-lightbox-img {
    max-width: 100%;
    max-height: 86vh;
    width: auto;
    height: auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    object-fit: contain;
}

.obras-lightbox-close,
.obras-lightbox-nav {
    position: absolute;
    border: none;
    cursor: pointer;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    transition: background 0.15s ease;
}

.obras-lightbox-close:hover,
.obras-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.22);
}

.obras-lightbox-close {
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    font-size: 1.6rem;
    line-height: 1;
}

.obras-lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    font-size: 2rem;
    line-height: 1;
}

.obras-lightbox-prev {
    left: 1rem;
}

.obras-lightbox-next {
    right: 1rem;
}

.obras-gallery {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.obras-gallery-title {
    font-size: 1.25rem;
    margin: 0 0 1rem;
}

.obras-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.obras-gallery-fig {
    margin: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.obras-gallery-fig img {
    width: 100%;
    aspect-ratio: 16 / 10;
    display: block;
    object-fit: cover;
}

.obras-gallery-fig figcaption {
    padding: 0.65rem 0.85rem 0.85rem;
    font-size: 0.92rem;
    color: #334155;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.obras-gallery-cap {
    font-weight: 400;
    color: #64748b;
}
