.obras-feature-img-invert {
  flex-direction: row-reverse;
}
.obras-final-btn {
  display: inline-block;
  margin-top: 1.2rem;
}
/* Secciones alternas de imagen y texto */
.obras-feature {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  margin: 2.5rem 0;
  flex-wrap: wrap;
}
.obras-feature-img {
  flex: 1 1 350px;
  min-width: 260px;
  max-width: 500px;
  border-radius: 1.2rem;
  overflow: hidden;
  box-shadow: 0 2px 16px 0 #0001;
}
.obras-feature-img img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 1.2rem;
}
.obras-feature-text {
  flex: 1 1 320px;
  min-width: 220px;
  max-width: 500px;
  color: #222;
}
.obras-feature-title {
  font-size: 2rem;
  color: #F64188 !important;
  margin-bottom: .7rem;
  font-family: 'Playfair Display', serif;
  margin-top: 5rem;
  text-align: center;
}

.obras-feature-text h2 {
  font-size: 2rem;
  color: #F64188;
  margin-bottom: .7rem;
  font-family: 'Playfair Display', serif;
}
.obras-feature-text p {
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
}
.obras-feature-img-left {
  flex-direction: row;
}
.obras-feature-img-right {
  flex-direction: row-reverse;
}

/* Sección galería */
.obras-section-title {
  text-align: center;
  font-size: 1.5rem;
  color: #F64188;
  margin-bottom: 1.5rem;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
}

/* Sección final */
.obras-final-text {
  background: #f8f8f8;
  border-radius: 1.2rem;
  margin: 3rem auto 0 auto;
  padding: 2.2rem 1.2rem;
  max-width: 700px;
  text-align: center;
  box-shadow: 0 2px 16px 0 #0001;
}
.obras-final-text h2 {
  color: #F64188;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.obras-final-text p {
  font-size: 1.1rem;
}
.obras-final-text .btn {
  margin-left: 0rem;
}

@media (max-width: 900px) {
  .obras-feature {
    flex-direction: column !important;
    gap: 1.2rem;
    text-align: center;
  }
  .obras-feature-img, .obras-feature-text {
    max-width: 100%;
  }
}
.obras-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.2rem 3rem 1.2rem;
}
.obras-hero {
  text-align: center;
  margin-bottom: 2.5rem;
}
.obras-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  color: #F64188;
  margin-bottom: .7rem;
}
.obras-desc {
  color: var(--paula-text, #444);
  font-size: 1.1rem;
}
.obras-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}
.obra-card {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 2px 16px 0 #0001;
  overflow: hidden;
  transition: transform .15s, box-shadow .15s;
  display: flex;
  flex-direction: column;
}
.obra-card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 6px 24px 0 #0002;
}
.obra-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.obra-img {
  width: 100%;
  height: 220px;
  background-size: cover;
  background-position: center;
  border-radius: 1rem 1rem 0 0;
  overflow: hidden;
}
.obra-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.obra-info {
  padding: 1.2rem;
  text-align: center;
}
.obra-title {
  font-size: 1.3rem;
  color: var(--paula-red, #e63946);
  margin-bottom: .4rem;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
}

/* Galería grid 3x2 grande con efecto hover y centrada */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 32px;
  justify-items: center;
  align-items: center;
  width: 100%;
  max-width: 1100px;
  margin: 40px auto 0 auto;
  place-items: center;
}
.gallery ul {
  display: contents;
}
.gallery ul li,
.gallery ul li img {
  width: 300px;
  height: 300px;
}
.gallery ul li {
  position: relative;
  list-style: none;
  z-index: 0;
}
.gallery ul li img {
  object-fit: cover;
  border: 1px solid #dddddd;
  background: #f0f0f0;
  position: absolute;
  left: 0;
  top: 0;
  transition: all 0.15s ease-in-out;
  padding: 0;
}
.gallery ul li:hover {
  z-index: 5;
}
.gallery ul li img:hover {
  width: 420px;
  height: 420px;
  margin-top: -60px;
  margin-left: -60px;
  top: 0;
  left: 0;
}
@media (max-width: 900px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 16px;
    max-width: 98vw;
  }
  .gallery ul li, .gallery ul li img {
    width: 180px;
    height: 180px;
  }
  .gallery ul li img:hover {
    width: 260px;
    height: 260px;
    margin-top: -40px;
    margin-left: -40px;
  }
}
@media (max-width: 600px) {
  .gallery {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    gap: 8px;
    max-width: 98vw;
  }
  .gallery ul li, .gallery ul li img {
    width: 98vw;
    height: 98vw;
    max-width: 320px;
    max-height: 320px;
  }
  .gallery ul li img:hover {
    width: 98vw;
    height: 98vw;
    margin-top: 0;
    margin-left: 0;
  }
}
