/* ======================================
   OBRAS PAGE STYLES
   ====================================== */

/* Obras Hero Section */
.obras-hero {
    position: relative;
    height: 100vh;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--black);
    overflow: hidden;
}

.hero-background-images {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transform: scale(1);
    /* Solo transición en opacity, el zoom lo maneja la animación */
    transition: opacity 1.5s ease-in-out;
}

.hero-bg-image.active {
    opacity: 1;
    /* La animación mantiene el último estado con 'forwards' */
    animation: smoothZoom 15s ease-out forwards;
}

/* Zoom suave que se mantiene al finalizar */
@keyframes smoothZoom {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.15);
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            rgba(17, 24, 39, 0.85) 0%,
            rgba(0, 0, 0, 0.75) 50%,
            rgba(33, 153, 213, 0.2) 100%);
    z-index: 1;
}

.obras-hero .container {
    position: relative;
    z-index: 2;
}

.obras-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Use same styles as index.html hero */
.obras-hero-content .hero-subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.obras-hero-content .hero-title {
    margin-bottom: 0.8rem;
    font-family: var(--font-secondary);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--white);
    background: linear-gradient(135deg,
            var(--white) 0%,
            var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.obras-hero-content .hero-location {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--very-light-gray);
    margin-bottom: 2rem;
}

.obras-hero-content .hero-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.6;
    font-weight: 400;
    text-shadow: 1px 1px 8px rgba(0, 0, 0, 0.7);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    text-align: center;
    animation: float 2s ease-in-out infinite;
}

.scroll-indicator .mouse {
    width: 28px;
    height: 45px;
    border: 2px solid rgba(33, 153, 213, 0.8);
    border-radius: 20px;
    position: relative;
    margin: 0 auto 0.5rem;
}

.scroll-indicator .mouse::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 2px;
    animation: scroll 1.5s ease-in-out infinite;
}

.scroll-indicator span {
    font-size: 0.75rem;
    color: rgba(33, 153, 213, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

@keyframes float {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(15px);
    }
}

/* Filter Section */
.obras-filter {
    background: var(--bg-section);
    padding: 2rem 0;
    position: relative;
    z-index: 10;
}

.filter-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(30, 35, 45, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-header {
    display: flex;
    align-items: center;
    padding-right: 1rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-title {
    color: var(--white);
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.filter-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    flex: 1;
}

.select-wrapper {
    position: relative;
    min-width: 200px;
}

.filter-select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    color: var(--white);
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:hover,
.filter-select:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(33, 153, 213, 0.2);
}

.select-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--light-gray);
    pointer-events: none;
    transition: transform 0.3s ease;
}

.filter-select:focus+.select-arrow {
    transform: translateY(-50%) rotate(180deg);
    color: var(--primary-color);
}

.filter-select option {
    background: #1a1f2e;
    color: var(--white);
    padding: 10px;
}

.view-buttons {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.view-btn {
    background: transparent;
    border: none;
    color: var(--light-gray);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.view-btn:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

.view-btn.active {
    background: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(33, 153, 213, 0.4);
}

.view-btn svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 992px) {
    .filter-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .filter-header {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-right: 0;
        padding-bottom: 0.5rem;
        width: 100%;
    }

    .filter-group {
        flex-direction: column;
        width: 100%;
    }

    .select-wrapper {
        width: 100%;
    }

    .view-buttons {
        justify-content: center;
        width: 100%;
    }
}

.filter-btn,
.status-btn {
    padding: 0.75rem 1.5rem;
    background: var(--bg-card);
    color: var(--lighter-gray);
    border: 2px solid var(--medium-gray);
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 140px;
    text-align: center;
}

.filter-btn:hover,
.status-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.filter-btn.active,
.status-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(33, 153, 213, 0.3);
}

.filter-status {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Obras Grid */
.obras-section {
    padding: var(--spacing-lg) 0;
    background: var(--bg-dark);
    min-height: 50vh;
}

.obras-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
    align-items: stretch;
}

