@import url('fonts/fonts.css');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Univers Next Pro', sans-serif;
    background: radial-gradient(circle at 50% 0%, #2a2a2a 0%, #1a1a1a 100%);
    color: #f2f2f2;
    min-height: 100vh;
}

header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    background: rgba(26, 26, 26, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.title-img {
    background-image: url('/img/6467ed3c-d58b-4279-8867-6ae0c731bfc1_rwc_0x2278x4500x1188x4096.png');
    background-size: cover;
    width: 320px;
    height: 80px;
    margin-right: 20px;
    border-radius: 6px;
    transition: opacity 0.3s ease;
}

.title-img:hover {
    opacity: 0.85;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 32px;
}

nav li {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

nav a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 400;
    transition: color 0.3s ease;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}

nav a:hover {
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, 0.4);
}

nav a.active {
    color: #ffffff;
    border-bottom-color: #ffffff;
}

main {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 500px) {
    main {
        grid-template-columns: 1fr;
    }
}

.project-card {
    position: relative;
    width: 100%;
    height: 450px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    transform: translateY(-4px);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(18, 18, 18, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 32px;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .card-overlay {
    opacity: 1;
}

.card-content h2 {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.3px;
    margin-bottom: 10px;
    line-height: 1.2;
}

.card-content p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.5;
    max-width: 320px;
    margin: 0 auto;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .card-img {
    transform: scale(1.04);
}

body.about-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.about-page main {
    display: flex;
    max-width: none;
}

#about {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 700px;
    margin: 60px auto;
    padding: 48px;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
}

#about p {
    font-size: 15px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.7);
}

#about .divider {
    color: rgba(255, 255, 255, 0.15);
    letter-spacing: 0.4em;
    text-align: center;
    font-size: 12px;
    user-select: none;
}

#about .email-link {
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    transition: border-color 0.3s ease;
}

#about .email-link:hover {
    border-bottom-color: #ffffff;
}

/* ==========================================================================
   Sección: Login Administrativo (Glassmorphism & Mobile-First)
   ========================================================================== */

.login-page {
    background: radial-gradient(circle at center, #2a2a2a 0%, #121212 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.login-header {
    display: flex;
    justify-content: center;
    border-bottom: none;
    padding: 0;
}

.login-logo {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 4px;
    color: #ffffff;
    text-transform: uppercase;
    text-align: center;
    border-bottom: 2px solid #ffffff;
    padding-bottom: 4px;
    transition: opacity 0.3s ease;
}

.login-logo:hover {
    opacity: 0.8;
}

.login-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.login-card h1 {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.5px;
    text-align: center;
}

.login-subtitle {
    font-size: 14px;
    color: #a0a0a0;
    text-align: center;
    margin-top: -20px;
    line-height: 1.5;
}

#login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 13px;
    font-weight: 600;
    color: #cccccc;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.input-group input {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 12px 16px;
    font-family: 'Univers Next Pro', sans-serif;
    font-size: 15px;
    color: #ffffff;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
    outline: none;
}

.input-group input:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

