/*
Theme Name: Mascota Facil
Theme URI: https://mascotafacil.es/
Author: Mascota Facil
Description: Tema editorial ligero para blogs de mascotas monetizados con publicidad display.
Version: 1.0.0
Text Domain: mascota-facil
*/

:root {
  --mf-bg: #fffaf4;
  --mf-surface: #ffffff;
  --mf-surface-soft: #f7efe5;
  --mf-ink: #25312d;
  --mf-muted: #66736c;
  --mf-line: #e7ddd0;
  --mf-green: #216e55;
  --mf-green-dark: #15503e;
  --mf-mint: #d9f1e4;
  --mf-coral: #d95f4a;
  --mf-gold: #f4b84a;
  --mf-blue: #315c88;
  --mf-shadow: 0 18px 50px rgba(37, 49, 45, 0.12);
  --mf-radius: 8px;
  --mf-wrap: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--mf-bg);
  color: var(--mf-ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: 0;
}

a {
  color: var(--mf-green-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--mf-coral);
}

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

.mf-wrap {
  width: min(var(--mf-wrap), calc(100% - 32px));
  margin-inline: auto;
}

.screen-reader-text,
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.skip-link:focus {
  z-index: 1000;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  overflow: visible;
  clip: auto;
  background: var(--mf-ink);
  color: #fff;
  border-radius: var(--mf-radius);
}

.mf-header {
  position: sticky;
  z-index: 50;
  top: 0;
  background: rgba(255, 250, 244, 0.92);
  border-bottom: 1px solid rgba(231, 221, 208, 0.86);
  backdrop-filter: blur(12px);
}

.mf-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 20px;
}

.mf-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--mf-ink);
  font-size: 1.18rem;
  font-weight: 850;
  text-decoration: none;
}

.mf-brand__mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: var(--mf-green);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(33, 110, 85, 0.22);
}

.mf-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.96rem;
  font-weight: 760;
}

.mf-nav a {
  color: var(--mf-ink);
  text-decoration: none;
}

.mf-nav a:hover {
  color: var(--mf-green);
}

.mf-search {
  display: flex;
  align-items: center;
  min-width: min(270px, 26vw);
  background: var(--mf-surface);
  border: 1px solid var(--mf-line);
  border-radius: 999px;
  overflow: hidden;
}

.mf-search input[type="search"] {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 10px 8px 10px 15px;
  background: transparent;
  color: var(--mf-ink);
  font: inherit;
  font-size: 0.94rem;
}

.mf-search button {
  flex: 0 0 auto;
  border: 0;
  padding: 10px 14px;
  background: var(--mf-green);
  color: #fff;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
}

.mf-main {
  min-height: 70vh;
}

.mf-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 520px;
  align-items: end;
  overflow: hidden;
  color: #fff;
}

.mf-hero::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(20, 35, 31, 0.82) 0%, rgba(20, 35, 31, 0.58) 44%, rgba(20, 35, 31, 0.12) 100%),
    url("https://images.unsplash.com/photo-1450778869180-41d0601e046e?auto=format&fit=crop&w=1800&q=82") center / cover no-repeat;
  content: "";
}

.mf-hero::after {
  position: absolute;
  z-index: -1;
  inset: auto 0 0;
  height: 160px;
  background: linear-gradient(180deg, rgba(255, 250, 244, 0), var(--mf-bg));
  content: "";
}

.mf-hero__body {
  width: min(780px, calc(100% - 32px));
  margin: 0 auto;
  padding: 92px 0 110px;
}

.mf-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: #fff4cc;
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.mf-hero h1,
.mf-page-head h1,
.mf-article-head h1 {
  margin: 0;
  font-weight: 920;
  line-height: 1.04;
  letter-spacing: 0;
}

.mf-hero h1 {
  max-width: 760px;
  font-size: clamp(2.45rem, 6vw, 5.5rem);
}

