/* =========================
   Casa Rural La Lechuza
   styles.css (final)
   ========================= */

:root{
  --bg: #faf7f1;
  --bg2:#f3efe6;
  --text:#1f2328;
  --muted:#5b616a;
  --card:#ffffff;
  --line: rgba(31,35,40,.10);

  --accent:#6b4f2d;   /* madera */
  --accent2:#3f5a48;  /* verde apagado */
  --cream:#fff7ea;

  --shadow: 0 14px 40px rgba(0,0,0,.10);
  --radius: 18px;

  --container: 1100px;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  color:var(--text);
  background:var(--bg);
  line-height:1.65;
}

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

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

.small{ font-size:14px; }
.muted{ color:var(--muted); }
.dot{ opacity:.6; }

/* ---------------------------------
   Topbar
---------------------------------- */
.topbar{
  position:sticky;
  top:0;
  z-index:50;
  background: rgba(250,247,241,.86);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}
.topbar__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:10px 0;
}
.topbar__left{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.topbar__right{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end; }

.pill{
  display:inline-flex;
  align-items:center;            /* ✅ importante */
  gap:10px;                      /* ✅ icono + texto */
  padding:6px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background: rgba(255,255,255,.78);
  font-size:14px;
  line-height: 1;                /* ✅ evita que el pill crezca raro */
}

.pill--link{
  display:inline-flex;           /* ✅ esto evita el “pill gigante” */
  align-items:center;
  gap:10px;
  text-decoration:none;
  cursor:pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.pill--link:hover{
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0,0,0,.08);
  background: white;
}

.pill__icon{
  width:18px;
  height:18px;
  flex-shrink:0;
  fill: currentColor;
  opacity:.85;
  display:block;
}

/* ---------------------------------
   Buttons
---------------------------------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid var(--line);
  text-decoration:none;
  background: rgba(255,255,255,.75);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
  white-space:nowrap;
}
.btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0,0,0,.08);
  border-color: rgba(31,35,40,.18);
}
.btn--primary{
  background: linear-gradient(180deg, rgba(107,79,45,1), rgba(82,60,34,1));
  color: white;
  border-color: rgba(0,0,0,.08);
}
.btn--ghost{
  background: rgba(255,255,255,.48);
}
.btn--lg{
  padding:12px 18px;
  font-weight:650;
}

/* ---------------------------------
   Typography
---------------------------------- */
h1, h2, h3{
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
}
h1{
  font-size: clamp(36px, 4.2vw, 56px);
  line-height:1.05;
}
h2{
  font-size: clamp(24px, 2.4vw, 34px);
  line-height:1.15;
  margin:0 0 10px 0;
}
h3{
  font-size: 18px;
  margin:0 0 8px 0;
}

.lead{
  margin:0;
  color: var(--muted);
  font-size: 18px;
  max-width: 82ch;
}

.prose{
  max-width: 78ch;
}
.prose p{
  margin: 12px 0;
  font-size: 18px;
  color: var(--text);
}
.prose strong{ font-weight: 800; }
.prose h2{ margin-bottom: 10px; }

/* ---------------------------------
   Hero
   (OJO: tu HTML debe usar .hero__photo y .hero__shade)
---------------------------------- */
.hero{
  position:relative;
  min-height: 72vh;
  display:grid;
  align-items:end;
  overflow:hidden;
  border-bottom:1px solid var(--line);
}
.hero__photo{
  position:absolute; inset:0;
  background-image: url("images/hero.jpeg");
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}
.hero__shade{
  position:absolute; inset:0;
  background:
    linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.62) 60%, rgba(0,0,0,.72) 100%),
    radial-gradient(900px 520px at 22% 20%, rgba(0,0,0,.35), transparent 60%),
    radial-gradient(900px 520px at 78% 30%, rgba(0,0,0,.25), transparent 60%);
  pointer-events:none;
}
.hero__content{
  position:relative;
  padding: 56px 0;
  color: var(--cream);
}

.brand{
  display:flex;
  gap:18px;
  align-items:flex-start;
}
.logo{
  width:84px;
  height:auto;
  filter: brightness(0) invert(1);
  opacity:.95;
}
.brand__text{ max-width: 70ch; }
.kicker{
  margin:0 0 10px 0;
  letter-spacing:.10em;
  text-transform:uppercase;
  font-size:12px;
  opacity:.92;
}
.sub{
  margin: 12px 0 18px 0;
  max-width: 62ch;
  color: rgba(255,247,234,.94);
  font-size: 18px;
  text-shadow: 0 2px 18px rgba(0,0,0,.35);
}
.hero__content h1{
  text-shadow: 0 4px 22px rgba(0,0,0,.55);
}

.hero__cta{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin: 18px 0 18px;
}
.hero__highlights{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top: 14px;
}
.card-mini{
  padding:10px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.10);
  font-size:14px;
  backdrop-filter: blur(8px);
}

/* ---------------------------------
   Sections
---------------------------------- */
.section{ padding: 56px 0; }
.section--alt{
  background: var(--bg2);
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
}
.section__head{ margin-bottom: 18px; }

.note{
  margin-top: 16px;
  padding: 14px 14px;
  border-radius: 14px;
  background: rgba(107,79,45,.08);
  border:1px solid rgba(107,79,45,.14);
  color: #3a2a16;
}

/* ---------------------------------
   Cards / grids
---------------------------------- */
.grid3{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:14px;
  margin-top: 18px;
}
.card{
  background: var(--card);
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(0,0,0,.06);
  padding: 18px;
}
.card p{ margin: 0; color: var(--muted); line-height:1.6; }

