/* martiemsmithresilience.com — estilos base (reconstrucción de TheGem + Elementor) */
:root {
  --dark: #17202C;
  --accent: #7792A1;
  --orange: #FF9D53;
  --orange-2: #FFB27E;
  --lime: #EDF86E;
  --menu: #3c3950;
  --border: #EBF0F2;
  --bg-soft: #F0F3F5;
  --font: 'Parkinsans', 'Helvetica Neue', Arial, sans-serif;
  --header-h: 96px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 25px;
  font-weight: 400; color: var(--dark); background: #fff;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; vertical-align: middle; border: 0; }
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--orange); }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font); color: var(--dark); margin: 0 0 .5em; }
h1, .title-h1 { font-size: 50px; line-height: 60px; font-weight: 300; }
h2, .title-h2 { font-size: 35px; line-height: 50px; font-weight: 400; }
h3, .title-h3 { font-size: 30px; line-height: 40px; font-weight: 400; }
h4, .title-h4 { font-size: 25px; line-height: 35px; font-weight: 400; }
h5, .title-h5 { font-size: 20px; line-height: 30px; font-weight: 400; }
h6, .title-h6 { font-size: 16px; line-height: 25px; font-weight: 400; }
.title-xlarge { font-size: 70px; line-height: 80px; font-weight: 300; }
.styled-subtitle, .title-styled-subtitle { font-size: 20px; line-height: 30px; }
.text-body { font-size: 16px; line-height: 25px; }
.text-body-tiny, .title-text-body-tiny { font-size: 14px; line-height: 23px; }
.title-main-menu { font-size: 20px; line-height: 30px; }
.thegem-heading { margin: 0; }
.thegem-heading.text-body, .thegem-heading.text-body-tiny { font-weight: 400; }
@media (max-width: 1024px) {
  h1, .title-h1 { font-size: 38px; line-height: 48px; }
  h2, .title-h2 { font-size: 32px; line-height: 44px; }
  h3, .title-h3 { font-size: 26px; line-height: 36px; }
  h4, .title-h4 { font-size: 24px; line-height: 34px; }
  .title-xlarge { font-size: 50px; line-height: 60px; }
}
@media (max-width: 767px) {
  h1, .title-h1 { font-size: 36px; line-height: 44px; }
  h2, .title-h2 { font-size: 30px; line-height: 40px; }
  h3, .title-h3 { font-size: 26px; line-height: 36px; }
  h5, .title-h5 { font-size: 18px; line-height: 28px; }
  .title-xlarge { font-size: 40px; line-height: 50px; }
  .styled-subtitle { font-size: 18px; line-height: 28px; }
}

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 1000; background: rgba(255,255,255,.95);
  backdrop-filter: blur(6px); transition: transform .3s, box-shadow .3s;
}
.site-header.scrolled { box-shadow: 0 2px 20px rgba(23,32,44,.08); }
.site-header.hidden { transform: translateY(-100%); }
.header-inner {
  max-width: 1376px; margin: 0 auto; padding: 0 16px; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 30px;
}
.logo img { display: block; height: auto; }
.main-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; align-items: center; }
.main-nav li { position: relative; }
.main-nav > ul > li > a {
  display: block; padding: 10px 18px; font-size: 20px; line-height: 30px; color: var(--menu);
}
.main-nav li.active > a, .main-nav li > a:hover { color: var(--orange); }
.sub-toggle { display: none; }
.sub-menu {
  list-style: none; margin: 0; padding: 12px 0; position: absolute; top: 100%; left: 0; min-width: 230px;
  background: #fff; border-radius: 16px; box-shadow: 0 10px 40px rgba(23,32,44,.12);
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: all .2s;
}
.has-sub:hover > .sub-menu, .has-sub:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.sub-menu a { display: block; padding: 8px 24px; color: var(--menu); font-size: 16px; }
.sub-menu a:hover, .sub-menu .active a { color: var(--orange); }
.menu-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.menu-toggle span { display: block; width: 26px; height: 2px; background: var(--dark); margin: 6px 0; transition: .3s; }
@media (max-width: 1024px) {
  :root { --header-h: 76px; }
  .menu-toggle { display: block; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 0 0; background: #fff; overflow-y: auto;
    transform: translateX(100%); transition: transform .3s; padding: 20px 16px 40px;
  }
  body.nav-open .main-nav { transform: none; }
  body.nav-open { overflow: hidden; }
  body.nav-open .menu-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  body.nav-open .menu-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .menu-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav > ul > li { border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; }
  .main-nav > ul > li > a { flex: 1; padding: 14px 4px; }
  .sub-toggle { display: block; background: none; border: 0; padding: 0 14px; cursor: pointer; color: var(--menu); }
  .sub-menu { position: static; box-shadow: none; opacity: 1; visibility: visible; transform: none;
              display: none; width: 100%; padding: 0 0 10px 12px; border-radius: 0; }
  .has-sub.open > .sub-menu { display: block; }
}