/* List View */
.obras-grid.list-view {
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.obras-grid.list-view .obra-card {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 0;
    min-height: 320px;
    height: auto;
}

.obras-grid.list-view .obra-image {
    height: 100%;
    min-height: 280px;
}

.obras-grid.list-view .obra-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem 2.5rem;
}

.obras-grid.list-view .obra-descripcion {
    -webkit-line-clamp: 4;
}

.obras-grid.list-view .obra-details {
    grid-template-columns: repeat(4, 1fr);
    margin-top: auto;
}

.obras-grid.list-view .obra-cta {
    display: none;
}

.obra-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    cursor: pointer;
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
    opacity: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    will-change: transform;
}

.obra-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(33, 153, 213, 0.3), transparent 50%, rgba(33, 153, 213, 0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    pointer-events: none;
}

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

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

    from {
        opacity: 0;
        transform: translateY(30px);
    }
}

.obra-card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: rgba(33, 153, 213, 0.5);
    box-shadow: 0 16px 50px rgba(33, 153, 213, 0.4),
        0 8px 30px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

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

.obra-image {
    width: 100%;
    height: 250px;
    background: var(--dark-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.obra-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1),
        opacity 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Lazy loading styles */
.obra-image img.lazy-load {
    opacity: 0;
}

.obra-image img.lazy-load.loaded {
    opacity: 1;
    transition: opacity 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Shimmer skeleton loader */
.obra-image-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            rgba(30, 35, 45, 1) 0%,
            rgba(40, 45, 55, 1) 20%,
            rgba(50, 55, 65, 1) 40%,
            rgba(40, 45, 55, 1) 60%,
            rgba(30, 35, 45, 1) 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite linear;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.obra-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(33, 153, 213, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.obra-image-loader p {
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0;
    opacity: 0.8;
}

.obra-card:hover .obra-image img {
    transform: scale(1.12);
}

.obra-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--medium-gray) 0%, var(--dark-gray) 100%);
    color: var(--lighter-gray);
}

.obra-placeholder svg {
    width: 60px;
    height: 60px;
    stroke: var(--primary-color);
}

.obra-status-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
}

.status-completada {
    background: rgba(34, 197, 94, 0.9);
    color: var(--white);
}

.status-en-progreso {
    background: rgba(33, 153, 213, 0.9);
    color: var(--white);
}

/* Image Indicators (Carousel Dots) */
.obra-image-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    z-index: 10;
    padding: 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    transition: opacity var(--transition-normal);
    opacity: 0.7;
}

.obra-card:hover .obra-image-indicators {
    opacity: 1;
}

.indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all var(--transition-fast);
    cursor: pointer;
    flex-shrink: 0;
}

.indicator-dot.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(33, 153, 213, 0.6);
}

.indicator-dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.obra-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.obra-header {
    margin-bottom: 1.5rem;
}

