/* === index.css === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --color-bg: #f5f6f8; 
  --color-surface: #ffffff; 
  --color-surface-hover: #f1f3f5;
  --color-primary: #e63946; 
  --color-text: #333333;
  --color-text-muted: #6c757d;
  --color-border: #e0e0e0;
  --font-family: 'Inter', sans-serif;
}


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

body {
  font-family: var(--font-family);
  background-color: var(--color-bg);
  color: var(--color-text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Glassmorphism utility */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-surface-hover);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}



/* === App.css === */
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 1.5rem;
  width: 50px;
  height: 50px;
  background-color: #2c3338;
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  z-index: 1000;
  transition: all 0.2s ease;
}

.footer {
  text-align: center;
  padding: 2rem;
  margin-top: 4rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

/* Cart Modal Styles */
.cart-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
}

.cart-modal {
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background: var(--color-bg);
  border-left: 1px solid var(--color-border);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  animation: slideIn 0.3s ease-out forwards;
}

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

.cart-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.cart-modal-header h3 {
  font-size: 1.25rem;
}

.close-btn {
  font-size: 2rem;
  color: var(--color-text-muted);
}

.close-btn:hover {
  color: white;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.empty-cart {
  color: var(--color-text-muted);
  text-align: center;
  margin-top: 2rem;
}

.cart-item {
  display: flex;
  gap: 1rem;
  background: rgba(255,255,255,0.03);
  padding: 0.75rem;
  border-radius: 8px;
}

.cart-item img {
  width: 60px;
  height: 60px;
  border-radius: 4px;
  object-fit: cover;
}

.cart-item strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.cart-item p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.cart-form {
  border-top: 1px solid var(--color-border);
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-form h4 {
  margin-bottom: 0.5rem;
}

.cart-form input {
  padding: 0.85rem;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #ccc;
  color: #333333;
  font-family: inherit;
  font-size: 0.95rem;
}

.cart-form input::placeholder {
  color: #999;
}

.cart-form input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(230, 57, 70, 0.2);
}

.submit-cart-btn {
  background: var(--color-primary);
  color: white;
  padding: 1rem;
  border-radius: 8px;
  font-weight: 600;
  margin-top: 0.5rem;
  transition: opacity 0.2s;
}

.submit-cart-btn:hover {
  opacity: 0.9;
}


/* === components/Header.css === */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 calc(2rem + 50px);
  height: 70px;
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: #262933; /* Dark header */
  color: white;
  border-bottom: none;
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex: 1; 
}

.header-right {
  justify-content: flex-end;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-right: 2rem;
}

.logo-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 4px solid var(--color-primary);
}

.logo-text {
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1.1;
  letter-spacing: 1px;
}

.header-nav {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--color-primary);
}

.icon-btn, .cart-btn {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover, .cart-btn:hover {
  color: var(--color-text);
}

.cart-btn {
  position: relative;
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: var(--color-primary);
  color: white;
  font-size: 0.7rem;
  font-weight: bold;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
}

.user-profile img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.vendor-badge {
  background: rgba(230, 57, 70, 0.15);
  color: var(--color-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}


/* === components/HeroBanner.css === */
.hero-container {
  height: 60vh;
  min-height: 400px;
  width: 100%;
  position: relative;
  overflow: hidden;
  background-color: var(--color-bg);
}

.hero-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  /* clip-path animation replacing framer-motion */
  transition: clip-path 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 17, 21, 0.9) 0%, rgba(15, 17, 21, 0.2) 50%, rgba(15, 17, 21, 0.4) 100%);
  display: flex;
  align-items: flex-end;
  padding: 4rem;
  transition: background 0.4s ease;
}

.hero-overlay.active {
  background: linear-gradient(to top, rgba(230, 57, 70, 0.8) 0%, rgba(15, 17, 21, 0.1) 60%);
}

