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

:root {
  --bg-page: #fbf9f4;
  --bg-card: #ffffff;
  --bg-soft: #f2ede2;
  --bg-tint: #edf4ee;
  --bg-dark: #19271e;
  --text-main: #273029;
  --text-muted: #5e6b61;
  --text-light: #f7f6f0;
  --c-forest: #204733;
  --c-forest-hover: #153424;
  --c-clay: #b85437;
  --c-clay-pale: #fbf0ec;
  --c-sage: #6e8b72;
  --c-border: #dfd8cb;
  --c-border-strong: #c8bea9;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --max-w: 1080px;
  --reading-w: 720px;
  --shadow-subtle: 0 4px 18px rgba(35, 45, 38, 0.06);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: 'Albert Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.62;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
}

/* Tipografía base */
h1, h2, h3, h4 {
  font-family: 'Lora', Georgia, serif;
  color: var(--text-main);
  line-height: 1.25;
  font-weight: 600;
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 3.8vw, 2.75rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.45rem, 2.5vw, 1.95rem);
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

p {
  margin: 0 0 1.2rem;
}

a {
  color: var(--c-forest);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.18s ease;
}

a:hover {
  color: var(--c-clay);
}

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

/* Layout helpers */
.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 22px;
}

.wrap-narrow {
  max-width: var(--reading-w);
}

/* Barra superior y navegación */
.site-top {
  background: #ffffff;
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.brand-blk {
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.brand-title {
  font-family: 'Lora', serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--c-forest);
  line-height: 1.1;
}

.brand-sub {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 3px;
}

.nav-links {
  display: flex;
  gap: 22px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--text-main);
  padding: 6px 2px;
  position: relative;
}

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

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background-color: var(--c-clay);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 7px 11px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-main);
}

/* Banner de contexto / altitud */
.alt-alert {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--c-border);
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 8px 0;
}

.alt-alert-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.alt-tag {
  display: inline-block;
  background: #ffffff;
  padding: 2px 7px;
  border-radius: 3px;
  font-weight: 600;
  color: var(--c-forest);
  border: 1px solid var(--c-border);
}

/* Portada / Cabecera de página */
.page-header {
  padding: 42px 0 28px;
  border-bottom: 1px solid var(--c-border);
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-page) 100%);
}

.page-header.compact {
  padding: 30px 0 20px;
}

.page-tagline {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--c-clay);
  margin-bottom: 10px;
  display: block;
}

.page-intro {
  font-size: 1.12rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-top: 10px;
  max-width: 660px;
}

.page-meta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-top: 14px;
}

.author-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  color: var(--text-main);
}

/* Grillas y módulos de contenido */
.content-section {
  padding: 38px 0;
}

.content-section.alt-bg {
  background-color: #ffffff;
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
}

.grid-cols-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-split {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 34px;
  align-items: start;
}

.grid-two-equal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}

/* Tarjetas y fichas de notas */
.note-card {
  background: var(--bg-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-subtle);
  display: flex;
  flex-direction: column;
}

.note-card-img {
  margin: -22px -22px 18px -22px;
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
  overflow: hidden;
  max-height: 190px;
}

.note-card-img img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.note-card:hover .note-card-img img {
  transform: scale(1.02);
}

.badge-row {
  display: flex;
  gap: 7px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  color: var(--text-muted);
}

.badge.cold {
  background: #e2ecf5;
  color: #274b69;
}

.badge.temperate {
  background: var(--bg-tint);
  color: var(--c-forest);
}

.badge.hot {
  background: var(--c-clay-pale);
  color: var(--c-clay);
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.card-title a {
  text-decoration: none;
  color: var(--text-main);
}

.card-title a:hover {
  color: var(--c-clay);
}

.card-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--c-border);
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Cajas editoriales / Callouts */
.callout-box {
  background: var(--bg-soft);
  border-left: 4px solid var(--c-clay);
  padding: 18px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 24px 0;
  font-size: 0.95rem;
}

