/* ===== PORTAFOLIO CSS ===== */

body {
    font-family: 'Montserrat', sans-serif;
    background: #000;
    color: #fff;
}

/* ===== HERO ===== */
.portfolio-hero {
    background: #000;
    padding: 8rem 2rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.portfolio-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.portfolio-hero h1 {
    font-family: 'Montserrat', sans-serif !important;
    font-size: clamp(3rem, 10vw, 7rem) !important;
    font-weight: 900 !important;
    letter-spacing: -0.04em !important;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    animation: fadeInUp 0.8s ease;
}

.portfolio-hero p {
    font-size: 1.1rem;
    color: #999;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== CONTENEDOR ===== */
.portfolio-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== BARRA DE FILTROS ===== */
.filter-bar {
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
    margin-bottom: 2rem;
    padding: 2rem;
    background: rgba(26, 26, 26, 0.5);
    border: 1px solid #333;
    border-radius: 4px;
    flex-wrap: wrap;
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    color: #999;
}

.search-input,
.filter-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #000;
    border: 1px solid #333;
    border-radius: 4px;
    color: #fff;
    font-size: 0.95rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.search-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.filter-select {
    cursor: pointer;
}

.btn-clear-filters {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid #333;
    color: #999;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-clear-filters:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #fff;
    color: #fff;
}

/* ===== CONTADOR DE RESULTADOS ===== */
.results-count {
    padding: 1rem 2rem;
    background: rgba(26, 26, 26, 0.3);
    border: 1px solid #333;
    border-radius: 4px;
    margin-bottom: 2rem;
    text-align: center;
    color: #999;
    font-size: 0.95rem;
    animation: fadeIn 0.6s ease 0.2s both;
}

.results-count #countNumber {
    color: #fff;
    font-weight: 700;
}

/* ===== GRID DE PORTAFOLIO ===== */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.portfolio-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.portfolio-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.portfolio-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 4px;
    background: #111;
    cursor: pointer;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-info {
    margin-bottom: 1rem;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.portfolio-item:hover .portfolio-info {
    transform: translateY(0);
}

.portfolio-info h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #fff;
}

.portfolio-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: #999;
}

.meta-separator {
    opacity: 0.5;
}

.btn-view-detail {
    padding: 0.75rem 1.5rem;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: opacity 0.3s, transform 0.3s;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transform: translateY(20px);
}

.portfolio-item:hover .btn-view-detail {
    transform: translateY(0);
}

.btn-view-detail:hover {
    opacity: 0.8;
}

/* ===== ESTADOS VACÍOS ===== */
.empty-state,
.no-results {
    text-align: center;
    padding: 6rem 2rem;
    color: #999;
    animation: fadeIn 0.6s ease;
}

.empty-state svg,
.no-results svg {
    margin-bottom: 2rem;
    opacity: 0.5;
}

.empty-state p,
.no-results p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.btn-reset {
    padding: 1rem 2rem;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s;
}

.btn-reset:hover {
    opacity: 0.8;
}

/* ===== MODAL DE DETALLE ===== */
.work-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.work-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
}

.modal-content {
    position: relative;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 4px;
    max-width: 1100px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 10000;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(0, 0, 0, 0.8);
    border: none;
    color: white;
    font-size: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.3s, transform 0.3s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.modal-body {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    padding: 3rem;
}

.modal-image {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    background: #000;
}

.modal-image img {
    width: 100%;
    height: auto;
    display: block;
    animation: fadeIn 0.6s ease;
}

.modal-details {
    display: flex;
    flex-direction: column;
}

.modal-details h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.modal-meta {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #333;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #999;
    font-size: 1rem;
}

.meta-item svg {
    flex-shrink: 0;
}

.meta-item span {
    color: #fff;
    font-weight: 500;
}

.modal-details p {
    color: #ccc;
    line-height: 1.8;
    margin-bottom: 2rem;
    flex: 1;
    animation: fadeInUp 0.6s ease 0.3s both;
}

.modal-actions {
    animation: fadeInUp 0.6s ease 0.4s both;
}

.btn-contact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem 2rem;
    background: #25D366;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 700;
    font-size: 1rem;
    transition: opacity 0.3s, transform 0.3s;
    width: 100%;
}

.btn-contact:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .modal-body {
        grid-template-columns: 1fr;
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .portfolio-hero h1 {
        font-size: 2.5rem;
        letter-spacing: 0.2em;
    }
    
    .portfolio-hero p {
        font-size: 1rem;
    }
    
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        min-width: 100%;
    }
    
    .btn-clear-filters {
        width: 100%;
        justify-content: center;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .modal-body {
        padding: 1.5rem;
        gap: 2rem;
    }
    
    .modal-details h2 {
        font-size: 1.8rem;
    }
    
    .modal-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
}

/* ===== SCROLLBAR PERSONALIZADO ===== */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #000;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}