.input-group input:focus {
    border-color: #ffffff;
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.btn-primary {
    background-color: #ffffff;
    color: #121212;
    border: 1px solid #ffffff;
    border-radius: 8px;
    padding: 14px;
    font-family: 'Univers Next Pro', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.btn-primary:hover {
    background-color: transparent;
    color: #ffffff;
}

.btn-primary:active {
    transform: scale(0.98);
}

.error-container {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13.5px;
    line-height: 1.4;
    text-align: center;
}

.login-footer {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.back-link {
    font-size: 13px;
    color: #a0a0a0;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #ffffff;
}

/* Spinner animado para indicar carga */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(18, 18, 18, 0.2);
    border-top-color: #121212;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn-primary:hover .spinner {
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ffffff;
}

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

/* Modo Editor - Estilos del banner de administración */
.admin-banner {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    padding: 10px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 500;
}

.admin-banner a, .admin-banner button {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-banner button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   Sección: Play Icon & Tarjetas de Video
   ========================================================================== */

.project-card.has-video {
    cursor: pointer;
}

.play-icon {
    font-size: 20px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 2px solid #ffffff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 16px;
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    /* Centrar en el flujo de la tarjeta */
    margin-left: auto;
    margin-right: auto;
}

.project-card:hover .play-icon {
    transform: scale(1.15);
    background-color: #ffffff;
    color: #121212;
    box-shadow: 0 12px 32px rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   Sección: Lightbox Modal Unificado (Vimeo & Imágenes)
   ========================================================================== */

.lightbox-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.lightbox-close {
    position: fixed;
    top: 28px;
    right: 36px;
    font-size: 36px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    user-select: none;
    line-height: 1;
    z-index: 2100;
}

.lightbox-close:hover {
    color: #ffffff;
    transform: scale(1.1);
}

.lightbox-content {
    width: 90%;
    max-width: 1100px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
    border-radius: 12px;
    overflow: hidden;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.lightbox-video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

.lightbox-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.image-lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
}

/* ==========================================================================
   Sección: Skeleton Loaders (Esqueletos de Carga de Proyectos)
   ========================================================================== */

.project-card.skeleton {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    flex-direction: column;
    pointer-events: none;
    overflow: hidden;
    height: 450px;
    position: relative;
    border-radius: 12px;
}

.skeleton-img {
    flex-grow: 1;
    background: linear-gradient(90deg, rgba(255,255,255,0.015) 25%, rgba(255,255,255,0.04) 50%, rgba(255,255,255,0.015) 75%);
    background-size: 200% 100%;
    animation: loadingPulse 1.5s infinite;
}

.skeleton-text {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(0, 0, 0, 0.15);
}

.skeleton-title {
    height: 20px;
    width: 60%;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    animation: loadingPulse 1.5s infinite;
}

.skeleton-desc {
    height: 14px;
    width: 90%;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
    animation: loadingPulse 1.5s infinite;
}

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

/* ==========================================================================
   Sección: Controles CRUD (Borrado e Inserción de Proyectos)
   ========================================================================== */

/* Botón de eliminación flotante en las tarjetas */
.delete-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 100;
    background: rgba(239, 68, 68, 0.95);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: none; /* Controlado por JS, se muestra en body.editor-mode */
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
}

body.editor-mode .delete-btn {
    display: flex;
}

.delete-btn:hover {
    background: #ef4444;
    transform: scale(1.12);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

.delete-btn:active {
    transform: scale(0.95);
}

/* Animación de eliminación de tarjeta */
.project-card.fade-out {
    opacity: 0;
    transform: scale(0.9) translateY(10px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Drag & Drop en modo editor */
.project-card.dragging {
    opacity: 0.35;
    border-color: rgba(255, 255, 255, 0.25);
    transform: scale(0.95);
    transition: all 0.2s ease;
}

.project-card.drag-over {
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25), 0 12px 32px rgba(0, 0, 0, 0.5);
    transform: translateY(-4px);
}

/* Modal del Formulario de Proyectos */
.form-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(18, 18, 18, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 60px 20px;
    overflow-y: auto;
}

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

.form-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 30px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 24px;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-modal.active .form-card {
    transform: translateY(0);
}

.form-card h2 {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 10px;
}

.btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px 20px;
    font-family: 'Univers Next Pro', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.4);
}

.form-card textarea {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 12px 16px;
    font-family: 'Univers Next Pro', sans-serif;
    font-size: 15px;
    color: #ffffff;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
    outline: none;
    resize: vertical;
    min-height: 100px;
}

.form-card textarea:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

.form-card textarea:focus {
    border-color: #ffffff;
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

/* ============================================================
   PÁGINA DE DETALLE DE PROYECTO (project.html)
   ============================================================ */

body.detail-page main {
    display: block;
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

.detail-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 50vh;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.detail-header {
    margin-bottom: 56px;
    text-align: center;
}

.detail-header .back-link {
    display: inline-block;
    font-size: 12px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 32px;
    transition: color 0.3s ease;
}

.detail-header .back-link:hover {
    color: #ffffff;
}

.detail-title-block {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 40px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    text-align: center;
}

.detail-title-block h1 {
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 16px;
    color: #ffffff;
}

.detail-description {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.7;
    text-align: center;
    max-width: 680px;
    margin: 0 auto;
}

/* Galería de imágenes: 2 columnas en desktop */
.detail-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

@media (max-width: 600px) {
    .detail-gallery {
        grid-template-columns: 1fr;
    }
}

.gallery-item {
    overflow: hidden;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
    line-height: 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.gallery-item.gallery-video {
    line-height: normal;
    background: #000;
}

.gallery-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: zoom-in;
}

.gallery-img:hover {
    transform: scale(1.03);
}

/* Videos de detalle */
.detail-video-wrapper {
    position: relative;
    padding-bottom: 125%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ============================================================
   ÁREA DE UPLOAD CON DRAG & DROP
   ============================================================ */

.upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.15);
    min-height: 120px;
}

.upload-area.drag-over {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.05);
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.upload-icon {
    font-size: 32px;
    margin-bottom: 4px;
    display: block;
}

.upload-placeholder p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.upload-link {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    padding: 0;
}

.upload-link:hover {
    color: rgba(255, 255, 255, 0.75);
}

.upload-hint {
    font-size: 12px !important;
    color: rgba(255, 255, 255, 0.35) !important;
}

/* Filas de inputs de video dinámicos */
.vimeo-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.vimeo-input-row input {
    flex: 1;
    margin-bottom: 0;
}

.vimeo-remove-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 120, 120, 0.7);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
}

.vimeo-remove-btn:hover {
    color: #ff6b6b;
    border-color: rgba(255, 100, 100, 0.4);
    background: rgba(255, 80, 80, 0.1);
}

.add-vimeo-link {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    padding: 0;
    margin-top: 4px;
    display: inline-block;
}

.add-vimeo-link:hover {
    color: rgba(255, 255, 255, 0.75);
}

/* Grid de previews de archivos seleccionados */
.upload-previews {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
}

.preview-item {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    aspect-ratio: 1;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.preview-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    font-size: 10px;
    padding: 3px 4px;
    background: rgba(0, 0, 0, 0.7);
    color: rgba(255, 255, 255, 0.75);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: rgba(200, 0, 0, 0.85);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.2s ease;
}

.preview-remove:hover {
    background: rgb(200, 0, 0);
}

.preview-add-more {
    aspect-ratio: 1;
    border-radius: 6px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-add-more button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    cursor: pointer;
    padding: 4px;
    text-align: center;
    transition: color 0.2s ease;
}

.preview-add-more button:hover {
    color: #ffffff;
}

/* ============================================================
   RESPONSIVE & UTILIDADES
   ============================================================ */

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
    }

    .title-img {
        width: 240px;
        height: 60px;
        margin-right: 0;
    }

    nav ul {
        gap: 20px;
    }

    #about {
        margin: 24px 16px;
        padding: 28px 20px;
    }
}

@media (max-width: 480px) {
    .title-img {
        width: 180px;
        height: 46px;
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
    }

    nav li {
        font-size: 11px;
    }
}

/* Estado vacío unificado */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.45);
}

.empty-state h2 {
    font-size: 18px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
}