.callout-box.forest {
  border-left-color: var(--c-forest);
  background: var(--bg-tint);
}

.callout-box strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 4px;
  color: var(--text-main);
}

/* Tablas comparativas y de precios locales */
.table-wrap {
  overflow-x: auto;
  margin: 22px 0;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  background: #ffffff;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: left;
}

.spec-table th, 
.spec-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--c-border);
}

.spec-table th {
  background: var(--bg-soft);
  font-family: 'Lora', serif;
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.92rem;
}

.spec-table tr:last-child td {
  border-bottom: none;
}

.spec-table tr:hover td {
  background-color: #faf9f6;
}

.cop-val {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--c-forest);
  white-space: nowrap;
}

/* Listas con estilo propio */
.check-list, .step-list {
  list-style: none;
  padding-left: 0;
  margin: 18px 0;
}

.check-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
}

.check-list li::before {
  content: "—";
  position: absolute;
  left: 6px;
  color: var(--c-clay);
  font-weight: bold;
}

.step-list {
  counter-reset: custom-step;
}

.step-list li {
  counter-increment: custom-step;
  position: relative;
  padding-left: 36px;
  margin-bottom: 18px;
}

.step-list li::before {
  content: counter(custom-step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 22px;
  height: 22px;
  background: var(--c-forest);
  color: #fff;
  border-radius: 50%;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* Bloque lateral / Sidebar de apoyo */
.aside-block {
  background: var(--bg-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-subtle);
  margin-bottom: 22px;
}

.aside-title {
  font-size: 1.05rem;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--c-border);
}

.aside-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.88rem;
}

.aside-list li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--c-border);
}

.aside-list li:last-child {
  border-bottom: none;
}

/* Formularios para Contacto */
.contact-form {
  background: #ffffff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-subtle);
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.87rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.95rem;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text-main);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--c-forest);
  box-shadow: 0 0 0 3px rgba(32, 71, 51, 0.12);
}

.form-check-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.form-check-group input[type="checkbox"] {
  margin-top: 3px;
}

.btn-submit {
  display: inline-block;
  background: var(--c-forest);
  color: #ffffff;
  border: none;
  padding: 12px 26px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.18s ease;
}

.btn-submit:hover {
  background: var(--c-forest-hover);
}

.form-feedback {
  padding: 12px;
  border-radius: var(--radius-sm);
  margin-top: 16px;
  display: none;
  font-size: 0.9rem;
}

.form-feedback.success {
  background: var(--bg-tint);
  border: 1px solid var(--c-sage);
  color: var(--c-forest);
  display: block;
}

/* Pie de página */
.site-foot {
  background: var(--bg-dark);
  color: #cbd7cf;
  margin-top: auto;
  padding: 46px 0 24px;
  font-size: 0.88rem;
  border-top: 3px solid var(--c-clay);
}

.foot-cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.foot-title {
  color: #ffffff;
  font-family: 'Lora', serif;
  font-size: 1.05rem;
  margin-bottom: 12px;
}

.foot-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.foot-links li {
  margin-bottom: 8px;
}

.foot-links a {
  color: #adbfae;
  text-decoration: none;
}

.foot-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.foot-bottom {
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: #8c9c8f;
}

.foot-bottom a {
  color: #adbfae;
}

/* Responsive queries - ajustadas a ojo */
@media (max-width: 860px) {
  .grid-cols-3 {
    grid-template-columns: 1fr;
  }
  .grid-split {
    grid-template-columns: 1fr;
  }
  .grid-two-equal {
    grid-template-columns: 1fr;
  }
  .foot-cols {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .nav-toggle {
    display: block;
  }
  
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--c-border);
    flex-direction: column;
    padding: 16px 22px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.06);
    gap: 12px;
    align-items: flex-start;
  }
  
  .nav-links.open {
    display: flex;
  }

  .alt-alert-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}
