html,
body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

.content-wrap {
    flex: 1 0 auto;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f0f2f5;
}

.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, .1);
}

.navbar-brand {
    font-weight: 600;
    color: #0d6efd !important;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

#gallery .col-md-4 {
    overflow: hidden;
    height: auto;
    margin-bottom: 1.5rem;
}

#gallery img,
#gallery video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .2s;
    cursor: pointer;
}

#gallery img:hover,
#gallery video:hover {
    transform: scale(1.05);
}

.gallery-item-title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, .5);
    color: #ffffff;
    padding: 5px;
    font-size: 14px;
    text-align: center;
    opacity: 0;
    transition: opacity .2s;
}

#gallery .col-md-4 a:hover .gallery-item-title {
    opacity: 1;
}

.gallery-item-description {
    padding: 10px;
    font-size: 12px;
    color: #6c757d;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}


#loader {
    margin-top: 50px;
}

footer {
    background-color: #ffffff !important;
    color: #000000 !important;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, .1);
}

.gallery-item {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Contenedor de la imagen o video */
.gallery-media-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.gallery-media-wrapper img,
.gallery-media-wrapper video {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.gallery-media-wrapper:hover img,
.gallery-media-wrapper:hover video {
    transform: scale(1.05);
}

/* Título superpuesto */
.gallery-item-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 14px;
    text-align: center;
    padding: 6px 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.delete-button {
    display: block;
    margin: 0 auto 10px auto;
}

.edit-button {
    display: block;
    margin: 0 auto 10px auto;
}

.empty-gallery,
.end-of-results {
    padding: 40px 0;
    color: #6c757d;
}

.empty-gallery-icon,
.end-of-results-icon {
    margin-bottom: 20px;
}

.empty-gallery h3,
.end-of-results h4 {
    font-weight: 600;
    color: #495057;
}

@media (min-width: 992px) {
    .gallery-media-wrapper {
        height: 250px;
    }
}

@media (max-width: 576px) {
    .gallery-media-wrapper {
        height: 180px;
    }
}

/* === Estilos para el modal de vista === */
#viewModal .modal-dialog {
    max-width: 900px;
    /* Ajusta el tamaño máximo del modal */
    margin: 1.75rem auto;
}

#viewModal .modal-body {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000;
    /* fondo negro para resaltar el contenido */
    padding: 0;
    height: 70vh;
    /* altura del modal visible: 70% de la pantalla */
    overflow: hidden;
}

#viewModal .modal-body img,
#viewModal .modal-body video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    /* mantiene proporción sin recortar */
    border-radius: 8px;
    background-color: #000;
}

.modal-backdrop.show {
    opacity: 0.9;
    background-color: rgba(0, 0, 0, 0.85);
}

#devInfo {
    text-decoration: underline;
}

#devInfo:hover {
    font-weight: bolder;
    cursor: pointer;
}

.idOnlyRead{
    background-color: #dfdfdf;
}

.idOnlyRead:focus{
    background-color: #dfdfdf;
}

.imgInfo{
    box-shadow: horizontal-offset vertical-offset blur-radius spread-radius color;
}

/* ===========================
   SIDEBAR MOBILE
   =========================== */
   .sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 260px;
    height: 100vh;
    background: #ffffff;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    transition: all 0.35s ease;
    z-index: 9999;
    padding: 20px;
    overflow-y: auto;
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

/* Dark overlay */
#sidebarOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: none;
    z-index: 9990;
}

#sidebarOverlay.active {
    display: block;
}

/* Ocultar sidebar en escritorio */
@media (min-width: 992px) {
    .sidebar {
        display: none;
    }
}

