@layer base {
  html {
    scroll-behavior: smooth;
    overflow-x: clip;
    overflow-y: auto;
  }
  [id] {
    scroll-margin-top: 5.5rem;
  }
  html, body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
  }
  body {
    font-family: 'Poppins', sans-serif;
    padding-left: 5% !important;
    padding-right: 5% !important;
    box-sizing: border-box;
    overflow-x: clip;
    min-height: 100vh;
  }
  header {
    padding-left: 5% !important;
    padding-right: 5% !important;
    box-sizing: border-box;
  }
  #mobileMenu {
    padding-left: 5% !important;
    padding-right: 5% !important;
    box-sizing: border-box;
  }
  h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
  }
  p {
    font-family: 'Poppins', sans-serif;
  }
  input, select, textarea {
    font-family: 'Poppins', sans-serif;
  }
  button {
    font-family: 'Montserrat', sans-serif;
  }
  main > :first-child {
    margin-top: 0 !important;
  }
  main > :last-child {
    margin-bottom: 0 !important;
  }
}

/* Scrollbar general estilizado */
html {
  scrollbar-width: thin;
  scrollbar-color: #008744 #f6f9ff;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f6f9ff;
}

::-webkit-scrollbar-thumb {
  background: #008744;
  border-radius: 9999px;
  border: 2px solid #f6f9ff;
}

::-webkit-scrollbar-thumb:hover {
  background: #00602b;
}

/* Lightbox Gallery Styles */
:root {
    --bg-primary: #f9fafb;
    --text-primary: #111827;
    --primary: #2563eb;
    --radius-xl: 1rem;
    --radius-lg: 0.75rem;
    --radius-full: 9999px;
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.gallery {
    padding: 100px 0;
    background: var(--bg-primary);
}

.lightbox-grid {
    display: grid;
    grid-template-columns: 50% 50%;
    gap: 40px;
    align-items: start;
}

@media (max-width: 768px) {
    .lightbox-grid {
        grid-template-columns: 100%;
    }
}

.lightbox-gallery-container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

.lightbox-info-container {
    padding-right: 0;
    text-align: left;
}

.main-image-container {
    position: relative;
    margin-bottom: 30px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.main-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
    transition: opacity 0.4s ease, transform 0.6s ease;
}

.image-counter {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.03em;
    z-index: 5;
    user-select: none;
    border: 1px solid rgba(255,255,255,0.1);
}

.thumbnails-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: all 0.25s ease;
    opacity: 0;
    pointer-events: none;
}

.scroll-arrow.visible {
    opacity: 1;
    pointer-events: auto;
}

.scroll-arrow-left { left: -10px; }
.scroll-arrow-right { right: -10px; }

.thumbnails-container {
    position: relative;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 10px;
    touch-action: pan-x;
    min-width: 0;
    width: 100%;
}

.thumbnails-container::-webkit-scrollbar {
    display: none;
}

.thumbnails-track {
    position: relative;
    display: flex;
    width: max-content;
    gap: 10px;
    padding: 10px 5px;
}

.thumb-btn {
    flex-shrink: 0;
    width: 120px;
    height: 80px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.thumb-btn.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}