body, html {
  margin: 0;
  padding: 0;
  font-family: "Barlow", sans-serif;
  height: 100%;
  overflow-x: hidden;
}

/* Smooth loading transitions */
img {
  transition: opacity 0.3s ease;
}

img[loading="lazy"] {
  opacity: 0;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* Prevent layout shift during image loading */
.photo-item,
.location-photo-item {
  position: relative;
  background-color: #f5f5f5;
}

.photo-item img,
.location-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: opacity 0.3s ease;
}

nav {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 25px;
  padding: 8px 20px;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
}

nav:hover {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

nav a {
  margin: 0 15px;
  text-decoration: none;
  font-family: "Barlow", sans-serif;
  font-weight: 200;
  font-style: normal;
  color: black;
  transition: color 0.2s ease;
  flex-shrink: 0;
  display: inline-block;
}

nav a:hover {
  color: #ff4444;
}

nav a.active {
  color: #ff4444;
  font-weight: 300;
}

.coordinates-button {
  position: absolute;
  top: 10px;
  right: 20px;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 8px 16px;
  font-family: "Barlow", sans-serif;
  font-weight: 300;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.coordinates-button:hover {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.coordinates-button.active {
  background-color: #ff4444;
  color: white;
  border-color: #ff4444;
}

.coordinates-notification {
  position: fixed;
  top: 60px;
  right: 20px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-family: "Barlow", sans-serif;
  font-size: 14px;
  z-index: 2000;
  backdrop-filter: blur(10px);
  animation: slideInCoords 0.3s ease-out;
}

@keyframes slideInCoords {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

#map-container {
  width: 100vw;
  height: 100vh;
  position: relative;
  background-color: #faf0dc;
  overflow: hidden;
  padding-top: 120px;
  box-sizing: border-box;
}

#svg-map {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

#svg-map svg {
  width: 100%;
  height: 100%;
  display: block;
}

#markers-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.photo-marker {
  position: absolute;
  width: 15px;
  height: 15px;
  background-color: #ff4444;
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  transition: transform 0.2s ease;
}

.photo-marker:hover {
  transform: translate(-50%, -50%) scale(1.2);
}

.photo-popup {
  position: absolute;
  background: #2d1810;
  border: 1px solid #4a2c1a;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 2000;
  max-width: 250px;
  min-width: 200px;
  text-align: center;
  backdrop-filter: blur(10px);
  animation: popupFadeIn 0.3s ease-out;
}

@keyframes popupFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.popup-content {
  position: relative;
}

.popup-content strong {
  font-size: 16px;
  color: #f5e6d3;
  display: block;
  margin-bottom: 10px;
  font-family: "Barlow", sans-serif;
  font-weight: 400;
}

.popup-image-container {
  position: relative;
  width: 180px;
  height: 120px;
  margin: 10px auto;
  background-color: #1a0e08;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-content img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
  transition: opacity 0.3s ease;
}

.image-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #b8a082;
  font-size: 14px;
  font-family: "Barlow", sans-serif;
}

.image-loading::after {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-left: 10px;
  border: 2px solid #4a2c1a;
  border-top: 2px solid #b8a082;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.image-error {
  color: #b8a082;
  font-size: 14px;
  text-align: center;
  padding: 20px;
}

.popup-meta {
  margin: 8px 0;
  color: #b8a082;
  font-size: 12px;
  font-family: "Barlow", sans-serif;
}

.popup-link {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 12px;
  background-color: #8b4513;
  color: #f5e6d3;
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  font-family: "Barlow", sans-serif;
  font-weight: 300;
  transition: background-color 0.2s ease;
}

.popup-link:hover {
  background-color: #a0522d;
}

.popup-close {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #8b4513;
  color: #f5e6d3;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

.popup-close:hover {
  background: #a0522d;
  transform: scale(1.1);
}

.popup-close:focus {
  outline: 2px solid #8b4513;
  outline-offset: 2px;
}

/* Loading indicator */
#loading-indicator {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(250, 240, 220, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(5px);
}

/* Pin hover tooltip */
.pin-tooltip {
  position: absolute;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: "Barlow", sans-serif;
  font-size: 12px;
  font-weight: 300;
  white-space: nowrap;
  z-index: 1500;
  pointer-events: none;
  animation: tooltipFadeIn 0.2s ease-out;
}