/* ---------------------------------------------------------------- contenedores Elementor */
.e-con {
  display: flex; flex-direction: column; position: relative; width: 100%;
  flex: 0 1 auto; min-width: 0;
}
.e-con-inner {
  display: flex; flex-direction: column; width: 100%; max-width: 1344px; margin: 0 auto; flex-grow: 1;
}
.e-con > .e-w, .e-con-inner > .e-w { max-width: 100%; position: relative; }
.e-w img { max-width: 100%; }
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
[data-anim] { opacity: 0; transition: opacity .9s ease, transform .9s ease; }
[data-anim="words-slide-right"], [data-anim="slide-right"] { transform: translateX(-30px); }
[data-anim="words-slide-up"], [data-anim="slide-up"], [data-anim="lines-slide-up"] { transform: translateY(30px); }
[data-anim].in { opacity: 1; transform: none; }
@media (min-width: 1367px) { .hide-desktop { display: none !important; } }
@media (min-width: 1025px) and (max-width: 1366px) { .hide-laptop { display: none !important; } }
@media (min-width: 768px) and (max-width: 1024px) { .hide-tablet { display: none !important; } }
@media (max-width: 767px) { .hide-mobile, .hidden-mobile { display: none !important; } }
@media (prefers-reduced-motion: reduce) {
  .reveal, [data-anim] { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------------------------------------------------------------- botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-size: 16px; line-height: 1; font-weight: 500;
  padding: 16px 32px; border-radius: 30px; border: 0; cursor: pointer;
  background: var(--dark); color: #fff; transition: background .25s, color .25s, transform .2s;
}
.btn:hover { background: var(--lime); color: var(--dark); }
.btn-small { padding: 11px 22px; font-size: 14px; }
.btn-large { padding: 20px 42px; font-size: 18px; }
.btn-outline { background: transparent; color: var(--dark); box-shadow: inset 0 0 0 2px var(--dark); }
.btn-outline:hover { background: var(--dark); color: #fff; }

/* ---------------------------------------------------------------- widgets */
.e-text ul, .e-text ol { padding-left: 1.3em; margin: 0 0 1em; }
.icon-list { list-style: none; margin: 0; padding: 0; }
.icon-list li a, .icon-list li { display: flex; align-items: center; gap: 10px; }
.il-ic { display: inline-flex; color: var(--accent); }
.socials { display: flex; flex-wrap: wrap; gap: 10px; }
.w-social-icons[style*="center"] .socials { justify-content: center; }
.soc {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: 50%; background: var(--dark); color: #fff; font-size: 16px; transition: transform .2s, background .2s;
}
.soc:hover { background: var(--orange); color: var(--dark); transform: translateY(-2px); }
.image-box .ib-img { margin-bottom: 18px; }
.image-box .ib-title { margin-bottom: 10px; }

/* carrusel */
.carousel { position: relative; --show: 4; --gap: 20px; }
.car-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - (var(--show) - 1) * var(--gap)) / var(--show));
  gap: var(--gap); align-items: center; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
}
.car-track::-webkit-scrollbar { display: none; }
.car-item { scroll-snap-align: start; }
.car-item img { width: 100%; height: auto; display: block; border-radius: 10px; }
.car-prev, .car-next {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 44px; height: 44px;
  border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: var(--dark); font-size: 28px;
  line-height: 1; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.12);
}
.car-prev { left: 10px; } .car-next { right: 10px; }
@media (max-width: 767px) { .carousel { --show: 1 !important; } }
@media (min-width: 768px) and (max-width: 1024px) { .carousel { --show: 2 !important; } }