.obra-categoria {
    display: inline-block;
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.obra-nombre {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.obra-cliente {
    color: var(--lighter-gray);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.obra-cliente svg {
    width: 16px;
    height: 16px;
    stroke: var(--primary-color);
}

.obra-descripcion {
    color: var(--lighter-gray);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.obra-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--medium-gray);
    margin-top: auto;
}

.obra-detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.75rem;
    color: var(--light-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.detail-value {
    font-size: 0.9rem;
    color: var(--white);
    font-weight: 600;
}

.obra-cta {
    margin-top: 1.5rem;
}

.btn-ver-mas {
    width: 100%;
    padding: 0.875rem;
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-ver-mas:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(33, 153, 213, 0.3);
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 4rem 0;
    grid-column: 1 / -1;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--medium-gray);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-spinner p {
    color: var(--lighter-gray);
    font-size: 1.1rem;
}

.no-obras-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
}

.no-obras-message h3 {
    font-size: 1.8rem;
    color: var(--white);
    margin-bottom: 1rem;
}

.no-obras-message p {
    color: var(--lighter-gray);
    font-size: 1.1rem;
}

/* Load More Button */
.load-more-container {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 3rem 0 2rem;
}

.btn-load-more {
    padding: 1rem 3rem;
    background: linear-gradient(135deg, rgba(33, 153, 213, 0.2) 0%, rgba(33, 153, 213, 0.1) 100%);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 20px rgba(33, 153, 213, 0.2);
    backdrop-filter: blur(10px);
}

.btn-load-more svg {
    width: 20px;
    height: 20px;
    transition: transform 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.btn-load-more:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 30px rgba(33, 153, 213, 0.4);
}

.btn-load-more:hover svg {
    transform: translateY(3px);
}

.load-more-info {
    color: var(--lighter-gray);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin: 0;
}


/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal.active {
    display: block;
}

.modal-content {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
    margin: 5% auto;
    padding: 0;
    width: 90%;
    max-width: 1200px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: slideDown 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

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

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2rem;
    font-weight: 300;
    color: var(--white);
    background: linear-gradient(135deg, rgba(33, 153, 213, 0.2), rgba(33, 153, 213, 0.1));
    border: 2px solid rgba(33, 153, 213, 0.4);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2001;
    transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-close:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    transform: rotate(90deg) scale(1.1);
    border-color: var(--primary-color);
    box-shadow: 0 8px 30px rgba(33, 153, 213, 0.5);
}

.modal-body {
    padding: 3rem;
}

.modal-header {
    margin-bottom: 2rem;
}

.modal-categoria {
    display: inline-block;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.modal-title {
    font-family: var(--font-secondary);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.modal-cliente {
    color: var(--lighter-gray);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Modal Carousel */
.modal-carousel-container {
    position: relative;
    margin: 2rem 0;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(30, 35, 45, 1) 0%, rgba(20, 25, 35, 1) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-carousel {
    position: relative;
    width: 100%;
    height: 550px;
    overflow: hidden;
}

.modal-carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
    pointer-events: none;
}

.modal-carousel-item.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-carousel-item img,
.modal-carousel-item video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* Carousel Navigation Buttons */
.modal-carousel-prev,
.modal-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(33, 153, 213, 0.3), rgba(33, 153, 213, 0.2));
    border: 2px solid rgba(33, 153, 213, 0.5);
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.modal-carousel-prev {
    left: 1.5rem;
}

.modal-carousel-next {
    right: 1.5rem;
}

.modal-carousel-prev svg,
.modal-carousel-next svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
}

.modal-carousel-prev:hover,
.modal-carousel-next:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 8px 30px rgba(33, 153, 213, 0.5);
}

/* Carousel Indicators */
.modal-carousel-indicators {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    z-index: 10;
}

.modal-carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.modal-carousel-dot:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: scale(1.2);
}

.modal-carousel-dot.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(33, 153, 213, 0.6);
}

.modal-video {
    width: 100%;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--dark-gray);
}

.modal-video video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--black);
}

.modal-description {
    color: var(--lighter-gray);
    font-size: 1.1rem;
    line-height: 1.8;
    margin: 2rem 0;
}

.modal-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.03) 100%);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.modal-detail-item {
    display: flex;
    flex-direction: column;
}

