/* Reset and Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: #fff;
  color: #333;
  padding: 20px;
}

/* Header */
.month-header {
  text-align: center;
  margin-bottom: 20px;
}

.month-header h2 {
  font-size: 1.6rem;
  color: #FFC60C;
    font-weight: 500;
    text-align: center;
}


/* Tabs Container */
.tabs-container {
  display: flex;
  justify-content: center; 
  margin-bottom: 20px;
  width: 100%;
}

/* Tabs Wrapper */
.tabs {
  display: flex;
  flex-wrap: wrap; 
  justify-content: center; 
  gap: 8px; 
  max-width: 1140px;
  width: 100%;
}

/* Individual Tab Button */
.tab-button {
  padding: 8px 20px;
  background: #f5f5f5;
  border: none;
  cursor: pointer;
  border-radius: 2px;
  font-size: 1rem;
  transition: all 0.3s ease;
  min-width: 100px; 
  text-align: center;
}

.tab-button.active,
.tab-button:hover {
  background: #FFC60C;
  color: #000;
}


/* Tab Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Tile Grid */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); 
  gap: 10px;
  max-width: 1140px;
  margin: 0 auto;
  justify-items: center;
}

/* Individual Tile */
/* Tile with 3D flip */
.tile {
  width: 100%;
  max-width: 350px;
  position: relative;
  height: 450px;
  border-radius: 1px;
  overflow: visible; /* inner faces handle overflow */
  background-size: cover;
  background-position: center;
  cursor: pointer;
  perspective: 1200px; /* enable 3D space */
}

.tile:hover {
  transform: none; /* scale removed to avoid interfering with flip */
}

/* The flipping inner wrapper */
.tile-inner {
  position: absolute;
  inset: 0;
  transition: transform 0.7s ease;
  transform-style: preserve-3d;
  border-radius: inherit;
}

.tile:hover .tile-inner,
.tile:focus-within .tile-inner {
  transform: rotateY(180deg);
}

.tile-front,
.tile-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
}

.tile-front {
  z-index: 2;
}

.tile-back {
  transform: rotateY(180deg);
  z-index: 1;
}

/* Front face: centered title and a subtle "more" hint */
.tile-front h3 {
  color: #FFC60C;
  font-size: 1.4rem;
  text-align: center;
  padding: 0 10px;
}

.tile-front .more {
  margin-top: 8px;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.95);
  background: rgba(0,0,0,0.35);
  padding: 6px 10px;
  border-radius: 12px;
  text-transform: lowercase;
  opacity: 0.95;
}


/* Gradient Shadow - from bottom to top */
.tile .overlay {
  /* overlay will be cloned into faces by JS; keep a low-impact style in case */
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(60, 60, 60, 1),
    rgba(60, 60, 60, 1),
    rgba(60, 60, 60, 0.2),
    rgba(60, 60, 60, 0)
  );
  z-index: 0; /* keep overlay beneath face content */
  pointer-events: none;
}


/* Date Badge */
.date-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  padding: 6px 12px;
  font-size: 0.9rem;
  font-weight: bold;
  border-radius: 2px;
  z-index: 2;
}

/* Content at Bottom */
.tile-back .tile-content {
  /* when .tile-content is moved into the back face this keeps the original layout */
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 15px;
  color: #000000;
  z-index: 2;
}

.tile-content h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
    color: #FFC60C;
}

.tile-content p {
  font-size: 0.8rem;
  margin-bottom: 10px;
  line-height: 1.4;
}

.tile-content li{
  font-size: 0.8rem;
  margin-bottom: 10px;
  line-height: 1.4;
}

/* ensure face text appears above overlays */
.tile-front h3,
.tile-front .more,
.tile-back .tile-content,
.tile-back .date-badge {
  position: relative;
  z-index: 2;
}


.tile-content .location {
  font-size: 0.8rem;
  opacity: 0.9;
}

/* No Data Message */
.no-data {
  text-align: center;
  font-size: 1rem;
  color: #777;
  padding: 40px 0;
}

/* =========================
   Grouped tile styles
   ========================= */

.grouped-tile {
  display: flex;
  gap: 20px;
  background: #f5f5f5;
  border-radius: 2px;
  overflow: hidden;
  min-height: 350px;
  width: 100%;
  align-items: stretch;
  grid-column: span 4;  
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

/* left image*/
.grouped-image {
  width: 565px;
  min-width: 300px;
  background-size: cover;
  background-position: center;
  position: relative;
}

/* right content */
.grouped-content {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  z-index: 2;
}

.grouped-content h3 {
  font-size: 1.45rem;
  color: #FFC60C;
  margin-bottom: 14px;
}

.description-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.description-list li {
  margin-bottom: 10px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #333;
}

.grouped-content .location {
  margin-top: 12px;
  font-size: 0.9rem;
  color: #555;
}


/* Responsive Fix */
@media (max-width: 480px) {
  .date-badge {
    font-size: 0.8rem;
    padding: 4px 8px;
  }

  .tile-content h3 {
    font-size: 1rem;
  }

  .tile-content p {
    font-size: 0.85rem;
  }

  .tile-grid {
    grid-template-columns: 1fr; 
  }

  .grouped-tile {
    grid-column: span 1;
    flex-direction: column;
  }

  .grouped-image {
    width: 100%;
    min-width: auto;
    height: 250px;
  }

  .grouped-content {
    padding: 16px;
  }
}
