:root {
  color-scheme: light;
  --primary: #1f4ed8;
  --primary-dark: #1939a6;
  --secondary: #0f172a;
  --muted: #64748b;
  --bg: #f8fafc;
  --card: #ffffff;
  --radius: 20px;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

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

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--secondary);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
video {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1120px, 90vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248, 250, 252, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  box-shadow: 0 10px 20px rgba(31, 78, 216, 0.3);
}

.brand-title {
  font-weight: 700;
}

.brand-subtitle {
  font-size: 0.85rem;
  color: var(--muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 12px 25px rgba(31, 78, 216, 0.25);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #fff;
  border-color: #e2e8f0;
  color: var(--secondary);
}

.btn-outline {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.7);
  color: var(--secondary);
}

.hero {
  padding: 90px 0 60px;
  background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.15), transparent 55%),
    linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  align-items: center;
}

.hero-content {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease;
}

.hero-content.is-loaded {
  opacity: 1;
  transform: translateY(0);
}

.eyebrow {
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(2.4rem, 4vw, 3.5rem);
  margin-bottom: 16px;
}

.hero-text {
  color: var(--muted);
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.hero-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  background: #fff;
  padding: 18px;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.hero-label {
  font-size: 0.8rem;
  color: var(--muted);
}

.hero-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-card-info {
  padding: 16px;
  background: #f8fafc;
  text-align: center;
  font-weight: 600;
}

/* Hero Carousel Styles */
.hero-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.hero-carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.hero-carousel-slide {
  min-width: 100%;
}

.hero-carousel-slide img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
}

.hero-carousel-controls {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 10px;
  pointer-events: none;
}

.hero-carousel-btn {
  background: rgba(255, 255, 255, 0.7);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  font-weight: bold;
  transition: background 0.2s;
}

.hero-carousel-btn:hover {
  background: #fff;
}

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

.hero-carousel-indicators button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 0;
}

.hero-carousel-indicators button.is-active {
  background: #fff;
  width: 20px;
  border-radius: 4px;
}

.section {
  padding: 70px 0;
}

#sobre {
  background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.8)), url('../img/fotosFondo/reloj1.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: #fff;
}

#sobre .section-header h2,
#sobre .feature-card h3,
#sobre .info-bar h4 {
  color: #fff;
}

#sobre .section-header p,
#sobre .feature-card p,
#sobre .info-bar p {
  color: #cbd5e1;
}

#sobre .feature-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

#sobre .info-bar {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#experiencias {
  background: linear-gradient(rgba(248, 250, 252, 0.85), rgba(248, 250, 252, 0.85)), url('../img/fotosFondo/vistaMirador.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

#experiencias .info-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  padding: 24px;
  border-radius: var(--radius);
}

#galeria {
  background: linear-gradient(rgba(241, 245, 249, 0.8), rgba(241, 245, 249, 0.8)), url('../img/fotosFondo/3.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

#galeria .section-header {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  padding: 20px;
  border-radius: var(--radius);
  display: inline-block;
  margin-bottom: 40px;
}

#ubicacion {
  background: linear-gradient(rgba(241, 245, 249, 0.9), rgba(241, 245, 249, 0.9)), url('../img/fotosFondo/istockphoto-1127592926-1024x1024.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

#ubicacion .location-info {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

#ubicacion .section-header {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  padding: 15px;
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.section.alt {
  background: #f1f5f9;
}

.section-header {
  margin-bottom: 36px;
  max-width: 640px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 12px;
}

.section-header p {
  color: var(--muted);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--card);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.feature-icon {
  font-size: 1.8rem;
  display: inline-block;
  margin-bottom: 12px;
}

.info-bar {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.gallery-item {
  border: none;
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.12);
  background: #e2e8f0;
  /* Color de fondo por si falta imagen */
  width: 100%;
}

.gallery-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}

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

.album-card {
  position: relative;
  max-width: 320px;
  /* Limitar ancho máximo */
}

.album-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.album-card:hover .album-overlay {
  opacity: 1;
}

