:root {
  --bg: #f7f3ed;
  --bg-alt: #ebe3d6;
  --text: #2f2b26;
  --muted: #6f665c;
  --primary: #8a5f3d;
  --primary-dark: #5d3d27;
  --white: #ffffff;
  --card: #fffaf3;
  --border: rgba(47, 43, 38, 0.1);
  --shadow: 0 24px 70px rgba(47, 43, 38, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: Inter, Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

body.no-scroll {
  overflow: hidden;
}

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

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

button {
  font-family: inherit;
}

/* HERO */

.hero {
  min-height: 92vh;
  padding: 24px;
  background:
    linear-gradient(rgba(20, 17, 14, 0.35), rgba(20, 17, 14, 0.45)),
    url("fotos/Casa_La_Era_Galve(Teruel)_015.webp");
  background-size: cover;
  background-position: center;
  color: var(--white);
  display: flex;
  flex-direction: column;
  border-radius: 0 0 40px 40px;
}

.navbar {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.logo {
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 0.95rem;
}

.nav-links a {
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.nav-links a:hover {
  opacity: 1;
}

.hero-content {
  max-width: 850px;
  margin: auto;
  text-align: center;
  padding: 80px 20px;
}

.hero-content span {
  display: inline-block;
  margin-bottom: 18px;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  font-size: 0.9rem;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 6vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
  margin-bottom: 26px;
  font-weight: 600;
}

.hero-content p {
  max-width: 680px;
  margin: 0 auto 34px;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  opacity: 0.95;
  color: #ffffff;
}

.btn {
  display: inline-flex;
  padding: 15px 26px;
  border-radius: 999px;
  background: var(--white);
  color: var(--primary-dark);
  font-weight: 700;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

/* GENERAL */

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.narrow {
  max-width: 850px;
  text-align: center;
}

.section,
.intro {
  padding: 50px 0;
}

.alt {
  background: var(--bg-alt);
  border-radius: 40px;
  margin: 20px;
}

.section-label {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

h2 {
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.055em;
  margin-bottom: 22px;
  color: var(--text);
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  letter-spacing: -0.025em;
}

p {
  color: var(--muted);
  font-size: 1.05rem;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 48px;
}

/* SERVICES */

.grid {
  display: grid;
  gap: 22px;
}

.services-grid {
  grid-template-columns: repeat(4, 1fr);
}

.service-card {
  background: var(--card);
  padding: 30px;
  border-radius: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 80px rgba(47, 43, 38, 0.13);
}

.icon {
  width: 54px;
  height: 54px;
  margin-bottom: 22px;
  border-radius: 18px;
  background: #efe0cc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
}

/* ENTORNO */

.two-columns {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 70px;
  align-items: start;
}

.info-list {
  display: grid;
  gap: 18px;
}

.info-item {
  background: rgba(255, 255, 255, 0.55);
  padding: 26px;
  border-radius: 24px;
  border: 1px solid var(--border);
}

/* GALLERY */

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 230px;
  gap: 18px;
}

.gallery-item {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}

.gallery-item:nth-child(1) {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-item:nth-child(8),
.gallery-item:nth-child(15),
.gallery-item:nth-child(24) {
  grid-column: span 2;
}

.gallery-item img {
  height: 100%;
  object-fit: cover;
  border-radius: 28px;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.gallery-item::after {
  content: "Ver imagen";
  position: absolute;
  inset: auto 16px 16px 16px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--primary-dark);
  font-size: 0.85rem;
  font-weight: 700;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.gallery-item:hover img {
  transform: scale(1.055);
  filter: brightness(0.82);
}

.gallery-item:hover::after {
  opacity: 1;
  transform: translateY(0);
}

/* CONTACT */

.contact-section {
  padding: 100px 0;
}

.contact-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 40px;
  padding: 56px;
  box-shadow: var(--shadow);
}

.contact-box p {
  max-width: 620px;
}

.contact-cards {
  display: grid;
  gap: 18px;
}

.contact-card {
  display: block;
  padding: 26px;
  border-radius: 26px;
  background: var(--bg);
  border: 1px solid var(--border);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.contact-card:hover {
  transform: translateY(-4px);
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(47, 43, 38, 0.1);
}

.contact-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.contact-card strong {
  display: block;
  color: var(--primary-dark);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.2;
}

/* LIGHTBOX */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  padding: 28px;
  background: rgba(15, 13, 11, 0.92);
  backdrop-filter: blur(14px);
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  width: min(1100px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 22px;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.45);
}

#lightbox-counter {
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
}

.lightbox-close,
.lightbox-arrow {
  border: 0;
  cursor: pointer;
  color: white;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox-close:hover,
.lightbox-arrow:hover {
  background: rgba(255, 255, 255, 0.22);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 2rem;
  line-height: 1;
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 58px;
  height: 58px;
  border-radius: 50%;
  font-size: 3rem;
  line-height: 0.8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-arrow:hover {
  transform: translateY(-50%) scale(1.06);
}

.lightbox-prev {
  left: 24px;
}

.lightbox-next {
  right: 24px;
}

/* FINAL */

.final-cta {
  margin: 20px;
  padding: 100px 20px;
  border-radius: 40px;
  background: var(--primary-dark);
  text-align: center;
}

.final-cta h2 {
  color: var(--white);
}

.final-cta p {
  max-width: 760px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.2rem;
}

footer {
  padding: 34px 20px;
  text-align: center;
}

footer p {
  font-size: 0.95rem;
  margin-bottom: 6px;
}

footer a {
  color: var(--primary-dark);
  font-weight: 700;
}

/* RESPONSIVE */

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

  .gallery {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 220px;
  }
}

@media (max-width: 900px) {
  .two-columns,
  .contact-box {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-box {
    padding: 38px;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-item:nth-child(1),
  .gallery-item:nth-child(8),
  .gallery-item:nth-child(15),
  .gallery-item:nth-child(24) {
    grid-column: span 1;
    grid-row: span 1;
  }

  .lightbox-arrow {
    width: 48px;
    height: 48px;
    font-size: 2.4rem;
  }

  .lightbox-prev {
    left: 12px;
  }

  .lightbox-next {
    right: 12px;
  }
}

@media (max-width: 700px) {
  .hero {
    min-height: 82vh;
    border-radius: 0 0 28px 28px;
  }

  .navbar {
    border-radius: 24px;
    align-items: flex-start;
    gap: 18px;
  }

  .nav-links {
    display: none;
  }

  .section,
  .intro,
  .contact-section {
    padding: 72px 0;
  }

  .alt,
  .final-cta {
    margin: 12px;
    border-radius: 28px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .gallery {
    grid-template-columns: 1fr;
    grid-auto-rows: 240px;
  }

  .hero-content h1 {
    letter-spacing: -0.055em;
  }

  .contact-box {
    border-radius: 28px;
    padding: 28px;
  }

  .lightbox {
    padding: 16px;
  }

  .lightbox-content img {
    max-height: 76vh;
    border-radius: 16px;
  }

  .lightbox-close {
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    font-size: 1.7rem;
  }

  .lightbox-arrow {
    top: auto;
    bottom: 24px;
    transform: none;
    width: 46px;
    height: 46px;
    font-size: 2.2rem;
  }

  .lightbox-arrow:hover {
    transform: scale(1.05);
  }

  .lightbox-prev {
    left: 24px;
  }

  .lightbox-next {
    right: 24px;
  }

  #lightbox-counter {
    margin-bottom: 70px;
  }
}