/* ─────────────────────────────────────────
   GLOBAL IMAGE STYLING
   ───────────────────────────────────────── */

.md-typeset img {
  border-radius: 12px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  object-fit: cover;
}

.md-typeset img:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

/* ─────────────────────────────────────────
   PHOTO GALLERY
   ───────────────────────────────────────── */

.photo-gallery {
  margin: 1.25rem 0 1.75rem;
}

.photo-gallery p {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 0;
}

.photo-gallery img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.photo-gallery img:hover {
  transform: scale(1.04);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 1;
  position: relative;
}

.photo-gallery p:has(img:nth-child(3):last-child) {
  grid-template-columns: 1fr 1fr;
}

.photo-gallery p:has(img:nth-child(3):last-child) img:first-child {
  grid-column: 1 / -1;
  height: 260px;
}

.photo-gallery p:has(img:nth-child(5):last-child) img:first-child {
  grid-column: 1 / -1;
  height: 260px;
}

/* ─────────────────────────────────────────
   FEATURED IMAGE
   ───────────────────────────────────────── */

.featured-img {
  margin: 0.75rem 0 1.25rem;
}

.featured-img p {
  margin: 0;
}

.featured-img img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.featured-img img:hover {
  box-shadow: 0 8px 36px rgba(0, 0, 0, 0.18);
}

/* ─────────────────────────────────────────
   HERO BANNER
   ───────────────────────────────────────── */

.hero-banner {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}

.hero-banner img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

.hero-banner img:hover {
  transform: none;
  box-shadow: none;
}

.hero-banner .hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  color: white;
  padding: 3rem 2rem 1.75rem;
}

