@import 'main.css';

/* 
  VENUES PAGE - Updated CSS 
  Includes lazy loading, unified region filters, minor SEO & performance improvements
*/

/* Page Header (example hero) */
.venues-hero {
  position: relative;
  background-size: cover;
  background-position: center;
  height: 70vh;
  min-height: 450px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  overflow: hidden;
}

.venues-hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.venues-hero .hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 0 auto;
  padding: 20px;
}

.venues-hero .hero-content h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  margin-bottom: 1rem;
}

.venues-hero .hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

/* Venues Intro */
.venues-intro {
  padding: 5rem 0;
  background-color: #f9f9f9;
  position: relative;
}

.intro-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.intro-text {
  flex: 1;
  padding-right: 3rem;
  min-width: 300px;
}

.intro-text h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  color: #333;
}

.intro-text h2::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 0;
  width: 80px;
  height: 3px;
  background-color: #d4af37;
}

.intro-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #666;
  margin-bottom: 1.5rem;
}

.intro-image {
  flex: 1;
  min-width: 300px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.intro-image:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.intro-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
  transform-origin: center center;
}

.intro-image:hover img {
  transform: scale(1.05);
}

/* Region Filters Section */
.region-filters-section {
  padding: 3rem 0;
  text-align: center;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.region-filter {
  padding: 1rem 2rem;
  border-radius: 6px;
  cursor: pointer;
  background-color: #fff;
  border: 1px solid #e0e0e0;
  font-weight: 500;
  transition: all 0.3s ease;
  text-align: center;
  color: #333;
  position: relative;
  overflow: hidden;
}

.region-filter:hover {
  background-color: #f0f0f0;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
  border-color: #d4af37;
}

.region-filter.active {
  background-color: #d4af37;
  color: #fff;
  border-color: #d4af37;
  font-weight: 600;
  box-shadow: 0 3px 15px rgba(212, 175, 55, 0.3);
}

/* Interactive Map Section */
.interactive-map-section {
  padding: 5rem 0;
  background-color: #fff;
  position: relative;
  margin-bottom: 4rem;
}

.map-container {
  display: flex;
  flex-wrap: wrap;
  max-width: 1400px;
  margin: 0 auto 3rem auto;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.venues-map {
  width: 100%;
  height: 500px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Sidebar with region filters */
.map-sidebar {
  flex: 1;
  min-width: 250px;
  background-color: #f9f9f9;
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.map-sidebar .region-filters {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

/* Venue Preview in sidebar */
.venue-preview {
  background-color: #fff;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  margin-top: auto;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid #e0e0e0;
}

.venue-preview:hover {
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.venue-preview-placeholder {
  height: 150px;
  background-color: #f0f0f0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-style: italic;
  text-align: center;
  padding: 1rem;
}

.venue-preview-content {
  display: none;
}

/* Featured Regions (Optional) */
.featured-regions {
  padding: 5rem 0;
  position: relative;
  background-color: #f9f9f9;
}

.featured-regions::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: url('../assets/images/abstract-bg.jpg') no-repeat center center;
  background-size: cover;
  opacity: 0.1;
  z-index: 0;
}

.regions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

.region-card {
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.region-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.region-image {
  height: 200px;
  overflow: hidden;
  position: relative;
}

.region-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  transform-origin: center center;
}

.region-card:hover .region-image img {
  transform: scale(1.1);
}

.region-name {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  padding: 2rem 1rem 1rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  color: #fff;
  transition: all 0.3s ease;
}

.region-details {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.region-details p {
  margin: 0 0 1.5rem 0;
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
  flex-grow: 1;
}

.region-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: #d4af37;
  font-weight: 600;
  margin-top: 0.5rem;
  transition: all 0.3s ease;
  gap: 5px;
}

.region-link:hover {
  color: #b28e1e;
  gap: 10px;
}

/* Venue Comparison */
.venue-comparison {
  background-color: var(--color-light);
  padding: 100px 0;
  position: relative;
}

.venue-selector {
  background-color: white;
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: var(--box-shadow);
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}

.selector-intro {
  font-size: 1.8rem;
  font-weight: 500;
  margin-right: 20px;
}

.selector-input {
  display: flex;
  gap: 15px;
  flex-grow: 1;
}

.venue-select {
  flex-grow: 1;
  padding: 15px;
  border: 2px solid var(--color-border);
  border-radius: 10px;
  font-size: 1.6rem;
  background-color: white;
  transition: all var(--transition-fast);
}

.venue-select:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(228, 183, 183, 0.3);
}

.btn-add-venue {
  background-color: var(--color-primary);
  color: white;
  padding: 15px 25px;
  border-radius: 10px;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all var(--transition-fast);
  border: none;
  font-weight: 500;
}

.btn-add-venue:hover {
  background-color: var(--color-accent);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.comparison-table-container {
  position: relative;
}

.comparison-placeholder {
  background-color: white;
  border-radius: 15px;
  padding: 80px 30px;
  text-align: center;
  box-shadow: var(--box-shadow);
  color: var(--color-gray);
}

.comparison-placeholder p {
  margin-top: 30px;
  font-size: 1.8rem;
}

.comparison-placeholder i {
  font-size: 5rem;
  margin-bottom: 20px;
  color: var(--color-primary);
  opacity: 0.7;
}

.comparison-table {
  display: none;
  background-color: white;
  border-radius: 15px;
  padding: 30px;
  box-shadow: var(--box-shadow);
}

.comparison-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.btn-reset-compare {
  display: block;
  margin: 20px auto 0;
  background-color: #f0f0f0;
  color: var(--color-text);
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 1.5rem;
  transition: all var(--transition-fast);
  border: none;
}

.btn-reset-compare:hover {
  background-color: #e0e0e0;
}

/* Regional Venues */
.regional-venues {
  padding: 5rem 0;
  position: relative;
  scroll-margin-top: 100px; /* for smoothscroll offsets */
}

.region-heading {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.region-heading h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  position: relative;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.region-heading h2::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background-color: #d4af37;
}

.region-heading p {
  font-size: 1.1rem;
  color: #666;
  max-width: 800px;
  margin: 1rem auto 0;
}

/* Venue Items */
.venue-item {
  display: flex;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto 4rem;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
  padding: 0;
}

.venue-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Venue Gallery */
.venue-gallery {
  flex: 1;
  min-width: 300px;
  position: relative;
}

.gallery-main {
  height: 350px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  transform-origin: center center;
}

.gallery-main:hover img {
  transform: scale(1.05);
}

.gallery-thumbs {
  display: flex;
  overflow-x: auto;
  padding: 10px;
  background-color: #f9f9f9;
}

.gallery-thumbs img {
  width: 80px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
  margin-right: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.gallery-thumbs img:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

/* Venue Info */
.venue-info {
  flex: 1;
  min-width: 300px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.featured-badge {
  background-color: #d4af37;
  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
  display: inline-block;
}

.venue-info h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  margin: 0 0 1.5rem;
  position: relative;
  color: #333;
}

.venue-info h3::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: #d4af37;
}

.venue-tagline {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 1.5rem;
  font-style: italic;
  line-height: 1.6;
}

.venue-details {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #eee;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background-color: #f9f9f9;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.detail-item:hover {
  background-color: #f0f0f0;
  transform: translateY(-2px);
}

.detail-item i {
  color: #d4af37;
}

.venue-description {
  margin-bottom: 1.5rem;
}

.venue-description p {
  margin: 0;
  color: #666;
  line-height: 1.8;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.venue-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.feature-tag {
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 50px;
  padding: 5px 10px;
  font-size: 0.8rem;
  color: #666;
  transition: all 0.3s ease;
}

/* Venue Actions */
.venue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: auto;
}

.view-360 {
  margin-left: 10px;
  background-color: #5d8aa8;
  color: white;
  font-size: 14px;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.view-360:hover {
  background-color: #406882;
}

.btn-venue-inquiry {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #d4af37;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-venue-inquiry:hover {
  background-color: #c49b2f;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

.btn-venue-inquiry.primary {
  background-color: #3498db;
}

/* Modals */
.venue-modal,
.tour-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 9000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0; visibility: hidden;
  transition: all 0.3s ease;
}

.venue-modal.active,
.tour-modal.active {
  opacity: 1; visibility: visible;
}

.modal-content {
  position: relative;
  background-color: white;
  border-radius: 20px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-content.modal-animate {
  transform: translateY(0);
}

.close-modal {
  position: absolute;
  top: 20px; right: 20px;
  font-size: 2.4rem;
  color: #666;
  cursor: pointer;
  background: none; border: none;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.close-modal:hover {
  color: #000;
  background-color: #f0f0f0;
  transform: rotate(90deg);
}

/* Form Styles */
.venue-form {
  width: 100%;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--color-text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 15px;
  border: 2px solid var(--color-border);
  border-radius: 10px;
  font-size: 1.6rem;
  transition: all var(--transition-fast);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.error-message {
  color: #f44336;
  font-size: 1.4rem;
  margin-top: 5px;
  display: block;
}

.btn-submit {
  background-color: var(--color-primary);
  color: white;
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 10px;
  font-size: 1.7rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-top: 20px;
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
}

.btn-submit:hover {
  background-color: var(--color-accent);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(228, 183, 183, 0.3);
}

/* 360° Virtual Tour Modal */
.tour-modal {
  display: none;
  position: fixed;
  z-index: 9999; /* Ensure it's above everything */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}

.tour-modal.active,
.tour-modal[style*="display: flex"] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tour-modal .modal-content {
  position: relative;
  background-color: #fff;
  margin: 0 auto;
  padding: 0;
  width: 90%;
  max-width: 900px;
  height: 90vh;
  max-height: 700px;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.tour-modal .modal-header {
  padding: 15px;
  background-color: #f8f8f8;
  border-bottom: 1px solid #e5e5e5;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tour-modal .modal-header h2 {
  margin: 0;
  font-weight: 500;
  font-size: 1.5rem;
  color: #333;
}

.tour-modal .close-modal {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #666;
  cursor: pointer;
  transition: color 0.2s;
}

.tour-modal .close-modal:hover {
  color: #000;
}

#tourContainer {
  width: 100%;
  height: calc(100% - 60px); /* Subtract header height */
  min-height: 400px;
  position: relative;
  background-color: #f0f0f0;
}

.tour-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #666;
}

.tour-loading i {
  font-size: 3rem;
  margin-bottom: 15px;
  color: #e74c3c;
}

.tour-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  padding: 30px;
  background: #f8f8f8;
}

.tour-error h3 {
  margin: 0 0 15px;
  color: #2c3e50;
  font-size: 22px;
}

.tour-error p {
  margin: 5px 0 15px;
  color: #505050;
  max-width: 600px;
  line-height: 1.6;
}

.fallback-image {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin-bottom: 25px;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.fallback-image img {
  width: 100%;
  object-fit: cover;
  aspect-ratio: 16/9;
  transition: transform 0.3s ease;
}

.fallback-image:hover img {
  transform: scale(1.05);
}

/* Venue CTA */
.venues-cta {
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.5)), url('../assets/images/venues-cta-bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding: 120px 0;
  color: white;
  text-align: center;
  position: relative;
}

.venues-cta::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100px;
  background: linear-gradient(to bottom, white, transparent);
}

.venues-cta .cta-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.venues-cta h2 {
  font-size: 3rem;
  margin-bottom: 20px;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.venues-cta p {
  font-size: 1.4rem;
  margin-bottom: 40px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Responsive Styles */
@media (max-width: 1200px) {
  .intro-image,
  .intro-text {
    padding-right: 0 !important;
  }
  .map-container {
    flex-direction: column;
  }
  .venues-map {
    height: 400px;
    min-height: 400px;
  }
  .venue-gallery, .venue-info {
    flex: 100%;
  }
}

@media (max-width: 768px) {
  .intro-content {
    flex-direction: column;
  }
  .venues-cta h2 {
    font-size: 2rem;
  }
  .venues-cta p {
    font-size: 1rem;
  }
  .gallery-main {
    height: 250px;
  }
  .gallery-thumbs img {
    width: 60px; height: 40px;
  }
  .modal-content {
    width: 95%; padding: 1.5rem;
  }
}

@media (max-width: 576px) {
  .modal-content h2 {
    font-size: 1.8rem;
  }
  .toast {
    width: 90%;
  }
}

/* Tour tabs for switching between exterior and interior views */
.tour-tabs {
  display: flex;
  background: #f8f8f8;
  border-bottom: 1px solid #ddd;
  padding: 0 20px;
}

.tour-tabs .tab-btn {
  padding: 12px 20px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-weight: 500;
  color: #555;
  transition: all 0.3s ease;
}

.tour-tabs .tab-btn.active {
  border-bottom-color: #3498db;
  color: #3498db;
}

.tour-tabs .tab-btn:hover:not(.active) {
  border-bottom-color: rgba(52, 152, 219, 0.3);
  color: #2980b9;
}

/* Interior gallery view */
.interior-gallery {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #f8f8f8;
}

.gallery-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  overflow: hidden;
}

.gallery-main img {
  max-width: 100%;
  max-height: 100%;
  transition: opacity 0.3s;
}

.gallery-thumbs {
  display: flex;
  padding: 10px;
  gap: 10px;
  background: #222;
  overflow-x: auto;
}

.gallery-thumbs img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.7;
  transition: all 0.2s ease;
}

.gallery-thumbs img.active {
  border-color: #3498db;
  opacity: 1;
}

.gallery-thumbs img:hover:not(.active) {
  opacity: 0.9;
  border-color: rgba(52, 152, 219, 0.5);
}

.gallery-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  gap: 15px;
  background: #333;
  color: white;
}

.gallery-controls button {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  padding: 5px 10px;
  transition: transform 0.2s ease;
}

.gallery-controls button:hover {
  transform: scale(1.1);
}

.gallery-count {
  font-size: 14px;
}

.view-on-google {
  padding: 10px;
  text-align: center;
  background: #222;
  color: white;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.3s ease;
}

.view-on-google:hover {
  background: #333;
}

/* Loading state */
.tour-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #555;
  text-align: center;
  padding: 20px;
}

.tour-loading i {
  font-size: 32px;
  color: #3498db;
  margin-bottom: 15px;
  animation: spin 1.5s linear infinite;
}

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

/* Error and fallback */
.tour-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  padding: 30px;
  background: #f8f8f8;
}

.tour-error p {
  margin: 5px 0 15px;
  color: #555;
}

.switch-to-exterior {
  padding: 10px 20px;
  margin-top: 15px;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.switch-to-exterior:hover {
  background: #2980b9;
}

/* Media queries for responsive adjustments */
@media (max-width: 768px) {
  .tour-tabs .tab-btn {
    padding: 8px 12px;
    font-size: 14px;
  }
  
  .gallery-thumbs img {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 576px) {
  .tour-tabs {
    padding: 0 10px;
  }
  
  .gallery-controls button {
    font-size: 16px;
  }
  
  .gallery-count {
    font-size: 12px;
  }
}

/* Mobile-specific enhancements */
@media (max-width: 767px) {
  /* Make map container more mobile-friendly */
  #venuesMap {
    min-height: 300px !important;
    width: 100% !important;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
  }
  
  /* Ensure map container has proper size */
  .map-container {
    display: flex;
    flex-direction: column;
    width: 100%;
  }
  
  /* Fix any potential layer issues */
  .map-container > div {
    z-index: 1;
  }
  
  /* Venue selector on mobile */
  .venue-selector {
    flex-direction: column;
  }
  
  /* Make buttons more tappable */
  .btn, .btn-primary, .btn-secondary, .view-360, .btn-venue-inquiry, .region-filter, .tab-btn {
    min-height: 44px;
    padding: 10px 16px;
    margin: 5px;
    touch-action: manipulation;
  }
  
  /* Style virtual tour buttons specifically */
  .view-360 {
    position: relative;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transform: translateZ(0); /* Force hardware acceleration */
  }
  
  /* Visual feedback when touched */
  .view-360:active,
  .btn:active,
  .btn-primary:active,
  .btn-secondary:active,
  .btn-venue-inquiry:active {
    transform: scale(0.96);
    opacity: 0.9;
  }
  
  /* Loading indicator for buttons */
  .view-360.loading {
    pointer-events: none;
    opacity: 0.7;
  }
  
  .view-360.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    margin-left: -10px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
  }
  
  @keyframes spin {
    to { transform: rotate(360deg); }
  }
  
  /* Tour modal improvements */
  .tour-modal .modal-content {
    width: 90%;
    max-width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix for Safari mobile */
  .tour-modal {
    -webkit-backface-visibility: hidden;
    -webkit-transform: translateZ(0);
  }
  
  /* Map error messages */
  .map-error {
    padding: 20px;
    text-align: center;
    background-color: #f8f9fa;
    border-radius: 8px;
  }
  
  /* Ensure venue galleries work on mobile */
  .venue-gallery .gallery-main {
    min-height: 200px;
  }
  
  .venue-gallery .gallery-thumbs {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .venue-gallery .gallery-thumbs img {
    max-width: calc(33.333% - 10px);
    margin: 5px;
  }
}

/* Fix for iOS Safari 100vh issue */
@supports (-webkit-touch-callout: none) {
  .tour-modal,
  .venue-modal {
    height: -webkit-fill-available;
  }
}

/* Mobile-optimized tour styles */
.tour-info.mobile {
  position: absolute;
  bottom: 70px;
  left: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  transition: opacity 0.5s ease;
  z-index: 1000;
}

.tour-info.mobile h4 {
  margin: 0 0 10px;
  font-size: 16px;
}

.tour-info.mobile p {
  margin: 5px 0;
  font-size: 14px;
}

.tour-info.mobile .close-info {
  position: absolute;
  top: 5px;
  right: 5px;
  background: none;
  border: none;
  color: white;
  padding: 5px;
  cursor: pointer;
}

/* Tour gallery styles */
.tour-gallery {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #000;
}

.tour-gallery .gallery-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.tour-gallery .gallery-main img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.tour-gallery .gallery-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  gap: 20px;
  background: rgba(0, 0, 0, 0.8);
}

.tour-gallery .gallery-controls button {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  padding: 10px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.tour-gallery .gallery-controls button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.tour-gallery .gallery-controls button:not(:disabled):hover {
  opacity: 1;
}

.tour-gallery .gallery-count {
  color: white;
  font-size: 14px;
}

.tour-gallery .gallery-thumbs {
  display: flex;
  padding: 10px;
  gap: 10px;
  background: #222;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tour-gallery .gallery-thumbs img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border: 2px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.3s ease;
}

.tour-gallery .gallery-thumbs img.active {
  border-color: #3498db;
  opacity: 1;
}

/* Mobile-specific map control styles */
@media (max-width: 767px) {
  .gm-style-mtc button {
    height: 40px !important;
    padding: 0 10px !important;
  }
  
  .gm-style-mtc div[role="menu"] {
    margin-top: 5px !important;
  }
  
  .gm-style-mtc div[role="menuitem"] {
    padding: 12px !important;
  }
  
  .gm-fullscreen-control {
    margin: 10px !important;
  }
  
  .gm-svpc {
    margin-bottom: 10px !important;
  }
  
  /* Ensure map controls are more tappable */
  .gm-control-active {
    min-width: 40px !important;
    min-height: 40px !important;
  }
  
  /* Improve Street View pegman dragging area */
  .gm-svpc {
    width: 40px !important;
    height: 40px !important;
  }
  
  /* Make zoom controls more tappable */
  .gm-bundled-control .gmnoprint > div {
    width: 40px !important;
    height: 81px !important;
  }
  
  .gm-bundled-control .gmnoprint > div > div {
    width: 40px !important;
    height: 40px !important;
  }
}