@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.loading-content {
  text-align: center;
  font-family: "Barlow", sans-serif;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #ddd;
  border-top: 4px solid #ff4444;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

.loading-content p {
  color: #666;
  font-size: 18px;
  margin: 0;
  font-weight: 300;
}

/* Error notification */
.error-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  border: 1px solid #ff4444;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 9998;
  max-width: 350px;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.error-content strong {
  color: #ff4444;
  display: block;
  margin-bottom: 8px;
  font-family: "Barlow", sans-serif;
}

.error-content p {
  margin: 8px 0;
  color: #666;
  font-family: "Barlow", sans-serif;
  font-size: 14px;
}

.error-content button {
  background: #ff4444;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-family: "Barlow", sans-serif;
  font-size: 14px;
  transition: background-color 0.2s ease;
}

.error-content button:hover {
  background: #cc0000;
}

/* Portfolio page styles */
main {
  display: flex;
  min-height: 100vh;
}

#sidebar {
  width: 250px;
  padding: 20px;
  padding-top: 20px;
  background-color: #faf0dc;
  border-right: 1px solid #ddd;
  overflow-y: auto;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  box-sizing: border-box;
}

.filter-section {
  margin-bottom: 24px;
}

.filter-section h3 {
  font-family: "Barlow", sans-serif;
  font-weight: 200;
  color: #333;
  margin-bottom: 12px;
  font-size: 16px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 50px;
  background: white;
  font-family: "Barlow", sans-serif;
  font-size: 14px;
  font-weight: 200;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  white-space: nowrap;
}

.filter-button:hover {
  border-color: #ff4444;
  background-color: #fafafa;
  transform: translateY(-1px);
}

.filter-button.active {
  background-color: #ff4444;
  border-color: #ff4444;
  color: white;
  font-weight: 300;
}

.filter-button.active:hover {
  background-color: #cc0000;
  border-color: #cc0000;
}

.filter-button.active .filter-count {
  opacity: 0.9;
}

#gallery {
  flex: 1;
  padding: 20px;
  padding-top: 80px;
  margin-left: 0;
  background-color: #faf0dc;
  overflow-y: auto;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