.album-name {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.album-count {
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 8px;
  border-radius: 4px;
}

.dual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.info-card {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.info-card ul {
  margin-top: 14px;
  display: grid;
  gap: 10px;
  padding-left: 20px;
  color: var(--muted);
}

.location-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
  align-items: stretch;
}

.map-frame {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 400px;
  height: 100%;
}

.map-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.location-info {
  display: grid;
  gap: 12px;
  color: var(--muted);
}

.site-footer {
  background: #0f172a;
  color: #e2e8f0;
  padding: 50px 0 20px;
}

.footer-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-bottom: 24px;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-bottom {
  text-align: center;
  font-size: 0.9rem;
  color: #94a3b8;
}

.contact-link {
  color: #e2e8f0;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.contact-link:hover {
  color: var(--primary);
}

.whatsapp-link {
  margin-left: 10px;
  color: #25d366;
  font-size: 1.2rem;
}

.whatsapp-link:hover {
  color: #128c7e;
  transform: scale(1.1);
}

.mr-1 {
  margin-right: 4px;
}

#galleryModal.modal,
#experienciaModal.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9998;
  padding: 24px;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.85);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#galleryModal.modal.is-open,
#experienciaModal.modal.is-open {
  display: flex;
  align-items: center;
  justify-content: center;
}

#galleryModal .modal-backdrop,
#experienciaModal .modal-backdrop {
  position: fixed;
  inset: 0;
  cursor: pointer;
  z-index: 0;
}

#galleryModal .modal-dialog,
#experienciaModal .modal-dialog {
  position: relative;
  background: #fff;
  border-radius: 20px;
  width: 90%;
  max-width: 960px;
  max-height: calc(100vh - 64px);
  padding: 24px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
  overflow-y: auto;
  z-index: 1;
  margin: 32px auto;
  pointer-events: auto;
  touch-action: pan-y;
}

#galleryModal .modal-close,
#experienciaModal .modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #0f172a;
  color: #fff;
  border: none;
  border-radius: 999px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  z-index: 10001;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

#galleryModal .modal-close:hover,
#experienciaModal .modal-close:hover {
  background: #1e293b;
}

.carousel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  position: relative;
}

.carousel-track {
  display: block;
  width: 100%;
}

.carousel-slide {
  display: none;
  width: 100%;
}

.carousel-slide.is-active {
  display: block;
}

.carousel-slide img {
  width: 100%;
  height: 60vh;
  min-height: 300px;
  max-height: 600px;
  object-fit: contain;
  border-radius: 8px;
  background-color: #f8fafc;
}

.carousel-control {
  position: relative;
  z-index: 2;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  width: 40px;
  height: 40px;
  font-size: 1.4rem;
  cursor: pointer;
}

.carousel-indicators {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}

.carousel-indicators button {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: none;
  background: #cbd5f5;
  cursor: pointer;
}

.carousel-indicators button.is-active {
  background: var(--primary);
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: all 0.6s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: none;
}


.experiencias-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr));
  gap: 24px;
}

.experiencias-empty {
  padding: 20px;
  color: var(--muted);
  grid-column: 1 / -1;
}

.experiencia-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.experiencia-row:last-child {
  border-bottom: none;
}

.experiencia-row h3 {
  font-size: 1rem;
}

.experiencia-open {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  cursor: pointer;
}

#experienciaModal .modal-dialog-slim {
  width: min(720px, 92vw);
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.experiencia-modal-content {
  display: grid;
  gap: 14px;
  padding-top: 12px;
}

.experiencia-modal-content p {
  color: var(--muted);
}

#experienciaModalPhotos {
  display: grid;
  gap: 12px;
}

#experienciaModalPhotos img {
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.experiencia-map-wrapper iframe {
  width: 100%;
  height: 320px;
  border: 0;
  border-radius: 12px;
}

.experiencia-map-warning {
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 720px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    padding-top: 60px;
  }

  #galleryModal.modal,
  #experienciaModal.modal {
    padding: 12px 8px;
  }

  #galleryModal .modal-dialog,
  #experienciaModal .modal-dialog {
    margin: 16px auto;
  }

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

  .carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
  }

  .carousel-control.prev {
    left: 4px;
  }

  .carousel-control.next {
    right: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
