/* ==========================================================================
   CSS FOR GALLERY.HTML (4-CATEGORY SHARP SQUARE CAROUSELS & LIGHTBOX SLIDER)
   ========================================================================== */

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500;1,600&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg-main: #F8EFE4;
  --header-bg: #D9B99F;
  --header-bg-gradient: linear-gradient(135deg, #D9B99F 0%, #CFAB91 100%);
  --text-dark: #261B16;
  --text-muted: #665045;
  --accent-terracotta: #C44E20;
  --accent-terracotta-hover: #9E3B14;
  --accent-gold: #DA8C2A;

  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;

  --nav-height: 72px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-full: 999px;
  --transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-card: 0 12px 28px rgba(38, 27, 22, 0.1);
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background: linear-gradient(180deg, #F8EFE4 0%, #F4E7D7 60%, #EFE1CE 100%);
  color: var(--text-dark);
  line-height: 1.5;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

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

.text-center {
  text-align: center;
}

/* Prevent blue highlight selection on clicks */
.btn-primary,
.btn-contact,
.icon-button,
.nav-link,
.brand-logo,
.whatsapp-float,
.cat-nav-btn,
.lightbox-nav,
.square-card {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header & Nav */
.site-header {
  height: var(--nav-height);
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--header-bg-gradient);
  box-shadow: 0 4px 16px rgba(38, 27, 22, 0.08);
  border-bottom: 1px solid rgba(196, 78, 32, 0.12);
  transition: var(--transition);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand-logo {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.01em;
  transition: transform var(--transition), color var(--transition);
  display: inline-block;
  white-space: nowrap;
}

.brand-logo:hover {
  transform: translateY(-1px);
  color: var(--accent-terracotta);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  list-style: none;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 600;
  color: #4A3A31;
  position: relative;
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-full);
  transition: all var(--transition);
  display: inline-block;
}

.nav-link::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-full);
  background: rgba(38, 27, 22, 0.07);
  opacity: 0;
  transform: scale(0.85);
  transition: all var(--transition);
  z-index: -1;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 16px;
  height: 2px;
  background-color: var(--accent-terracotta);
  border-radius: 2px;
  opacity: 0;
  transform: translateX(-50%) scaleX(0);
  transition: all var(--transition);
}

.nav-link:hover {
  color: var(--accent-terracotta);
  transform: translateY(-1px);
}

.nav-link:hover::before {
  opacity: 1;
  transform: scale(1);
}

.nav-link:hover::after,
.nav-link.active::after {
  opacity: 1;
  transform: translateX(-50%) scaleX(1);
}

.nav-link.active {
  color: var(--text-dark);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.35);
}

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

.icon-button {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.1rem;
  transition: all var(--transition);
  background-color: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(38, 27, 22, 0.1);
}

.icon-button:hover {
  background-color: var(--accent-terracotta);
  transform: translateY(-1px) rotate(6deg);
}