/* ---------------------------------
   Split (texto + fotos)
---------------------------------- */
.split{
  display:grid;
  grid-template-columns: 1fr 1fr; /* fotos más protagonistas */
  gap:22px;
  align-items:start;
}

/* Side photos */
.side-photos{
  display:grid;
  gap:12px;
}
.side-photos img{
  border-radius: 22px;
  border:1px solid var(--line);
  box-shadow: 0 18px 44px rgba(0,0,0,.14);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .18s ease, box-shadow .18s ease;
}
.side-photos img:hover{
  transform: translateY(-2px);
  box-shadow: 0 24px 60px rgba(0,0,0,.18);
}

/* ---------------------------------
   Entorno (cards con imagen + hint)
   - soporta .entorno-media (nuevo)
   - y .entorno-img (compatibilidad)
---------------------------------- */
.entorno-grid{
  gap: 18px;
  align-items: stretch;
}

.entorno-card{
  padding: 0;
  overflow: hidden;
  display:flex;
  flex-direction:column;
  height:100%;
  box-shadow: 0 8px 18px rgba(0,0,0,.06);
  transition: transform .18s ease, box-shadow .18s ease;
}
.entorno-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(0,0,0,.08);
}

/* Media con altura fija */
.entorno-media,
.entorno-img{
  flex: 0 0 auto;
  height: 160px;          /* PC: uniforme */
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--bg2);
}
.entorno-media img,
.entorno-img img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Texto */
.entorno-body{
  flex: 1 1 auto;
  padding: 16px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.entorno-body h3{
  margin:0;
  font-size:17px;
}
.entorno-body p{
  margin:0;
  font-size:15px;
  line-height:1.55;
  color: var(--muted);
}

/* Hint bonito (solo en sección entorno) */
#entorno .hint{
  margin: 18px auto 0;
  width: fit-content;
  max-width: 100%;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.62);
  border: 1px solid var(--line);
  box-shadow: 0 10px 26px rgba(0,0,0,.05);
  color: var(--muted);
  text-align:center;
}

/* ---------------------------------
   Gallery
---------------------------------- */
.gallery{
  margin-top: 18px;
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:12px;
}
.gallery img{
  width:100%;
  border-radius: 16px;
  border:1px solid var(--line);
  box-shadow: 0 10px 26px rgba(0,0,0,.06);
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform .14s ease;
}
.gallery img:hover{ transform: translateY(-2px); }

.hint{
  margin: 14px 0 0;
  color: var(--muted);
}

/* ---------------------------------
   Contact
---------------------------------- */
.contact{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap:16px;
  align-items:stretch;
}
.contact__copy{
  background: var(--card);
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(0,0,0,.06);
  padding: 18px;
}

.contact__copy h2{
  margin-bottom: 22px;
}

.contact__copy .lead{
  font-size: 20px;
  line-height: 1.7;
  margin: 0 0 18px 0;
  max-width: 70ch;
}

.perk{
  margin: 18px 0 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(107,79,45,.10);
  border: 1px solid rgba(107,79,45,.18);
  color: #3a2a16;
  max-width: 62ch;
  line-height: 1.6;
  font-size: 17px;
}
.perk strong{ color: var(--accent); font-weight: 800; }

.contact__copy p{
  font-size: 18px;
  line-height: 1.75;
  margin: 0 0 14px 0;
  max-width: 62ch;
}

.contact__copy strong{
  color: var(--accent);
  font-weight: 700;
}

.contact__actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin: 16px 0 0;
}

.contact__map{
  border-radius: var(--radius);
  overflow:hidden;
  border:1px solid var(--line);
  box-shadow: 0 10px 26px rgba(0,0,0,.06);
  background: var(--card);
}
.contact__map iframe{
  width:100%;
  height:100%;
  min-height: 260px;
  border:0;
}

/* ---------------------------------
   Footer
---------------------------------- */
.footer{
  padding: 24px 0 34px;
  border-top:1px solid var(--line);
  background: rgba(255,255,255,.35);
}
.footer__inner{
  display:flex;
  gap:16px;
  align-items:flex-start;
  justify-content:space-between;
}
.footer__links{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}
.footer__links a{
  text-decoration:none;
  color: var(--muted);
}
.footer__links a:hover{ text-decoration:underline; }

/* ---------------------------------
   Responsive
---------------------------------- */
@media (max-width: 920px){
  .grid3{ grid-template-columns: 1fr; }
  .split{ grid-template-columns: 1fr; }
  .contact{ grid-template-columns: 1fr; }
  .hero{ min-height: 66vh; }

  /* Entorno: un poco más de imagen en tablet */
  .entorno-media,
  .entorno-img{ height: 190px; }

  /* Hint en tablet: cómodo */
  #entorno .hint{
    width: 100%;
    border-radius: 16px;
  }
}

@media (max-width: 640px){
  .brand{ align-items:center; }
  .logo{ width:70px; }
  .topbar__inner{ flex-direction:column; align-items:flex-start; }
  .topbar__right{ justify-content:flex-start; }
  .gallery{ grid-template-columns: 1fr; }

  /* En móvil: fotos de la casa grandes y bonitas */
  .side-photos img{
    border-radius: 18px;
    box-shadow: 0 14px 34px rgba(0,0,0,.14);
  }

  /* Entorno: imagen un pelín más alta */
  .entorno-media,
  .entorno-img{ height: 200px; }

  .entorno-body{ padding: 14px; }
}
