/**
 * Portfolio.css
 * Estilos específicos para la página de portafolio
 */

/* ============================================
   HERO SECTION
   ============================================ */
.portfolio-hero-section {
    padding: 200px 0 80px;
    text-align: center;
}

/* ============================================
   FILTROS SECTION
   ============================================ */
.portfolio-filters-section {
    padding: 0 0 40px;
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.portfolio-category-filters,
.portfolio-style-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.category-label {
    background: rgba(59, 167, 118, 0.2);
    color: #3BA776;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 500;
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 11;
}

.filter-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cccccc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 400;
    font-family: 'Inter', sans-serif;
}

.filter-btn:hover {
    background: rgba(59, 167, 118, 0.1);
    border-color: rgba(59, 167, 118, 0.3);
}

.filter-btn.active {
    background: rgba(59, 167, 118, 0.2);
    border-color: #3BA776;
    color: #3BA776;
}

/* ============================================
   CONTENT SECTION
   ============================================ */
.portfolio-content-section {
    padding: 0 0 60px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(350px, 100%), 1fr));
    grid-auto-rows: auto;
    gap: 25px;
    margin-bottom: 50px;
    align-items: start;
}

.portfolio-item {
    position: relative;
    background: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    height: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.portfolio-item:hover {
    border-color: rgba(59, 167, 118, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

/* ============================================
   PORTFOLIO INFO (NEW)
   ============================================ */
.portfolio-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.portfolio-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    margin: 8px 0 12px;
}

.portfolio-info p {
    font-size: 0.95rem;
    color: #cccccc;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
}

.portfolio-category-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #3BA776;
    font-weight: 600;
    display: block;
}

/* ============================================
   PORTFOLIO MEDIA
   ============================================ */
.portfolio-media {
    width: 100%;
    height: auto;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-media iframe {
    width: 100%;
    height: 100%;
    min-height: 300px;
    border: none;
    display: block;
}

.portfolio-media img {
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    background-color: rgba(26, 26, 26, 0.8);
}

/* ============================================
   FORMATOS ESPECÍFICOS
   ============================================ */
/* Formato 1:1 (cuadrado) para imágenes */
.portfolio-item.format-1-1 .portfolio-media {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-item.format-1-1 .portfolio-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Formato 9:16 (vertical) para videos */
.portfolio-item.format-9-16 .portfolio-media {
    aspect-ratio: 9 / 16;
    position: relative;
    width: 100%;
}

.portfolio-item.format-9-16 .portfolio-media iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: unset;
}

/* ============================================
   OVERLAY Y ESTADÍSTICAS
   ============================================ */
.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 30px;
    text-align: center;
    z-index: 10;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.overlay-title {
    font-size: 1.3rem;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 20px;
}

.overlay-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.overlay-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 0.85rem;
    color: #3BA776;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1rem;
    color: #ffffff;
    font-weight: 400;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #cccccc;
    font-size: 1.1rem;
}

/* ============================================
   MODAL
   ============================================ */
.portfolio-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.portfolio-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.modal-content-wrapper {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    z-index: 10001;
    overflow-y: auto;
    overflow-x: hidden;
}

.modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 10px;
    transition: all 0.3s ease;
    z-index: 10002;
}

.modal-close:hover {
    opacity: 0.7;
    transform: scale(1.1);
}

.modal-content {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 167, 118, 0.2);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    max-width: 1200px;
    width: 100%;
    margin: 20px auto;
}

.modal-media {
    width: 100%;
    margin-bottom: 24px;
}

.modal-media iframe {
    width: 100%;
    height: 600px;
    border: none;
    border-radius: 12px;
}

.modal-media img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
    object-fit: contain;
}

/* Formato 9:16 (vertical) para videos en el modal */
.modal-media.format-9-16 {
    max-width: 400px;
    margin: 0 auto 24px;
    aspect-ratio: 9 / 16;
    position: relative;
}

.modal-media.format-9-16 iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

/* Formato 1:1 (cuadrado) para imágenes en el modal */
.modal-media.format-1-1 {
    max-width: 600px;
    margin: 0 auto 24px;
    aspect-ratio: 1 / 1;
}

.modal-media.format-1-1 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 500;
    color: #ffffff;
    margin: 0;
}

.modal-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.modal-stat {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    background: rgba(59, 167, 118, 0.1);
    border: 1px solid rgba(59, 167, 118, 0.2);
    border-radius: 12px;
}

.modal-stat .stat-label {
    font-size: 0.85rem;
    color: #3BA776;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-stat .stat-value {
    font-size: 1.1rem;
    color: #ffffff;
    font-weight: 400;
}

/* ============================================
   MEDIA QUERIES
   ============================================ */
@media (max-width:968px) {
    .portfolio-hero-section {
        padding: 180px 0 60px;
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
    }

    .modal-content {
        padding: 24px;
    }

    .modal-media iframe {
        height: 400px;
    }

    .modal-media.format-9-16 {
        max-width: 300px;
    }

    .modal-media.format-1-1 {
        max-width: 400px;
    }

    .modal-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }

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

@media (max-width:640px) {
    .portfolio-hero-section {
        padding: 160px 0 50px;
    }

    .portfolio-filters {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .portfolio-item {
        height: auto;
    }

    .portfolio-media iframe {
        min-height: 250px;
    }

    .portfolio-item.format-9-16 .portfolio-media iframe {
        min-height: unset;
    }

    .portfolio-media img {
        height: auto;
    }

    .overlay-title {
        font-size: 1.1rem;
    }

    .overlay-stats {
        gap: 10px;
    }

    .modal-content-wrapper {
        max-width: 95vw;
    }

    .modal-close {
        top: -40px;
        right: 0;
    }

    .modal-content {
        padding: 20px;
    }

    .modal-media iframe {
        height: 250px;
    }

    .modal-media.format-9-16 {
        max-width: 250px;
    }

    .modal-media.format-9-16 iframe {
        height: 100%;
    }

    .modal-media.format-1-1 {
        max-width: 300px;
    }

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

    .modal-stat {
        padding: 12px;
    }

    .modal-stat .stat-value {
        font-size: 1rem;
    }
}