.hero-content {
  color: white;
  max-width: 600px;
  /* Emulate framer-motion slide up */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

.hero-overlay.active .hero-content {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.hero-content h2 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.1;
  text-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.hero-content p {
  font-size: 1.2rem;
  font-weight: 300;
  opacity: 0.9;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}


/* === components/Directory.css === */
.directory-section {
  padding: 2rem 5rem 4rem 2rem; /* Added right and bottom padding to clear the button */
  max-width: 1440px;
  margin: 0 auto;
}

.directory-controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  
  /* Sticky behavior */
  position: sticky;
  top: 70px; /* Under the header */
  z-index: 50; /* Stay above cards */
  transition: all 0.2s ease;
  margin-top: -1rem; /* Better spacing when transitioning */
  padding: 1rem 0; /* Base padding */
}

/* Solo se aplica cuando hace contacto con el header y se pega */
.directory-controls-row.is-sticky {
  background: white;
  padding: 0.75rem 1rem;
  margin-left: -1rem; /* Compensate for the padding to keep content aligned */
  margin-right: -1rem;
  border-radius: 8px; /* Optional subtle corner */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); /* Slight shadow to separate from cards */
  border-bottom: 1px solid #eee;
}

.filters-area {
  display: flex;
  align-items: center;
  position: relative;
}

.mobile-filter-btn {
  display: none; /* Hidden on desktop */
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  cursor: pointer;
  z-index: 10;
}
.mobile-filter-btn:active {
  background: var(--color-surface-hover);
}

.filter-pills {
  display: flex;
  gap: 0.5rem;
}