.modal-detail-label {
    font-size: 0.85rem;
    color: var(--light-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.modal-detail-value {
    font-size: 1.1rem;
    color: var(--white);
    font-weight: 600;
}

.modal-status-badge {
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    padding: var(--spacing-lg) 0;
    text-align: center;
}

.cta-content h2 {
    font-family: var(--font-secondary);
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--white);
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.cta-section .btn-primary {
    background: var(--white);
    color: var(--primary-color);
    font-size: 1.1rem;
    padding: 1.2rem 3rem;
}

.cta-section .btn-primary:hover {
    background: var(--black);
    color: var(--white);
}

/* Responsive */
@media (max-width: 768px) {
    .obras-hero {
        height: 100vh;
        min-height: 100vh;
    }

    .obras-hero-title {
        font-size: clamp(2rem, 8vw, 3rem);
        letter-spacing: 2px;
    }

    .obras-hero-description {
        font-size: 1rem;
    }

    .scroll-indicator {
        bottom: 1.5rem;
    }

    .obras-filter {
        top: 0;
        padding: 2rem 0 1.5rem;
    }

    .filter-row {
        gap: 1rem;
        padding: 0 1rem;
    }

    /* Ocultar selector de vista en mobile */
    .view-buttons {
        display: none;
    }

    .filter-buttons {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 0.75rem;
        padding-bottom: 0.5rem;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: var(--primary-color) var(--medium-gray);
    }

    .filter-buttons::-webkit-scrollbar {
        height: 4px;
    }

    .filter-buttons::-webkit-scrollbar-track {
        background: var(--medium-gray);
        border-radius: 10px;
    }

    .filter-buttons::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 10px;
    }

    .filter-btn {
        flex-shrink: 0;
        min-width: 110px;
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
        scroll-snap-align: start;
    }

    .filter-status {
        display: flex;
        gap: 0.75rem;
        justify-content: center;
        flex-wrap: wrap;
    }

    .status-btn {
        flex: 0 1 calc(50% - 0.375rem);
        min-width: 120px;
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }

    .obras-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .view-buttons {
        width: 100%;
        justify-content: center;
        padding: 0.75rem;
    }

    .view-buttons::before {
        font-size: 0.85rem;
    }

    .view-btn {
        padding: 0.75rem 1rem;
    }

    /* Responsive image indicators for mobile */
    .obra-image-indicators {
        bottom: 0.75rem;
        padding: 0.4rem 0.6rem;
        gap: 0.4rem;
    }

    .indicator-dot {
        width: 7px;
        height: 7px;
    }

    .view-btn svg {
        width: 20px;
        height: 20px;
    }

    .obras-grid.list-view .obra-card {
        grid-template-columns: 1fr;
    }

    .obras-grid.list-view .obra-image {
        height: 200px;
        min-height: 200px;
    }

    .obras-grid.list-view .obra-details {
        grid-template-columns: repeat(2, 1fr);
    }

    .obra-image {
        height: 200px;
    }

    .obra-content {
        padding: 1.5rem;
    }

    .obra-details {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .modal-content {
        width: 95%;
        margin: 2% auto;
    }

    .modal-body {
        padding: 2rem 1.5rem;
    }

    .modal-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 2rem;
    }

    .modal-images {
        grid-template-columns: 1fr;
    }

    .modal-details-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .cta-section {
        padding: var(--spacing-md) 0;
    }
}

@media (max-width: 480px) {
    .obras-hero-title {
        font-size: 2rem;
        letter-spacing: 2px;
    }

    .obras-hero-description {
        font-size: 0.95rem;
        padding: 0 1rem;
    }

    .section-tag {
        font-size: 0.75rem;
        padding: 0.3rem 1rem;
    }

    .filter-row {
        padding: 0 0.5rem;
    }

    .filter-buttons {
        gap: 0.5rem;
        padding-bottom: 0.75rem;
    }

    .filter-btn {
        min-width: 100px;
        padding: 0.5rem 0.875rem;
        font-size: 0.75rem;
    }

    .filter-status {
        gap: 0.5rem;
    }

    .status-btn {
        flex: 0 1 calc(50% - 0.25rem);
        min-width: 100px;
        padding: 0.5rem 0.875rem;
        font-size: 0.75rem;
    }

    .view-buttons {
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
    }

    .view-buttons::before {
        font-size: 0.75rem;
    }

    .view-btn {
        padding: 0.6rem 0.875rem;
    }

    .view-btn svg {
        width: 18px;
        height: 18px;
    }

    .obra-nombre {
        font-size: 1.3rem;
    }

    .modal-title {
        font-size: 1.8rem;
    }
}