/* --- ESTILO GENERAL --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #e9ecef; 
    color: #000;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- HEADER Y NAV  --- */
.blog-header {
    background-color: #fff; 
    text-align: center;
    padding: 10px 20px 0 20px;
}

.blog-logo {
    max-width: 600px;
    width: 100%;
}

.tagline {
    font-size: 15px;
    color: #666;
    margin: -10px 0 20px 0;
}

.blog-nav {
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 12px 0;
}

.blog-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.blog-nav a {
    text-decoration: none;
    color: #3498db;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.blog-nav a.active {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
}

/* --- CUERPO DE POSTS  --- */
.blog-content {
    flex: 1;
    max-width: 800px;
    margin: 20px auto;
    padding: 0 15px;
    width: 100%;
}

.post-bubble {
    background-color: #fff; 
    border-radius: 10px;   
    padding: 15px 20px;
    margin-bottom: 12px;    
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.post-title {
    font-weight: bold;
    font-size: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee; 
    margin-bottom: 12px;
}

.post-text {
    font-size: 12.5px;
    margin-bottom: 8px;
}

.post-image {
    margin: 15px 0;
}

.post-image img {
    width: 100%;
    border-radius: 5px;
    display: block;
}

.post-author {
    font-size: 13px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee; 
    margin-bottom: 12px;
}

.post-date {
    font-size: 13px;
    color: #99aab5; 
}

/* --- FOOTER --- */
.blog-footer {
    text-align: center;
    padding: 30px;
    color: #888;
    font-size: 12px;
}

/* --- OVERLAY DE BLUR  --- */
.blur-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.15);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 50;
}

.blur-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto; 
}


.post-bubble {
    position: relative;
    z-index: 1;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-bubble.active {
    transform: scale(1.04);
    box-shadow: 0 10px 28px rgba(0,0,0,0.25);
    z-index: 51; 
}

/* --- RESPONSIVE --- */
@media (max-width: 600px) {
    .blog-nav ul { gap: 10px; }
}
/* ========================= */
/* SCROLL TOP */
/* ========================= */

#scrollTop {
    position: fixed;

    right: 30px;
    bottom: 30px;

    width: 60px;
    height: 60px;

    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.45);

    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);

    color: #000;

    font-size: 20px;
    font-weight: 400;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateY(10px);

    transition:
        opacity 0.4s ease,
        transform 0.4s ease,
        visibility 0.4s ease;
}

/* APARECE AL HACER SCROLL */

#scrollTop.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform: translateY(0);
}

/* HOVER */

#scrollTop:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.65);
}

/* MOBILE */

@media (max-width: 600px) {

    #scrollTop {
        width: 50px;
        height: 50px;

        right: 20px;
        bottom: 20px;

        font-size: 18px;
    }

}

/* ========================= */
/* GALERÍA (MASONRY)         */
/* ========================= */

.gallery-content {
    flex: 1;
    width: 100%;
    max-width: 1100px;
    margin: 20px auto;
    padding: 0 15px;
}

/* Masonry con columnas CSS: cada foto conserva su proporción original */
.gallery-grid {
    column-count: 4;
    column-gap: 15px;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 15px;
}

.gallery-item img {
    display: block;
    width: 100%;
    height: auto;       /* respeta el tamaño natural de cada foto */
}

/* Celular: 2 columnas */
@media (max-width: 600px) {
    .gallery-content {
        padding: 0 10px;
    }

    .gallery-grid {
        column-count: 2;
        column-gap: 10px;
    }

    .gallery-item {
        margin-bottom: 10px;
    }
}


/* ========================= */
/* LIGHTBOX                  */
/* ========================= */

.gallery-item {
    overflow: hidden;   /* el zoom queda dentro del marco de la foto */
}

.gallery-item img {
    cursor: pointer;
    transition: transform 0.4s ease;
}

/* Solo en dispositivos con mouse (en el celular no queda "pegado") */
@media (hover: hover) {
    .gallery-item:hover img {
        transform: scale(1.06);
    }
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;

    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;

    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.lightbox-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    cursor: default;
    transform: scale(0.96);
    transition: transform 0.25s ease;
}

.lightbox.active .lightbox-img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 20px;

    width: 44px;
    height: 44px;

    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;

    font-size: 30px;
    line-height: 1;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: background 0.2s ease;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
    background: rgba(255, 255, 255, 0.3);
}

/* Bloquea el scroll de fondo mientras la foto está abierta */
body.lightbox-open {
    overflow: hidden;
}


/* ========================= */
/* INFO AL PASAR EL MOUSE    */
/* ========================= */

.gallery-item {
    position: relative;   /* para ubicar el texto sobre la foto */
}

.gallery-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;

    display: flex;
    align-items: center;
    gap: 10px;

    padding: 45px 14px 14px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
    color: #fff;

    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;

    pointer-events: none;   /* el clic pasa a la foto y abre el lightbox */
}

.gallery-rating {
    width: 34px;
    height: auto;
    flex-shrink: 0;
}

/* Anula el zoom/cursor de las fotos grandes para el ícono */
.gallery-item .gallery-rating {
    width: 34px;      /* pisa el width:100% de las fotos */
    height: auto;
    cursor: default;
    transform: none;
}

.gallery-caption-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.gallery-caption-title {
    font-size: 15px;
    font-weight: bold;
}

.gallery-caption-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
}

@media (hover: hover) {
    .gallery-item:hover .gallery-caption {
        opacity: 1;
        transform: translateY(0);
    }

    /* El ícono de clasificación no debe agrandarse con el zoom de la foto */
    .gallery-item:hover .gallery-rating {
        transform: none;
    }
}

  .post-link {
      color: #099721;
      font-weight: bold;
      text-decoration: underline;
  }