* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #581c87 50%, #0f172a 100%);
  background-attachment: fixed;
  color: #e2e8f0;
  line-height: 1.8;
}

.hero-image {
  width: 100%;
  height: 60vh;
  object-fit: cover;
  display: block;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem 5rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  min-height: 100vh;
}

.date-header {
  text-align: center;
  padding: 3rem 0 2rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 3rem;
}

.date-header h1 {
  font-size: 2.5rem;
  color: #ffffff;
  margin-bottom: 0.5rem;
  font-weight: 400;
  letter-spacing: -0.5px;
}

.date-header .location {
  font-size: 1.25rem;
  color: #cbd5e1;
  font-style: italic;
}

.entry-section {
  margin-bottom: 4rem;
}

.entry-text {
  font-size: 1.125rem;
  color: #e2e8f0;
  margin-bottom: 2rem;
  text-align: justify;
}

.entry-text:first-letter {
  font-size: 3.5rem;
  font-weight: bold;
  float: left;
  line-height: 1;
  margin: 0 0.1em 0 0;
  color: #ffffff;
}

.entry-text-indent {
  display: block;
  margin-left: 1.5rem;
}

.image-full {
  width: 100%;
  border-radius: 0.5rem;
  margin: 2rem 0;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

.image-caption {
  text-align: center;
  font-size: 0.95rem;
  color: #cbd5e1;
  font-style: italic;
  margin-top: 0.75rem;
  margin-bottom: 2rem;
}

.split-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin: 3rem 0;
  align-items: center;
}

@media (min-width: 768px) {
  .split-section {
    grid-template-columns: 1fr 1fr;
  }

  .split-section.reverse {
    direction: rtl;
  }

  .split-section.reverse > * {
    direction: ltr;
  }
}

.split-section img {
  width: 100%;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

.split-text {
  font-size: 1.125rem;
  color: #e2e8f0;
  text-align: justify;
}

.split-text:first-letter {
  font-size: 3rem;
  font-weight: bold;
  float: left;
  line-height: 1;
  margin: 0 0.1em 0 0;
  color: #ffffff;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 300px;
  gap: 1rem;
  margin: 3rem 0;
  grid-auto-flow: dense;
}

.photo-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.3s;
  display: block;
}

.photo-grid img:hover {
  transform: scale(1.03);
}

/* Aspect ratio classes for flexible layout */
.photo-grid .portrait {
  grid-row: span 2;
}

.photo-grid .landscape {
  grid-row: span 1;
}

.photo-grid .square {
  grid-row: span 2;
  object-fit: contain;
}

@media (max-width: 768px) {
  .photo-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 220px;
  }

  .photo-grid .portrait,
  .photo-grid .square {
    grid-row: span 1;
    object-fit: cover;
  }
}

/* Base highlight box styling */
.highlight-box {
  padding: 2rem;
  border-radius: 0.5rem;
  margin: 3rem 0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  border-left: 4px solid;
}

.highlight-box h3 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.highlight-box p {
  font-size: 1.125rem;
}

/* Day's Highlights - Green/Emerald theme */
.highlight-box.alt {
  background: rgba(16, 185, 129, 0.1);
  border-left-color: #10b981;
}

.highlight-box.alt h3 {
  color: #34d399;
}

.highlight-box.alt p {
  color: #d1fae5;
}

/* Travel Tip - Blue/Cyan theme */
.highlight-box.travel-tip {
  background: rgba(6, 182, 212, 0.1);
  border-left-color: #06b6d4;
}

.highlight-box.travel-tip h3 {
  color: #22d3ee;
}

.highlight-box.travel-tip p {
  color: #cffafe;
}

/* Fact of the Day - Purple/Violet theme */
.highlight-box.fact {
  background: rgba(139, 92, 246, 0.1);
  border-left-color: #8b5cf6;
}

.highlight-box.fact h3 {
  color: #a78bfa;
}

.highlight-box.fact p {
  color: #ede9fe;
}

/* Distance - Small subtle box with nearly invisible styling */
.highlight-box.distance {
  background: rgba(51, 65, 85, 0.05);
  border-left-color: #52525b;
  padding: 0.75rem 1.5rem;
  margin: 2rem 0;
}

.highlight-box.distance h3 {
  color: #94a3b8;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.highlight-box.distance p {
  color: #cbd5e1;
  font-size: 0.95rem;
  margin: 0;
}

/* Keep the pink/rose as default for any unclassified highlight boxes */
.highlight-box:not(.alt):not(.travel-tip):not(.fact) {
  background: rgba(244, 114, 182, 0.1);
  border-left-color: #ec4899;
}

.highlight-box:not(.alt):not(.travel-tip):not(.fact) h3 {
  color: #f9a8d4;
}

.highlight-box:not(.alt):not(.travel-tip):not(.fact) p {
  color: #fce7f3;
}