.btn-contact {
  background: linear-gradient(135deg, var(--accent-terracotta) 0%, #9E3B14 100%);
  color: #FFFFFF;
  padding: 0.55rem 1.4rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 4px 14px rgba(196, 78, 32, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-contact:hover {
  background: linear-gradient(135deg, #D65A29 0%, var(--accent-terracotta) 100%);
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 8px 18px rgba(196, 78, 32, 0.38);
}

.mobile-toggle {
  display: none;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 3px;
  width: 22px;
  height: 22px;
  cursor: pointer;
  z-index: 1001;
  background: transparent;
  border: none;
  padding: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-toggle .grid-square {
  width: 9.5px;
  height: 9.5px;
  border: 1.8px solid var(--text-dark);
  border-radius: 3px;
  background-color: transparent;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-toggle:hover .grid-square {
  border-color: var(--accent-terracotta);
}

/* Active State (When clicked / open menu) */
.mobile-toggle.active {
  transform: rotate(90deg);
}

.mobile-toggle.active .grid-square {
  background-color: var(--accent-terracotta);
  border-color: var(--accent-terracotta);
  box-shadow: 0 2px 8px rgba(196, 78, 32, 0.4);
}

/* Gallery Hero Intro */
.gallery-hero {
  padding: 2.5rem 0 1.5rem 0;
}

.gallery-title {
  font-family: var(--font-heading);
  font-size: 3.75rem;
  line-height: 1.05;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
}

.gallery-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
  font-weight: 500;
}

/* Category Carousels Layout */
.category-carousels-section {
  padding: 1.5rem 0 4.5rem 0;
}

.category-block {
  margin-bottom: 2.75rem;
}

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

.category-title {
  font-family: var(--font-heading);
  font-size: 2.15rem;
  font-weight: 600;
  color: var(--text-dark);
  letter-spacing: -0.01em;
}

.category-nav-btns {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Category Nav Buttons */
.cat-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-terracotta);
  color: #FFFFFF;
  font-size: 1.35rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 3px 0;
  box-shadow: 0 4px 10px rgba(196, 78, 32, 0.3);
  transition: all var(--transition);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.cat-nav-btn.prev {
  padding-right: 2px;
}

.cat-nav-btn.next {
  padding-left: 2px;
}

.cat-nav-btn:hover {
  background: var(--accent-terracotta-hover);
  transform: scale(1.08);
  box-shadow: 0 6px 14px rgba(196, 78, 32, 0.45);
}

/* Horizontal Scrolling Carousel Track (Hide Scrollbar) */
.category-carousel-track {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0.5rem 0.25rem 0.75rem 0.25rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.category-carousel-track::-webkit-scrollbar {
  display: none;
}

/* Sharp Square Photo Cards */
.square-card {
  flex: 0 0 270px;
  aspect-ratio: 1 / 1;
  border-radius: 0;
  overflow: hidden;
  position: relative;
  scroll-snap-align: start;
  box-shadow: 0 10px 24px rgba(38, 27, 22, 0.12);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  background-color: #E2D2C3;
  border: none;
}

.square-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Gradient Shadow Overlay (No Orange Tag) */
.square-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(38, 27, 22, 0.75) 100%);
  pointer-events: none;
  z-index: 2;
}

.square-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(140, 55, 26, 0.22);
}

.square-card:hover img {
  transform: scale(1.08);
}

/* Lightbox Modal (100% Centered Image & Nav Buttons, No Text Badges) */
.lightbox-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background-color: rgba(26, 18, 14, 0.94);
  backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
}

.lightbox-modal.open {
  display: flex;
  animation: fadeIn 0.3s ease-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.75rem;
  font-size: 2.5rem;
  color: #FFFFFF;
  cursor: pointer;
  transition: color var(--transition), transform var(--transition);
  line-height: 1;
  z-index: 2020;
}

.lightbox-close:hover {
  color: var(--accent-terracotta);
  transform: scale(1.15);
}

.lightbox-content {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 82vw;
  max-height: 82vh;
  position: relative;
  z-index: 2005;
}

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

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-terracotta);
  color: #FFFFFF;
  font-size: 1.75rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 3px 0;
  z-index: 2010;
  box-shadow: 0 6px 18px rgba(196, 78, 32, 0.45);
  transition: all var(--transition);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.lightbox-nav.prev {
  left: 1.75rem;
  padding-right: 2px;
}

.lightbox-nav.next {
  right: 1.75rem;
  padding-left: 2px;
}

.lightbox-nav:hover {
  background: var(--accent-terracotta-hover);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 8px 24px rgba(196, 78, 32, 0.6);
}

/* Floating WhatsApp */
.whatsapp-float {
  position: fixed;
  bottom: 1.75rem;
  right: 2rem;
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #25D366 0%, #1DA851 100%);
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  box-shadow: 0 8px 22px rgba(37, 211, 102, 0.4);
  z-index: 999;
  transition: var(--transition);
  text-decoration: none;
  border: 2px solid #FFFFFF;
}

.whatsapp-float:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.5);
}

/* Footer */
.site-footer {
  background-color: var(--header-bg);
  background: var(--header-bg-gradient);
  color: var(--text-dark);
  padding: 2.25rem 0;
  border-top: 1px solid rgba(38, 27, 22, 0.1);
}

.footer-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-brand {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-dark);
  white-space: nowrap;
}

.footer-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
}

.footer-info-item {
  font-size: 0.88rem;
  color: rgba(38, 27, 22, 0.85);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.footer-wa-link {
  color: var(--text-dark);
  font-weight: 600;
  transition: color var(--transition);
}

.footer-wa-link:hover {
  color: var(--accent-terracotta);
  text-decoration: underline;
}

.info-divider {
  color: var(--accent-terracotta);
  opacity: 0.5;
}

.footer-copy {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dark);
}

/* Mobile & Tablet Responsive */
@media (max-width: 768px) {
  .brand-logo {
    font-size: 1.2rem;
  }

  .container {
    padding: 0 1.25rem;
  }

  .mobile-toggle {
    display: grid;
  }

  .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    background: var(--header-bg);
    padding: 1.5rem 1.5rem 1.75rem 1.5rem;
    box-shadow: 0 12px 28px rgba(38, 27, 22, 0.15);
    gap: 0.85rem;
    border-bottom: 1px solid rgba(196, 78, 32, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translate3d(0, -10px, 0);
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
    will-change: opacity, transform;
    backface-visibility: hidden;
    pointer-events: none;
    z-index: 999;
  }

  .nav-links.mobile-open {
    opacity: 1;
    visibility: visible;
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
  }

  .gallery-title {
    font-size: 2.75rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
  }

  .category-title {
    font-size: 1.75rem;
  }

  .square-card {
    flex: 0 0 200px;
    aspect-ratio: 1 / 1;
    border-radius: 0;
  }

  .cat-nav-btn {
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
  }

  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 1.4rem;
  }

  .lightbox-nav.prev {
    left: 0.5rem;
    padding-right: 2px;
  }

  .lightbox-nav.next {
    right: 0.5rem;
    padding-left: 2px;
  }

  .whatsapp-float {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 48px;
    height: 48px;
    font-size: 1.3rem;
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 1.25rem;
  }
}

@media (max-width: 480px) {
  .brand-logo {
    font-size: 1.08rem;
  }

  .footer-brand {
    font-size: 1.15rem;
  }

  .gallery-title {
    font-size: 2.25rem;
  }

  .gallery-subtitle {
    font-size: 0.95rem;
  }

  .category-title {
    font-size: 1.5rem;
  }

  .square-card {
    flex: 0 0 170px;
  }

  .lightbox-nav {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }

  .lightbox-close {
    font-size: 2.2rem;
    top: 0.75rem;
    right: 1rem;
  }
}

/* Scroll Reveal Fade-In Animation */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

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

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}