.filter-pill {
  padding: 0.6rem 1.2rem;
  border-radius: 20px;
  background-color: white;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.filter-pill:hover {
  background-color: var(--color-surface-hover);
}

.filter-pill.active {
  background-color: #555c66; /* Match screenshot dark pill */
  color: white;
  border-color: #555c66;
}

.view-toggle {
  display: flex;
  background: white;
  border-radius: 25px;
  border: 1px solid var(--color-border);
  padding: 0.2rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.toggle-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  transition: all 0.2s ease;
  border: none;
  background: transparent;
}

.toggle-btn.active {
  background: #555c66;
  color: white;
}

/* Map Mode Styles */
.directory-layout.map-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.directory-layout.map-mode .directory-content {
  display: block;
  grid-column: 1;
}

.directory-layout.map-mode .sites-container {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
  max-height: 80vh;
  overflow-y: auto;
  padding-right: 10px;
}

.directory-layout.map-mode .map-container-side {
  display: block;
  grid-column: 2;
  height: 80vh;
  position: sticky;
  top: 100px;
}

/* Grid Mode Styles */
.sites-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* Site Card Styles exactly like screenshot */
.site-card {
  background: white;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.site-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.card-image-wrapper {
  position: relative;
  height: 220px;
  width: 100%;
  overflow: hidden;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card-image-wrapper:hover .card-image {
  transform: scale(1.05);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card-image-wrapper:hover .card-overlay {
  opacity: 1;
}

.card-overlay span {
  color: white;
  font-weight: 600;
  border: 1px solid white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

.card-info {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.card-title-row h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-id-link {
  text-decoration: none;
  font-size: 0.85rem;
  color: var(--color-primary);
  font-weight: 500;
  cursor: pointer;
}

.card-location, .card-size {
  font-size: 0.9rem;
  color: #666; 
  margin: 0;
  line-height: 1.4;
}

.card-footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.badge-available {
  background: #d4edda;
  color: #155724;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
}

.card-footer-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-add-cart {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  background: white;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.btn-add-cart:hover {
  background: var(--color-primary);
  color: white;
}

.btn-calendar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
  border-radius: 4px;
  background: white;
  border: 1px solid #ccc;
  color: #555;
  transition: all 0.2s ease;
}

.btn-calendar:hover {
  background: #f4f5f7;
}


/* === components/MapComponent.css === */
.map-wrapper {
  height: 100%;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--color-border);
}

.leaflet-container {
  background-color: var(--color-bg) !important;
}

/* Customizing Leaflet Popup for Dark Theme */
.leaflet-popup-content-wrapper {
  background: var(--color-surface) !important;
  color: var(--color-text) !important;
  border-radius: 12px !important;
  padding: 0 !important;
  overflow: hidden;
}

.leaflet-popup-tip {
  background: var(--color-surface) !important;
}

.leaflet-popup-content {
  margin: 0 !important;
  width: 200px !important;
}

.custom-popup .popup-content {
  display: flex;
  flex-direction: column;
}

.popup-img {
  width: 100%;
  height: 100px;
  object-fit: cover;
}

.custom-popup h4 {
  font-size: 1rem;
  margin: 10px 10px 2px 10px;
  color: white;
}

.popup-type {
  font-size: 0.7rem;
  color: var(--color-primary);
  margin: 0 10px 5px 10px;
  text-transform: uppercase;
  font-weight: bold;
}

.custom-popup p {
  font-size: 0.8rem;
  margin: 0 10px 5px 10px;
  color: #adb5bd;
}

.btn-add-cart-popup {
  margin: 10px;
  background: rgba(230, 57, 70, 0.1);
  color: var(--color-primary);
  border: none;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-add-cart-popup:hover {
  background: var(--color-primary);
  color: white;
}


/* === components/SiteDetailsModal.css === */
.site-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.site-modal-content {
  background: white;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  border-radius: 8px;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
}

.site-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
}

.site-modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #333;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-ficha-tecnica {
  background: #f4f5f7;
  border: 1px solid #ddd;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #555;
}

.btn-close-modal {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f4f5f7;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
}

.site-modal-body {
  padding: 1.5rem;
}

.modal-images {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  height: 250px;
  position: relative;
}

.modal-image-wrapper {
  flex: 1;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #f4f5f7; /* Add a background in case image is contained */
}

.modal-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  z-index: 2;
  cursor: pointer;
}

.img-nav:hover {
  background: #f4f5f7;
}

.img-nav.prev { left: 10px; }
.img-nav.next { right: 10px; }

.modal-specs {
  margin-bottom: 1.5rem;
}

.specs-title {
  font-size: 0.75rem;
  color: #888;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.specs-desc {
  font-size: 0.95rem;
  color: #333;
  margin-bottom: 1rem;
  font-weight: 500;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.5rem;
}

.spec-box {
  background: #f4f5f7;
  padding: 0.75rem;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.spec-label {
  font-size: 0.75rem;
  color: #777;
}

.spec-value {
  font-size: 0.9rem;
  color: #333;
  font-weight: 600;
}

.modal-availability {
  position: relative;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
}

.availability-badge {
  display: inline-block;
  background: #3b82f6;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.calendars-wrapper {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Reducimos escala en el modal para que quepan dos */
.calendars-wrapper .calendar-widget {
  max-width: 320px;
  padding: 0.5rem;
}

.modal-footer-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}

.btn-add-modal {
  background: #dc3545;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 600;
  transition: background 0.2s;
}

.btn-add-modal:hover {
  background: #c82333;
}


/* === components/CalendarModal.css === */
.cal-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.cal-modal-content {
  background: white;
  width: 100%;
  max-width: 400px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
}

.cal-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #eee;
}

.cal-modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #333;
}

.btn-close-cal {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  color: #888;
}

.cal-modal-body {
  padding: 1.5rem;
}


/* === components/CalendarWidget.css === */
.calendar-widget {
  width: 100%;
  max-width: 350px;
  background: white;
  padding: 1rem;
  border-radius: 8px;
  font-family: var(--font-family);
  margin: 0 auto;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.cal-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #f4f5f7;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  color: #333;
  transition: background 0.2s ease;
}

.cal-nav:hover {
  background: #e2e4e8;
}

.cal-month {
  font-weight: 700;
  font-size: 1rem;
  color: #333;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  text-align: center;
  margin-bottom: 1.5rem;
}

.cal-day-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #888;
  margin-bottom: 0.5rem;
}

.cal-day-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 4px;
  background: #f8f9fa;
  color: #adb5bd;
}

.cal-day-cell.empty {
  background: transparent;
}

.cal-day-cell.available {
  background: #d4edda;
  color: #155724;
  font-weight: 700;
}

.cal-day-cell.occupied {
  background: #f8d7da;
  color: #721c24;
  font-weight: 700;
}