.quote-box {
  background: rgba(234, 179, 8, 0.1);
  border-left: 4px solid #eab308;
  padding: 2rem;
  border-radius: 0.5rem;
  margin: 3rem 0;
  font-style: italic;
  font-size: 1.25rem;
  color: #fef08a;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  flex-direction: column;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 0.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  color: white;
  text-align: center;
  font-size: 1rem;
  margin-top: 1rem;
  max-width: 90%;
  font-style: italic;
  color: #cbd5e1;
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  color: white;
  font-size: 3rem;
  cursor: pointer;
  background: none;
  border: none;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.3s;
  z-index: 10;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 4rem;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s;
  z-index: 10;
  font-weight: 300;
  line-height: 1;
}

.lightbox-prev {
  left: 2rem;
}

.lightbox-next {
  right: 2rem;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-counter {
  position: absolute;
  top: 2rem;
  left: 2rem;
  color: white;
  background: rgba(0, 0, 0, 0.7);
  padding: 0.5rem 1rem;
  border-radius: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1rem;
  box-shadow: 0 -10px 25px -5px rgba(0, 0, 0, 0.3);
  z-index: 100;
}

.nav-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  max-width: 56rem;
  margin: 0 auto;
}

.nav-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  transition: all 0.2s;
  text-decoration: none;
}

.nav-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

.nav-btn svg {
  transition: transform 0.2s;
}

.nav-btn:hover svg.icon-left {
  transform: translateX(-2px);
}

.nav-btn:hover svg.icon-right {
  transform: translateX(2px);
}

/* Disabled button state */
.nav-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.nav-btn.disabled:hover {
  transform: none;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.nav-btn.disabled svg {
  transform: none !important;
}

.tooltip {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.9);
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.nav-btn:hover .tooltip {
  opacity: 1;
}

.btn-last-month {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
}

.btn-yesterday {
  background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
}

.btn-home {
  background: linear-gradient(135deg, #14b8a6 0%, #06b6d4 100%);
  width: 2.5rem;
  height: 2.5rem;
}

.btn-map {
  background: linear-gradient(135deg, #eab308 0%, #f59e0b 100%);
  width: 2.5rem;
  height: 2.5rem;
}

.btn-tomorrow {
  background: linear-gradient(135deg, #fb923c 0%, #f87171 100%);
}

.btn-next-month {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

@media (min-width: 640px) {
  .date-header h1 {
    font-size: 3rem;
  }

  .date-header .location {
    font-size: 1.5rem;
  }
}

/* ── Gallery float button ── */
.gallery-fab {
  position: fixed;
  bottom: 5.5rem;
  right: 1.25rem;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.5);
  transition: transform 0.25s, box-shadow 0.25s;
  z-index: 200;
}

.gallery-fab:hover {
  transform: scale(1.12);
  box-shadow: 0 6px 28px rgba(168, 85, 247, 0.7);
}

.gallery-fab svg {
  width: 1.5rem;
  height: 1.5rem;
}

.gallery-fab-label {
  position: absolute;
  right: 3.75rem;
  background: rgba(15, 23, 42, 0.92);
  color: #e2e8f0;
  font-size: 0.78rem;
  white-space: nowrap;
  padding: 0.3rem 0.65rem;
  border-radius: 0.4rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.gallery-fab:hover .gallery-fab-label {
  opacity: 1;
}

/* ── Slide-out panel ── */
.gallery-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(480px, 100vw);
  height: 100%;
  background: rgba(10, 10, 26, 0.97);
  backdrop-filter: blur(20px);
  border-left: 1px solid rgba(168, 85, 247, 0.25);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
  z-index: 500;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-panel.open {
  transform: translateX(0);
}

.gallery-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.gallery-panel-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #e9d5ff;
  letter-spacing: 0.03em;
}

.gallery-panel-close {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.5rem;
  transition: background 0.2s, color 0.2s;
  line-height: 1;
}

.gallery-panel-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.gallery-panel-body {
  overflow-y: auto;
  flex: 1;
  padding: 1rem 1rem 2rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 85, 247, 0.4) transparent;
}

.gallery-panel-body::-webkit-scrollbar {
  width: 4px;
}

.gallery-panel-body::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.4);
  border-radius: 2px;
}

/* ── Masonry columns ── */
.masonry-grid {
  columns: 2;
  column-gap: 0.6rem;
}

.masonry-grid img {
  width: 100%;
  display: block;
  margin-bottom: 0.6rem;
  border-radius: 0.4rem;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
  break-inside: avoid;
}

.masonry-grid img:hover {
  transform: scale(1.02);
  opacity: 0.9;
}

/* Empty state */
.gallery-empty {
  text-align: center;
  color: #64748b;
  padding: 3rem 1rem;
  font-size: 0.95rem;
  line-height: 2;
}

.gallery-empty svg {
  width: 2.5rem;
  height: 2.5rem;
  opacity: 0.3;
  margin: 0 auto 0.75rem;
  display: block;
}

/* Overlay backdrop */
.gallery-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 499;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
}

.gallery-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

@media (max-width: 480px) {
  .masonry-grid {
    columns: 1;
  }
}