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

:root {
  --bg-primary: #FAFAFA;
  --bg-secondary: #F5F2EB;
  --text-main: #2C2C2C;
  --text-light: #4A4A4A;
  --accent-ochre: #C49A45;
  --accent-terra: #A35D4D;
  
  --font-serif: 'Cormorant Garamond', serif;
  --font-sans: 'Inter', sans-serif;
  
  --transition-smooth: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html, body {
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
}

button, a, input, textarea {
  touch-action: manipulation;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--text-main);
}

a {
  text-decoration: none;
  color: var(--text-main);
  transition: var(--transition-smooth);
}

a:hover {
  color: var(--accent-ochre);
}

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

/* Animations (Intersection Observer targets) */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.5rem 8vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background-color: var(--bg-primary);
  color: var(--text-main);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.nav-links a {
  color: inherit;
  font-size: 0.95rem;
  text-transform: lowercase;
  letter-spacing: 0.5px;
  font-family: var(--font-sans);
}

.nav-brand {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: none;
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.nav-brand:hover {
  color: var(--accent-ochre);
}

.nav-links {
  display: flex;
  gap: 3rem;
  align-items: center;
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-ochre);
}

.nav-contact {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

.nav-contact svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transition: fill var(--transition-smooth);
}

.nav-contact a:hover svg {
  fill: var(--accent-ochre);
}

/* Nav Hamburger (mobile only, hidden on desktop) */
.nav-hamburger {
  display: none !important;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 44px;
  height: 44px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  z-index: 1001;
  color: var(--text-main);
  touch-action: manipulation;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: currentColor;
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Ensure picture tags behave like block wrappers */
picture {
  display: block;
  width: 100%;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 2.5rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 50px;
  border: 1px solid var(--accent-ochre);
  color: var(--accent-ochre);
  background: transparent;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

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

.btn-primary:hover {
  background: var(--accent-ochre);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(196, 154, 69, 0.4);
}

/* Hero Section */
.hero {
  height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 5%;
  z-index: -2;
  filter: brightness(0.7);
}

.hero-content {
  max-width: 800px;
  padding: 0 2rem;
  z-index: 1;
}

.hero-content > * {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-content h1 {
  animation-delay: 0.1s;
}

.hero-content p {
  animation-delay: 0.3s;
}

.hero-content .hero-buttons {
  animation-delay: 0.5s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  font-style: italic;
  margin-bottom: 1rem;
  color: white;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 300;
  letter-spacing: 1px;
  margin-bottom: 3rem;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

.hero .btn:not(.btn-primary) {
  background: white;
  border-color: white;
  color: var(--accent-ochre);
}

.hero .btn:not(.btn-primary):hover {
  background: white;
  color: var(--accent-ochre);
  border-color: white;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* Remover overrides de hero .btn-primary para que use el por defecto */


/* General Section Styling */
.section {
  padding: 10rem 8vw;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-family: var(--font-sans);
  color: var(--text-light);
  font-size: 1.1rem;
  margin-bottom: 4rem;
  font-weight: 300;
}

/* Two Column Layout */
.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  gap: clamp(3rem, 6vw, 6rem);
  align-items: center;
}

.two-col.reverse {
  direction: rtl;
}
.two-col.reverse > * {
  direction: ltr;
}

/* Quien es Carlos */
.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* Horizontal 16:9 video aspect ratio */
  overflow: hidden;
  background: var(--bg-secondary);
  border-radius: 16px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.video-wrapper video, .video-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-content {
  /* Padding removed to let grid handle spacing */
}

.about-text p {
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text-light);
  line-height: 1.8;
}

/* Ultimas Obras (Carousel) */
.obras-section {
  background-color: var(--bg-secondary);
  padding: 10rem 0 10rem 8vw;
}

.carousel-wrapper {
  position: relative;
  overflow: visible;
}

.carousel-btn {
  background: white;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.2rem;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.carousel-btn:hover {
  background: var(--accent-ochre);
  color: white;
  border-color: var(--accent-ochre);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(196,154,69,0.3);
}

.carousel-container {
  display: flex;
  overflow-x: auto;
  overflow-y: visible;
  gap: 3rem;
  padding-bottom: 1.25rem;
  padding-top: 12px;  /* room for hover lift */
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x mandatory;
  cursor: grab;
}

.carousel-container:active {
  cursor: grabbing;
}

.carousel-container::-webkit-scrollbar {
  display: none;
}

.obra-card {
  flex: 0 0 clamp(220px, 28vw, 380px);
  scroll-snap-align: start;
}

.obra-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  margin-bottom: 1rem;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}

.obra-card:hover .obra-img {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.14);
}

.obra-title {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  margin-bottom: 0.3rem;
}

.obra-details {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 300;
  letter-spacing: 0.5px;
}

.carousel-arrows {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-left: -8vw;
  padding: 0 8vw;
  margin-top: 1.25rem;
}

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

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

/* Proxima Exposicion */
.expo-section-header {
  text-align: center;
  margin-bottom: 5rem;
}

.expo-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.expo-tag {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.8rem;
  color: var(--accent-ochre);
  margin-bottom: clamp(0.5rem, 1vw, 0.75rem);
  display: block;
}

.expo-title {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  margin-bottom: clamp(0.25rem, 0.5vw, 0.4rem);
  line-height: 1.15;
}

.expo-subtitle {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  font-weight: 400;
  color: var(--accent-ochre);
  margin-top: 0;
  margin-bottom: clamp(0.4rem, 0.8vw, 0.6rem);
  line-height: 1.25;
}

.expo-date {
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  color: var(--text-light);
  margin-bottom: clamp(1rem, 1.6vw, 1.5rem);
  font-style: italic;
  font-family: var(--font-serif);
}

.expo-desc {
  font-size: clamp(0.95rem, 1.15vw, 1.05rem);
  color: var(--text-light);
  font-weight: 300;
  margin-bottom: 0;
  line-height: 1.75;
}

.expo-content .btn {
  margin-top: clamp(1.5rem, 2vw, 2rem);
  align-self: flex-start;
}

.expo-img-wrapper {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
  aspect-ratio: 4 / 3;
  max-height: min(480px, 58vh);
  background-color: rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
}

.expo-img-wrapper img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.expo-item:hover .expo-img-wrapper img {
  transform: scale(1.02);
}

/* Inversionismo */
.inversionismo-section {
  padding: 8rem 8vw;
  background-color: var(--bg-secondary);
}

.inv-img-wrapper {
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
  width: 100%;
}

.inv-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 3 / 4;
}

.inv-content {
  /* Padding removed */
}

.inv-content h2 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 2rem;
}