.calendar-legend {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: center;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #555;
  font-weight: 600;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.legend-color.available {
  background: #d4edda;
}

.legend-color.occupied {
  background: #f8d7da;
}


/* === components/Lightbox.css === */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  font-size: 2.5rem;
  color: white;
  opacity: 0.7;
  transition: opacity 0.2s;
  z-index: 2010;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-content {
  position: relative;
  width: 90%;
  max-width: 1200px;
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  object-fit: contain;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  color: white;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: all 0.2s ease;
  z-index: 2010;
}

.lightbox-nav:hover {
  opacity: 1;
  background: rgba(230, 57, 70, 0.8); /* Primary red */
}

.lightbox-nav.prev {
  left: -80px;
}

.lightbox-nav.next {
  right: -80px;
}

.lightbox-indicators {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: background 0.3s ease;
}

.indicator.active {
  background: white;
}



/* === Card Scroll Animations (replaces framer-motion) === */
.site-card {
  opacity: 0;
  transform: translateY(50px) scale(0.95);
  transition: opacity 0.5s ease, transform 0.5s ease;
  will-change: opacity, transform;
}

.site-card.in-view {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* === Mobile Responsiveness === */
@media (max-width: 768px) {
  /* Header */
  .header {
    padding: 0 1rem;
    height: auto;
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .header-nav {
    display: none; /* Ocultar menú en móviles por simplicidad o usar menú hamburguesa */
  }
  .header-left, .header-right {
    gap: 0.5rem;
  }
  .logo-text {
    font-size: 0.75rem;
  }
  
  /* Hero Banner */
  .hero-container {
    height: auto;
    min-height: 50vh;
  }
  .hero-overlay {
    padding: 2rem;
  }
  .hero-content h2 {
    font-size: 2rem;
  }
  .hero-content p {
    font-size: 1rem;
  }
  /* En móviles, las rebanadas diagonales son complejas, mejor resetear a capas completas con opacidad o dejar como están si el usuario no hace hover */
  
  /* Directory Section */
  .directory-section {
    padding: 1rem;
  }
  .directory-controls-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
  .filters-area {
    width: auto;
    overflow: visible;
  }
  .mobile-filter-btn {
    display: flex;
  }
  .filter-pills {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 55px;
    left: 0;
    background: white;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    z-index: 200;
    min-width: 180px;
    border: 1px solid var(--color-border);
  }
  .filter-pills.show-mobile {
    display: flex;
  }
  .filter-pill {
    width: 100%;
    text-align: left;
    margin-bottom: 5px;
  }

  
  /* Map vs Grid Mode */
  .directory-layout.map-mode {
    display: flex;
    flex-direction: column; 
  }
  .directory-layout.map-mode .directory-content {
    display: none; /* Hide grid completely when map is active on mobile */
  }
  .directory-layout.map-mode .map-container-side {
    position: relative;
    top: 0;
    height: 60vh; /* Takes most of the screen */
    width: 100%;
    margin-bottom: 1rem;
    z-index: 1;
    border-radius: 12px;
  }
  .directory-layout.map-mode .sites-container {
    max-height: none;
    overflow-y: visible;
    grid-template-columns: 1fr;
    padding-right: 0;
  }
  
  /* Grid Mode only */
  .sites-container {
    grid-template-columns: 1fr;
  }
  
  /* Modals — reestructurar a una sola columna vertical (PRO-252) */
  .site-modal-content {
    width: 95%;
    max-width: none;
    max-height: 90vh;
    flex-direction: column;
  }
  /* Las dos imágenes del detalle se apilan en columna */
  .modal-images {
    flex-direction: column;
    height: auto;
  }
  .modal-image-wrapper {
    width: 100%;
    height: 200px;
  }
  /* Specs en una sola columna */
  .specs-grid {
    grid-template-columns: 1fr;
  }
  /* Calendarios de disponibilidad apilados */
  .calendars-wrapper {
    flex-direction: column;
  }
  .calendars-wrapper .calendar-widget {
    width: 100%;
  }
  /* Carrito a pantalla completa, formulario en columna */
  .cart-modal {
    width: 100%;
    max-width: none;
  }
  .cart-form {
    display: flex;
    flex-direction: column;
  }
  .lightbox-nav.prev {
    left: 10px;
  }
  .lightbox-nav.next {
    right: 10px;
  }
  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 2rem;
  }
}