.hero-banner .hero-overlay h1 {
  margin: 0 0 0.3rem;
  font-size: 2.2rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hero-banner .hero-overlay p {
  margin: 0;
  font-size: 1.1rem;
  opacity: 0.92;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* ─────────────────────────────────────────
   DAY CARDS
   ───────────────────────────────────────── */

.day-card {
  display: flex;
  gap: 1.5rem;
  align-items: stretch;
  padding: 1.25rem;
  margin: 1rem 0;
  border-radius: 14px;
  background: var(--md-code-bg-color);
  border: 1px solid var(--md-default-fg-color--lightest);
  transition: box-shadow 0.25s ease, transform 0.2s ease;
}

.day-card:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
  transform: translateY(-3px);
}

.day-card > p:first-child,
.day-card > p:first-of-type {
  margin: 0;
  flex-shrink: 0;
  display: flex;
}

.day-card img,
.day-card > p:first-child img,
.day-card > p:first-of-type img {
  width: 240px;
  min-height: 160px;
  max-height: 200px;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.day-card img:hover {
  transform: none;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.day-card-content {
  flex: 1;
}

.day-card-content h3 {
  margin: 0.25rem 0 0.5rem;
  font-size: 1.15rem;
}

.day-card-content ul {
  margin: 0.25rem 0 0;
  padding-left: 1.2rem;
}

.day-card-content ul li {
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ─────────────────────────────────────────
   INFO CARDS GRID
   ───────────────────────────────────────── */

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.info-card {
  padding: 1.25rem;
  border-radius: 14px;
  background: var(--md-code-bg-color);
  border: 1px solid var(--md-default-fg-color--lightest);
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.info-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.info-card h4 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.info-card p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.85;
  line-height: 1.5;
}

/* ─────────────────────────────────────────
   WEATHER GRID
   ───────────────────────────────────────── */

.weather-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.weather-card {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--md-default-fg-color--lightest);
  background: var(--md-code-bg-color);
  transition: box-shadow 0.2s ease;
}

.weather-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.weather-card h4 {
  margin: 0;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

.weather-card iframe,
.weather-card img {
  display: block;
  width: 100%;
  height: 50px;
  border: none;
}

/* ─────────────────────────────────────────
   STAT BAR
   ───────────────────────────────────────── */

.stat-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0;
}

.stat-item {
  flex: 1;
  min-width: 130px;
  text-align: center;
  padding: 1.25rem 1rem;
  border-radius: 14px;
  background: var(--md-code-bg-color);
  border: 1px solid var(--md-default-fg-color--lightest);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.stat-item .stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--md-primary-fg-color);
  display: block;
  line-height: 1.2;
  white-space: nowrap;
}

.stat-item .stat-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.65;
  margin-top: 0.25rem;
  display: block;
}

/* ─────────────────────────────────────────
   TABLE POLISH
   ───────────────────────────────────────── */

.md-typeset table:not([class]) {
  border-radius: 10px;
  overflow: hidden;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.md-typeset table:not([class]) th {
  background: var(--md-primary-fg-color);
  color: var(--md-primary-bg-color);
  font-weight: 600;
}

/* ─────────────────────────────────────────
   GLIGHTBOX OVERRIDES
   ───────────────────────────────────────── */

.glightbox-clean .gslide-description {
  background: transparent;
}

.glightbox-clean .gdesc-inner {
  padding: 0.5rem 1rem;
}

.glightbox-clean .gslide-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: #fff;
}

/* ─────────────────────────────────────────
   SIDEBAR NAV
   ───────────────────────────────────────── */

/* Section group labels (Itinerary, Logistics, Reservations) */
.md-nav--primary > .md-nav__list > .md-nav__item > label.md-nav__link {
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  opacity: 0.7;
  margin-top: 0.75rem;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.md-nav--primary > .md-nav__list > .md-nav__item > label.md-nav__link:hover {
  opacity: 1;
}

/* Top-level direct links (Dashboard, Today, Map) */
.md-nav--primary > .md-nav__list > .md-nav__item > .md-nav__link:not(label) {
  font-weight: 500;
  font-size: 0.85rem;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.md-nav--primary > .md-nav__list > .md-nav__item > .md-nav__link:not(label):hover {
  background: rgba(0, 0, 0, 0.04);
}

/* Sub-items inside sections */
.md-nav--primary > .md-nav__list > .md-nav__item .md-nav__item > .md-nav__link {
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.md-nav--primary > .md-nav__list > .md-nav__item .md-nav__item > .md-nav__link:hover {
  background: rgba(0, 0, 0, 0.04);
}

/* Active page */
.md-nav__link--active {
  font-weight: 600 !important;
  color: var(--md-primary-fg-color) !important;
  background: rgba(255, 87, 34, 0.08) !important;
  border-radius: 6px;
}

/* ─────────────────────────────────────────
   MOBILE RESPONSIVE -- content
   ───────────────────────────────────────── */

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

  .photo-gallery img {
    height: 220px;
  }

  .photo-gallery p:has(img:nth-child(3):last-child) {
    grid-template-columns: 1fr;
  }

  .photo-gallery p:has(img:nth-child(3):last-child) img:first-child {
    grid-column: auto;
    height: 220px;
  }

  .photo-gallery p:has(img:nth-child(5):last-child) img:first-child {
    grid-column: auto;
    height: 220px;
  }

  .day-card {
    flex-direction: column;
  }

  .day-card > p:first-child,
  .day-card > p:first-of-type {
    width: 100%;
  }

  .day-card img,
  .day-card > p:first-child img,
  .day-card > p:first-of-type img {
    width: 100%;
    max-height: 220px;
    min-height: auto;
  }

  .hero-banner img {
    height: 280px;
  }

  .hero-banner .hero-overlay h1 {
    font-size: 1.5rem;
  }

  .hero-banner .hero-overlay p {
    font-size: 0.95rem;
  }

  .stat-bar {
    gap: 0.5rem;
  }

  .stat-item {
    min-width: 100px;
    padding: 0.75rem 0.5rem;
  }

  .stat-item .stat-number {
    font-size: 1.4rem;
  }

  .featured-img img {
    max-height: 260px;
  }
}

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

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

/* ─────────────────────────────────────────
   WEATHER CARDS - LIVE DATA
   ───────────────────────────────────────── */
.weather-temp {
  font-size: 2rem;
  font-weight: bold;
  color: var(--md-primary-fg-color);
}

.weather-desc {
  font-size: 0.9rem;
  margin: 0.25rem 0;
}

.weather-details {
  font-size: 0.75rem;
  color: var(--md-color-fg--light);
}

/* ─────────────────────────────────────────
   WEATHER CARDS - ENHANCED
   ───────────────────────────────────────── */
.weather-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

.weather-header h4 {
  margin: 0;
  font-size: 0.95rem;
}

.weather-arrival {
  font-size: 0.7rem;
  background: var(--md-primary-fg-color);
  color: var(--md-primary-bg-color);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-weight: bold;
}

.weather-current {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.75rem 1rem 0.25rem;
}

.weather-temp {
  font-size: 2rem;
  font-weight: bold;
  color: var(--md-primary-fg-color);
}

.weather-desc {
  font-size: 0.85rem;
  color: var(--md-color-fg--light);
}

.weather-details {
  font-size: 0.75rem;
  color: var(--md-color-fg--lighter);
  padding: 0 1rem 0.5rem;
}

.weather-forecast {
  background: var(--md-code-bg-color);
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  border-top: 1px dashed var(--md-default-fg-color--lightest);
}

.forecast-label {
  color: var(--md-color-fg--light);
}

.forecast-high {
  font-weight: bold;
  color: #e65100;
}

.forecast-low {
  color: #0277bd;
}

.forecast-desc {
  margin-left: 0.5rem;
  color: var(--md-color-fg--light);
}

.weather-label {
  font-size: 0.55rem;
  font-weight: bold;
  background: #2e7d32;
  color: white;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  margin-right: 0.5rem;
}

/* Compact weather table */
.md-content .weather-table {
  font-size: 0.75rem;
}
.weather-table th, .weather-table td {
  padding: 0.25rem 0.5rem;
}
.weather-table h2 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

/* Weather table compact */
table {
  font-size: 0.75rem !important;
}
table th, table td {
  padding: 0.25rem 0.5rem !important;
  font-size: 0.75rem !important;
}

/* ─────────────────────────────────────────
   ORIENTATION-AWARE PHOTOS
   ───────────────────────────────────────── */
.photo-landscape {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 400px !important;
}

.photo-portrait {
  width: 60% !important;
  max-width: 300px !important;
  height: auto !important;
  display: block !important;
  margin: 0 auto !important;
}