.inv-content p {
  font-size: 1.05rem;
  color: var(--text-light);
  font-weight: 300;
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

/* Footer */
footer {
  padding: 4rem;
  text-align: center;
  border-top: 1px solid rgba(0,0,0,0.1);
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Page Header Centered (Obras, Exposiciones, Contacto) */
.page-header-centered {
  padding: 12rem 2rem 4rem;
  text-align: center;
  background: var(--bg-secondary);
}

.page-header-centered h1 {
  font-size: clamp(3rem, 7vw, 4.5rem);
  margin-bottom: 1rem;
  font-style: italic;
}

.page-header-centered p {
  font-size: 1.2rem;
  color: var(--text-light);
  font-weight: 300;
  max-width: 600px;
  margin: 0 auto;
}

/* Mobile Toggle */
.mobile-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}
.mobile-toggle-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  transition: fill var(--transition-smooth);
}
.mobile-toggle-btn:hover svg {
  fill: var(--accent-ochre);
}

/* Obras Filter and Grid */
.filter-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 4rem 2rem 3rem;
}

.filter-btn {
  background: transparent;
  border: 1px solid rgba(0,0,0,0.1);
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  color: var(--text-main);
}

.filter-btn:hover {
  border-color: var(--accent-ochre);
  color: var(--accent-ochre);
}

.filter-btn.active {
  background: var(--accent-ochre);
  color: white;
  border-color: var(--accent-ochre);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 3rem;
  padding: 0 8vw 8rem;
}

.gallery-card {
  display: block;
}
.gallery-card.hidden {
  display: none;
}

/* Exposiciones Page - Sections & Items */
.expo-section-title-wrap {
  text-align: center;
  padding: 5rem 8vw 2rem;
  background-color: var(--bg-primary);
}

.expo-section-title-wrap h2 {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  color: var(--text-main);
  font-weight: 400;
  letter-spacing: 0.5px;
  position: relative;
  display: inline-block;
  padding-bottom: 1rem;
}

.expo-section-title-wrap h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background-color: var(--accent-ochre);
}

.expo-item {
  padding: clamp(3.5rem, 6vw, 6rem) 8vw;
}

.expo-item .two-col {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 5vw, 5.5rem);
  align-items: center;
}

.expo-item:nth-of-type(odd) {
  background-color: var(--bg-primary);
}

.expo-item:nth-of-type(even) {
  background-color: var(--bg-secondary);
}

.no-expo-text {
  text-align: center;
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text-light);
  font-family: var(--font-serif);
}

/* Gallery Loading Indicator */
.gallery-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem;
  gap: 1.5rem;
}

.gallery-loading p {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--text-light);
  font-style: italic;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0,0,0,0.1);
  border-top-color: var(--accent-ochre);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Hide gallery until images load */
