.avisos-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

#avisos-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- Post-it estilo --- */
.postit-aviso {
    position: relative;
    width: 200px;
    min-height: 180px;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 6px 10px rgba(0,0,0,0.25);
    transform: rotate(-2deg);
    font-family: "Comic Sans MS", cursive, sans-serif;
    transition: transform 0.2s ease;
    background-color: #fff9b3; /* amarillo pastel claro fijo */
}

.postit-aviso:hover {
    transform: rotate(0deg) scale(1.05);
    z-index: 10;
}

.postit-pin {
    background: url('https://avisopolis.cl/wp-content/uploads/2025/11/logo_avisopolis_transparencia_150.png') no-repeat center;
    background-size: contain;
    width: 30px;
    height: 30px;
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
}

.postit-titulo {
    font-weight: bold;
    margin-top: 15px;
    font-size: 16px;
}

.postit-contenido {
    margin-top: 8px;
    font-size: 14px;
}

.postit-stars {
    position: absolute;
    bottom: 10px;
    right: 10px;
    color: gold;
    cursor: pointer;
    font-size: 16px;
}

.star {
    display: inline-block;
    opacity: 0.4;
}

.star.filled {
    opacity: 1;
}

.postit-stars .star {
    display: inline-block;
    opacity: 0.4;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3); /* Sombra sutil */
}

.postit-stars .star.filled {
    opacity: 1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.4); /* Sombra más marcada para las estrellas llenas */
}


/* --- Botón al pie --- */
.load-more-container {
    width: 100%;
    text-align: center;
    margin: 30px 0 10px;
}

.clearfix {
    flex-basis: 100%;
    height: 0;
}

.wishlist-icon {
    position: absolute;
    top: 5px;
    left: 5px;
    font-size: 20px;
    cursor: pointer;
    color: #e74c3c;
    transition: transform 0.2s ease;
    z-index: 5;
}

.wishlist-icon:hover {
    transform: scale(1.2);
}

#load-more-avisos {
    background-color: #ffcc00;
    border: none;
    border-radius: 8px;
    padding: 10px 25px;
    font-weight: bold;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

#load-more-avisos:hover:not(:disabled) {
    background-color: #ffd633;
    transform: scale(1.05);
}

#load-more-avisos:disabled {
    background-color: #e6e6e6;
    color: #888;
    cursor: not-allowed;
    transform: none;
}

/* --- Popup emergente --- */
#avisos-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 99999;
    justify-content: center;
    align-items: center;
}

#avisos-popup .popup-content {
    background: #fffbea;
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    text-align: center;
    font-size: 16px;
    font-family: "Comic Sans MS", cursive, sans-serif;
}

#avisos-popup button {
    margin-top: 15px;
    background-color: #ffcc00;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
}

/* Vista individual del aviso (entrada única) */
body.single-aviso .postit-aviso {
    width: 80vw;                /* Ancho máximo 80% del dispositivo */
    height: 80vw;               /* Alto igual al ancho para hacerlo cuadrado */
    max-width: 800px;           /* Limitar ancho máximo absoluto */
    max-height: 800px;          /* Limitar alto máximo absoluto */
    margin: 20px auto;          /* Centrado horizontal */
    /* transform: rotate(-2deg); */ /* Se elimina para que JS maneje rotación */
    z-index: 20;                /* Encima de otros elementos */
    overflow-y: auto;           /* Scroll vertical si el contenido es largo */
    overflow: visible;  
    box-sizing: border-box;     /* Evitar que padding aumente el tamaño */
    transition: transform 0.2s ease; /* Suavizar rotación al enderezar */
}

/* Ajustes internos para vista individual */
body.single-aviso .postit-titulo {
    font-size: 1.5em;
}

body.single-aviso .postit-contenido {
    font-size: 1.2em;
    overflow: visible;
    max-height: none;    
}

