/*
 Theme Name:   GeneratePress Child (todobuceo)
 Theme URI:    https://www.todobuceo.es
 Description:  Child theme de GeneratePress para todobuceo.es
 Author:       PixelClip
 Template:     generatepress
 Version:      2.0.0
*/

/* ── Google Fonts ────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@700&family=Inter:ital,wght@0,400;0,500;0,600;1,400&display=swap');

/* ── Design tokens (wireframe palette exacta) ───────────────────────────── */
:root {
  --paper:      #eef7fb;   /* luz del agua */
  --paper-2:    #dbeef7;   /* agua ligeramente más profunda */
  --ink:        #0b2535;   /* azul marino oscuro — texto principal */
  --ink-2:      #1d4d65;   /* azul marino medio */
  --ink-3:      #4a7a90;   /* azul marino atenuado */
  --accent:     #0a6489;   /* teal/cyan oscuro — 6.2:1 sobre --paper */
  --accent-bg:  #cce8f4;   /* callout fondo claro */
  --accent-ink: #064f6e;   /* texto sobre --accent-bg */
  --travel:     #0f8a7e;   /* verde teal para destinos */
  --line:       #0b2535;   /* bordes */
  --radius:     6px;
}

/* ── Base ────────────────────────────────────────────────────────────────── */
body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image:
    linear-gradient(to right, rgba(10,100,137,.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(10,100,137,.06) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 0;
}
.site-container { position: relative; z-index: 1; }
a { color: var(--accent); }
a:hover { color: var(--accent-ink); }

/* ── Header ──────────────────────────────────────────────────────────────── */
.site-header {
  background: var(--paper) !important;
  border-bottom: 1.5px solid var(--line) !important;
  padding: 0 !important;
}
.inside-header {
  padding: 10px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1140px;
  margin: 0 auto;
}

/* ── Brand / Logo ────────────────────────────────────────────────────────── */
.site-title { margin: 0; font-size: 1rem; line-height: 1; }
.site-title a,
.site-title a:visited {
  font-family: 'Caveat', cursive;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ink) !important;
  text-decoration: none;
  letter-spacing: -0.5px;
  line-height: 1;
}
.site-title a:hover { color: var(--accent) !important; }
.site-title .accent-es { color: var(--accent); }
.site-description { font-size: 0.75rem; color: var(--ink-3); margin: 0; }

/* ── Navegación principal ────────────────────────────────────────────────── */
.main-navigation { background: transparent !important; }
.main-navigation ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0; }
.main-navigation ul li a {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-2) !important;
  text-decoration: none;
  padding: 8px 14px;
  display: block;
  transition: color .15s;
  position: relative;
}
.main-navigation ul li a:hover { color: var(--ink) !important; }
.main-navigation ul li.current-menu-item > a,
.main-navigation ul li.current-menu-ancestor > a {
  color: var(--ink) !important;
  font-weight: 600;
}
.main-navigation ul li.current-menu-item > a::after,
.main-navigation ul li.current-menu-ancestor > a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 14px; right: 14px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}
.main-navigation .sub-menu {
  flex-direction: column !important;
  background: var(--paper) !important;
  border: 1.5px solid var(--line) !important;
  border-radius: var(--radius);
  box-shadow: 2px 4px 12px rgba(0,0,0,.08);
  padding: 6px 0;
  min-width: 200px;
}
.main-navigation .sub-menu li a {
  font-size: 0.825rem;
  padding: 7px 16px !important;
}
.main-navigation .sub-menu li a:hover {
  background: var(--accent-bg) !important;
  color: var(--accent-ink) !important;
}

/* ── Breadcrumbs ─────────────────────────────────────────────────────────── */
.rank-math-breadcrumb, .breadcrumb-area {
  font-size: 0.8rem;
  color: var(--ink-3);
  padding: 8px 22px;
  font-family: 'Inter', sans-serif;
  border-bottom: 1px dashed rgba(0,0,0,.12);
  background: var(--paper);
}
.rank-math-breadcrumb a { color: var(--ink-3); text-decoration: none; }
.rank-math-breadcrumb a:hover { color: var(--accent); }
.rank-math-breadcrumb p { margin: 0; }