/* acordeón */
.accordion { display: flex; flex-direction: column; gap: 14px; }
.acc-item { border-radius: 20px; background: var(--bg-soft); overflow: hidden; }
.acc-item summary {
  list-style: none; cursor: pointer; padding: 20px 60px 20px 28px; font-size: 20px; line-height: 30px;
  position: relative; color: var(--dark);
}
.acc-item summary::-webkit-details-marker { display: none; }
.acc-item summary::after {
  content: '+'; position: absolute; right: 26px; top: 50%; transform: translateY(-50%);
  font-size: 26px; transition: transform .2s;
}
.acc-item[open] summary::after { content: '–'; }
.acc-body { padding: 0 28px 24px; }

/* pestañas */
.tab-heads { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 40px; }
.tab-btn {
  font-family: var(--font); font-size: 18px; padding: 12px 30px; border-radius: 30px; border: 2px solid var(--dark);
  background: transparent; color: var(--dark); cursor: pointer; transition: all .2s;
}
.tab-btn.active, .tab-btn:hover { background: var(--dark); color: #fff; }
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fade .4s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* CTA libros */
.cta { display: flex; align-items: stretch; flex-direction: column; height: 100%; background: #fff; border-radius: 20px; padding: 30px; }
.cta-graphic { margin-bottom: 20px; text-align: center; }
.cta-graphic img { border-radius: 12px; }
.cta-body { display: flex; flex-direction: column; flex: 1; }
.cta-title { font-size: 25px; line-height: 35px; margin-bottom: 12px; }
.cta-text { margin-bottom: 20px; flex: 1; }
.cta-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.cta .b1 { background: var(--orange); color: var(--dark); border-radius: 50px; }
.cta .b1:hover { background: #000; color: #fff; }

/* menú del footer */
.custom-menu .cm-heading { font-size: 20px; line-height: 30px; margin-bottom: 14px; font-weight: 500; }
.custom-menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.custom-menu a { color: inherit; }
.custom-menu a:hover { color: var(--orange); }

/* buscador */
.searchbar { display: flex; max-width: 520px; background: var(--bg-soft); border-radius: 25px; overflow: hidden; }
.searchbar input { flex: 1; border: 0; background: transparent; padding: 14px 22px; font: inherit; color: var(--dark); outline: 0; }
.searchbar button { border: 0; background: transparent; padding: 0 20px; cursor: pointer; color: var(--dark); font-size: 16px; }
.search-page { max-width: 1344px; margin: 0 auto; padding: 60px 16px 100px; }
.search-page .searchbar { margin-bottom: 30px; }

/* ---------------------------------------------------------------- formularios */
.ajax-form { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.ajax-form input[type=text], .ajax-form input[type=email], .ajax-form textarea {
  width: 100%; font: inherit; color: var(--dark); background: #fff; border: 1px solid #dfe5e8;
  border-radius: 25px; padding: 14px 22px; outline: 0; transition: border-color .2s;
}
.ajax-form textarea { border-radius: 20px; resize: vertical; min-height: 140px; }
.ajax-form input:focus, .ajax-form textarea:focus { border-color: var(--accent); }
.f-row.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.f-inline { display: flex; gap: 8px; }
.f-inline input { flex: 1; }
.f-check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.ajax-form .btn { align-self: flex-start; background: var(--orange); color: var(--dark); }
.ajax-form .btn:hover { background: #000; color: #fff; }
.ajax-form .btn[disabled] { opacity: .6; cursor: wait; }
.f-msg { font-size: 14px; min-height: 1em; }
.f-msg.ok { color: #2e7d32; } .f-msg.err { color: #c62828; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.preset-white input[type=text], .preset-white input[type=email], .preset-white textarea { background: #fff; border-color: #fff; }
.preset-dark input[type=text], .preset-dark input[type=email] { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); color: #fff; }
@media (max-width: 767px) { .f-row.three { grid-template-columns: 1fr; } .f-inline { flex-direction: column; } }

/* ---------------------------------------------------------------- blog */
.w-thegem-blog-grid { width: 100%; max-width: 1344px; margin-left: auto; margin-right: auto; }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.blog-card { background: #fff; border-radius: 20px; overflow: hidden; display: flex; flex-direction: column;
             box-shadow: 0 6px 30px rgba(23,32,44,.06); transition: transform .3s, box-shadow .3s; }
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 14px 40px rgba(23,32,44,.1); }
.blog-card.is-hidden { display: none; }
.bc-img { display: block; overflow: hidden; border-radius: 30px; margin: 10px 10px 0; position: relative; }
.bc-img img { width: 100%; aspect-ratio: 16/11; object-fit: cover; transition: transform .5s; }
.bc-img::after { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.31); opacity: 0; transition: opacity .3s; }
.blog-card:hover .bc-img img { transform: scale(1.05); }
.blog-card:hover .bc-img::after { opacity: 1; }
.bc-body { padding: 22px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.bc-date { font-size: 14px; color: var(--accent); margin-bottom: 8px; }
.bc-title { font-size: 20px; line-height: 30px; margin-bottom: 10px; }
.bc-title a { color: var(--dark); }
.bc-title a:hover { color: var(--orange); }
.bc-excerpt { font-size: 15px; line-height: 24px; color: #4a5562; flex: 1; }
.bc-more { margin-top: 14px; font-weight: 500; color: var(--dark); }
.bc-more:hover { color: var(--orange); }
.bg-loadmore { text-align: center; margin-top: 40px; }
@media (max-width: 1024px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767px) { .blog-grid { grid-template-columns: 1fr; } }

/* post individual */
.post { max-width: 880px; margin: 0 auto; padding: 50px 16px 90px; }
.post-head { text-align: center; margin-bottom: 36px; }
.back-link { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; margin-bottom: 20px; }
.post-title { font-size: 46px; line-height: 56px; }
.post-meta { color: var(--accent); }
.post-featured { margin: 0 0 40px; }
.post-featured img { width: 100%; border-radius: 30px; }
.post-content { font-size: 17px; line-height: 28px; }
.post-content .e-con { padding-left: 0 !important; padding-right: 0 !important; }
.post-content h2, .post-content h3 { margin-top: 1.2em; }
.post-nav { display: flex; justify-content: space-between; gap: 20px; margin-top: 60px; padding-top: 30px; border-top: 1px solid var(--border); }
.post-nav a { max-width: 48%; color: var(--dark); font-weight: 500; }
.post-nav a span { display: block; font-size: 13px; color: var(--accent); font-weight: 400; }
.post-nav .next { text-align: right; margin-left: auto; }
@media (max-width: 767px) { .post-title { font-size: 32px; line-height: 40px; } }

/* testimonios */
.testimonials { position: relative; max-width: 900px; margin: 0 auto; padding: 0 70px; text-align: center; }
.t-track { position: relative; min-height: 260px; }
.t-item { margin: 0; position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .6s; }
.t-item.active { position: relative; opacity: 1; visibility: visible; }
.t-quote { font-size: 36px; color: var(--orange); margin-bottom: 18px; }
.t-item blockquote { margin: 0 0 24px; font-size: 20px; line-height: 32px; }
.t-item figcaption { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.t-item figcaption img { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; margin-bottom: 8px; }
.t-name { font-weight: 600; font-size: 18px; }
.t-pos { color: var(--accent); font-size: 14px; }
.t-prev, .t-next {
  position: absolute; top: 40%; width: 48px; height: 48px; border-radius: 50%; border: 1px solid #dfe5e8;
  background: #fff; cursor: pointer; color: var(--dark); transition: all .2s;
}
.t-prev:hover, .t-next:hover { background: var(--dark); color: #fff; }
.t-prev { left: 0; } .t-next { right: 0; }
@media (max-width: 767px) { .testimonials { padding: 0 0 70px; } .t-prev, .t-next { top: auto; bottom: 0; } .t-prev { left: calc(50% - 56px); } .t-next { right: calc(50% - 56px); } }

/* ---------------------------------------------------------------- footer */
.site-footer { margin-top: 0; }
.copyright { text-align: center; font-size: 14px; padding: 22px 16px; color: #5f727f; border-top: 1px solid var(--border); }