.mf-hero p {
  max-width: 650px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.mf-hero__actions,
.mf-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.mf-button,
.mf-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 17px;
  font-size: 0.96rem;
  font-weight: 850;
  line-height: 1.1;
  text-decoration: none;
}

.mf-button--primary {
  background: var(--mf-gold);
  color: #2e2412;
}

.mf-button--secondary {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.mf-chip {
  min-height: 36px;
  background: var(--mf-surface);
  border-color: var(--mf-line);
  color: var(--mf-green-dark);
  font-size: 0.9rem;
}

.mf-band {
  padding: 64px 0;
}

.mf-band--tight {
  padding: 38px 0;
}

.mf-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 22px;
}

.mf-section-head h2,
.mf-sidebar h2,
.mf-page-head h1 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  line-height: 1.15;
}

.mf-section-head p {
  max-width: 610px;
  margin: 8px 0 0;
  color: var(--mf-muted);
}

.mf-grid {
  display: grid;
  gap: 18px;
}

.mf-grid--topics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mf-grid--posts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mf-topic,
.mf-post-card,
.mf-sidebar__box,
.mf-newsletter,
.mf-content-card {
  background: var(--mf-surface);
  border: 1px solid var(--mf-line);
  border-radius: var(--mf-radius);
  box-shadow: 0 12px 34px rgba(37, 49, 45, 0.07);
}

.mf-topic {
  position: relative;
  min-height: 168px;
  overflow: hidden;
  padding: 18px;
  color: #fff;
  text-decoration: none;
}

.mf-topic::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 32, 28, 0.1), rgba(16, 32, 28, 0.76));
  content: "";
}

.mf-topic img {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mf-topic__text {
  position: relative;
  z-index: 1;
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: flex-end;
}

.mf-topic strong {
  font-size: 1.2rem;
  line-height: 1.15;
}

.mf-topic span {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.93rem;
}

.mf-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 24px;
  align-items: stretch;
}

.mf-feature__image {
  min-height: 360px;
  border-radius: var(--mf-radius);
  background: url("https://images.unsplash.com/photo-1552053831-71594a27632d?auto=format&fit=crop&w=1100&q=82") center / cover no-repeat;
  box-shadow: var(--mf-shadow);
}

.mf-feature__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 4vw, 46px);
}

.mf-feature h2 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1.08;
}

.mf-feature p {
  color: var(--mf-muted);
}

.mf-post-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  text-decoration: none;
}

.mf-post-card__media {
  height: 170px;
  background: var(--mf-surface-soft);
}

.mf-post-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mf-post-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.mf-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--mf-muted);
  font-size: 0.86rem;
  font-weight: 760;
}

.mf-post-card h3 {
  margin: 10px 0 8px;
  color: var(--mf-ink);
  font-size: 1.18rem;
  line-height: 1.22;
}

.mf-post-card p {
  margin: 0;
  color: var(--mf-muted);
  font-size: 0.96rem;
}

.mf-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 34px;
  padding: 46px 0 70px;
}

.mf-article {
  min-width: 0;
}

.mf-article-head,
.mf-page-head {
  padding: 44px 0 10px;
}

.mf-article-head h1 {
  max-width: 920px;
  font-size: clamp(2rem, 5vw, 4rem);
}

.mf-article-head .mf-meta {
  margin-top: 16px;
}

.mf-content {
  background: var(--mf-surface);
  border: 1px solid var(--mf-line);
  border-radius: var(--mf-radius);
  padding: clamp(22px, 4vw, 50px);
  box-shadow: 0 16px 42px rgba(37, 49, 45, 0.08);
}

.mf-content > *:first-child {
  margin-top: 0;
}

.mf-content > *:last-child {
  margin-bottom: 0;
}

.mf-content p {
  margin: 0 0 1.15em;
}

.mf-content h2 {
  margin: 2.05em 0 0.55em;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  line-height: 1.18;
}

.mf-content h3 {
  margin: 1.75em 0 0.45em;
  font-size: 1.28rem;
  line-height: 1.22;
}

