/* CSS Variables */
:root {
  --white: #ffffff;
  --light-bg: #f8f9fa;
  --light-gray: #e9ecef;
  --medium-gray: #adb5bd;
  --dark-gray: #495057;
  --black: #212529;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --accent: #10b981;
  --border: rgba(0, 0, 0, 0.08);
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.1);
  --hurban-dark: #1a1a1a;
  --hurban-accent: #c6a87c;
  --hurban-gray: #f4f4f4;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6,
.serif-font {
  font-family: 'Playfair Display', serif;
}

/* Navigation */
.glass-nav {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Utilities */
.text-balance {
  text-wrap: balance;
}

/* Animations */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease-out;
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.animate-marquee {
  animation: marquee 30s linear infinite;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Container */
.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

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

.btn.primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn.secondary {
  background-color: transparent;
  color: var(--dark-gray);
  border: 1px solid var(--medium-gray);
}

.btn.secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Hero Section */
.hero {
  padding-top: 100px;
  padding-bottom: 40px;
}

@media (max-width: 768px) {
  .hero {
    padding-top: 80px;
    padding-bottom: 30px;
  }
}

.heroGrid {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: 40px;
  align-items: center;
}

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

.hero h1 {
  font-size: clamp(25px, 2.8vw, 39px);
  line-height: 1.1;
  margin-bottom: 16px;
  color: var(--black);
  font-weight: 800;
}

.hero p {
  color: var(--dark-gray);
  font-size: clamp(16px, 1.8vw, 20px);
  margin-bottom: 24px;
}

.pillRow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 28px;
}

.pill {
  font-size: 13px;
  color: var(--dark-gray);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 8px 16px;
  background-color: var(--light-bg);
}

/* Cards */
.card {
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.heroMedia {
  height: 456px;
  position: relative;
  border-radius: 2px;
  overflow: hidden;
}

.heroMedia img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 2px;
}

@media (max-width: 768px) {
  .heroMedia {
    height: 336px;
  }
}

img {
  border-radius: 2px;
}

/* Sections */
.section {
  padding: 60px 0;
}

@media (max-width: 768px) {
  .section {
    padding: 40px 0;
  }
}

.sectionTitle {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .sectionTitle {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

.sectionTitle h2 {
  margin: 0;
  font-size: 32px;
  font-weight: 800;
  color: var(--black);
}

.sectionTitle p {
  margin: 0;
  color: var(--medium-gray);
  font-size: 15px;
}

/* Grid Layouts */
.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .grid3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.feat {
  padding: 24px;
  height: 100%;
}

.feat h3 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
  color: var(--black);
}

.feat p {
  margin: 0;
  color: var(--dark-gray);
  font-size: 15px;
  line-height: 1.6;
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
}

.g {
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid var(--border);
  background-color: var(--light-bg);
}

.g img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
  border-radius: 2px;
}

.g:hover img {
  transform: scale(1.03);
}

.g1 {
  grid-column: span 7;
  height: 320px;
}

.g2 {
  grid-column: span 5;
  height: 320px;
}

.g3, .g4, .g5, .g6 {
  grid-column: span 4;
  height: 220px;
}

@media (max-width: 900px) {
  .g1, .g2 {
    grid-column: span 12;
    height: 260px;
  }
  
  .g3, .g4, .g5, .g6 {
    grid-column: span 6;
    height: 200px;
  }
}

@media (max-width: 600px) {
  .g3, .g4, .g5, .g6 {
    grid-column: span 12;
    height: 180px;
  }
}

/* Map */
.mapWrap {
  height: 420px;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* Utility Classes */
.small {
  font-size: 14px;
  color: var(--medium-gray);
}

/* Main Content - add padding for fixed header */
main {
  padding-top: 80px;
}

@media (max-width: 768px) {
  main {
    padding-top: 70px;
  }
}

/* Nosotros image mobile styles */
@media (max-width: 1023px) {
  #nosotros .nosotros-image {
    opacity: 1 !important;
    transform: none !important;
    margin-top: -20%;
  }
}

/* Noscript fallback styles */
noscript .reveal-on-scroll {
  opacity: 1;
  transform: none;
}

noscript .animate-fade-in-up {
  opacity: 1;
  transform: none;
}

noscript .animate-marquee {
  animation: none;
}

/* Lightbox Gallery */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 48px;
  font-weight: 300;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10000;
  line-height: 1;
  padding: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.lightbox-close:hover {
  transform: scale(1.1);
  opacity: 0.8;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 48px;
  font-weight: 300;
  color: white;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  cursor: pointer;
  z-index: 10000;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.lightbox-prev {
  left: 30px;
}

.lightbox-next {
  right: 30px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-counter {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 16px;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.6);
  padding: 8px 16px;
  border-radius: 20px;
  z-index: 10000;
}

.gallery-item {
  cursor: pointer;
  transition: transform 0.2s ease;
}

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

@media (max-width: 768px) {
  .lightbox-close {
    top: 10px;
    right: 15px;
    font-size: 36px;
    width: 40px;
    height: 40px;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 50px;
    height: 50px;
    font-size: 36px;
  }

  .lightbox-prev {
    left: 15px;
  }

  .lightbox-next {
    right: 15px;
  }

  .lightbox-content img {
    max-height: 80vh;
  }

  .lightbox-counter {
    bottom: 15px;
    font-size: 14px;
    padding: 6px 12px;
  }
}