.location-group {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.location-group:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.location-group.clickable {
  cursor: pointer;
}

.location-group.clickable:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.location-header {
  padding: 16px;
  background: linear-gradient(135deg, #faf0dc, #f0e6cc);
  border-bottom: 1px solid #eee;
}

.location-header h3 {
  margin: 0 0 4px 0;
  font-family: "Barlow", sans-serif;
  font-weight: 400;
  color: #333;
  font-size: 18px;
}

.location-meta {
  color: #666;
  font-family: "Barlow", sans-serif;
  font-size: 14px;
}

.photos-grid {
  padding: 16px;
  display: flex;
  justify-content: center;
}

.photo-item {
  position: relative;
  width: 200px;
  height: 200px;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.photo-item:hover {
  transform: scale(1.05);
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: white;
  padding: 8px;
  font-size: 12px;
  font-family: "Barlow", sans-serif;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.photo-item:hover .photo-overlay {
  opacity: 1;
}

.gallery-empty {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  font-family: "Barlow", sans-serif;
}

.gallery-empty h3 {
  font-weight: 300;
  font-size: 24px;
  margin-bottom: 12px;
}

.gallery-empty p {
  font-size: 16px;
  margin: 0;
}

/* Location page styles */
.location-main {
  display: flex;
  min-height: 100vh;
  background-color: #faf0dc;
}

.location-content {
  flex: 1;
  padding: 20px 40px;
  padding-top: 80px;
  margin-left: 0;
  background-color: #faf0dc;
  overflow-y: auto;
}

.location-header-section {
  text-align: center;
  margin-bottom: 40px;
}

.location-header-section h1 {
  font-family: "Barlow", sans-serif;
  font-weight: 300;
  font-size: 36px;
  color: #333;
  margin: 0 0 12px 0;
}

.location-info {
  color: #666;
  font-family: "Barlow", sans-serif;
  font-size: 16px;
}

#filtered-count {
  margin-left: 10px;
  color: #ff4444;
  font-weight: 300;
}

.location-gallery {
  width: 100%;
}

.location-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

/* Dynamic grid sizing based on photo count */
.location-photos-grid.photos-1 {
  grid-template-columns: 1fr;
  max-width: 800px;
  margin: 0 auto 40px auto;
}

.location-photos-grid.photos-2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 1200px;
  margin: 0 auto 40px auto;
}

.location-photos-grid.photos-3 {
  grid-template-columns: repeat(3, 1fr);
  max-width: 1400px;
  margin: 0 auto 40px auto;
  gap: 32px;
}

.location-photos-grid.photos-4-plus {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.location-photo-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  /* Ensure border-radius is preserved during transforms */
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

.location-photo-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  /* Ensure border-radius stays rounded on hover */
  border-radius: 12px;
}

.location-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  /* Ensure image corners stay rounded during hover */
  border-radius: 12px;
}

.location-photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: white;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.location-photo-item:hover .location-photo-overlay {
  opacity: 1;
}

.photo-title {
  font-family: "Barlow", sans-serif;
  font-weight: 400;
  font-size: 16px;
  margin-bottom: 4px;
}

.photo-details {
  font-family: "Barlow", sans-serif;
  font-weight: 200;
  font-size: 14px;
  opacity: 0.9;
}

.location-empty {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  font-family: "Barlow", sans-serif;
}

.location-empty h3 {
  font-weight: 300;
  font-size: 24px;
  margin-bottom: 12px;
}

.location-empty p {
  font-size: 16px;
  margin: 0;
}

.back-button {
  color: #666 !important;
  font-weight: 300 !important;
}

.back-button:hover {
  color: #ff4444 !important;
}

/* Mobile responsive design */
@media (max-width: 768px) {
  nav {
    padding: 8px 12px;
    border-radius: 20px;
    white-space: nowrap;
    min-width: auto;
    max-width: calc(100vw - 40px);
  }
  
  nav a {
    margin: 0 8px;
    font-size: 14px;
    padding: 4px 0;
  }
}

/* Very small mobile screens */
@media (max-width: 480px) {
  nav {
    padding: 6px 8px;
    border-radius: 18px;
    left: 50%;
    transform: translateX(-50%);
    top: 8px;
  }
  
  nav a {
    margin: 0 6px;
    font-size: 13px;
    font-weight: 300;
  }
}

/* Extra small screens */
@media (max-width: 360px) {
  nav {
    padding: 4px 6px;
    border-radius: 16px;
  }
  
  nav a {
    margin: 0 3px;
    font-size: 12px;
  }
  
  /* Special handling for location page with back button */
  nav a.back-button {
    font-size: 11px;
    margin: 0 2px;
  }
}

/* Ultra small screens - iPhone SE and similar */
@media (max-width: 320px) {
  nav {
    padding: 3px 4px;
    border-radius: 14px;
    font-size: 11px;
  }
  
  nav a {
    margin: 0 2px;
    font-size: 11px;
    padding: 2px 0;
  }
  
  nav a.back-button {
    font-size: 10px;
    margin: 0 1px;
  }
}

@media (max-width: 768px) {
  #map-container {
    padding-top: 80px;
  }
  
  .photo-popup {
    max-width: calc(100vw - 40px);
    min-width: calc(100vw - 40px);
    left: 20px !important;
    right: 20px;
  }
  
  .popup-image-container {
    width: 100%;
    height: 120px;
  }
  
  main {
    flex-direction: column;
  }
  
  #sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 16px;
    padding-top: 80px;
    border-right: none;
    border-bottom: 1px solid #ddd;
  }
  
  #gallery {
    margin-left: 0;
    padding-top: 20px;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0 16px;
  }
  
  /* Location page mobile styles */
  .location-main {
    flex-direction: column;
  }
  
  .location-content {
    margin-left: 0;
    padding-top: 100px;
  }
  
  .location-header-section h1 {
    font-size: 28px;
  }
  
  .location-photos-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  /* Override dynamic sizing on mobile - all photos use single column */
  .location-photos-grid.photos-1,
  .location-photos-grid.photos-2,
  .location-photos-grid.photos-3,
  .location-photos-grid.photos-4-plus {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
  
  .error-notification {
    left: 20px;
    right: 20px;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .photos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .location-header h3 {
    font-size: 16px;
  }
  
  .location-photos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .location-header-section h1 {
    font-size: 24px;
  }
}

/* Photo Sidebar Styles */
.photo-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: flex;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0s, visibility 0s;
}

