/* =============================================================
   MEM — Mexicanos en Madrid · CSS principal (v1.7 limpia)
   ============================================================= */

/* ---------- Tokens ---------- */
:root{
  --mem-red:        #FF202D;
  --mem-bg:         #FFFFFF;
  --mem-bg-soft:    #FAFAF8;
  --mem-bg-invert:  #000000;
  --mem-fg:         #000000;
  --mem-fg-soft:    #4A4A4A;
  --mem-fg-mute:    #A0A0A0;
  --mem-fg-invert:  #FFFFFF;
  --mem-line:       #EDEDED;
  --mem-line-soft:  #E5E5E5;
  --mem-card:       #FFFFFF;

  --mem-font-display: 'Anton', Impact, 'Bebas Neue', sans-serif;
  --mem-font-body:    'Montserrat', system-ui, -apple-system, sans-serif;

  --mem-gutter: clamp(20px, 4vw, 64px);
  --mem-ease:   cubic-bezier(0.2, 0.8, 0.2, 1);

  --mem-logo-url: url('https://mexicanosenmadrid.es/wp-content/uploads/2026/05/mem.png');
}

html.mem-dark, body.mem-dark, .mem-dark{
  --mem-bg:         #0A0A0A;
  --mem-bg-soft:    #141517;
  --mem-bg-invert:  #FFFFFF;
  --mem-fg:         #FFFFFF;
  --mem-fg-soft:    #C8C8C8;
  --mem-fg-mute:    #6E6E6E;
  --mem-fg-invert:  #000000;
  --mem-line:       rgba(255,255,255,.10);
  --mem-line-soft:  rgba(255,255,255,.16);
  --mem-card:       #141517;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body{
  margin: 0;
  font-family: var(--mem-font-body);
  color: var(--mem-fg);
  background: var(--mem-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 240ms var(--mem-ease), color 240ms var(--mem-ease);
}
img{ display: block; max-width: 100%; height: auto; }
a{ color: inherit; text-decoration: none; }
button{ font-family: inherit; cursor: pointer; border: none; background: none; padding: 0; color: inherit; }
::selection{ background: var(--mem-red); color: #fff; }

.mem-block, .mem-block * { box-sizing: border-box; }
.mem-skip-link{
  position: absolute; left: -9999px; top: -9999px;
  background: #000; color: #fff; padding: 12px 16px;
  font-size: 13px; font-weight: 600;
}
.mem-skip-link:focus{ left: 16px; top: 16px; z-index: 9999; }
.mem-section-num{
  font-size: 13px; font-weight: 700; letter-spacing: .16em;
  color: var(--mem-red); padding-top: 12px;
  font-family: var(--mem-font-body);
}

/* ---------- Buttons ---------- */
.mem-btn-primary{
  display: inline-block;
  padding: 16px 28px;
  background: var(--mem-red); color: #fff;
  font-size: 14px; font-weight: 600; letter-spacing: .04em;
  border-radius: 4px; cursor: pointer;
  font-family: var(--mem-font-body);
  transition: filter 200ms var(--mem-ease), transform 200ms var(--mem-ease);
}
.mem-btn-primary:hover{ filter: brightness(1.08); transform: translateY(-1px); }

.mem-btn-secondary{
  display: inline-block;
  padding: 16px 28px;
  background: var(--mem-bg);
  color: var(--mem-fg);
  border: 1.5px solid var(--mem-fg);
  font-size: 14px; font-weight: 600; letter-spacing: .04em;
  border-radius: 4px;
  font-family: var(--mem-font-body);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  transition: all 200ms var(--mem-ease);
}
.mem-btn-secondary:hover{
  background: var(--mem-fg);
  color: var(--mem-bg);
  transform: translateY(-1px);
}

.mem-btn-link{
  background: transparent; color: var(--mem-fg-soft);
  font-weight: 500; font-size: 13px;
  text-decoration: underline; padding: 8px 4px;
}

/* ---------- TOPBAR ---------- */
.mem-topbar{
  position: sticky;
  top: 0; left: 0; right: 0;
  z-index: 60;
  background: var(--mem-red);
  color: #fff;
  width: 100%;
  text-align: center;
  padding: 10px 16px;
  font-family: var(--mem-font-body);
  font-size: 12px; font-weight: 500; letter-spacing: .06em;
  line-height: 1.4;
  min-height: 36px;
}
@media (max-width: 480px){
  .mem-topbar{ font-size: 11px; padding: 9px 12px; letter-spacing: .04em; }
}

/* ---------- NAV ---------- */
.mem-nav{
  position: sticky;
  top: 36px;
  z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px var(--mem-gutter);
  background: var(--mem-bg);
  border-bottom: 1px solid var(--mem-line);
  font-family: var(--mem-font-body);
  transition: background-color 240ms var(--mem-ease), border-color 240ms var(--mem-ease);
}

/* Logo del header — imagen PNG */
.mem-nav__logo{
  display: inline-block;
  background: var(--mem-logo-url) no-repeat left center / contain;
  width: 80px;
  aspect-ratio: 1.45 / 1;
  text-indent: -9999px;
  overflow: hidden;
  font-size: 0;
  flex-shrink: 0;
}
.mem-nav__logo-mark,
.mem-nav__logo-sub{ display: none; }

.mem-nav__links{ display: flex; align-items: center; }
.mem-nav__menu, .mem-nav__menu li{
  margin: 0; padding: 0; list-style: none;
  display: flex; align-items: center; gap: 32px;
  font-size: 14px; font-weight: 500;
  color: var(--mem-fg);
}
.mem-nav__menu a:hover{ color: var(--mem-red); }

.mem-nav__right{ display: flex; align-items: center; gap: 14px; }

.mem-nav__cta{
  padding: 12px 24px; background: var(--mem-red); color: #fff !important;
  font-size: 13px; font-weight: 600; letter-spacing: .04em;
  border-radius: 4px;
  font-family: var(--mem-font-body);
  transition: filter 200ms var(--mem-ease);
}
.mem-nav__cta:hover{ filter: brightness(1.08); }

/* Theme toggle */
.mem-theme-toggle{
  width: 40px; height: 40px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--mem-line-soft);
  background: transparent; color: var(--mem-fg);
  cursor: pointer;
  transition: transform 200ms var(--mem-ease), background-color 200ms, border-color 200ms;
}
.mem-theme-toggle:hover{ transform: rotate(20deg); }
.mem-theme-toggle svg{ width: 18px; height: 18px; }
.mem-theme-toggle .mem-icon-sun{ display: none; }
.mem-theme-toggle .mem-icon-moon{ display: block; }
html.mem-dark .mem-theme-toggle .mem-icon-sun,
body.mem-dark .mem-theme-toggle .mem-icon-sun{ display: block; }
html.mem-dark .mem-theme-toggle .mem-icon-moon,
body.mem-dark .mem-theme-toggle .mem-icon-moon{ display: none; }

/* Burger (mobile) */
.mem-nav__burger{
  display: none;
  width: 40px; height: 40px;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  background: transparent; border: 1.5px solid var(--mem-line-soft);
  border-radius: 999px;
}
.mem-nav__burger span{
  width: 18px; height: 2px; background: var(--mem-fg);
  transition: transform 200ms, opacity 200ms;
}
.mem-nav__burger[aria-expanded="true"] span:nth-child(1){ transform: translateY(6px) rotate(45deg); }
.mem-nav__burger[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
.mem-nav__burger[aria-expanded="true"] span:nth-child(3){ transform: translateY(-6px) rotate(-45deg); }

/* Mobile menu drawer */
.mem-mobile-menu{
  position: fixed;
  inset: 0;
  z-index: 70;
  background: var(--mem-bg);
  transform: translateY(-100%);
  transition: transform 320ms var(--mem-ease);
  padding: 150px 24px 32px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column; gap: 8px;
}
.mem-mobile-menu.is-open{ transform: translateY(0); }
.mem-mobile-menu__list,
.mem-mobile-menu ul{
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column;
}
.mem-mobile-menu__list a{
  display: block; padding: 18px 0;
  font-family: var(--mem-font-display);
  font-size: 28px; line-height: 1; text-transform: uppercase;
  color: var(--mem-fg);
  border-bottom: 1px solid var(--mem-line);
  letter-spacing: -.01em;
}
.mem-mobile-menu__list a:hover{ color: var(--mem-red); }
.mem-mobile-menu__cta{ margin-top: 24px; align-self: flex-start; }

/* Header + drawer en móvil */
@media (max-width: 860px){
  .mem-nav{ padding: 14px 16px; gap: 8px; }
  .mem-nav__links,
  .mem-nav__cta{ display: none; }
  .mem-nav__burger{ display: inline-flex; }
  .mem-nav__right{ gap: 8px; }

  .mem-mobile-menu.is-open ~ .mem-nav,
  body:has(.mem-mobile-menu.is-open) .mem-nav{ z-index: 71; }
  .mem-mobile-menu.is-open ~ .mem-topbar,
  body:has(.mem-mobile-menu.is-open) .mem-topbar{ z-index: 72; }
}
@media (max-width: 480px){
  .mem-theme-toggle, .mem-nav__burger{ width: 36px; height: 36px; }
  .mem-mobile-menu{ padding: 140px 20px 32px; }
  .mem-mobile-menu__list a{ font-size: 24px; padding: 16px 0; }
}

/* ---------- HERO ---------- */
.mem-hero{
  position: relative;
  background: var(--mem-bg);
  overflow: hidden;
  font-family: var(--mem-font-body);
}
.mem-hero__bg{
  position: absolute; inset: 0;
  background-image:
    linear-gradient(90deg, rgba(255,255,255,.95) 0%, rgba(255,255,255,.78) 32%, rgba(255,255,255,0) 55%),
    var(--hero-bg);
  background-size: cover; background-position: center;
}
html.mem-dark .mem-hero__bg,
body.mem-dark .mem-hero__bg{
  background-image:
    linear-gradient(90deg, rgba(0,0,0,.92) 0%, rgba(0,0,0,.7) 32%, rgba(0,0,0,0) 55%),
    var(--hero-bg);
}
.mem-hero__inner{
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(60px, 12vh, 140px) clamp(20px, 4vw, 64px) clamp(60px, 12vh, 120px);
  text-align: left;
}

/* Logo del hero — imagen PNG */
.mem-hero__mark{
  background: var(--mem-logo-url) no-repeat left center / contain;
  width: clamp(280px, 45vw, 560px);
  aspect-ratio: 1.45 / 1;
  text-indent: -9999px;
  overflow: hidden;
  color: transparent;
  font-size: 0;
  margin: 0;
  padding: 0;
}
.mem-hero__sub{ display: none; }

.mem-hero__copy{ margin-top: 48px; max-width: 480px; }
.mem-hero__copy p{
  font-size: clamp(18px, 1.4vw, 22px);
  line-height: 1.5; color: var(--mem-fg); margin: 0; font-weight: 400;
}
.mem-hero__ctas{ margin-top: 36px; display: flex; gap: 12px; flex-wrap: wrap; }
.mem-hero__values{
  position: relative;
  padding: 16px clamp(20px, 4vw, 64px);
  background: var(--mem-red); color: #fff;
  font-size: 13px; font-weight: 500; letter-spacing: .06em;
  text-transform: uppercase;
  display: flex; justify-content: space-around; flex-wrap: wrap; gap: 16px;
}
.mem-hero__values .sep{ opacity: .5; }

/* HERO en móvil — todo centrado, gradiente vertical */
@media (max-width: 860px){
  .mem-hero__bg{
    background-image:
      linear-gradient(180deg, rgba(255,255,255,.78) 0%, rgba(255,255,255,.55) 60%, rgba(255,255,255,.30) 100%),
      var(--hero-bg);
  }
  html.mem-dark .mem-hero__bg,
  body.mem-dark .mem-hero__bg{
    background-image:
      linear-gradient(180deg, rgba(0,0,0,.78) 0%, rgba(0,0,0,.55) 60%, rgba(0,0,0,.30) 100%),
      var(--hero-bg);
  }
  .mem-hero__inner{ text-align: center; padding: 60px 20px; }
  .mem-hero__mark{
    background-position: center center;
    width: clamp(240px, 70vw, 400px);
    margin: 0 auto;
  }
  .mem-hero__copy{
    margin: 36px auto 0;
    max-width: 100%;
    padding: 0 8px;
    text-align: center;
  }
  .mem-hero__copy p{
    font-size: 17px;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  .mem-hero__ctas{
    justify-content: center;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    max-width: 320px;
    margin: 28px auto 0;
  }
  .mem-hero__ctas .mem-btn-primary,
  .mem-hero__ctas .mem-btn-secondary{
    text-align: center;
    width: 100%;
  }
}

/* ---------- ABOUT ---------- */
.mem-about{
  background: var(--mem-bg); color: var(--mem-fg);
  padding: clamp(80px, 14vh, 160px) clamp(20px, 4vw, 64px);
}
.mem-about__inner{
  max-width: 1300px; margin: 0 auto;
  display: grid; grid-template-columns: 120px 1fr; gap: 32px; align-items: start;
}
.mem-about__title{
  font-family: var(--mem-font-display);
  font-size: clamp(48px, 8vw, 140px);
  line-height: .92; letter-spacing: -.02em;
  text-transform: uppercase; margin: 0; color: var(--mem-fg);
}
.mem-about__title em{ color: var(--mem-red); font-style: normal; }
.mem-about__lede{
  font-size: clamp(17px, 1.4vw, 22px);
  line-height: 1.55; color: var(--mem-fg);
  margin-top: 32px; max-width: 760px; font-weight: 400;
}
.mem-about__values{
  margin-top: 56px; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}
.mem-about__values h3{
  font-family: var(--mem-font-display);
  font-size: 28px; line-height: 1; text-transform: uppercase;
  color: var(--mem-red); margin: 0 0 8px;
}
.mem-about__values p{ font-size: 14px; line-height: 1.5; color: var(--mem-fg-soft); margin: 0; font-weight: 400; }
@media (max-width: 720px){ .mem-about__inner{ grid-template-columns: 1fr; } }

/* ---------- SERVICES ---------- */
.mem-services{
  background: var(--mem-bg-soft);
  padding: clamp(80px, 14vh, 160px) clamp(20px, 4vw, 64px);
  border-top: 1px solid var(--mem-line);
}
.mem-services__head{
  max-width: 1300px; margin: 0 auto 56px;
  display: grid; grid-template-columns: 120px 1fr; gap: 32px; align-items: start;
}
.mem-services__title{
  font-family: var(--mem-font-display);
  font-size: clamp(40px, 6.5vw, 110px);
  line-height: .92; letter-spacing: -.02em;
  text-transform: uppercase; margin: 0;
}
.mem-services__grid{
  max-width: 1300px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.mem-service-card{
  text-align: left; padding: 36px 32px; min-height: 360px;
  display: flex; flex-direction: column; justify-content: space-between;
  cursor: pointer;
  transition: transform 240ms var(--mem-ease);
  text-decoration: none;
}
.mem-service-card:hover{ transform: translateY(-4px); }
.mem-service-card--red   { background: var(--mem-red); color: #fff; }
.mem-service-card--black { background: #000;          color: #fff; }
.mem-service-card--white { background: #fff;          color: #000; border: 1.5px solid #1A1A1A; }
.mem-service-card__num{ font-size: 12px; font-weight: 700; letter-spacing: .16em; opacity: .7; }
.mem-service-card__title{
  font-family: var(--mem-font-display);
  font-size: 64px; line-height: .92; letter-spacing: -.02em;
  text-transform: uppercase; margin-top: 24px;
}
.mem-service-card__partner{
  font-size: 12px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; margin-top: 12px; opacity: .8;
}
.mem-service-card__desc{ font-size: 15px; line-height: 1.5; font-weight: 400; margin: 32px 0 24px; opacity: .92; }
.mem-service-card__cta{
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}
.mem-service-card__cta span{ transition: transform 240ms; display: inline-block; }
.mem-service-card:hover .mem-service-card__cta span{ transform: translateX(4px); }
@media (max-width: 720px){ .mem-services__head{ grid-template-columns: 1fr; } }

/* ---------- COMMUNITY ---------- */
.mem-community{
  background: var(--mem-bg);
  padding: clamp(80px, 14vh, 160px) clamp(20px, 4vw, 64px);
}
.mem-community__head{
  max-width: 1300px; margin: 0 auto 56px;
  display: grid; grid-template-columns: 120px 1fr; gap: 32px; align-items: start;
}
.mem-community__title{
  font-family: var(--mem-font-display);
  font-size: clamp(40px, 6.5vw, 110px);
  line-height: .92; letter-spacing: -.02em;
  text-transform: uppercase; margin: 0;
}
.mem-community__lede{
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.55; color: var(--mem-fg-soft);
  margin-top: 24px; max-width: 540px; font-weight: 400;
}
.mem-community__grid{
  max-width: 1300px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.mem-tile{
  aspect-ratio: 1/1;
  padding: 20px 22px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.mem-tile--white{ background: #fff; color: #000; border: 1.5px solid var(--mem-line); }
.mem-tile--red  { background: var(--mem-red); color: #fff; }
.mem-tile--black{ background: #000; color: #fff; }
.mem-tile__big{
  font-family: var(--mem-font-display);
  font-size: 28px; line-height: .95;
  text-transform: uppercase; letter-spacing: -.01em;
  white-space: pre-line;
}
.mem-tile__big--logo{ font-size: 56px; }
.mem-tile__quote{
  font-family: var(--mem-font-body);
  font-size: 16px; line-height: 1.4; font-weight: 500;
  white-space: pre-line;
}
.mem-tile__quote-mark{
  font-family: Georgia, serif;
  font-size: 64px; line-height: .6; color: var(--mem-red);
}
.mem-tile__sub{
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; opacity: .85;
}
@media (max-width: 720px){ .mem-community__head{ grid-template-columns: 1fr; } }

/* ---------- SOCIAL ICONS (community + footer) ---------- */
.mem-social-icons{
  display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
  margin-top: 40px;
}
.mem-social-icons a{
  width: 52px; height: 52px;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--mem-fg);
  color: var(--mem-fg);
  background: transparent;
  transition: all 220ms var(--mem-ease);
  text-decoration: none;
}
.mem-social-icons a:hover{
  background: var(--mem-red);
  border-color: var(--mem-red);
  color: #fff;
  transform: translateY(-2px) scale(1.04);
}
.mem-social-icons a:focus-visible{ outline: 2px solid var(--mem-red); outline-offset: 3px; }
.mem-social-icons--footer{ margin-top: 24px; gap: 10px; }
.mem-social-icons--footer a{
  width: 40px; height: 40px;
  border-color: rgba(255,255,255,0.35);
  color: #fff;
}
.mem-social-icons--footer a:hover{ background: var(--mem-red); border-color: var(--mem-red); }

/* ---------- RESOURCES ---------- */
.mem-resources{
  background: #000; color: #fff;
  padding: clamp(80px, 14vh, 160px) clamp(20px, 4vw, 64px);
}
.mem-resources__head{
  max-width: 1300px; margin: 0 auto 56px;
  display: grid; grid-template-columns: 120px 1fr; gap: 32px; align-items: start;
}
.mem-resources__head .mem-section-num{ color: var(--mem-red); }
.mem-resources__title{
  font-family: var(--mem-font-display);
  font-size: clamp(40px, 6.5vw, 110px);
  line-height: .92; letter-spacing: -.02em;
  text-transform: uppercase; margin: 0;
}
.mem-resources__title em{ color: var(--mem-red); font-style: normal; }
.mem-resources__grid{
  max-width: 1300px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.mem-resource{
  padding: 32px 28px;
  border-top: 1px solid rgba(255,255,255,.12);
  border-right: 1px solid rgba(255,255,255,.12);
}
.mem-resource:last-child{ border-right: none; }
.mem-resource h3{
  font-family: var(--mem-font-display);
  font-size: 28px; line-height: 1.05; text-transform: uppercase;
  margin: 0 0 12px;
}
.mem-resource p{ font-size: 14px; line-height: 1.55; color: #A0A0A0; margin: 0 0 20px; font-weight: 400; }
.mem-resource a{
  font-size: 12px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--mem-red);
}
@media (max-width: 720px){ .mem-resources__head{ grid-template-columns: 1fr; } }

/* ---------- CTA ---------- */
.mem-cta{
  background: var(--mem-red); color: #fff;
  padding: clamp(100px, 16vh, 200px) clamp(20px, 4vw, 64px);
  text-align: center;
}
.mem-cta h2{
  font-family: var(--mem-font-display);
  font-size: clamp(56px, 11vw, 200px);
  line-height: .86; letter-spacing: -.03em;
  text-transform: uppercase; margin: 0;
}
.mem-cta p{
  margin: 32px auto 0;
  font-size: clamp(17px, 1.4vw, 22px);
  line-height: 1.5; max-width: 560px; opacity: .95;
}
.mem-cta__btn{
  display: inline-block; margin-top: 48px;
  padding: 20px 36px; background: #000; color: #fff;
  font-size: 14px; font-weight: 600; letter-spacing: .06em;
  border-radius: 4px;
  transition: transform 200ms var(--mem-ease);
}
.mem-cta__btn:hover{ transform: translateY(-2px); }

/* ---------- FORMS ---------- */
.mem-form-wrap{
  background: var(--mem-bg-soft);
  padding: clamp(60px, 10vh, 120px) clamp(20px, 4vw, 64px);
}
.mem-form-wrap--alt{ background: var(--mem-bg); }
.mem-form{
  max-width: 720px; margin: 0 auto;
  background: var(--mem-card); padding: clamp(28px, 5vw, 56px);
  border: 1px solid var(--mem-line);
}
.mem-form__head{ margin-bottom: 32px; }
.mem-form__kicker{
  font-size: 11px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--mem-red); margin-bottom: 8px;
}
.mem-form__title{
  font-family: var(--mem-font-display);
  font-size: 40px; line-height: 1; letter-spacing: -.01em;
  text-transform: uppercase; margin: 0;
}
.mem-form__sub{ color: var(--mem-fg-soft); font-size: 14px; margin-top: 8px; }
.mem-fieldset{ border: none; padding: 0; margin: 0 0 28px; }
.mem-fieldset__title{
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--mem-red); margin: 0 0 16px;
}
.mem-row{ display: grid; gap: 16px; }
.mem-row--2{ grid-template-columns: 1fr 1fr; }
.mem-row--phone{ grid-template-columns: 130px 1fr; gap: 10px; }
.mem-label{
  display: block; font-size: 11px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--mem-fg-soft); margin-bottom: 8px;
}
.mem-label--req::after{ content: " *"; color: var(--mem-red); }
.mem-input, .mem-select, .mem-textarea{
  width: 100%; padding: 16px 18px;
  background: var(--mem-bg); border: 1.5px solid var(--mem-line-soft); border-radius: 4px;
  font-size: 16px; color: var(--mem-fg); outline: none;
  font-family: var(--mem-font-body);
  transition: border-color 160ms;
}
.mem-input:focus, .mem-select:focus, .mem-textarea:focus{ border-color: var(--mem-red); }
.mem-textarea{ resize: vertical; min-height: 120px; }
.mem-radios{ display: grid; gap: 10px; }
.mem-radio{
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border: 1.5px solid var(--mem-line-soft); border-radius: 4px;
  cursor: pointer; transition: all 160ms;
  font-size: 15px;
}
.mem-radio input{ accent-color: var(--mem-red); width: 18px; height: 18px; margin: 0; }
.mem-radio:has(input:checked){
  border-color: var(--mem-red);
  background: rgba(255,32,45,.06);
  font-weight: 600;
}
.mem-form__submit{
  margin-top: 8px;
  padding: 18px 32px; background: var(--mem-red); color: #fff;
  font-size: 13px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; border-radius: 999px;
  cursor: pointer; font-family: var(--mem-font-body);
  transition: filter 200ms;
}
.mem-form__submit:hover{ filter: brightness(1.08); }
.mem-form__submit:disabled{ opacity: .5; cursor: not-allowed; }
.mem-hp{
  position: absolute !important; left: -9999px !important;
  width: 1px; height: 1px; opacity: 0;
}

/* Consent checkbox (RGPD) */
.mem-form__consent{ margin: 16px 0 8px; }
.mem-consent-label{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92em;
  line-height: 1.45;
  color: var(--mem-fg);
  opacity: 0.92;
  cursor: pointer;
}
.mem-consent-label input[type="checkbox"]{
  margin-top: 4px;
  flex-shrink: 0;
  width: 18px; height: 18px;
  accent-color: var(--mem-red);
  cursor: pointer;
}
.mem-consent-label a{
  color: var(--mem-red);
  text-decoration: underline;
}
.mem-consent-label a:hover{ text-decoration: none; }

/* Conditional fieldsets (servicio dinámico) */
.mem-conditional{
  border-top: 1px dashed var(--mem-line);
  padding-top: 24px;
  margin-top: 8px;
}
.mem-conditional[hidden]{ display: none; }

@media (max-width: 520px){ .mem-row--2{ grid-template-columns: 1fr; } }

/* ---------- FOOTER ---------- */
.mem-footer{
  background: #000; color: #fff;
  padding: 60px clamp(20px, 4vw, 64px) 32px;
  font-family: var(--mem-font-body);
}
.mem-footer__inner{
  max-width: 1300px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 48px;
}

/* Logo del footer — imagen PNG */
.mem-footer__logo{
  display: inline-block;
  background: var(--mem-logo-url) no-repeat left center / contain;
  width: 130px;
  aspect-ratio: 1.45 / 1;
  text-indent: -9999px;
  overflow: hidden;
  font-size: 0;
}
.mem-footer__logo-mark,
.mem-footer__logo-sub{ display: none; }

.mem-footer__about{ font-size: 14px; color: #8A8A8A; margin-top: 20px; line-height: 1.55; max-width: 280px; }
.mem-footer__col-title{
  font-size: 11px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--mem-red); margin-bottom: 14px;
}
.mem-footer ul{ margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.mem-footer li{ font-size: 14px; font-weight: 400; }
.mem-footer a:hover{ color: var(--mem-red); }
.mem-footer__bottom{
  max-width: 1300px; margin: 48px auto 0; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: 12px; color: #8A8A8A;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.mem-footer__handle{ margin-top: 20px; color: var(--mem-red); font-weight: 600; font-size: 14px; }

/* Footer legal links con separador | */
.mem-footer__legal{
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.86em;
  opacity: 0.85;
}
.mem-footer__legal a{
  color: inherit;
  text-decoration: none;
  padding: 0 12px;
  position: relative;
  transition: opacity 0.2s;
}
.mem-footer__legal a:first-child{ padding-left: 0; }
.mem-footer__legal a:last-child{ padding-right: 0; }
.mem-footer__legal a:not(:last-child)::after{
  content: "|";
  position: absolute;
  right: -2px;
  opacity: 0.45;
  pointer-events: none;
}
.mem-footer__legal a:hover{
  opacity: 1;
  text-decoration: underline;
}
@media (max-width: 720px){
  .mem-footer__bottom{
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
  }
  .mem-footer__legal{ justify-content: center; }
}

/* ---------- POPUP ---------- */
.mem-popup{
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 280ms var(--mem-ease), visibility 0s linear 280ms;
}
.mem-popup.is-open{
  opacity: 1; visibility: visible; pointer-events: auto;
  transition: opacity 280ms var(--mem-ease), visibility 0s;
}
.mem-popup__backdrop{
  position: absolute; inset: 0;
  background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
}
.mem-popup__card{
  position: relative; max-width: 480px; width: 100%;
  background: var(--mem-bg); color: var(--mem-fg);
  padding: 40px 32px;
  border: 1px solid var(--mem-line);
  border-top: 6px solid var(--mem-red);
  transform: translateY(20px) scale(.98);
  transition: transform 320ms var(--mem-ease);
}
.mem-popup.is-open .mem-popup__card{ transform: translateY(0) scale(1); }
.mem-popup__close{
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--mem-fg-soft);
  transition: background 200ms;
}
.mem-popup__close:hover{ background: var(--mem-bg-soft); }
.mem-popup__kicker{
  font-size: 11px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--mem-red); margin-bottom: 8px;
}
.mem-popup__title{
  font-family: var(--mem-font-display);
  font-size: clamp(36px, 5vw, 56px);
  line-height: .96; letter-spacing: -.02em;
  text-transform: uppercase; margin: 0 0 16px;
}
.mem-popup__text{
  font-size: 15px; line-height: 1.55; color: var(--mem-fg-soft);
  margin: 0 0 28px;
}
.mem-popup__actions{ display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* ---------- TOAST ---------- */
.mem-toast{
  position: fixed; left: 50%; bottom: 24px;
  transform: translateX(-50%) translateY(120%);
  background: #000; color: #fff;
  padding: 14px 22px; border-radius: 999px;
  font-size: 14px; font-weight: 500;
  box-shadow: 0 8px 30px rgba(0,0,0,.2);
  z-index: 110;
  transition: transform 320ms var(--mem-ease);
  max-width: calc(100% - 32px);
}
.mem-toast.is-show{ transform: translateX(-50%) translateY(0); }
.mem-toast--success{ background: #0F8F4D; }
.mem-toast--error{ background: var(--mem-red); }

/* ---------- BLOG / PAGE / SINGLE / 404 ---------- */
.mem-blog, .mem-page, .mem-single, .mem-404{
  background: var(--mem-bg); color: var(--mem-fg);
  padding: clamp(80px, 12vh, 140px) clamp(20px, 4vw, 64px);
}
.mem-blog__inner, .mem-page__inner, .mem-single__inner, .mem-404__inner{
  max-width: 1100px; margin: 0 auto;
}
.mem-blog__title, .mem-page__title, .mem-single__title, .mem-404__title{
  font-family: var(--mem-font-display);
  font-size: clamp(48px, 8vw, 110px);
  line-height: .92; letter-spacing: -.02em;
  text-transform: uppercase; margin: 0 0 48px;
}
.mem-404__title em{ color: var(--mem-red); font-style: normal; }
.mem-404__text{ font-size: 18px; line-height: 1.55; color: var(--mem-fg-soft); margin: 0 0 32px; }

.mem-blog__grid{
  display: grid; gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.mem-blog__card{ display: flex; flex-direction: column; gap: 12px; }
.mem-blog__thumb img{ aspect-ratio: 16/10; object-fit: cover; }
.mem-blog__meta{
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--mem-red);
}
.mem-blog__card-title{
  font-family: var(--mem-font-display);
  font-size: 28px; line-height: 1; text-transform: uppercase;
  margin: 4px 0;
}
.mem-blog__card-title a:hover{ color: var(--mem-red); }
.mem-blog__excerpt{ font-size: 14px; color: var(--mem-fg-soft); line-height: 1.55; }
.mem-blog__cta{ font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--mem-red); }
.mem-blog__pagination{ margin-top: 64px; display: flex; gap: 8px; flex-wrap: wrap; }

.mem-page__content, .mem-single__content{
  font-size: 17px; line-height: 1.7; color: var(--mem-fg);
}
.mem-page__content h2, .mem-single__content h2,
.mem-page__content h3, .mem-single__content h3{
  font-family: var(--mem-font-display);
  text-transform: uppercase; line-height: 1; margin: 48px 0 16px;
  letter-spacing: -.01em;
}
.mem-page__content h2, .mem-single__content h2{ font-size: 40px; }
.mem-page__content h3, .mem-single__content h3{ font-size: 28px; color: var(--mem-red); }
.mem-page__content a, .mem-single__content a{ color: var(--mem-red); text-decoration: underline; }
.mem-page__content blockquote, .mem-single__content blockquote{
  border-left: 4px solid var(--mem-red);
  padding-left: 24px; margin: 32px 0;
  font-size: 20px; font-style: italic; color: var(--mem-fg-soft);
}

/* ---------- WP ADMIN BAR ---------- */
body.admin-bar .mem-topbar{ top: 32px; }
body.admin-bar .mem-nav{ top: 68px; }
@media (max-width: 782px){
  body.admin-bar .mem-topbar{ top: 46px; }
  body.admin-bar .mem-nav{ top: 82px; }
}

/* ---------- DARK MODE TWEAKS ---------- */
html.mem-dark .mem-services,
body.mem-dark .mem-services{ background: var(--mem-bg-soft); }
html.mem-dark .mem-form-wrap,
body.mem-dark .mem-form-wrap{ background: var(--mem-bg-soft); }
html.mem-dark .mem-form-wrap--alt,
body.mem-dark .mem-form-wrap--alt{ background: var(--mem-bg); }
html.mem-dark .mem-service-card--white,
body.mem-dark .mem-service-card--white{ background: var(--mem-card); color: var(--mem-fg); border-color: var(--mem-line-soft); }
html.mem-dark .mem-tile--white,
body.mem-dark .mem-tile--white{ background: var(--mem-card); color: var(--mem-fg); border-color: var(--mem-line-soft); }