/* ── Content layout ──────────────────────────────────────────────────────── */
.site-main { max-width: 1140px; margin: 0 auto; }

/* ── Post / Article single ───────────────────────────────────────────────── */
.single .entry-title, h1.entry-title {
  font-family: 'Caveat', cursive;
  font-size: 2.6rem;
  line-height: 1.05;
  color: var(--ink);
  margin-bottom: 12px;
  letter-spacing: .3px;
}
.entry-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 0.8rem;
  color: var(--ink-2);
  flex-wrap: wrap;
}
.entry-content {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink-2);
  max-width: 720px;
}
.entry-content h2 {
  font-family: 'Caveat', cursive;
  font-size: 1.75rem;
  color: var(--ink);
  margin-top: 2em;
  margin-bottom: .5em;
  line-height: 1.1;
}
.entry-content h3 {
  font-family: 'Caveat', cursive;
  font-size: 1.35rem;
  color: var(--ink);
  margin-top: 1.5em;
  margin-bottom: .4em;
}
.entry-content p { margin-bottom: 1.1em; }
.entry-content ul, .entry-content ol { margin-left: 1.2em; margin-bottom: 1.1em; }
.entry-content li { margin-bottom: .35em; }
.entry-content strong { color: var(--ink); }
.entry-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.entry-content img {
  border-radius: var(--radius);
  border: 1.5px solid rgba(0,0,0,.1);
  display: block; max-width: 100%; margin: 1.5em auto;
}
.post-thumbnail { overflow: hidden; }
.post-thumbnail img {
  border-radius: var(--radius);
  border: 1.5px solid rgba(0,0,0,.1);
  margin-bottom: 24px; display: block; max-width: 100%;
}

/* ── Componentes tb-* ────────────────────────────────────────────────────── */
.tb-tldr {
  background: var(--accent-bg);
  border-left: 4px solid var(--accent);
  padding: 14px 18px;
  margin: 24px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.95rem;
  line-height: 1.55;
}
.tb-tldr strong:first-child {
  color: var(--accent-ink);
  font-size: 0.78rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}
.tb-useful {
  background: var(--paper-2);
  border: 1.5px solid rgba(0,0,0,.12);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 28px 0;
  font-size: 0.9rem;
}
.tb-useful strong:first-child {
  display: block; margin-bottom: 6px;
  color: var(--accent-ink);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.tb-useful ul { margin: 0; padding-left: 18px; }
.tb-useful li { margin-bottom: 4px; }
.tb-useful a { color: var(--accent); }
.tb-faq {
  background: var(--paper-2);
  border: 1.5px solid rgba(0,0,0,.12);
  border-radius: 8px;
  padding: 20px 22px;
  margin: 32px 0;
}
.tb-faq h2 {
  font-family: 'Caveat', cursive !important;
  font-size: 1.5rem !important;
  margin-top: 0 !important; margin-bottom: 16px !important;
  color: var(--ink);
}
.tb-faq details {
  border-bottom: 1px dashed rgba(0,0,0,.15);
  padding: 10px 0;
}
.tb-faq details:last-child { border-bottom: none; }
.tb-faq summary {
  cursor: pointer; font-weight: 600; font-size: 0.93rem; color: var(--ink);
  list-style: none; display: flex; justify-content: space-between; align-items: center; padding-right: 8px;
}
.tb-faq summary::-webkit-details-marker { display: none; }
.tb-faq summary::after { content: "+"; color: var(--accent); font-size: 1.2em; font-weight: 700; flex-shrink: 0; }
.tb-faq details[open] summary::after { content: "\2212"; }
.tb-faq details p { margin: 8px 0 4px; color: var(--ink-2); line-height: 1.6; font-size: 0.9rem; }

/* ── Category chips ──────────────────────────────────────────────────────── */
.post-categories a, .entry-meta .cat-links a {
  display: inline-flex; align-items: center;
  padding: 3px 9px;
  border: 1.25px solid var(--accent);
  border-radius: 20px;
  font-size: 0.72rem; font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent-bg);
  text-decoration: none;
  letter-spacing: .3px;
  transition: background .15s;
}
.post-categories a:hover, .entry-meta .cat-links a:hover {
  background: var(--accent); color: #fff;
}

