/* === MAIN === */

.head-container {
    display: flex;
    justify-content: center;
}

.page-head {
    width: 100%;
    max-width: 1200px;
    color: #fff;
    background: #c28298d0;
    padding: 60px 60px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    margin-bottom: 40px;
}

.page-head img {
    width: 120px;
    height: auto;
    margin-bottom: 15px;
}

.page-head h1 {
    margin: 10px 0 5px;
    font-size: 2em;
}

.page-head p {
    color: #ffffff;
    max-width: 600px;
    margin: 0 auto;
}

main {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    width: 100%;
    padding: 20px;
}

.section {
    margin: 40px auto;
    width: 90%;
    color: #fff;
    background: #c28298d0;
    border-radius: 10px;
    padding: 30px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    text-align: left;
}

.section-header h2 {
    margin: 0;
    font-size: 1.5em;
}

.section-header a {
    background: #111827;
    color: #fff;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

.section-header a:hover {
    background: #111827;
}

/* === EVENTS === */

.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); 
    gap: 20px;              
    width: 100%;
    margin: 0 auto;
}

.event-card {
    position: relative;
    perspective: 1000px;
    cursor: pointer;
    aspect-ratio: 3 / 4;
    height: 400px;
    --bg: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
    border: 2px solid transparent;
    border-radius: 10px;
}

.event-card:hover {
    transform: scale(1.05);
    border-color: rgba(255, 105, 180, 0.6);
    box-shadow: 0 0 10px 2px rgba(255, 105, 180, 0.4);
}

.event-inner {
    position: relative;
    width: 100%;
    height: 100%; 
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.event-card.flipped .event-inner {
    transform: rotateY(180deg);
}

.event-front,
.event-back {
    position: absolute;
    width: 100%;
    height: 400px; 
    border-radius: 10px;
    backface-visibility: hidden;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.event-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    transition: filter 0.3s;
}

.event-card:hover .event-front img {
    filter: brightness(1.1);
}

.event-back {
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 15px;
    text-align: center;
    background: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8)), var(--bg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
}

.event-back h3 {
    margin: 10px 0 5px;
    font-size: 1.1em;
    z-index: 1;
}

.event-back p {
    font-size: 0.9em;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;     
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    z-index: 1;
}

.event-back a {
    margin-top: 10px;
    color: #fff;
    text-decoration: underline;
    font-weight: bold;
    z-index: 1;
}

/* === NANIMOS === */

.nanimos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  width: 100%;
  margin: 30px auto;
}

.nanimo-card {
  aspect-ratio: 3 / 4;
  width: 300px;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  border: 2px solid transparent;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
}

.nanimo-card:hover {
  transform: scale(1.05);
  border-color: rgba(255, 105, 180, 0.6);
  box-shadow: 0 0 10px 2px rgba(255, 105, 180, 0.4);
}

.nanimo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 10px;
}

/* responsive */
@media (max-width: 800px) {
    .sidebar {
        width: 200px;
    }

    .event-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}