#galleryGrid:not(.loaded) {
  opacity: 0;
  height: 0;
  overflow: hidden;
}

#galleryGrid.loaded {
  opacity: 1;
  height: auto;
  transition: opacity 0.4s ease;
}

/* Contacto Page */
.contact-section {
  padding: 6rem 8vw 8rem;
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.contact-card {
  background: white;
  border-radius: 16px;
  padding: 3rem 2rem;
  text-align: center;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 10px 30px rgba(0,0,0,0.03);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}
.contact-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 1.5rem;
  fill: var(--accent-ochre);
}
.contact-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.contact-card p {
  color: var(--text-light);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}
.email-copy-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 290px;
  height: 46px;
  min-height: 46px;
  padding: 0.35rem 0.5rem 0.35rem 1.1rem;
  background: var(--bg-primary);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 50px;
  box-sizing: border-box;
  transition: var(--transition-smooth);
  cursor: pointer;
  margin-top: auto;
}

.email-copy-pill:hover {
  border-color: var(--accent-ochre);
  box-shadow: 0 4px 15px rgba(196, 154, 69, 0.15);
}

.email-copy-address {
  font-family: var(--font-sans);
  font-size: 0.84rem;
  color: var(--text-main);
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: all;
}

.email-copy-trigger {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-left: 0.5rem;
  background: var(--accent-ochre);
  color: #FFFFFF;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.email-copy-trigger:hover {
  background: #ad8332;
  transform: scale(1.08);
}

.email-copy-trigger:active {
  transform: scale(0.95);
}

.email-copy-trigger svg {
  display: block;
}

.copy-feedback-toast {
  position: absolute;
  top: -36px;
  right: 12px;
  background: var(--text-main);
  color: #FFFFFF;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.copy-feedback-toast.show {
  opacity: 1;
  transform: translateY(0);
}
.contact-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: auto;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  background: var(--bg-primary);
  transition: border-color 0.3s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent-ochre);
}
.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}
.contact-card-form {
  justify-content: flex-start;
}

/* Lightbox Styles */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(8px);
}

.lightbox-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.5);
  transform: scale(0.95);
  transition: transform 0.3s ease;
  object-fit: contain;
}

.lightbox-overlay.active .lightbox-img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: white;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: transform 0.2s, background 0.2s;
  z-index: 100001;
}

.lightbox-close:hover {
  transform: scale(1.1);
  background: #f0f0f0;
}

.lightbox-close svg {
  width: 24px;
  height: 24px;
  fill: #111;
}

/* Responsive */
@media (max-width: 1024px) {
  .section { padding: 5rem 4vw; }
  .obras-section { padding-left: 4vw; }
  .carousel-arrows { padding: 0 4vw; }
}

@media (min-width: 520px) and (max-width: 850px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 2rem !important;
  }
}


@media (min-width: 769px) and (max-width: 960px) {
  .expo-item { padding: 4rem 6vw; }
  .expo-item .two-col { gap: 2.5rem; }
  .expo-title { font-size: 2.2rem; }
  .expo-img-wrapper { aspect-ratio: 4 / 3; }
}