/* ── Archive cards ───────────────────────────────────────────────────────── */
article.type-post .inside-article {
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .15s, transform .1s;
  background: var(--paper);
}
article.type-post .inside-article:hover {
  box-shadow: 3px 4px 0 var(--ink);
  transform: translate(-1px, -2px);
}
article.type-post .entry-title {
  font-family: 'Caveat', cursive;
  font-size: 1.3rem;
}
article.type-post .entry-title a { color: var(--ink); text-decoration: none; }
article.type-post .entry-title a:hover { color: var(--accent); }
article.type-post .entry-summary { font-size: 0.87rem; color: var(--ink-2); }

/* ── Archive / taxonomy header ───────────────────────────────────────────── */
.archive-title h1, .page-header h1 {
  font-family: 'Caveat', cursive;
  font-size: 2.2rem; color: var(--ink); margin-bottom: 8px;
}
.term-description p { color: var(--ink-2); font-size: 0.95rem; max-width: 640px; }

/* ── Sidebar widgets ─────────────────────────────────────────────────────── */
.sidebar .widget {
  border: 1.5px solid rgba(0,0,0,.12);
  border-radius: var(--radius);
  padding: 16px; margin-bottom: 20px;
  background: var(--paper);
}
.sidebar .widget-title, .sidebar .widgettitle {
  font-family: 'Caveat', cursive;
  font-size: 1.1rem; color: var(--accent);
  border-bottom: 2px solid var(--accent-bg);
  padding-bottom: 6px; margin-bottom: 12px;
}
.sidebar ul { padding-left: 0; list-style: none; margin: 0; }
.sidebar ul li { border-bottom: 1px dashed rgba(0,0,0,.1); padding: 6px 0; font-size: 0.875rem; }
.sidebar ul li:last-child { border-bottom: none; }
.sidebar ul li a { color: var(--ink-2); text-decoration: none; }
.sidebar ul li a:hover { color: var(--accent); }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--ink) !important;
  color: rgba(255,255,255,.75) !important;
  padding: 28px 22px !important;
  margin-top: 48px;
  border-top: 1.5px solid var(--line);
}
.site-footer a { color: var(--accent-bg) !important; text-decoration: none; }
.site-footer a:hover { color: #fff !important; }
.footer-brand {
  font-family: 'Caveat', cursive;
  font-size: 1.2rem; font-weight: 700; color: #fff; margin-bottom: 6px;
}
.footer-brand .accent-es { color: var(--accent-bg); }
.copyright { color: rgba(255,255,255,.5); font-size: 0.78rem; }

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  body { font-size: 16px; }
  .single .entry-title, h1.entry-title { font-size: 2rem; }
  .entry-content h2 { font-size: 1.5rem; }
  .inside-header { flex-wrap: wrap; gap: 8px; }
}
@media (max-width: 480px) {
  .single .entry-title, h1.entry-title { font-size: 1.75rem; }
}

/* Brand/header stabilization */
.site-header {
  background: var(--paper) !important;
  border-bottom: 1.5px solid var(--line) !important;
  padding: 0 !important;
}
.inside-header {
  min-height: 82px;
}
.site-branding-container,
.site-logo {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}
.wp-custom-logo .site-branding-container .site-branding {
  display: none;
}
.site-logo a {
  display: inline-flex;
  align-items: center;
}
.site-logo img.header-image,
.site-logo img.custom-logo {
  width: 205px !important;
  max-width: 205px !important;
  height: auto !important;
  max-height: 82px !important;
  object-fit: contain;
  display: block;
}
#site-navigation {
  margin-left: auto;
}
.main-navigation ul li a {
  white-space: nowrap;
}