.mf-content ul,
.mf-content ol {
  padding-left: 1.25em;
}

.mf-content li + li {
  margin-top: 0.32em;
}

.mf-content table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  font-size: 0.95rem;
}

.mf-content th,
.mf-content td {
  border: 1px solid var(--mf-line);
  padding: 12px 14px;
  text-align: left;
}

.mf-content th {
  background: var(--mf-mint);
}

.mf-content .wp-block-table {
  overflow-x: auto;
}

.mf-note {
  margin: 22px 0;
  border-left: 4px solid var(--mf-coral);
  background: #fff3ed;
  padding: 14px 16px;
  color: #5e382d;
}

.mf-ad-slot {
  display: none;
  min-height: 250px;
  margin: 28px 0;
  place-items: center;
  border: 1px dashed #d6c9bb;
  border-radius: var(--mf-radius);
  background: #fbf6ef;
  color: #9a8b7b;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.mf-show-ads .mf-ad-slot {
  display: grid;
}

.mf-ad-slot--wide {
  min-height: 110px;
}

.mf-sidebar {
  position: sticky;
  top: 92px;
  height: max-content;
}

.mf-sidebar__box {
  padding: 18px;
}

.mf-sidebar__box + .mf-sidebar__box {
  margin-top: 18px;
}

.mf-sidebar h2 {
  font-size: 1.16rem;
}

.mf-sidebar ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.mf-sidebar li + li {
  margin-top: 10px;
}

.mf-sidebar a {
  color: var(--mf-ink);
  font-weight: 760;
  text-decoration: none;
}

.mf-newsletter {
  display: grid;
  gap: 16px;
  align-items: center;
  padding: 30px;
  background: var(--mf-green);
  color: #fff;
}

.mf-newsletter h2,
.mf-newsletter p {
  margin: 0;
}

.mf-newsletter p {
  color: rgba(255, 255, 255, 0.84);
}

.mf-newsletter form {
  display: flex;
  gap: 10px;
}

.mf-newsletter input {
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  font: inherit;
}

.mf-newsletter button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: var(--mf-gold);
  color: #2e2412;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.mf-footer {
  background: #17231f;
  color: rgba(255, 255, 255, 0.78);
  padding: 44px 0;
}

.mf-footer__inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}

.mf-footer strong {
  display: block;
  color: #fff;
  font-size: 1.14rem;
}

.mf-footer a {
  color: #fff2c4;
}

.mf-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  justify-content: flex-end;
}

.mf-empty {
  border: 1px solid var(--mf-line);
  border-radius: var(--mf-radius);
  background: var(--mf-surface);
  padding: 24px;
}

@media (max-width: 980px) {
  .mf-header__inner {
    align-items: stretch;
    flex-direction: column;
    padding: 14px 0;
  }

  .mf-nav {
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .mf-search {
    width: 100%;
  }

  .mf-grid--topics,
  .mf-grid--posts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mf-feature,
  .mf-layout {
    grid-template-columns: 1fr;
  }

  .mf-sidebar {
    position: static;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .mf-wrap {
    width: min(100% - 22px, var(--mf-wrap));
  }

  .mf-hero {
    min-height: 560px;
  }

  .mf-hero::before {
    background:
      linear-gradient(180deg, rgba(20, 35, 31, 0.78), rgba(20, 35, 31, 0.44)),
      url("https://images.unsplash.com/photo-1450778869180-41d0601e046e?auto=format&fit=crop&w=980&q=78") center / cover no-repeat;
  }

  .mf-hero__body {
    padding: 74px 0 92px;
  }

  .mf-section-head,
  .mf-newsletter form,
  .mf-footer__inner {
    align-items: stretch;
    flex-direction: column;
    display: flex;
  }

  .mf-footer__links {
    justify-content: flex-start;
  }

  .mf-grid--topics,
  .mf-grid--posts {
    grid-template-columns: 1fr;
  }

  .mf-content {
    padding: 20px;
  }
}