@media (max-width: 768px) {
  /* Navbar mobile - Clean single bar + drawer */
  .navbar {
    padding: 0.75rem 5vw;
    background: rgba(250, 250, 250, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    min-height: 60px;
    height: 60px;
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
  }
  .nav-brand { 
    font-size: 1.45rem; 
    margin: 0;
    position: relative;
    z-index: 1002;
  }
  .nav-contact {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    position: relative;
    z-index: 1002;
  }
  .nav-hamburger {
    display: flex !important;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    position: relative;
    z-index: 1003;
    color: var(--text-main);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    margin-left: 0.25rem;
  }
  .nav-links { 
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(250, 250, 250, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.2rem;
    z-index: 1001;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
    animation: none !important;
  }
  .nav-links.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  .nav-links a {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-style: italic;
    color: var(--text-main);
    padding: 0.6rem 2rem;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: capitalize;
    transition: color 0.2s ease, transform 0.2s ease;
  }
  .nav-links a.active, .nav-links a:hover {
    color: var(--accent-ochre);
    transform: scale(1.05);
  }
  .nav-contact { 
    gap: 0.25rem; 
  }
  .nav-contact a {
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .mobile-toggle-btn {
    display: none !important;
  }

  /* Hero mobile */
  .hero {
    height: 100vh;
    height: 100dvh;
    min-height: 520px;
    padding: 60px 1.5rem 2rem;
  }
  .hero-content {
    padding: 0 1rem;
  }
  .hero h1 {
    font-size: clamp(2.4rem, 10vw, 3.8rem);
    margin-bottom: 0.8rem;
    line-height: 1.15;
  }
  .hero p {
    font-size: clamp(0.95rem, 3.6vw, 1.15rem);
    margin-bottom: 2rem;
    line-height: 1.6;
    padding: 0 0.5rem;
  }
  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }
  .hero-buttons .btn {
    width: 100%;
    max-width: 100%;
    min-height: 48px;
  }

  /* Sections */
  .section { padding: 3.5rem 5vw; }
  .section-title {
    font-size: clamp(2rem, 7vw, 2.8rem);
  }
  .section-subtitle {
    font-size: 1rem;
    margin-bottom: 2rem;
  }

  /* Two-col stacks vertically */
  .two-col {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .two-col.reverse > * { direction: ltr; }
  .two-col.reverse { direction: ltr; }
  .two-col.reverse .expo-img-wrapper,
  .two-col.reverse .inv-img-wrapper,
  .two-col.reverse .video-wrapper { order: -1; }

  /* About video */
  .video-wrapper { border-radius: 12px; margin-bottom: 0.5rem; }
  .about-content { padding-right: 0; }

  /* Obras section */
  .obras-section { padding: 3.5rem 0 3.5rem 5vw; }
  .obra-card { flex: 0 0 clamp(240px, 75vw, 320px); }
  .carousel-arrows {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-left: 0;
    padding: 0 5vw 0 0;
    gap: 1.5rem;
    width: 100%;
  }
  .carousel-nav {
    order: 1;
    display: flex;
    gap: 1rem;
    justify-content: center;
  }
  .obras-actions {
    order: 2;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin: 0;
  }
  .obras-actions .btn {
    flex: 1 1 130px;
    max-width: 190px;
    min-height: 48px;
    text-align: center;
    padding: 0.8rem 0.85rem;
    font-size: 0.82rem;
  }
  .carousel-btn {
    width: 48px;
    height: 48px;
    font-size: 1.3rem;
  }

  /* Expo */
  .expo-content { padding-right: 0; }
  .expo-img-wrapper { border-radius: 12px; width: 100%; }

  /* Inversionismo */
  .inversionismo-section { padding: 3.5rem 5vw; }
  .inv-content { padding-left: 0; margin-top: 0; }
  .inv-img-wrapper { max-width: 100%; justify-self: stretch; width: 100%; }
  .inv-img { aspect-ratio: 4 / 3; }

  /* Subpages */
  .page-header-centered { padding: 6.5rem 5vw 2rem; text-align: center; }
  .page-header-centered h1 { font-size: clamp(2.4rem, 8vw, 3.5rem); }
  .page-header-centered p { font-size: 1.05rem; padding: 0 1rem; }
  .filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1.5rem 4vw 2.5rem;
  }
  .filter-btn {
    padding: 0.6rem 1.2rem;
    min-height: 44px;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .gallery-grid { grid-template-columns: 1fr; padding: 0 5vw 4rem; gap: 2.5rem; }
  .contact-section { padding: 2.5rem 5vw 4rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .contact-card { padding: 2.5rem 1.5rem; }
  .contact-card .btn { width: 100%; min-height: 48px; }
  .contact-card .email-copy-pill { max-width: 100%; min-height: 48px; }
  .contact-form input,
  .contact-form textarea {
    font-size: 16px; /* Prevents auto-zoom in iOS Safari */
    padding: 0.9rem 1rem;
    min-height: 48px;
  }
  .contact-form textarea {
    min-height: 120px;
  }
  .contact-form button[type="submit"] {
    width: 100%;
    min-height: 48px;
  }
  .expo-section-title-wrap { padding: 2.5rem 5vw 1rem; }
  .expo-item { padding: 3rem 5vw; }
  .expo-item .two-col {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .expo-img-wrapper {
    max-width: 580px;
    margin: 0 auto;
    aspect-ratio: 16 / 10;
    max-height: 380px;
  }
  .expo-title { font-size: clamp(2rem, 6vw, 2.8rem); }
  .expo-subtitle { font-size: 1.35rem; margin-top: -0.2rem; margin-bottom: 0.6rem; }
  .expo-date { margin-bottom: 1rem; }
  .expo-desc { margin-bottom: 0; }

  /* Footer */
  footer { padding: 2.5rem 5vw; margin-top: 1rem; }
}

@media (max-width: 480px) {
  .obra-card { flex: 0 0 82vw; }
  .contact-card { padding: 2rem 1.25rem; }
  .lightbox-close {
    top: 0.75rem;
    right: 0.75rem;
    width: 44px;
    height: 44px;
  }
  .lightbox-img {
    max-width: 95vw;
    max-height: 78vh;
    max-height: 78dvh;
    border-radius: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .fade-in {
    opacity: 1 !important;
    transform: none !important;
  }
}