/* TodoBuceo footer */
.tb-footer {
  background: #071f2d;
  color: rgba(255,255,255,.78);
  margin-top: 56px;
  border-top: 1px solid rgba(255,255,255,.12);
}
.tb-footer__inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 38px 22px 22px;
}
.tb-footer__top {
  display: grid;
  grid-template-columns: minmax(240px, 1.2fr) minmax(0, 2fr);
  gap: 34px;
  align-items: start;
}
.tb-footer__brand img {
  width: 178px;
  height: auto;
  filter: brightness(0) invert(1);
}
.tb-footer__brand-title {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.35rem;
  line-height: 1.05;
  font-weight: 800;
  color: #fff;
  margin: 0 0 8px;
}
.tb-footer__brand-title span {
  display: block;
  color: #7fd4e3;
  font-size: 1.75rem;
}
.tb-footer__tagline {
  margin: 12px 0 18px;
  max-width: 310px;
  color: rgba(255,255,255,.74);
  font-size: .93rem;
  line-height: 1.55;
}
.tb-footer__search {
  display: flex;
  max-width: 330px;
}
.tb-footer__search input[type="search"] {
  min-width: 0;
  flex: 1;
  border: 1px solid rgba(255,255,255,.22);
  border-right: 0;
  border-radius: 6px 0 0 6px;
  background: rgba(255,255,255,.08);
  color: #fff;
  padding: 9px 10px;
}
.tb-footer__search input[type="search"]::placeholder {
  color: rgba(255,255,255,.52);
}
.tb-footer__search button {
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 0 6px 6px 0;
  background: #0a6489;
  color: #fff;
  padding: 9px 13px;
  cursor: pointer;
}
.tb-footer__cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}
.tb-footer__col h2 {
  color: #fff;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .86rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 0 0 12px;
}
.tb-footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tb-footer__col li {
  margin: 0 0 8px;
}
.tb-footer__col a {
  color: rgba(255,255,255,.72) !important;
  text-decoration: none;
  font-size: .9rem;
}
.tb-footer__col a:hover {
  color: #fff !important;
}
.tb-footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.55);
  font-size: .78rem;
}

@media (max-width: 900px) {
  .tb-footer__top,
  .tb-footer__cols {
    grid-template-columns: 1fr 1fr;
  }
  .tb-footer__brand {
    grid-column: 1 / -1;
  }
}
@media (max-width: 768px) {
  .inside-header {
    min-height: 72px;
    justify-content: space-between;
    flex-wrap: wrap;
    position: relative;
    padding-right: 92px;
  }
  .site-branding-container {
    max-width: calc(100% - 74px);
    min-width: 0;
  }
  .site-logo img.header-image,
  .site-logo img.custom-logo {
    width: 168px !important;
    max-width: 168px !important;
    max-height: 68px !important;
  }
  #mobile-menu-control-wrapper {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
  }
  #mobile-menu-control-wrapper .menu-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 42px;
    padding: 8px 12px;
    border: 1.5px solid var(--line);
    border-radius: 6px;
    background: var(--paper-2) !important;
    color: var(--ink) !important;
    line-height: 1;
  }
  #site-navigation {
    margin-left: 0;
    flex-basis: 100%;
    width: 100%;
  }
}
@media (max-width: 560px) {
  .tb-footer__top,
  .tb-footer__cols {
    grid-template-columns: 1fr;
  }
  .tb-footer__bottom {
    display: block;
  }
}