.photo-sidebar.active {
  opacity: 1;
  visibility: visible;
}

.sidebar-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
}

.sidebar-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  background: #1a1a1a;
}

.photo-sidebar.active .sidebar-content {
  transform: translateY(0);
}

.sidebar-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  z-index: 2001;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.5);
  transition: background-color 0.2s ease;
}

.sidebar-close:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.sidebar-image-section {
  flex: 1;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 10px 5px 10px 10px;
  background: #000;
}

.sidebar-image-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}

.sidebar-image-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.sidebar-details-section {
  width: 280px;
  background: #2d1810;
  padding: 60px 25px 40px 25px;
  overflow-y: auto;
  border-left: 1px solid #444;
}

.sidebar-details h2 {
  color: #f5e6d3;
  font-size: 24px;
  font-weight: 400;
  margin: 0 0 24px 0;
  line-height: 1.3;
}

.detail-group {
  margin-bottom: 20px;
}

.detail-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #b8a082;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.detail-group span {
  display: block;
  font-size: 16px;
  color: #f5e6d3;
  font-weight: 300;
  line-height: 1.4;
}

/* Mobile responsive sidebar */
@media (max-width: 1024px) {
  .sidebar-content {
    flex-direction: column;
  }
  
  .sidebar-image-section {
    flex: 1;
    padding: 60px 20px 20px 20px;
  }
  
  .sidebar-details-section {
    width: 100%;
    height: 300px;
    padding: 20px;
    border-left: none;
    border-top: 1px solid #444;
  }
  
  .sidebar-details h2 {
    font-size: 24px;
    margin-bottom: 20px;
  }
  
  .detail-group {
    margin-bottom: 16px;
  }
  
  .detail-group span {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .sidebar-image-section {
    padding: 80px 15px 15px 15px;
  }
  
  .sidebar-details-section {
    height: 250px;
    padding: 15px;
  }
  
  .sidebar-details h2 {
    font-size: 20px;
    margin-bottom: 15px;
  }
  
  .detail-group {
    margin-bottom: 12px;
  }
  
  .detail-group label {
    font-size: 12px;
  }
  
  .detail-group span {
    font-size: 14px;
  }
}

/* Mobile landscape orientation - full screen image experience for ALL phones */
@media screen and (orientation: landscape) and (max-width: 1024px) {
  .photo-sidebar {
    width: 100vw !important;
    height: 100vh !important;
    /* iOS Safari viewport fix */
    height: 100dvh !important;
  }
  
  .sidebar-content {
    flex-direction: row !important;
    width: 100% !important;
    height: 100% !important;
  }
  
  .sidebar-image-section {
    flex: 1 !important;
    padding: 10px !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .sidebar-details-section {
    display: none !important; /* Hide metadata in landscape on phones */
  }
  
  .sidebar-image-container {
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .sidebar-image-container img {
    max-width: calc(100vw - 20px) !important;
    max-height: calc(100vh - 20px) !important;
    /* iOS Safari viewport fix */
    max-height: calc(100dvh - 20px) !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    object-position: center !important;
    box-shadow: none !important;
    touch-action: manipulation !important;
    user-select: none !important;
    -webkit-user-select: none !important;
  }
  
  .sidebar-close {
    position: fixed !important;
    top: 15px !important;
    right: 15px !important;
    z-index: 2002 !important;
    background-color: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(4px) !important;
  }
}

/* Large tablets/laptops in landscape - show metadata */
@media screen and (orientation: landscape) and (min-width: 1025px) {
  .photo-sidebar {
    width: 100vw !important;
    height: 100vh !important;
  }
  
  .sidebar-content {
    flex-direction: row !important;
    width: 100% !important;
    height: 100% !important;
  }
  
  .sidebar-image-section {
    flex: 1 !important;
    padding: 20px !important;
    width: 70% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .sidebar-image-container {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .sidebar-image-container img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    object-position: center !important;
    touch-action: manipulation !important;
    user-select: none !important;
    -webkit-user-select: none !important;
  }
  
  .sidebar-details-section {
    width: 30% !important;
    min-width: 280px !important;
    height: 100% !important;
    padding: 40px 25px 20px 25px !important;
    border-left: 1px solid #444 !important;
    border-top: none !important;
    overflow-y: auto !important;
  }
  
  .sidebar-details h2 {
    font-size: 20px !important;
    margin-bottom: 20px !important;
  }
  
  .detail-group {
    margin-bottom: 16px !important;
  }
  
  .detail-group span {
    font-size: 16px !important;
  }
  
  .sidebar-close {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 2002 !important;
  }
}

/* All phones portrait mode - optimize for better image viewing */
@media screen and (orientation: portrait) and (max-width: 768px) {
  .sidebar-image-section {
    padding: 20px 10px 10px 10px !important;
    flex: 1 !important;
  }
  
  .sidebar-image-container {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .sidebar-image-container img {
    max-width: calc(100vw - 20px) !important;
    max-height: 55vh !important;
    /* iOS Safari viewport fix */
    max-height: 55dvh !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    touch-action: manipulation !important;
    user-select: none !important;
    -webkit-user-select: none !important;
  }
  
  .sidebar-details-section {
    max-height: 35vh !important;
    /* iOS Safari viewport fix */
    max-height: 35dvh !important;
    overflow-y: auto !important;
    flex-shrink: 0 !important;
  }
}

/* About page styles */
.about-main {
  min-height: 100vh;
  background-color: #faf0dc;
  padding: 80px 20px 40px 20px;
}

.about-content {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.about-header {
  background: linear-gradient(135deg, #faf0dc, #f0e6cc);
  padding: 40px;
  text-align: center;
  border-bottom: 1px solid #eee;
}

.about-header h1 {
  font-family: "Barlow", sans-serif;
  font-weight: 300;
  font-size: 42px;
  color: #333;
  margin: 0;
}

.about-body {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  padding: 40px;
}

.about-text {
  font-family: "Barlow", sans-serif;
  line-height: 1.7;
  color: #444;
}

.about-text p {
  font-size: 18px;
  font-weight: 300;
  margin-bottom: 24px;
}

.about-text a {
  color: #ff4444;
  text-decoration-color: #ff4444;
  font-weight: 400;
  transition: color 0.2s ease;
}

.about-text a:hover {
  color: #cc0000;
  text-decoration-color: #cc0000;
}

.about-text h2 {
  font-family: "Barlow", sans-serif;
  font-weight: 400;
  font-size: 24px;
  color: #333;
  margin: 40px 0 20px 0;
  border-bottom: 2px solid #ff4444;
  display: inline-block;
  padding-bottom: 8px;
}

.contact-links {
  display: flex;
  gap: 16px;
  margin-top: 30px;
}

.contact-link {
  display: inline-block;
  padding: 12px 24px;
  background-color: #ff4444;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-family: "Barlow", sans-serif;
  font-weight: 300;
  font-size: 16px;
  transition: all 0.2s ease;
}

.contact-link:hover {
  background-color: #cc0000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 68, 68, 0.3);
}

.about-featured-image {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.about-featured-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.about-featured-image img:hover {
  transform: scale(1.02);
}

.image-caption {
  font-family: "Barlow", sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: #666;
  text-align: center;
  margin-top: 12px;
  font-style: italic;
}

/* Mobile responsive for about page */
@media (max-width: 768px) {
  .about-main {
    padding: 60px 16px 20px 16px;
  }
  
  .about-header {
    padding: 30px 20px;
  }
  
  .about-header h1 {
    font-size: 32px;
  }
  
  .about-body {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 30px 20px;
  }
  
  .about-featured-image {
    position: static;
    order: -1;
  }
  
  .contact-links {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .contact-link {
    text-align: center;
    width: 200px;
  }
}

@media (max-width: 480px) {
  .about-header h1 {
    font-size: 28px;
  }
  
  .about-text h2 {
    font-size: 20px;
  }
  
  .about-text p {
    font-size: 16px;
  }
  
  .contact-link {
    width: 100%;
  }
}
  