/* Editorial rankings */
.tb-ranking-intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .9fr);
  gap: 16px;
  margin: 28px 0;
}
.tb-ranking-intro-grid > div,
.tb-ranking-note,
.tb-product-card {
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}
.tb-ranking-intro-grid > div {
  padding: 18px;
}
.tb-ranking-intro-grid h2 {
  margin-top: 0;
}
.tb-ranking-note {
  padding: 16px 18px;
  margin: 24px 0;
  background: var(--accent-bg);
  color: var(--accent-ink);
  font-size: .94rem;
  line-height: 1.6;
}
.tb-ranking-table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0 30px;
  font-size: .92rem;
}
.tb-ranking-table th,
.tb-ranking-table td {
  border: 1.25px solid rgba(11,37,53,.22);
  padding: 10px 12px;
  vertical-align: top;
}
.tb-ranking-table th {
  background: var(--paper-2);
  color: var(--ink);
  text-align: left;
}
.tb-product-picks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0 32px;
}
.tb-product-card {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tb-product-card h3 {
  margin: 0;
  color: var(--ink);
}
.tb-product-card p,
.tb-product-card ul {
  margin-top: 0;
}
.tb-product-card__badge {
  align-self: flex-start;
  border: 1.25px solid var(--accent);
  border-radius: 20px;
  color: var(--accent-ink);
  background: var(--accent-bg);
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 9px;
}
.tb-product-card__score {
  color: var(--accent-ink);
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 0;
}
.tb-product-card a {
  margin-top: auto;
  font-weight: 700;
}
@media (max-width: 760px) {
  .tb-ranking-intro-grid,
  .tb-product-picks {
    grid-template-columns: 1fr;
  }
  .tb-ranking-table {
    display: block;
    overflow-x: auto;
  }
}


/* ── Hub /aprende/ ──────────────────────────────────────────────────────── */
.tb-aprende-hero {
  background: var(--ink);
  padding: 3.5rem 1.5rem;
  text-align: center;
}
.tb-aprende-hero__inner {
  max-width: 680px;
  margin: 0 auto;
}
.tb-aprende-hero__title {
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin: 0 0 .75rem;
  line-height: 1.15;
}
.tb-aprende-hero__sub {
  color: rgba(255,255,255,.78);
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 0;
}
.tb-aprende-grid-section {
  padding: 3rem 1.25rem;
  max-width: 1180px;
  margin: 0 auto;
}
.tb-aprende-section-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
@media (max-width: 960px) {
  .tb-aprende-section-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 580px) {
  .tb-aprende-section-grid { grid-template-columns: 1fr; }
}
.tb-aprende-card {
  border: 1.5px solid var(--paper-2);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: 0 1px 4px rgba(11,37,53,.06);
  transition: box-shadow .2s, transform .2s;
}
.tb-aprende-card:hover {
  box-shadow: 0 6px 22px rgba(10,100,137,.14);
  transform: translateY(-3px);
}
.tb-aprende-card__header {
  display: flex;
  align-items: flex-end;
  gap: .75rem;
  padding: 1rem 1.1rem;
  min-height: 135px;
  background-color: var(--accent);
  background-size: cover;
  background-position: center;
  text-decoration: none;
  color: #fff;
  position: relative;
}
.tb-aprende-card__header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.68) 0%, rgba(0,0,0,.22) 55%, transparent 100%);
  pointer-events: none;
}
.tb-aprende-card__header > * { position: relative; z-index: 1; }
.tb-aprende-card__header:hover { opacity: .93; color: #fff; }
.tb-aprende-card__icon {
  font-size: 1.9rem;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.4));
}
.tb-aprende-card__name {
  font-size: .97rem;
  font-weight: 700;
  margin: 0 0 .12rem;
  color: #fff;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
}
.tb-aprende-card__count {
  font-size: .73rem;
  opacity: .88;
  display: block;
  text-shadow: 0 1px 2px rgba(0,0,0,.4);
}
.tb-aprende-card__desc {
  padding: .85rem 1.1rem .45rem;
  font-size: .83rem;
  color: var(--ink-2);
  line-height: 1.55;
  margin: 0;
}
.tb-aprende-card__posts {
  list-style: none;
  margin: 0;
  padding: .15rem 1.1rem .65rem;
  flex: 1;
}
.tb-aprende-card__posts li {
  border-top: 1px solid var(--paper-2);
  padding: .3rem 0;
}
.tb-aprende-card__posts li:first-child { border-top: none; }
.tb-aprende-card__posts a {
  font-size: .79rem;
  color: var(--ink-3);
  text-decoration: none;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .12s;
}
.tb-aprende-card__posts a:hover { color: var(--accent); }
.tb-aprende-card__cta {
  display: block;
  text-align: center;
  padding: .6rem;
  background: var(--paper);
  font-size: .79rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border-top: 1px solid var(--paper-2);
  letter-spacing: .02em;
  transition: background .15s, color .15s;
}
.tb-aprende-card__cta:hover { background: var(--accent); color: #fff; }
